text
stringlengths
4
1.02M
meta
dict
""" HiveDB client access via SQLAlchemy """ import sqlalchemy as sq metadata = sq.MetaData() DB_TYPES = dict( BIGINT=sq.Integer, CHAR=sq.String, DATE=sq.DateTime, DOUBLE=sq.Integer, FLOAT=sq.Float, INTEGER=sq.Integer, SMALLINT=sq.SmallInteger, TIMESTAMP=sq.DateTime, TINYINT=sq.Sma...
{ "content_hash": "0ad7c71fd4403999ea2bc03401f6e2aa", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 70, "avg_line_length": 27.25, "alnum_prop": 0.6039090546469884, "repo_name": "tv42/snakepit", "id": "fab81c80943dd4c9cd99158994fe18eccb20c1c6", "size": "2507", "binary": ...
from google.cloud import container_v1beta1 async def sample_list_locations(): # Create a client client = container_v1beta1.ClusterManagerAsyncClient() # Initialize request argument(s) request = container_v1beta1.ListLocationsRequest( parent="parent_value", ) # Make the request re...
{ "content_hash": "68b1cb6213a43a9105b20e04169d7ac6", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 70, "avg_line_length": 25.94736842105263, "alnum_prop": 0.7302231237322515, "repo_name": "GoogleContainerTools/python-container", "id": "ffe44d15dee0939fe467cd498ea0470475991...
import argparse from matplotlib import pyplot as plt from matplotlib import animation import pds.pds as pds class PdsScope(object): def __init__(self, tagname, npoints=80, ylim=(), offset=0, scale_factor=1, interval=200, style=None, show_grid=True): self.store_conf(npoints=npoints, ylim=...
{ "content_hash": "11f5b2876b137d6f46e423b8be2bdc06", "timestamp": "", "source": "github", "line_count": 139, "max_line_length": 192, "avg_line_length": 39.13669064748201, "alnum_prop": 0.6253676470588235, "repo_name": "paul-breen/plc-data-server", "id": "f59c48640567a9358e7e07f9cf4c82fb6ba0bd2e", "...
""" 1. P: is set of problems that can be solved by determinitisic Turing machine in Polynomial time 2. NP: is set of decision problems that can be solved by non-deterministic Turing Machine in Polinominal time. P is subset of NP. 3. NP-complete problems are the hardest problem in NP set, a decision problem L is NP-c...
{ "content_hash": "98e4550489ab840271d2ff7883fb085c", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 110, "avg_line_length": 41.92857142857143, "alnum_prop": 0.7444633730834753, "repo_name": "armsky/Algorithms", "id": "2bb6901177bcf29ea6dd28a4300b83bdec2fba78", "size": "58...
from flask import Flask,render_template,request,redirect import loganalysis_v2 import user import gconf app=Flask(__name__) @app.route('/') def index(): return render_template('login.html') @app.route('/log/',methods=['POST','GET']) def log(): params = request.args if request.method == 'GET' else request.form...
{ "content_hash": "142fe864d2f6e39804ee4b7a7597477f", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 143, "avg_line_length": 38.56989247311828, "alnum_prop": 0.6849735154725397, "repo_name": "51reboot/actual_09_homework", "id": "888ead60f54ede27fcda32b834246af963748cca", "...
import os import re import hmac import jinja2 import hashlib import random from string import letters from google.appengine.ext import db # Jinja configuration template_dir = os.path.join(os.path.dirname(__file__), 'templates') jinja_env = jinja2.Environment(loader=jinja2.FileSystemLoader(template_dir), ...
{ "content_hash": "bbaebabea3deb16c9c391c01e87fdc2c", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 76, "avg_line_length": 22.5, "alnum_prop": 0.66006006006006, "repo_name": "mr-karan/Udacity-FullStack-ND004", "id": "1076f7a66bd73450dc99727b5643ee8c1196eadc", "size": "166...
from .manager import JSONRPCResponseManager from .dispatcher import Dispatcher __version = (1, 13, 0) __version__ = version = '.'.join(map(str, __version)) __project__ = PROJECT = __name__ dispatcher = Dispatcher() # lint_ignore=W0611,W0401
{ "content_hash": "2f0904f3cc25e93cf2a9bac0d0cac3a3", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 53, "avg_line_length": 22.272727272727273, "alnum_prop": 0.689795918367347, "repo_name": "pavlov99/json-rpc", "id": "753838fc33cbc55d08e3f73ae80a802e2c1e1e73", "size": "245...
"""Provides strategy object.""" from __future__ import absolute_import import re from ..entity import Entity from ..utils import PATHS, suppress PIXEL_PATTERN = re.compile(r'\[(\d+)\]') OPERATOR_PATTERN = re.compile(r'(AND|OR)') class Strategy(Entity): """docstring for Strategy.""" collection = 'strategies'...
{ "content_hash": "592fffb59882bd77aed77a21864fb1d6", "timestamp": "", "source": "github", "line_count": 196, "max_line_length": 93, "avg_line_length": 39.01020408163265, "alnum_prop": 0.566309181271253, "repo_name": "leiforion/t1-python", "id": "eb3e65ab5544baa492731d116bd5f6991e778363", "size": "7...
''' A home for the vdb specific memory renderers. ''' import envi import vtrace import envi.bits as e_bits import envi.memory as e_mem import envi.memcanvas as e_canvas import vivisect.impapi as viv_impapi import envi.memcanvas.renderers as e_canvas_rend class OpcodeRenderer(e_canvas.MemoryRenderer): def __init_...
{ "content_hash": "d0109d7d52c822d5bf11309b94b29f20", "timestamp": "", "source": "github", "line_count": 263, "max_line_length": 83, "avg_line_length": 31.836501901140686, "alnum_prop": 0.536725188104622, "repo_name": "imjonsnooow/vivisect", "id": "75ba4a95fe813bb9f90045f647f405fa0dbc97b0", "size": ...
import re import copy import numpy as np from astropy import _erfa as erfa from astropy.utils.compat.misc import override__dir__ from astropy import units as u from astropy.constants import c as speed_of_light from astropy.wcs.utils import skycoord_to_pixel, pixel_to_skycoord from astropy.utils.data_info import Mixin...
{ "content_hash": "35a77e1bc0c2492a84e9e1db82deb9a2", "timestamp": "", "source": "github", "line_count": 1701, "max_line_length": 106, "avg_line_length": 42.81540270429159, "alnum_prop": 0.5931016490683656, "repo_name": "stargaser/astropy", "id": "9c113ef1f0ad54c0e8f1670e079846430fe20ae9", "size": "...
""" Configuration consolidation for the Nexus Driver This module will export the configuration parameters from the nexus.ini file """ from quantum.common.utils import find_config_file from quantum.plugins.cisco.common import cisco_configparser as confp CP = confp.CiscoConfigParser(find_config_file({'plugin': 'cisco'...
{ "content_hash": "937e8529b4f57616127d545ab9ee408a", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 68, "avg_line_length": 28.3, "alnum_prop": 0.7173144876325088, "repo_name": "ruijie/quantum", "id": "4d648d93ddd63ce5e7b144964c6081231c1e4903", "size": "1342", "binary": ...
import json from sygnal.gcmpushkin import GcmPushkin from tests import testutils from tests.testutils import DummyResponse DEVICE_EXAMPLE = {"app_id": "com.example.gcm", "pushkey": "spqr", "pushkey_ts": 42} DEVICE_EXAMPLE2 = {"app_id": "com.example.gcm", "pushkey": "spqr2", "pushkey_ts": 42} DEVICE_EXAMPLE_WITH_DEFA...
{ "content_hash": "638a3530fa1fd968db86cd8119811716", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 88, "avg_line_length": 34.17209302325581, "alnum_prop": 0.581734041105213, "repo_name": "matrix-org/sygnal", "id": "dcb685bf1267cc5d1f493b8d04a919cf50618ec5", "size": "796...
"""This module implements the WordSub class, modelled after a recipe in "Python Cookbook" (Recipe 3.14, "Replacing Multiple Patterns in a Single Pass" by Xavier Defrang). Usage: Use this class like a dictionary to add before/after pairs: > subber = TextSub() > subber["before"] = "after" > subber["b...
{ "content_hash": "0067f110976e43a8a968bac8a58985c2", "timestamp": "", "source": "github", "line_count": 104, "max_line_length": 97, "avg_line_length": 34.04807692307692, "alnum_prop": 0.5972889014402711, "repo_name": "mpetyx/pychatbot", "id": "ef30ef688256488b85fa4f3814ec8faf654aa140", "size": "354...
import configparser import os import unittest from parameterized import parameterized from tests.test_utils import AIRFLOW_MAIN_FOLDER CONFIG_TEMPLATES_FOLDER = os.path.join(AIRFLOW_MAIN_FOLDER, "airflow", "config_templates") DEFAULT_AIRFLOW_SECTIONS = [ 'core', "logging", "metrics", 'secrets', ...
{ "content_hash": "9412db8ced62fa6030d311b49ff45c47", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 90, "avg_line_length": 21.50574712643678, "alnum_prop": 0.5638695884553715, "repo_name": "sekikn/incubator-airflow", "id": "aa98fa93bf4effb9e45466ce42f5220939039997", "size...
from lib.utils import connect, tor_init class Crawler: def __init__(self, q, tor): self.q = q if tor: tor_init() def run(self): while True: if not self.q[0].empty(): package = self.q[0].get() result = connect(package) ...
{ "content_hash": "2813b41ceab7ab6f9240f930ecf44d33", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 41, "avg_line_length": 23.133333333333333, "alnum_prop": 0.4697406340057637, "repo_name": "OAlienO/DreamStorm", "id": "13646ccc1eb19f76bf567f57bc80a8d1e84371a1", "size": "3...
''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-05-18 Last_modify: 2016-05-18 ****************************************** ''' ''' You are given coins of different denominations and a total amount of money amount. Write...
{ "content_hash": "ed2eb1c21824d9cf08c36f763c16f19a", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 82, "avg_line_length": 28.566666666666666, "alnum_prop": 0.543757292882147, "repo_name": "zhlinh/leetcode", "id": "efd61e889891cddd3839514dd0e8b6970daf899f", "size": "1760"...
import json from simpoll_backend.models import Poll def get_poll(poll_id): # for some reason mongoengine uses id instead of _id.. poll = Poll.objects.get_or_404(id=poll_id) return to_json(poll) def get_polls_chron(): # arbitrarily limit to 100 objects polls = Poll.objects.all().order_by('-id').lim...
{ "content_hash": "2c3e254ce6d3c81c93d7100c1d1c059d", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 66, "avg_line_length": 31.854545454545455, "alnum_prop": 0.6255707762557078, "repo_name": "dpuleri/simpoll_backend", "id": "84a6abb404bd70708a6c1fb2800bacda0eb08936", "size...
import os from setuptools import setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name='OnlineNIC', version='0.1.2', url='http://github.com/kolanos/onlinenic', license='MIT', author='Michael Lavers', author_email='kolanos@gmail.com', d...
{ "content_hash": "14e103dae3c6378a607e71d87d0bfee7", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 70, "avg_line_length": 27.967741935483872, "alnum_prop": 0.6274509803921569, "repo_name": "kolanos/onlinenic", "id": "ad81c86082dfa86a65d6a5082bb59b5f1b03981f", "size": "86...
from Kamaelia.Visualisation.PhysicsGraph import BaseParticle import pygame from pygame.locals import * """\ ==================================================== "Postbox" particle for Axon/Kamaelia visualisation ==================================================== This is an implementation of a rendering particle fo...
{ "content_hash": "2a83bee9d0bcb8068f9c18e66e9bf58a", "timestamp": "", "source": "github", "line_count": 286, "max_line_length": 108, "avg_line_length": 36.38461538461539, "alnum_prop": 0.5837017105516048, "repo_name": "sparkslabs/kamaelia_", "id": "989eecae1a0e28eeef8747dfac3be0b3a13479b6", "size":...
from logging.handlers import RotatingFileHandler import logging def init_logger(app, log_file): formatter = logging.Formatter('%(asctime)s %(levelname)s: %(message)s ' '[in %(pathname)s:%(lineno)d]') stream_handler = logging.StreamHandler() stream_handler.setLevel(logging.DEBUG) stream_handler...
{ "content_hash": "e1f3f3e586a8067461448250fdc12122", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 81, "avg_line_length": 36.1764705882353, "alnum_prop": 0.7284552845528456, "repo_name": "ragnraok/MonoReader", "id": "dd0d8f811c3f85ab77aaf3f6a1849657c0a35084", "size": "12...
import os import sqlite3 import sys MIN_SINGLE_DB_FORMAT = 19 def get_format(wc_path): entries = os.path.join(wc_path, '.svn', 'entries') wc_db = os.path.join(wc_path, '.svn', 'wc.db') formatno = 'not under version control' if os.path.exists(wc_db): conn = sqlite3.connect(wc_db) curs = conn.cursor()...
{ "content_hash": "abbedaa3f32eb636354167569b2d8847", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 67, "avg_line_length": 25.488888888888887, "alnum_prop": 0.6277244986922407, "repo_name": "centic9/subversion-ppa", "id": "fc6ef0789d9108b0324b545b3011a3e4819ac3af", "size"...
import logging import re from django.core.management.base import BaseCommand from optparse import make_option from corehq.toggles import all_toggles from corehq.apps.domain.models import Domain from corehq.apps.app_manager.dbaccessors import get_apps_in_domain from corehq.apps.app_manager.util import ParentCaseProper...
{ "content_hash": "95a3b686513ae31bb083aa9ea45f4a6a", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 114, "avg_line_length": 48.926829268292686, "alnum_prop": 0.519690927218345, "repo_name": "qedsoftware/commcare-hq", "id": "19bc0dd2e42b60b7ec6a3c6c295d965e3764b7a9", "size...
from authorize import Customer from authorize import AuthorizeResponseError from datetime import date from nose.plugins.attrib import attr from unittest2 import TestCase FULL_CUSTOMER = { 'email': 'vincent@vincentcatalano.com', 'description': 'Cool web developer guy', 'customer_type': 'individual', ...
{ "content_hash": "457b4b3d5936a3992462ed7cb7ff7419", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 79, "avg_line_length": 27.865853658536587, "alnum_prop": 0.5776805251641138, "repo_name": "ClearcodeHQ/py-authorize", "id": "c253be65d5eb3316cac881dfbaee07d19642fdee", "siz...
from builtins import range from airflow import configuration from airflow.utils.log.logging_mixin import LoggingMixin from airflow.utils.state import State PARALLELISM = configuration.conf.getint('core', 'PARALLELISM') class BaseExecutor(LoggingMixin): def __init__(self, parallelism=PARALLELISM): """ ...
{ "content_hash": "98922fd42898c9a245928a6a94d9c9fe", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 87, "avg_line_length": 35.39325842696629, "alnum_prop": 0.5876190476190476, "repo_name": "wndhydrnt/airflow", "id": "30ecee06a19bce3081e93fd61396b1a21521facb", "size": "71...
import pytest import rhc.task as task @pytest.fixture def happy(): def cb(rc, result): assert rc == 0 return task.Task(cb) @pytest.fixture def not_happy(): def cb(rc, result): assert rc != 0 return task.Task(cb) def test_simple(happy): happy.respond('yay') def test_error(not...
{ "content_hash": "9497a0a78de92adeaed7f9c3450a6f32", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 52, "avg_line_length": 16.58490566037736, "alnum_prop": 0.6257110352673493, "repo_name": "robertchase/rhc", "id": "41b2c8f3422c055280549400d883327bc103a464", "size": "879",...
from firenado import tornadoweb class IndexHandler(tornadoweb.TornadoHandler): def get(self): self.render("index.html", schedulers=self.component.schedulers)
{ "content_hash": "b98e70f4a9b778ecf10df8453a1f9291", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 71, "avg_line_length": 24.714285714285715, "alnum_prop": 0.7572254335260116, "repo_name": "candango/firenado", "id": "a029672924d330ae3cc56a828de74735ef764197", "size": "173...
from __future__ import absolute_import, division, with_statement
{ "content_hash": "77c851e9e9b2d0a77a91ae12a74e9c42", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 64, "avg_line_length": 33, "alnum_prop": 0.7727272727272727, "repo_name": "robertding/vo", "id": "ac2f2e656ba258a4e4759c2b49cef3230877e87f", "size": "249", "binary": false...
""" Regular prism mesh -------------------- The mesh classes in Fatiando are more efficient ways of representing regular meshes than simples lists of :class:`~fatiando.mesher.Prism` objects. This is how you can create a :class:`~fatiando.mesher.PrismMesh` and assign it a density for each prism. """ from __future__ im...
{ "content_hash": "4dcb09c4f00a367497e89af93008170f", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 78, "avg_line_length": 40.023809523809526, "alnum_prop": 0.735871505056514, "repo_name": "mtb-za/fatiando", "id": "75a569a5464f6f8b8bc8cfb94866d60fda8b26bc", "size": "1681"...
# import modules from main import os import decimal # import other modules import pandas as pd import matplotlib # import local functions import net_worth as net_worth from financial_independence import fin_ind import utils as utils # some initial setup - abbreviating the Decimal command, changing the...
{ "content_hash": "f719fe7c0f2cbb6488bee58ee6f70153", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 117, "avg_line_length": 43.838235294117645, "alnum_prop": 0.6517946997651795, "repo_name": "dmsun/Financial-Independence", "id": "f4d90b5c596373e465291d6b3f6e933e0bb84b85", ...
import os class Libstdcpp_P1: conf_lst = {} e = False root_dir = "" def init(self, c_lst, ex, root_dir): self.conf_lst = c_lst self.e = ex self.root_dir = root_dir self.config = { "name": "libstdcpp", # Name of the package "version": ...
{ "content_hash": "35cb45ecd5dca2842b62665c312886ee", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 95, "avg_line_length": 33.90196078431372, "alnum_prop": 0.48582995951417, "repo_name": "Morphux/installer", "id": "c030d72ee96e4b52452995cdf091a44e5368e066", "size": "3035"...
import json import socket from hashlib import sha256 from urllib2 import urlopen from urllib import quote def urlencode(query): if isinstance(query, dict): query = query.items() pairs = [] for item in query: pairs.append("%s=%s" % (item[0], quote(str(item[1])))) return "&".join(pairs) class MinecraftStream(ob...
{ "content_hash": "11ee653afdeccc60d48dc498c6006a3b", "timestamp": "", "source": "github", "line_count": 322, "max_line_length": 103, "avg_line_length": 26.322981366459626, "alnum_prop": 0.6459414818310524, "repo_name": "alecgorge/jsonapi", "id": "79ad8bf4221f7b6230e92b55328b4f9c79025557", "size": "...
from __future__ import print_function, division, unicode_literals, absolute_import from future import standard_library standard_library.install_aliases() import pytest import sys from contextlib import contextmanager from io import StringIO from ...utils import nipype_cmd PY2 = sys.version_info[0] < 3 @contextmana...
{ "content_hash": "4911733a59f6d5cd7fcb531fc54ca13d", "timestamp": "", "source": "github", "line_count": 136, "max_line_length": 108, "avg_line_length": 34.0514705882353, "alnum_prop": 0.5577629021809545, "repo_name": "mick-d/nipype", "id": "315d55441f7984a27cb6e2c6475acd0181682ee6", "size": "4653",...
from pipeline.component.hetero_linr import HeteroLinR a = HeteroLinR(name="hetero_linr_0", early_stop="weight_diff", stepwise_param={"max_step": 3, "need_stepwise": True}) print(a.output.data) print(a.output.model)
{ "content_hash": "86e14e082d91986086f69770b6b41230", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 69, "avg_line_length": 29.125, "alnum_prop": 0.6952789699570815, "repo_name": "FederatedAI/FATE", "id": "6d64f604298de6383d79fd77eb7b9513d5e43de0", "size": "851", "binary"...
import warnings from oscar.utils.deprecation import RemovedInOscar21Warning def deprecated(obj): if isinstance(obj, type): return _deprecated_cls(cls=obj) else: return _deprecated_func(f=obj) def _deprecated_func(f, warn_cls=RemovedInOscar21Warning): def _deprecated(*args, **kwargs): ...
{ "content_hash": "fc7c58ec03eca164ac9b0f0872ff60ce", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 63, "avg_line_length": 32.12903225806452, "alnum_prop": 0.6124497991967871, "repo_name": "sasha0/django-oscar", "id": "64b61c0ddec13bd06a6598c52b70aee0873faf1f", "size": "9...
def _get_data_from_xml(doclist, fieldname, nohitreturn=None): """Get the fieldname (i.e. author, title etc) from minidom.parseString().childNodes[0].childNodes list """ result = [] for element in doclist: try: fields = element[fieldname] except KeyError: field...
{ "content_hash": "4097fc9e3dd2c2f2268e120e5e637770", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 61, "avg_line_length": 32.166666666666664, "alnum_prop": 0.6139896373056994, "repo_name": "imbasimba/astroquery", "id": "c4e1cbb59efce40ccd5a79c2a23c043fbb2f29ed", "size": ...
"""Testable usage examples for Google BigQuery API wrapper Each example function takes a ``client`` argument (which must be an instance of :class:`google.cloud.bigquery.client.Client`) and uses it to perform a task with the API. To facilitate running the examples as system tests, each example is also passed a ``to_de...
{ "content_hash": "9dedecbab3f89b04f687248b7f06b799", "timestamp": "", "source": "github", "line_count": 3004, "max_line_length": 79, "avg_line_length": 36.32623169107856, "alnum_prop": 0.667424214654888, "repo_name": "jonparrott/google-cloud-python", "id": "9e8ba524a1151f13381ef4437e0b25cf91e06162", ...
from database.db4 import db4, Channel4, ConstDB4 from utils.log import Logger, Action class Location: channel_name = Channel4.gis_gateway_location + '*' def __init__(self): self.ps = db4.pubsub() def psubscribe_gis(self): self.ps.psubscribe(self.channel_name) return self.ps ...
{ "content_hash": "f3cce2b7bc3510517f800d952ed31333", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 106, "avg_line_length": 35.44444444444444, "alnum_prop": 0.5216300940438872, "repo_name": "soybean217/lora-python", "id": "3f3813851c53809aa07a4cb83bb60ebdc4368e6b", "size"...
from . import views def construct_blueprint(celery): return views.construct_blueprint(celery)
{ "content_hash": "2e0d7105e2f8a805d743dcfe8ac59ca5", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 44, "avg_line_length": 24.75, "alnum_prop": 0.7777777777777778, "repo_name": "slarse/pdfebc-web", "id": "6ab2e1f339e21e005f47700fb89c1d7ee34d0858", "size": "99", "binary":...
"""A simple demo that allows the user to drive the 'Robot Arm H25' located here: http://robotsquare.com/2013/10/01/education-ev3-45544-instruction/ The program waits for key presses and responds to the following keys: 'w' - Raises the claw 's' - Lowers the claw 'a' - Swivels the claw left 'd' - Swivels...
{ "content_hash": "af6e49b8dfa63f3629b3a797a0ab84ac", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 75, "avg_line_length": 35.82258064516129, "alnum_prop": 0.5159837910850968, "repo_name": "inductivekickback/ev3", "id": "bb877ac5c10efc8371d31c6496da70ac3eb90f0a", "size":...
from .forms import RegisterForm, LoginForm, PasswordResetForm, \ PasswordChangeForm from django.http import HttpResponseRedirect from django.shortcuts import render_to_response from django.template import RequestContext from django.core.urlresolvers import reverse from django.contrib.auth.models import User from dj...
{ "content_hash": "d3f6e11fcd42f895ab65ac333776c9f0", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 86, "avg_line_length": 46.01176470588236, "alnum_prop": 0.6090513935054973, "repo_name": "theju/f1oracle", "id": "da0d6e712abe3ed352a04fa9e0ecd9646e7a4dba", "size": "3911",...
""" Python 'utf-16' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is intended. ...
{ "content_hash": "9cbb82ebfd1f50199878196952662f95", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 69, "avg_line_length": 20.032258064516128, "alnum_prop": 0.7133655394524959, "repo_name": "Integral-Technology-Solutions/ConfigNOW", "id": "c034a97d1dd4c333528690a08c718f0c57...
""" Code to build HMM models of PSSMs of various Markov orders. """ import hmm, numpy, pickle def _load_model_parameters(model, f): parameters = pickle.load(f) if len(parameters) != len(model.parameters): raise RuntimeError('Different number of parameters in file (%d) and in model (%d)' % (len(parame...
{ "content_hash": "4f65d1650c4e04f480a6daf283f61d9a", "timestamp": "", "source": "github", "line_count": 157, "max_line_length": 134, "avg_line_length": 34.904458598726116, "alnum_prop": 0.6031021897810219, "repo_name": "JohnReid/biopsy", "id": "aabbb47a6d58e9ce7270cec510305aee2d5c700c", "size": "55...
import errno import functools import os import shutil import tempfile import time import weakref from eventlet import semaphore from oslo.config import cfg from nova.openstack.common import fileutils from nova.openstack.common.gettextutils import _ from nova.openstack.common import local from nova.openstack.common im...
{ "content_hash": "3ec51f2b316efecb7bee6a4cb94c28f0", "timestamp": "", "source": "github", "line_count": 231, "max_line_length": 79, "avg_line_length": 37.58874458874459, "alnum_prop": 0.5291949786939998, "repo_name": "maheshp/novatest", "id": "3270f0473645db2a9d79ad2a96e7de9278682829", "size": "936...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='speaker', options={'verbose_name': 'palestrante...
{ "content_hash": "0d1fd5c377d4ba093fba5cdb6b27176f", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 91, "avg_line_length": 29.214285714285715, "alnum_prop": 0.5484922575387123, "repo_name": "Golker/wttd", "id": "69007d9361a289bcbbe220a3b373959ae78468d8", "size": "1301", ...
"""Monitor the state of Thermos tasks on a system This module contains the TaskMonitor, used to reconstruct the state of active or finished Thermos tasks based on their checkpoint streams. It exposes two key pieces of information about a Task, both as their corresponding Thrift structs: - a RunnerState, representing...
{ "content_hash": "f547b43d7a529c94aa15c6631077b669", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 100, "avg_line_length": 33.62307692307692, "alnum_prop": 0.6650652024708305, "repo_name": "rosmo/aurora", "id": "d77703e9027e6c23ffb67d936cf8beef0384b4a6", "size": "4920",...
from ACJ import ACJ
{ "content_hash": "5beef6367f1f3a41c18252825b5e951e", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 19, "avg_line_length": 20, "alnum_prop": 0.8, "repo_name": "RossMcKenzie/ACJ", "id": "6d9aa8a37d74de2b31e85881493ac66a69dfc1a5", "size": "20", "binary": false, "copies":...
from __future__ import absolute_import, division, print_function import random import tensorflow as tf import gym from deep_rl.graphs import create_a3c_graph from deep_rl.misc import first_in_collection from deep_rl.trajectories import discount from six.moves import range EPSILON_ENDS = [0.1, 0.01, 0.5] class A3...
{ "content_hash": "d6f1b3c2b33c60447303b9622c1b3063", "timestamp": "", "source": "github", "line_count": 133, "max_line_length": 100, "avg_line_length": 33.86466165413534, "alnum_prop": 0.47357904085257546, "repo_name": "domluna/deep_rl", "id": "3e58d71104e453f28fde791f1b5a8282c6d7b3cd", "size": "45...
""" pixeloperations provides an implementation of PixelOperations class used by ImageFrame to interact with basis and background """ import numpy as np import deconvolution.auxlib as aux import deconvolution.exceptions as ex from copy import deepcopy _infzero = 0.00001 _white255 = np.array([255, 255, 255], dtype=floa...
{ "content_hash": "b7727780dd5f54ccb0255383fd53ea42", "timestamp": "", "source": "github", "line_count": 421, "max_line_length": 114, "avg_line_length": 29.802850356294538, "alnum_prop": 0.5522435641986132, "repo_name": "grfrederic/deconvolution", "id": "267d0a5fe13c834f4f2ec1b1699ecf17a71ba654", "s...
from a10sdk.common.A10BaseClass import A10BaseClass class HostidAppendToVrid(A10BaseClass): """This class does not support CRUD Operations please use parent. :param hostid_append_to_vrid_value: {"description": "hostid append to vrid num", "partition-visibility": "shared", "format": "number", "maximum": ...
{ "content_hash": "72f1b168c6c9efbbd3378824dd1b2ef8", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 280, "avg_line_length": 54.794392523364486, "alnum_prop": 0.6372164420944909, "repo_name": "amwelch/a10sdk-python", "id": "55f4103aeb8dfa607c5ced19e6df05af73cab32a", "size...
"""API data models - schemas and their properties. This module handles the objects created for the "schema" section of an API. """ __author__ = 'aiuto@google.com (Tony Aiuto)' import collections import logging from googleapis.codegen import data_types from googleapis.codegen import template_objects from googleapis...
{ "content_hash": "a3b36a47b4a60c12ad7a2b26b1e947d9", "timestamp": "", "source": "github", "line_count": 460, "max_line_length": 80, "avg_line_length": 38.41304347826087, "alnum_prop": 0.6387662705149971, "repo_name": "googleapis/google-api-php-client-services", "id": "f0a7289554991a2cca0b9078372841a1...
from os.path import dirname, abspath, join as pjoin import pytest import numpy as np from Corrfunc.tests.common import gals_Mr19 from Corrfunc.tests.common import (check_against_reference, check_vpf_against_reference) from Corrfunc.tests.common import generate_isa_and_nthreads_combo...
{ "content_hash": "be805951b0266e0a51a548750b4e6d3c", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 106, "avg_line_length": 37.289655172413795, "alnum_prop": 0.5357869428518587, "repo_name": "manodeep/Corrfunc", "id": "4247d5033c2b475fce24f511903c65823c3c2041", "size": "...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('meas_models', '0001_squashed_0016_auto_20170117_2325'), ] operations = [ migrations.RemoveField( model_name='formula', name='questio...
{ "content_hash": "3e6a96b1f25a2160fcb28fd2ca9a95ad", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 65, "avg_line_length": 20.058823529411764, "alnum_prop": 0.6011730205278593, "repo_name": "deka108/mathqa-server", "id": "05f11c943a16f2ae5692efe26f468fdfdd4b734d", "size":...
"""Created with Pycharm IDEA @Create on 2015/9/12 16:31 @my_story controllers.py @author : OmegaMiao""" from app import app from flask import jsonify, request, render_template, redirect, flash, url_for from flask.ext.login import login_required, login_user, logout_user, current_user from models import Story, User f...
{ "content_hash": "a5f83c1f35a2b3e92225fd17fbf6cd93", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 100, "avg_line_length": 29.08411214953271, "alnum_prop": 0.6542416452442159, "repo_name": "OmegaM/story", "id": "c9fef566774c86872d9770d0d6cd42c1976355a0", "size": "3203",...
exercicio4 = open('exercicio4.txt', 'w') texto = "eu não sei o que estou fazendo" print (texto) exercicio4.close() lerexercicio4 = open('exercicio4.txt', 'r') ler = lerexercicio4.readline() print ('agora eu sei o que estou fazendo') lerexercicio4.close()
{ "content_hash": "3329e3a8dc2f5bb0b80de393c00d11db", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 43, "avg_line_length": 19.642857142857142, "alnum_prop": 0.6763636363636364, "repo_name": "ribeironaldo/Desenvolvimento-de-Sistemas", "id": "855afee4c7adcff8e0a3965b68474e9a4...
import arff import argparse import collections import matplotlib import matplotlib.pyplot as plt import openml import openmlpimp import os import pickle import random import sklearn from statistics import mean def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('--virtual_env', type=str,...
{ "content_hash": "7133891a772c85465a937eedb45d55aa", "timestamp": "", "source": "github", "line_count": 250, "max_line_length": 207, "avg_line_length": 47.644, "alnum_prop": 0.6048190748048022, "repo_name": "janvanrijn/openml-pimp", "id": "3f77652f9c314e8f4ec8da0217b343e4c830ee9f", "size": "11911",...
from datetime import timedelta import httplib as http from django.utils import timezone from nose.tools import * # noqa (PEP8 asserts) from framework.auth import campaigns, views as auth_views, cas from website.util import web_url_for from osf_tests import factories from tests.base import OsfTestCase from tests.util...
{ "content_hash": "763155c1802d538090021070fedb4352", "timestamp": "", "source": "github", "line_count": 264, "max_line_length": 104, "avg_line_length": 39.51136363636363, "alnum_prop": 0.6320582877959927, "repo_name": "leb2dg/osf.io", "id": "1306ec2ce8b80ff569264864f931a9d34a9cc0aa", "size": "10431...
"""Class DistributionStrategy, ReplicaContext, and supporting APIs.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import threading from tensorflow.python.data.ops import dataset_ops from tensorflow.python.eager import context as eager_context from ten...
{ "content_hash": "6226474ff5c8b6004790677f68ff7889", "timestamp": "", "source": "github", "line_count": 1312, "max_line_length": 114, "avg_line_length": 40.948170731707314, "alnum_prop": 0.6915531233713051, "repo_name": "alshedivat/tensorflow", "id": "051f965f8b4d128c44f8ff4a4cfd14ea0953538f", "siz...
import click from alertaclient.utils import action_progressbar, build_query @click.command('ack', short_help='Close alerts') @click.option('--ids', '-i', metavar='ID', multiple=True, help='List of alert IDs (can use short 8-char id)') @click.option('--query', '-q', 'query', metavar='QUERY', help='severity:"warning" ...
{ "content_hash": "748169ce5621158973f632f6807f3f93", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 128, "avg_line_length": 40.76, "alnum_prop": 0.6388616290480864, "repo_name": "alerta/python-alerta-client", "id": "8b7ac781807c1c0de37d8431aa3cd3577db06cfd", "size": "1019...
""" Tests for the twistedcaldav.datafilters module. """
{ "content_hash": "8d937f19eeeed0ba5c530a115b745247", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 47, "avg_line_length": 18.666666666666668, "alnum_prop": 0.7321428571428571, "repo_name": "macosforge/ccs-calendarserver", "id": "bcb5f024b17c1104c3e32691a4afc8b91e0a9e6b", ...
from distutils.core import setup from distutils.extension import Extension from Cython.Distutils import build_ext import numpy as np ext_module = Extension( 'cchol', ['cchol.pyx'], include_dirs=[np.get_include()])#, ''' extra_compile_args=['-fopenmp'], ...
{ "content_hash": "cf15ec4784dd71498b04d5d6b82e8f3b", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 71, "avg_line_length": 27.625, "alnum_prop": 0.583710407239819, "repo_name": "pysal/pPysal", "id": "80440e2e5b741ba9f14ca08c0f35d340e627509f", "size": "442", "binary": fa...
""" Functions for plotting nodes. Functions ========= .. currentmodule:: bayespy.plot .. autosummary:: :toctree: generated/ pdf contour plot hinton gaussian_mixture_2d Plotters ======== .. autosummary:: :toctree: generated/ Plotter PDFPlotter ContourPlotter HintonPlotter Funct...
{ "content_hash": "67da994a519ff2afe9aecc3aa53fc37c", "timestamp": "", "source": "github", "line_count": 1341, "max_line_length": 88, "avg_line_length": 26.216256524981358, "alnum_prop": 0.5488394584139265, "repo_name": "SalemAmeen/bayespy", "id": "5ac404ab8021edf787934026e31df2e8b81a3ff0", "size": ...
from django import forms from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ from .mailchimp import subscribe_user class RegistrationForm(forms.Form): username = forms.CharField(label=_('Username')) first_name = forms.CharField(label=_('First Name'), required=F...
{ "content_hash": "ac6fafbf40d6bea4dd75f19efad5d4f1", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 78, "avg_line_length": 36.52, "alnum_prop": 0.5899963490324936, "repo_name": "samitnuk/online_shop", "id": "1454bdc8aff82f3ae0f53995b431c6b8a612a670", "size": "2739", "bi...
from .voxel_dir import task_dir, storage_dir, image_dir
{ "content_hash": "6c3a74f26a8913ae1bcaba0fd0b0e2ed", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 55, "avg_line_length": 55, "alnum_prop": 0.7818181818181819, "repo_name": "andyneff/voxel-globe", "id": "45307aa82f77b6437b0196378bacf8c87d605427", "size": "55", "binary":...
try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage def config(settings): """ Template settings for CERT (Community Emergency Response Teams) ...
{ "content_hash": "047754c6ebfe0bc55a929da856bd8ced", "timestamp": "", "source": "github", "line_count": 177, "max_line_length": 151, "avg_line_length": 40.16949152542373, "alnum_prop": 0.5441631504922644, "repo_name": "flavour/Turkey", "id": "611153e317ca2ce8de1d84f59e76e343cb1e9685", "size": "7135...
from django.contrib.syndication.views import * # merge modules import sys from django.contrib.syndication.views import Feed as DjangoFeed from coffin.template import loader as coffin_loader class Feed(DjangoFeed): """A ``Feed`` implementation that renders it's title and description templates using Jinj...
{ "content_hash": "4bcee5df818520bce8c159509313bdb9", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 75, "avg_line_length": 41.75, "alnum_prop": 0.6892880904856953, "repo_name": "havard024/prego", "id": "7f3e86e8e7496e74a28491027a558073b22826db", "size": "1503", "binary"...
from django.db import models from django.contrib.auth.models import User from donations.currencymap import SYMBOLS from main.support import animations_list, font_effects class Donation(models.Model): user = models.ForeignKey(User) name = models.CharField(max_length=250) comment = models.TextField(blank=Tru...
{ "content_hash": "180edeec3cabf7b716b276e46268a8e3", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 147, "avg_line_length": 46.98360655737705, "alnum_prop": 0.6566643405443127, "repo_name": "google/mirandum", "id": "ac2b5a4a630694b3c4faaeedffa124fdefdfcaa2", "size": "3479...
'''perform automatic newline conversion To perform automatic newline conversion, use:: [extensions] win32text = [encode] ** = cleverencode: # or ** = macencode: [decode] ** = cleverdecode: # or ** = macdecode: If not doing conversion, to make sure you do not commit CRLF/CR by accident:: [hooks] ...
{ "content_hash": "65ac016f0315dac8fd3f6c9a67f15443", "timestamp": "", "source": "github", "line_count": 151, "max_line_length": 79, "avg_line_length": 32.05298013245033, "alnum_prop": 0.5888429752066116, "repo_name": "joewalnes/idea-community", "id": "b3a25b0aa75e189915086a41a7136a7d0fa977d0", "siz...
"""Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 88 PATCH_VERSION = '0.dev0' __short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION) __version__ = '{}.{}'.format(__short_version__, PATCH_VERSION) REQUIRED_PYTHON_VER = (3, 5, 3) # Format for platform files PLATFORM_FORMAT = ...
{ "content_hash": "115c9de4830998e740517d09630046fa", "timestamp": "", "source": "github", "line_count": 457, "max_line_length": 79, "avg_line_length": 27.49671772428884, "alnum_prop": 0.720913576317046, "repo_name": "PetePriority/home-assistant", "id": "1a3d4e2e455afad0ca70fa25ffae383005d145d6", "s...
import json import logging import unittest from core.Database import Database from core.entities.Plugin import Plugin logging.basicConfig(level=logging.DEBUG, format='[%(levelname)s] [%(asctime)s] (%(threadName)-10s) %(message)s', filename='debug.log', filemode='w') class PluginsTest(unittest.TestCase): config...
{ "content_hash": "ef491ea583ada6868236dd9f3f4300cd", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 149, "avg_line_length": 28.363636363636363, "alnum_prop": 0.5459401709401709, "repo_name": "Cirreth/shome", "id": "852bb11c0e32384061d1c2907f2d45c96f9d5759", "size": "936",...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('search', '0011_auto_20170810_1205'), ] operations = [ migrations.AlterField( model_name='savedsearch', name='name', ...
{ "content_hash": "51a1a7469fc079cba4a1290994802b3e", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 74, "avg_line_length": 22.444444444444443, "alnum_prop": 0.6014851485148515, "repo_name": "erikng/sal", "id": "cba7c9bd167e7ccfe61823c03f77bec9ee9b26c7", "size": "475", "...
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render(request, 'template.html', {'google': GoogleMap(...
{ "content_hash": "d4943f7af0c2706a854cda4254193505", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 92, "avg_line_length": 41.10144927536232, "alnum_prop": 0.6502115655853314, "repo_name": "yephper/django", "id": "6fe4325c1197be01814e70e8bc891f60d184313f", "size": "2836",...
import rospy import json import argparse import matplotlib.pyplot as plt import matplotlib.animation as animation from modules.planning.proto import planning_pb2 from modules.drivers.proto import mobileye_pb2 from mobileye_data import MobileyeData from localization_data import LocalizationData from planning_data import...
{ "content_hash": "6dcf917ade1bf79009338e52b2953715", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 78, "avg_line_length": 30.631067961165048, "alnum_prop": 0.7004754358161648, "repo_name": "startcode/apollo", "id": "cec014bf3de3082e5f7de86c21109423a7ea5618", "size": "39...
import numpy as np import cv2 from LineSegment import LineSegment from RoadLanes import RoadLanes class LaneDetector(object): """ Given a source image, implements a pipeline of image processing operations to detect lane division markings on a typical highway scene. ## Typical operation: 1....
{ "content_hash": "cc5599f29673c05ef04504541846857e", "timestamp": "", "source": "github", "line_count": 192, "max_line_length": 137, "avg_line_length": 40.041666666666664, "alnum_prop": 0.6062695109261186, "repo_name": "pmerloti/CarND-LaneLines-P1-Merloti", "id": "14f476d71ffe3880c38d40deabe8f496b3d4...
"""Firebase Cloud Storage module. This module contains utilities for accessing Google Cloud Storage buckets associated with Firebase apps. This requires the ``google-cloud-storage`` Python module. """ # pylint: disable=import-error,no-name-in-module try: from google.cloud import storage except ImportError: ra...
{ "content_hash": "6b71becf1bb3e9e4eb7c4deaa3668d27", "timestamp": "", "source": "github", "line_count": 68, "max_line_length": 91, "avg_line_length": 40.838235294117645, "alnum_prop": 0.6845516744688512, "repo_name": "firebase/firebase-admin-python", "id": "f3948371c481408561cff3a78b3dd438b3474fba", ...
import firebase_storage import location
{ "content_hash": "671da7de461251e715d0f4a3d3e749c5", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 23, "avg_line_length": 20, "alnum_prop": 0.875, "repo_name": "alt-locator/alt-python", "id": "012c4c35bedcc68b558091e5597f84117d61548c", "size": "40", "binary": false, "...
from typing import Mapping from typing import Optional from typing import Tuple from typing import Union import tensorflow as tf from keras_cv import bounding_box class ROIGenerator(tf.keras.layers.Layer): """ Generates region of interests (ROI, or proposal) from scores. Mainly used in Region CNN (RCNN...
{ "content_hash": "faac6a2f8b8594125965106ebc2845a2", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 112, "avg_line_length": 44.67821782178218, "alnum_prop": 0.6068698060941828, "repo_name": "keras-team/keras-cv", "id": "88be147b2ebaa7d791c9ce773ac9f4bfa921bbfe", "size": ...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Package.featured' db.add_column('packages_package', 'featured', self.gf('django.db.models.fiel...
{ "content_hash": "03c2ab5cc43761473bd71d0ecaf2f4cf", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 197, "avg_line_length": 73.50819672131148, "alnum_prop": 0.5519625334522748, "repo_name": "crate-archive/crate-site", "id": "b9409187082fcd544128be54129502b8fcac8a47", "si...
class MockECR(object): @property def aws_account_id(self): return '12345678' @property def registry(self): return [] @property def project_repo(self): return 'nginxdemos' def project_repo_exists(self): return True def create_project_repo(self): return True def get_login(self):...
{ "content_hash": "c6ba387035d5178c136c67bd0243953a", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 41, "avg_line_length": 15.945945945945946, "alnum_prop": 0.6372881355932203, "repo_name": "izakp/hokusai", "id": "025fc73ad2514281889c699c88b7fe0f741c9bcc", "size": "590", ...
input_data = { 'permission_sets': { 'developer': { 'permissions': ['access_data', 'can_see_system_activity', 'see_dashboards', 'clear_cache_refresh', 'create_table_calculations', 'deploy', 'develop', 'download_without_limit', 'explore', 'manage_spaces', 'mobile_app_access', 'save_content', 'sche...
{ "content_hash": "ebeda09026f021eb6d1a64e97903104b", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 387, "avg_line_length": 35.6, "alnum_prop": 0.47234226447709593, "repo_name": "looker-open-source/lmanage", "id": "fba55312d4f7e26e07ad2e62ca84e64559d9d0fe", "size": "4628...
from sonmano.consume import *
{ "content_hash": "4270855bee721d512950447147d7014e", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 29, "avg_line_length": 30, "alnum_prop": 0.8, "repo_name": "sonata-nfv/son-mano-framework", "id": "3ab3c602b6028e493dc2555a4f72aa563e29e673", "size": "1484", "binary": fal...
from __future__ import print_function import re import os import sys import platform import contextlib import subprocess import collections if sys.version_info.major == 3: import urllib.request as urllib import io raw_input = input else: import urllib2 as urllib import io import zipfile import tar...
{ "content_hash": "b7b2f448c45665cd3c7de67ddff364db", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 77, "avg_line_length": 27.69281045751634, "alnum_prop": 0.5888600424828888, "repo_name": "DaRasch/spiceminer", "id": "1307d08288a39b2c320368f109947d7df1134e1d", "size": "4...
from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.vpc import VPCConnection, InternetGateway class TestDescribeInternetGateway(AWSMockServiceTestCase): connection_class = VPCConnection def default_body(self): return """ <DescribeInternetGatewaysRespo...
{ "content_hash": "edc11c035650a3b9ce2b0b2b42fa63fb", "timestamp": "", "source": "github", "line_count": 152, "max_line_length": 95, "avg_line_length": 39.9671052631579, "alnum_prop": 0.5902880658436214, "repo_name": "IsCoolEntertainment/debpkg_python-boto", "id": "35f78fe094d9d018c2fafa33efae01870554...
from pathlib import Path from setuptools import find_packages, setup rootpath = Path(__file__).parent.absolute() def read(*parts): return open(rootpath.joinpath(*parts), "r").read() with open("requirements.txt") as f: require = f.readlines() install_requires = [r.strip() for r in require] setup( name=...
{ "content_hash": "62cfc14ffd99995a16cf72511841026b", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 104, "avg_line_length": 34.680851063829785, "alnum_prop": 0.6251533742331289, "repo_name": "pyoceans/gridgeo", "id": "d06f78b89186b4121ee807fee56ad81f6cf7a711", "size": "16...
""" An extension for a heartbeat keyword following the convention used by KTL in the wild """ from __future__ import absolute_import from Cauldron.types import Integer, DispatcherKeywordType __all__ = ['HeartbeatKeyword'] class HeartbeatKeyword(Integer, DispatcherKeywordType): """This keyword will update with a ...
{ "content_hash": "19cea9e78c5edb0c9383f63bdf6701ea", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 85, "avg_line_length": 26.586206896551722, "alnum_prop": 0.6264591439688716, "repo_name": "alexrudy/Cauldron", "id": "7dae1d4f885b944dc7dd20ee48d5ec4b028ab661", "size": "79...
from __future__ import with_statement import os try: import json; json except ImportError: # test skipped later json = None from mapproxy.test.image import img_from_buf from mapproxy.test.http import mock_single_req_httpd from mapproxy.test.system import module_setup, module_teardown, SystemTest, make_bas...
{ "content_hash": "9d969ec977bc86a789c2aa6f29fba13e", "timestamp": "", "source": "github", "line_count": 254, "max_line_length": 102, "avg_line_length": 44.125984251968504, "alnum_prop": 0.5781584582441114, "repo_name": "faegi/mapproxy", "id": "de76b12af00685963e87de14c7b49b7f2fac3b16", "size": "118...
import json import logging import os from io import StringIO from django.core.management import call_command import pytest from demo.models import SimpleConcurrentModel logger = logging.getLogger(__name__) @pytest.mark.django_db() def test_dumpdata(): SimpleConcurrentModel.objects.create() out = StringIO(...
{ "content_hash": "85dbd04c5727234d45657ef8fddd7361", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 72, "avg_line_length": 23.78787878787879, "alnum_prop": 0.7031847133757961, "repo_name": "saxix/django-concurrency", "id": "e2b93dc17b33589c7f4011ca73e548943a3c1d58", "size...
from django.conf import settings from django.core.mail import EmailMultiAlternatives class MinimalEmailHandler: ''' A simplistic outgoing email handler, to consolidate outgoing mail sending needs of impact-api calls attachment, if any, should be a triple of (filename, content, filetype) attach_alt...
{ "content_hash": "ce448c84de51ede913a10c0442d44312", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 75, "avg_line_length": 30.435897435897434, "alnum_prop": 0.5939342881213142, "repo_name": "masschallenge/impact-api", "id": "22765334915d35e5a9a6a4ff1880ff60df64c991", "siz...
""" Swaggy Jenkins Jenkins API clients generated from Swagger / Open API specification # noqa: E501 The version of the OpenAPI document: 1.5.1-pre.0 Contact: blah@cliffano.com Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 import typing # noqa:...
{ "content_hash": "12b5654d5505f2ae0a16f1b9761b00e5", "timestamp": "", "source": "github", "line_count": 124, "max_line_length": 89, "avg_line_length": 25.56451612903226, "alnum_prop": 0.6511041009463723, "repo_name": "cliffano/swaggy-jenkins", "id": "aaa0d495f766fc97fc4ba5132b09c1ba6481a8ef", "size...
""" Allows you to launch a pynetworktables2js server without copying any python code. Just install, and do:: python -m pynetworktables2js Or on Windows: py -m pynetworktables2js """ from __future__ import print_function import os from optparse import OptionParser from os...
{ "content_hash": "bfec9aeb2ab4948cadd87d6e6525a254", "timestamp": "", "source": "github", "line_count": 130, "max_line_length": 155, "avg_line_length": 26.338461538461537, "alnum_prop": 0.6378504672897196, "repo_name": "amorygalili/pynetworktables2js", "id": "7ea9e7041e5718f2f41efb0bc0ce48b5e242b14a"...
"""Tests for vumi.demos.words.""" from twisted.internet.defer import inlineCallbacks from vumi.demos.words import (SimpleAppWorker, EchoWorker, ReverseWorker, WordCountWorker) from vumi.message import TransportUserMessage from vumi.tests.helpers import VumiTestCase from vumi.application....
{ "content_hash": "8d21c8a4c46e005ee23fa9e02ca51d56", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 78, "avg_line_length": 36.32, "alnum_prop": 0.6651982378854625, "repo_name": "vishwaprakashmishra/xmatrix", "id": "16c735c467c8c47b42707b56ebd874a9dd3fdd19", "size": "3657...
""" Accessibility algorithms. @sort: accessibility, connected_components, cut_edges, cut_nodes, mutual_accessibility """ # Imports from sys import getrecursionlimit from sys import setrecursionlimit # Transitive-closure def accessibility(graph): """ Accessibility matrix (transitive closure). @type gr...
{ "content_hash": "519c7cee1d195d81dc763ca66035939d", "timestamp": "", "source": "github", "line_count": 324, "max_line_length": 99, "avg_line_length": 28.37962962962963, "alnum_prop": 0.6147906470908102, "repo_name": "wdv4758h/ZipPy", "id": "863e0de024b95a9501b604049899c6b3a9e5e326", "size": "10321...
import codecs import inspect from json import loads import os import sys from bokeh.model import Model import bokeh.models as models from bokeh.core.properties import DataSpec from bokeh.core.json_encoder import serialize_json dest_dir = sys.argv[1] classes = [member for name, member in inspect.getmembers(models) if...
{ "content_hash": "c53ba120b0e3c3edb0ffb18a15c0914d", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 110, "avg_line_length": 32.88785046728972, "alnum_prop": 0.6439329354930378, "repo_name": "clairetang6/bokeh", "id": "5e158387c19d32d21ec41a9eb521e01fe25523dd", "size": "3...
from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at you...
{ "content_hash": "0f26cb328a2cba2f6c0ed47b96047054", "timestamp": "", "source": "github", "line_count": 382, "max_line_length": 150, "avg_line_length": 32.47643979057592, "alnum_prop": 0.5577946155086249, "repo_name": "thaim/ansible", "id": "60b040ece438c80f1d2da28eaf8d49aa8d77decf", "size": "12424...
from django import forms try: from django.core.urlresolvers import reverse except ImportError: from django.urls import reverse from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout from smartfields.crispy.layout import ImageField, VideoField, LimitedField from smartfields.processo...
{ "content_hash": "18c97bfe8b9f26923e5e97b6f7e38dda", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 83, "avg_line_length": 32.55555555555556, "alnum_prop": 0.5439419795221843, "repo_name": "lehins/django-smartfields", "id": "417ebc3787dcd1751291ceeefd4dc4b1f2a6a319", "siz...
from django.utils.translation import activate from django.test import TestCase from django.core.urlresolvers import reverse class TestHomePage(TestCase): def test_uses_index_template(self): activate('en') response = self.client.get(reverse('home')) self.assertTemplateUsed(response, 'taskb...
{ "content_hash": "d869eb9f6eec3fc1d51185b962251fe9", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 66, "avg_line_length": 31.8125, "alnum_prop": 0.7033398821218074, "repo_name": "caithess/taskbuster", "id": "998443e6befd78039334b42faa6b9cca2f2e87fc", "size": "533", "bi...
def main(): pass if __name__ == '__main__': main() # Load the Chrono::Engine unit!!! import ChronoEngine_python_core as chrono # Create a physical system, my_system = chrono.ChSystemNSC() # Add two bodies my_shbodyA = chrono.ChBody() my_shbodyA.SetMass(20) my_shbodyA.SetInertiaXX( chrono.ChVectorD(10,10,1...
{ "content_hash": "799cce7ad2c581e478807c4e6c8895d9", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 144, "avg_line_length": 29.844961240310077, "alnum_prop": 0.7358441558441559, "repo_name": "jcmadsen/chrono", "id": "5f2712f18a44880fc3836b836afb538232726f3e", "size": "40...
from wtforms import TextField from wtforms.validators import DataRequired from ..datacenter import DatacenterCheckForm class CheckForm(DatacenterCheckForm): ''' Creates a wtforms form object for monitors ''' title = "Heroku: All Dynos Not Idle" description = """ This monitor returns false if any Hero...
{ "content_hash": "d10477b22439773dec5bc39eaad2ba25", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 210, "avg_line_length": 35.96666666666667, "alnum_prop": 0.6886005560704356, "repo_name": "madflojo/cloudroutes-service", "id": "d3422af1a78e53eca1fc6fd01ae676d9b8b68141", ...
import os from os.path import join as opj import numpy as np import matplotlib.pyplot as plt cwd = os.getcwd() # results[0] = test loss; results[1] = test accuracy translate_results = np.load(opj(cwd, 'perclearn/data/results/translate.npz'))['arr_0'] rotate_results = np.load(opj(cwd, 'perclearn/data/results/rotate.np...
{ "content_hash": "30c55edd99bde6c494b09e9064caa5e4", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 86, "avg_line_length": 32.43333333333333, "alnum_prop": 0.7153134635149023, "repo_name": "erramuzpe/seattle-perceptual-learning", "id": "9c0b209a355e96547bddec25d7fe84c6dc64b...
import datetime from distutils.core import setup import py2exe import site import os import os.path class Target(object): '''Target is the baseclass for all executables that are created. It defines properties that are shared by all of them. ''' def __init__(self, **kw): self.__dict_...
{ "content_hash": "4049b97c7b9a90eb42386472d374f6e1", "timestamp": "", "source": "github", "line_count": 243, "max_line_length": 124, "avg_line_length": 36.08230452674897, "alnum_prop": 0.5806341240875912, "repo_name": "BeTeK/EliteMerchant", "id": "cdd12e73566695094f8778d4c193bbcc84fc6869", "size": ...
from tkinter import * #from tkinter import messagebox from tkinter import ttk from tkinter import filedialog from datetime import datetime import plotly.plotly as py from plotly.graph_objs import Scatter import plotly.graph_objs as go import random import sqlite3 import pandas conn=sqlite3.connect('MultiServerDatab...
{ "content_hash": "6e51bbd83d0ca67642928885c9077fff", "timestamp": "", "source": "github", "line_count": 1050, "max_line_length": 290, "avg_line_length": 34.404761904761905, "alnum_prop": 0.6647474048442906, "repo_name": "rsmailach/MultiServerSRPT", "id": "5fbe2bc240593de606437af8d5d147d7b0881136", ...