gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
"""Let's Encrypt display."""
import os
import textwrap
import dialog
import zope.interface
from letsencrypt import interfaces
WIDTH = 72
HEIGHT = 20
# Display exit codes
OK = "ok"
"""Display exit code indicating user acceptance."""
CANCEL = "cancel"
"""Display exit code for a user canceling the display."""
HELP ... | |
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | |
from __future__ import absolute_import
from . import app
from alta.bims import Bims
from ..utils import get_conf, runJob
from celery import chain
from celery.utils.log import get_task_logger
logger = get_task_logger(__name__)
@app.task(name='presta.app.lims.sync_samples')
def sync_samples(samples, **kwargs):
b... | |
import pytest
from urlparse import urlparse
from rest_framework import exceptions
from api.base.settings.defaults import API_BASE
from osf.utils import permissions
from osf.models import Registration, NodeLog
from framework.auth import Auth
from api.registrations.serializers import RegistrationSerializer, Registration... | |
#!/usr/bin/env python
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | |
import logging
import json
import textwrap
from json.encoder import JSONEncoder
from logging import StreamHandler, Formatter, FileHandler
from ethereum.utils import bcolors, is_numeric
import sys
DEFAULT_LOGLEVEL = 'INFO'
JSON_FORMAT = '%(message)s'
PRINT_FORMAT = '%(levelname)s:%(name)s\t%(message)s'
FILE_PREFIX =... | |
#!/bin/env python
#
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "Li... | |
#!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
import... | |
import traceback
import pyquery
from scrapy.conf import settings
from scrapy.spiders import CrawlSpider, Rule
from scrapy.exceptions import DropItem
from scrapy.link import Link
from src.items import NewsItem
from src.utils.database.quarantine import get_quarantine_database
class NewsSpider(CrawlSpider):
"""... | |
#!/usr/bin/env python
import string
from kuralib import lngapp
class App:
def __init__(self):
self.tables = {}
def addDef(self, **args):
for (tableName, tableDef) in args.items():
#
# Store tableNama/table definition
#
tableDef.n... | |
#!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test objects... | |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | |
#
# (c) Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
out = frappe.response
from frappe.utils import cint
import frappe.defaults
def get_sql_tables(q):
if q.find('WHERE') != -1:
tl = q.split('FROM')[1].split('WHE... | |
# Copyright 2017-present Open Networking Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | |
#!/usr/bin/python3
from pyspark.mllib.linalg import DenseVector
from pyspark.sql import Row
from collections import namedtuple
import re, csv, os, shlex
import subprocess, shutil
# global vars
Point = namedtuple('Point', ['x', 'y'])
reg = r"[^a-zA-Z| 0-9 | \']"
reg_compiled = re.compile(reg)
gfs_output_path_hdfs = "gs... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from .estimator_base import H2OEstimator
class H2ODeepLearningEstimator(H2OEstimator):
"""Build a supervised Deep Neural Network model
Builds a feed-forward multilayer artificial neural network on an H2OFrame
Parameters
----------
model_id : str, optional
The unique id assigne... | |
#!/usr/bin/python
#
# Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Loops Custom Tabs tests and outputs the results into a CSV file."""
import collections
import contextlib
import logging
import optpar... | |
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | |
from __future__ import division, absolute_import, print_function
import sys
import numpy as np
from numpy.testing import *
import numpy.core.umath_tests as umt
import numpy.core.operand_flag_tests as opflag_tests
from numpy.compat import asbytes
from numpy.core.test_rational import *
class TestUfunc(TestCase):
d... | |
#!/usr/bin/python
#
# Perforce Defect Tracking Integration Project
# <http://www.ravenbrook.com/project/p4dti/>
#
# COVERAGE.PY -- COVERAGE TESTING
#
# Gareth Rees, Ravenbrook Limited, 2001-12-04
# Ned Batchelder, 2004-12-12
# http://ned... | |
import sys
import deen.logger
class DeenPlugin(object):
"""The core plugin class that should be subclassed
by every deen plugin. It provides some required
class attributes that ease the process of writing
new plugins."""
# In case an error happened, it should
# be stored in this variable.
... | |
# -*- coding: utf-8 -*-
#
# Copyright 2015-2020 BigML
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | |
# coding=utf-8
# Copyright 2022 The Uncertainty Baselines Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ap... | |
#!/usr/bin/env python
# Needed for antipackage with python 2
from __future__ import absolute_import
import datetime
import fnmatch
import glob
import io
import json
import os
import os.path
import random
import re
import socket
import string
import subprocess
import sys
import yaml
from collections import Counter, Or... | |
""" ietf_netconf_acm
NETCONF Access Control Model.
Copyright (c) 2012 IETF Trust and the persons identified as
authors of the code. All rights reserved.
Redistribution and use in source and binary forms, with or
without modification, is permitted pursuant to, and subject
to the license terms contained in, the Simp... | |
# coding=utf-8
# Licensed Materials - Property of IBM
# Copyright IBM Corp. 2016
import unittest
import sys
import itertools
from enum import IntEnum
import datetime
import decimal
import random
from streamsx.topology.schema import StreamSchema
from streamsx.topology.topology import *
from streamsx.topology.tester imp... | |
from read_spec import *
from read_spec import Inst
# Instrument parameters
inst = __name__[5:] # HARPS, HARPSpre, HARPSpost, HARPN
name = inst[:5] # HARPS, HARPN (passed to bary)
obsname = {'HARPS': 'eso', 'HARPN': 'lapalma'}[name] # for barycorrpy
iomax = {'HARPS': 72, 'HARPN': 69}[name]
oset = {'HARPS': '10... | |
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Helpers related to multiprocessing."""
import builtins
import itertools
import logging
import multiprocessing
import multiprocessing.dummy
import os
impor... | |
#!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for Interrogate."""
import socket
from grr.client import vfs
from grr.client.client_actions import admin
from grr.lib import action_mocks
from grr.lib import aff4
from grr.lib import artifact_test
from grr.lib import client_index
from grr.lib imp... | |
#!/usr/bin/env python2
import sys
import time
import argparse
import numpy
import matplotlib
matplotlib.use('Agg')
sys.path.append('/home/twesterh/Bachelor/project/plasmon-cpp/python-tipsi')
import tipsi
# Define some config parameters
# =============================
# lattice_constant = 0.24612E-9 # [m]
# ons... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015 SeukWon Kang (kasworld@gmail.com)
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0... | |
"""Prepare read inputs (fastq, gzipped fastq and BAM) for parallel NGS alignment.
"""
import collections
import copy
import os
import shutil
import subprocess
import toolz as tz
from bcbio import bam, utils
from bcbio.bam import cram
from bcbio.log import logger
from bcbio.distributed import objectstore
from bcbio.di... | |
# coding=utf-8
"""
The Collector class is a base class for all metric collectors.
"""
import os
import socket
import platform
import logging
import configobj
import time
import re
import subprocess
from diamond.metric import Metric
from diamond.utils.config import load_config
from error import DiamondException
# De... | |
#!/usr/bin/env python
# We want a way to generate non-colliding 'pyxl<num>' ids for elements, so we're
# using a non-cryptographically secure random number generator. We want it to be
# insecure because these aren't being used for anything cryptographic and it's
# much faster (2x). We're also not using NumPy (which is... | |
from __future__ import division
try:
from builtins import str
except ImportError:
pass
from flask.ext.login import login_required, current_user
from flask import Blueprint, current_app, render_template, request, redirect, \
url_for, flash, make_response
from flask_blogging.forms import BlogEditor
import mat... | |
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file... | |
"""
sentry.tagstore.legacy.backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2017 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
from collections import defaultdict
from datetime import timedelta
from dj... | |
'''
brozzler/ydl.py - youtube-dl / yt-dlp support for brozzler
Copyright (C) 2022 Internet Archive
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
U... | |
# $Id$
"""Internet Protocol, version 6."""
import dpkt
class IP6(dpkt.Packet):
__hdr__ = (
('v_fc_flow', 'I', 0x60000000L),
('plen', 'H', 0), # payload length (not including header)
('nxt', 'B', 0), # next header protocol
('hlim', 'B', 0), # hop limit
('src', '16s', ''),
... | |
# Copyright 2019 The Waymo Open Dataset Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | |
import os
import logging
import requests
import json
from programy.utils.license.keys import LicenseKeys
class NewsArticle(object):
def __init__(self):
self.title = None
self.description = None
self.published_at = None
self.author = None
self.url = None
self.url_to... | |
#!/usr/bin/env python3
__author__ = 'Petr Ankudinov'
from jinja2 import meta, FileSystemLoader
import jinja2.nodes
import os
import sys
import yaml
from modules.tools import merge_dict, build_dict
def build_dict_recursive(lst_or_tpl):
# Recursive function that builds a hierarchical dictionary from lists and sub... | |
"""Form implementation"""
from collections import OrderedDict
from webob.multidict import MultiDict
from pyramid.compat import string_types
from pyramid.decorator import reify
from pyramid.renderers import NullRendererHelper
from pyramid.interfaces import IResponse
from pyramid.httpexceptions import HTTPException, HTTP... | |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from grid.cell import Cell
from grid.vertex import Vertex
from grid.triangle import Triangle
import numpy
import matplotlib.pyplot as plt
class Mesh(object):
'''
Description: (Quad) Mesh object
Attributes:
bounding_box: [xmin, xmax, ymin, ymax]
children: Cell, list of cel... | |
"""Release data for pythonUtils.
The information of the version is in the version.py file.
"""
from __future__ import absolute_import
import os
import sys
import time
import datetime
basedir = os.path.abspath(os.path.split(__file__)[0])
## Quantify the version
MAJOR = 0
MINOR = 0
MICRO = 0
ISRELEASED = False
VERS... | |
"""
Models for environments.
"""
import itertools
from collections import defaultdict
from django.db import models
from ..mtmodel import MTModel
class Profile(MTModel):
"""
A set of Environments for a type of product.
For instance, a "browser testing" Profile might be a set of
environments releva... | |
# Copyright (c) <2016> <GUANGHAN NING>. All Rights Reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable ... | |
#!/usr/bin/env python
import os,sys,tempfile,string,math,re
_palettes = ('gray','rainbow','heat','iraf','aips','pgplot','a','bb','he','i8','ds','cyclic')
_colors = ('w','k','r','g','b','c','m','y','o','gy','gc','bc','bm','rm','dg','lg')
_fills = ('s','h','/','#')
_fonts = ('sf','rm','it','cu')
_lstyles = ('-','--... | |
"""Functions for creating or importing topologies for experiments.
To create a custom topology, create a function returning an instance of the
`IcnTopology` class. An IcnTopology is simply a subclass of a Topology class
provided by FNSS.
A valid ICN topology must have the following attributes:
* Each node must have ... | |
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
from random import choice
from django.db import connection
from django.db.models import get_model
from django.test import TestCase
from django.conf import settings
from django.contrib.auth.models import User, AnonymousUser, Group
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.mode... | |
#!/usr/bin/env python3
from runtime import EspNone, EspList, EspString, EspDict
import re
from multimethod import multimethod
def join(sep, v):
return sep.join(str(x) for x in v if x is not None)
COLOR = True
if COLOR:
num = '\033[38;5;202m%s\033[0m'
color = {
str: '\033[38;5;247;4m%r\033[0m',
EspString: '\03... | |
"""
The tdb module provides support for reading and writing databases in
Thermo-Calc TDB format.
"""
from pyparsing import CaselessKeyword, CharsNotIn, Group
from pyparsing import LineEnd, MatchFirst, OneOrMore, Optional, Regex, SkipTo
from pyparsing import ZeroOrMore, Suppress, White, Word, alphanums, alphas, nums
fr... | |
# Copyright 2021 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | |
# orm/interfaces.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""
Contains various base classes used throughout the ORM.
Defines some key bas... | |
import unittest
from lambda_tools import mapper
FAMOUS_FIVE = ['Dick', 'Julian', 'George', 'Anne', 'Timmy']
class StringFieldEntity:
hello = mapper.StringField()
class TestStringField(unittest.TestCase):
def test_simple_mapping(self):
result = mapper.parse(StringFieldEntity, { 'hello': 'world' })
... | |
# -*- coding: ascii -*-
#
# Copyright 2007 - 2021
# Andr\xe9 Malo or his licensors, as applicable
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | |
"""Describe TestBlock class."""
# pylint: disable=attribute-defined-outside-init,unused-argument
# pylint: disable=dangerous-default-value,access-member-before-definition
# pylint: disable=bare-except,protected-access,too-many-instance-attributes
# pylint: disable=too-many-arguments,too-many-locals,broad-except,no-self... | |
"""
Matplotlib implementation of the plotting engine.
"""
from __future__ import absolute_import, print_function, division
from .engine import PlottingEngine, PlottingFigure, PlottingLayout
import os
import matplotlib.pyplot as plt
from matplotlib import gridspec
from tempfile import mkstemp
# enable fixes for non-... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the importmulti RPC.
Test importmulti by generating keys on node0, importing the scriptPubKeys an... | |
"""Support to manage a shopping list."""
import asyncio
import logging
import uuid
import voluptuous as vol
from homeassistant.const import HTTP_NOT_FOUND, HTTP_BAD_REQUEST
from homeassistant.core import callback
from homeassistant.components import http
from homeassistant.components.http.data_validator import (
... | |
import os
import os.path as op
import pytest
import numpy as np
from numpy.testing import (assert_array_equal, assert_equal, assert_allclose,
assert_array_less, assert_almost_equal)
import itertools
import mne
from mne.datasets import testing
from mne.fixes import _get_img_fdata
from mne im... | |
"""
Reimplementations of constructs introduced in later versions of Python than
we support. Also some functions that are needed SymPy-wide and are located
here for easy import.
"""
from __future__ import print_function, division
import operator
from collections import defaultdict
from sympy.external import import_modu... | |
# Copyright 2020 kubeflow.org.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | |
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | |
# Copyright 2011 OpenStack LLC. # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
""" Galois Field GF(2^m) and polynomials over it. """
#-------------------------------------------------------------------------------
from math import log
import numpy as np
from itertools import zip_longest
from io import StringIO
import locale
#----------------------------------------------------------------------... | |
#! /usr/bin/env python
#-----------------------------------------------------------------------
# COPYRIGHT_BEGIN
# Copyright (C) 2016-2017, FixFlyer, LLC.
# All rights reserved.
# COPYRIGHT_END
#-----------------------------------------------------------------------
"""Logging support."""
import os
import time
impor... | |
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
from ..autocorr import integrated_time
__all__ = ["Backend"]
class Backend(object):
"""The default backend that stores the data in memory as numpy arrays.
The backend can be subscripted to access the data.
Attr... | |
"""Setup script for Bokeh."""
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved.
#
# Powered by the Bokeh Development Team.
#
# The full license is in the file LICENCE.txt, distributed with this software.
#---------... | |
'''
BookController module is a module that defines the BookController class. The BookController interfaces with
BookRepository and the UI, as we use a MVC structure in this program.
'''
from undo.Operation import *
from sorting.filter import *
from undo.Undo import Undo
from controller.controller import Contro... | |
from bisect import bisect
import gtk
import gobject
from gtk.gdk import Rectangle, CONTROL_MASK, SHIFT_MASK
from gtk import keysyms
from uxie.utils import send_focus_change
icon_sizes = None
class DrawItem(object):
__slots__ = ['ix', 'iy', 'iwidth', 'iheight',
'tx', 'ty', 'twidth', 'theight', 'width', '... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright Kitware Inc.
#
# Licensed under the Apache License, Version 2.0 ( the "License" );
# you may not use this file except in compliance with the License.
# You may obtain a copy of ... | |
#
# Copyright 2010-2019 University of Southern California
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | |
"""
Syslog server which allows handler methods to subscribe to syslog entries based
on regular expressions.
Author: Gregory Haynes <greg@idealist.org> (2012)
"""
from multiprocessing import Pool, Queue, Process
from loggerglue.rfc5424 import SyslogEntry
from Queue import Empty as QueueEmpty
import asyncore
import soc... | |
"""Support for OpenTherm Gateway devices."""
from datetime import date, datetime
import logging
import pyotgw
import pyotgw.vars as gw_vars
import voluptuous as vol
from homeassistant.components.binary_sensor import DOMAIN as COMP_BINARY_SENSOR
from homeassistant.components.climate import DOMAIN as COMP_CLIMATE
from ... | |
""":mod:`sqlalchemy_imageattach.stores.s3` --- AWS S3_ backend storage
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The backend storage implementation for `Simple Storage Service <S3>`_
provided by `Amazon Web Services <AWS>`_.
.. _S3: http://aws.amazon.com/s3/
.. _AWS: http://aws.amazon.com... | |
#
# Package analogous to 'threading.py' but using processes
#
# multiprocessing/__init__.py
#
# This package is intended to duplicate the functionality (and much of
# the API) of threading.py but uses processes instead of threads. A
# subpackage 'multiprocessing.dummy' has the same API but is a simple
# wrapper for 't... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import unittest
from external.wip import work_in_progress
from rmgpy.molecule.adjlist import InvalidAdjacencyListError
from rmgpy.molecule.molecule import Molecule
from rmgpy.molecule.group import Group
import logging
logging.basicConfig(level=logging.DEBUG)
#################... | |
# -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Authors: dr-prodigy <maurizio.... | |
import datetime
import re
import hashlib
import random
from django.db import models, transaction
from django.utils.timezone import now as datetime_now
from django.utils.translation import ugettext_lazy as _
from django.template.loader import render_to_string
from django.contrib import auth
from django.conf import se... | |
# Copyright (C) 2013 eBay Inc.
# Copyright (C) 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/lice... | |
import unittest
import os
import subprocess
import logging
import re
import time
import json
import requests
import xmlrunner
from pyinfraboxutils.db import connect_db
from pyinfraboxutils.token import encode_project_token
from pyinfraboxutils.secrets import encrypt_secret
class Test(unittest.TestCase):
job_id =... | |
import warnings
import re
from flask import (request, redirect, flash, abort, json, Response,
get_flashed_messages)
from jinja2 import contextfunction
from wtforms.fields import HiddenField
from wtforms.fields.core import UnboundField
from wtforms.validators import ValidationError, Required
from fl... | |
#/u/GoldenSights
import praw
import time
import sqlite3
import datetime
import random
USERAGENT = """
/u/GoldenSights T3 data collection: Gathering Submission data for
statistical analysis.
More info at https://github.com/voussoir/reddit/tree/master/T3
"""
r = praw.Reddit(USERAGENT)
print('Connected to reddit.')
sql ... | |
# Copyright (c) 2012-2022, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
from . import AWSObject, AWSProperty, PropsDictType
from .validators import boolean, double, integer
from .validators.autoscaling import EC2_INSTANC... | |
#
# Copyright (c) 2018 Juniper Networks, Inc. All rights reserved.
#
import base64
import docker
import gevent
import os
import re
import socket
from netaddr import IPAddress, IPNetwork
class DeviceZtpManager(object):
EXCHANGE = 'device_ztp_exchange'
CONFIG_FILE_ROUTING_KEY = 'device_ztp.config.file'
TF... | |
from sqlalchemy.testing import eq_, assert_raises, \
assert_raises_message, is_
from sqlalchemy.ext import declarative as decl
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.testing.schema import Table, Column
from sqlalchemy.orm import rela... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | |
#!/usr/bin/python3
#
# Copyright (C) 2011 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list o... | |
# GPS L1Cp code construction
#
# Copyright 2018 Peter Monta
import numpy as np
from sympy.ntheory import legendre_symbol
chip_rate = 1023000
code_length = 10230
l1cp_params = {
1: (5111,412), 2: (5109,161), 3: (5108,1), 4: (5106,303),
5: (5103,207), 6: (5101,4971), 7: (5100,4496), 8: (5098,... | |
"""
Ax_Metrics - EROut plugin 'geckoboard_text'
Writes Geckoboard JSON output for various charts for use with
http://www.geckoboard.com.
Contents:
- EROut_geckoboard_text - pages of text, optionally flagged
See:
- https://developer.geckoboard.com/#geck-o-meter
----------------------------------------------... | |
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | |
# Copyright 2011 Rackspace
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | |
import json
import cgi
import datetime
from google.appengine.api import users
from django import http
from django.shortcuts import render_to_response
from django.http import HttpResponse, HttpResponseRedirect
from django.template import Context, loader
from django.core.context_processors import csrf
from django.views.... | |
# grammar.py, part of Yapps 2 - yet another python parser system
# Copyright 1999-2003 by Amit J. Patel <amitp@cs.stanford.edu>
# Enhancements copyright 2003-2004 by Matthias Urlichs <smurf@debian.org>
#
# This version of the Yapps 2 grammar can be distributed under the
# terms of the MIT open source license, either fo... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.