text
stringlengths
4
1.02M
meta
dict
"""Look at reads mapping to decoy STR chromosomes and use their pairs to determine which STR locus they originated from. Generates counts of reads mapping to the decoy originating each STR locus. """ import argparse import pysam #from insert_size import parse_bed, span_intervals import pybedtools as bt import pandas a...
{ "content_hash": "d3e82f6608807afc88d1ecbbab84c2e3", "timestamp": "", "source": "github", "line_count": 327, "max_line_length": 211, "avg_line_length": 40.862385321100916, "alnum_prop": 0.6241580601706331, "repo_name": "hdashnow/STRetch", "id": "b21c5af2838b4908071bff0430a0c5e07ff10eeb", "size": "1...
import sys import unittest from androguard.core.bytecodes import apk, axml TEST_APP_NAME = "TestsAndroguardApplication" TEST_ICONS = { 120: "res/drawable-ldpi/icon.png", 160: "res/drawable-mdpi/icon.png", 240: "res/drawable-hdpi/icon.png", 65536: "res/drawable-hdpi/icon.png" } TEST_CONFIGS = { "la...
{ "content_hash": "b25d154c7cb6c975a1c1f2b004b37e58", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 95, "avg_line_length": 35.32835820895522, "alnum_prop": 0.6092099704267004, "repo_name": "huangtao2003/androguard", "id": "f680cd5b9da90e69bfef8752cefac89d5932e89d", "size"...
from __future__ import annotations from typing import Dict, Optional import argparse import json import multiprocessing import os import pathlib import shutil import socket import subprocess import sys import tempfile import time MESSAGE_DEFAULTS: Dict[str, str] = { "PRIORITY": "6", "SYSLOG_IDENTIFIER": "jou...
{ "content_hash": "3d56a39778d06d23133bd6012801bd4d", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 94, "avg_line_length": 29.26851851851852, "alnum_prop": 0.6135716545397026, "repo_name": "aiven/journalpump", "id": "5a13a3e6a073685df09fe9db80d8dd53a75cd277", "size": "63...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('volunteers', '0008_auto_20161101_2324'), ] operations = [ migrations.AlterField( model_name='volunteer', name='age', ...
{ "content_hash": "2551c4b57c0a3b38f9d8e5f9a055cece", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 89, "avg_line_length": 23.333333333333332, "alnum_prop": 0.611904761904762, "repo_name": "mrts/foodbank-campaign", "id": "26652dffcf86c0d7e670999a4bf0201d9bd34b0e", "size":...
import boto3 import pytest from botocore.exceptions import ClientError from moto import mock_apigatewayv2 @mock_apigatewayv2 def test_get_vpc_links_empty(): client = boto3.client("apigatewayv2", region_name="eu-west-1") resp = client.get_vpc_links() resp.should.have.key("Items").equals([]) @mock_apiga...
{ "content_hash": "b697078372f030d36d1d87cc32c61b0d", "timestamp": "", "source": "github", "line_count": 162, "max_line_length": 79, "avg_line_length": 32, "alnum_prop": 0.6375385802469136, "repo_name": "spulec/moto", "id": "4696f392b2685c7d3c14d440e6f8fa7b534e9b36", "size": "5184", "binary": fals...
import os import csv import configparser import numpy as np from scipy.optimize import linear_sum_assignment from ._base_dataset import _BaseDataset from .. import utils from .. import _timing from ..utils import TrackEvalException class PersonPath22(_BaseDataset): """Dataset class for MOT Challenge 2D bounding bo...
{ "content_hash": "75d03a9cb5327f5de4ef916a9244e2a9", "timestamp": "", "source": "github", "line_count": 452, "max_line_length": 157, "avg_line_length": 55.23451327433628, "alnum_prop": 0.5593607305936074, "repo_name": "JonathonLuiten/TrackEval", "id": "177954a82009d68e7e4a68a2087255fc5dcac42e", "si...
from decimal import * from koalixcrm.crm.documents.sales_document_position import SalesDocumentPosition class Calculations: @staticmethod def calculate_document_price(document, pricing_date): """Performs a price recalculation on contact documents. The calculated price is stored in the last_ca...
{ "content_hash": "2402c70c08c4badd7a9f2be26ef810aa", "timestamp": "", "source": "github", "line_count": 113, "max_line_length": 104, "avg_line_length": 44.557522123893804, "alnum_prop": 0.5932472691161867, "repo_name": "dario61081/koalixcrm", "id": "083855062dcf8f37b1ce540f49af33e5e487b401", "size"...
from .. import Availability, Class, Constant, Define, Method, Parameter, Type gx_class = Class('PAT', doc=""" A :class:`PAT` object is created from a Geosoft format pattern file. It contains all the individual patterns listed in the file. ...
{ "content_hash": "9211f9ef466c6ac9e00cca2d816d18bc", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 99, "avg_line_length": 40.6, "alnum_prop": 0.4839901477832512, "repo_name": "GeosoftInc/gxapi", "id": "84d12adc0f053838835231189863a84cca5d1f0e", "size": "3248", "binary"...
import sys import os # If extensions (or modules to document with autodoc) are in another # directory, add these directories to sys.path here. If the directory is # relative to the documentation root, use os.path.abspath to make it # absolute, like shown here. #sys.path.insert(0, os.path.abspath('.')) # Get the proje...
{ "content_hash": "3d3cdd5a6d2bd2830438c2331f9454b3", "timestamp": "", "source": "github", "line_count": 260, "max_line_length": 76, "avg_line_length": 30.557692307692307, "alnum_prop": 0.7019509125235998, "repo_name": "yaph/shpinfo", "id": "711999fc13fbfa957bfe5b972c3dadaf80a1b347", "size": "8391",...
import functools import msgpack from oslo_utils import timeutils import redis from zaqar.common import decorators from zaqar import storage from zaqar.storage import errors from zaqar.storage.redis import utils QUEUES_SET_STORE_NAME = 'queues_set' MESSAGE_IDS_SUFFIX = 'messages' class QueueController(storage.Queue...
{ "content_hash": "ed924338d7a2773fa6c0e04db072e694", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 75, "avg_line_length": 33.08064516129032, "alnum_prop": 0.5771168535673655, "repo_name": "openstack/zaqar", "id": "493c08d1c656e11bbb4912b6f4ecdf32983ff267", "size": "6737...
from contextlib import closing import os import shutil import sys import tarfile try: from gppylib import gplog from gppylib.commands import gp from gppylib.commands.base import Command, REMOTE, WorkerPool, ExecutionError from gppylib.commands.unix import Rsync from gppylib.gpversion import GpVersi...
{ "content_hash": "9496bd95b21648d804df48729c5f1ab2", "timestamp": "", "source": "github", "line_count": 1642, "max_line_length": 167, "avg_line_length": 40.294762484774665, "alnum_prop": 0.6212139532071822, "repo_name": "greenplum-db/gpdb", "id": "1bfecf2bd5809e5f4a42faea5b650c07add5873e", "size": ...
import logging import emission.core.wrapper.wrapperbase as ecwb class CommonPlace(ecwb.WrapperBase): props = { "location" : ecwb.WrapperBase.Access.WORM, # location in geojson format # TODO: Currently marking this as RW to get around the fact that I need # to set the successors after cre...
{ "content_hash": "67967fd40bf462921d3933962a8eb1fb", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 100, "avg_line_length": 39.15, "alnum_prop": 0.6743295019157088, "repo_name": "joshzarrabi/e-mission-server", "id": "534eddb4ab3a126a3d4c39785623ebb5060da476", "size": "783...
"""Build NativeClient toolchain packages.""" import logging import optparse import os import subprocess import sys import textwrap sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import pynacl.file_tools import pynacl.gsd_storage import pynacl.log_tools import pynacl.local_storage_cache SCRIPT_DIR = o...
{ "content_hash": "e2f438f277e9e37f7c48abdd7fcfa721", "timestamp": "", "source": "github", "line_count": 541, "max_line_length": 80, "avg_line_length": 39.746765249537894, "alnum_prop": 0.627400827791471, "repo_name": "sbc100/native_client", "id": "5e193293127c24ea7d4683e96674fb8b5d6bac73", "size": ...
import numpy as np import tensorflow as tf import helpers import matplotlib.pyplot as plt import embeddings as emb class BidirectionalEncoder(object): def __init__(self,embeddings): # Shape: [encoder_max_time, batch_size] self.embeddings = embeddings self.inputs = tf.placeholder(shape=(None...
{ "content_hash": "6422a1ea448e3874545256ee38566ca5", "timestamp": "", "source": "github", "line_count": 213, "max_line_length": 127, "avg_line_length": 49.23943661971831, "alnum_prop": 0.6267162471395881, "repo_name": "josdaza/deep-toolbox", "id": "b92aa7f115a66c9c09d169c55c57b5e918dd1a83", "size":...
""" Classes to represent error states """ class Error(Exception): """Base exception class for NPC""" pass class FormatError(Error): """ Raised when trying to use a malformed file Attributes: strerror (str): Error message describing what happened """ def __init__(self, strerror): ...
{ "content_hash": "5d030746816ceaf10b0b936764bf6f9d", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 74, "avg_line_length": 26.818181818181817, "alnum_prop": 0.6305084745762712, "repo_name": "aurule/npc", "id": "b6acc316a733fa40900364c99be249025a96327a", "size": "885", "...
from tenhou.client import TenhouClient from utils.logger import set_up_logging def connect_and_play(): logger = set_up_logging() client = TenhouClient(logger) client.connect() try: was_auth = client.authenticate() if was_auth: client.start_game() else: ...
{ "content_hash": "ef4dea01b3e1925be97756f1696a5d38", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 60, "avg_line_length": 24.958333333333332, "alnum_prop": 0.6143572621035058, "repo_name": "MahjongRepository/tenhou-python-bot", "id": "339889f396a771bcaddd2e29f80f498dcd506f...
from scrapy import Selector from libs.misc import get_spider_name_from_domain from libs.polish import polish_title, polish_subtitle, polish_content from novelsCrawler.spiders.novelSpider import NovelSpider class LwxiaoshuoSpider(NovelSpider): """ classdocs example: http://www.kanshuge.la/files/article/h...
{ "content_hash": "7cdb34d71989b431c4bdb44d53ee87e0", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 74, "avg_line_length": 34.666666666666664, "alnum_prop": 0.6490384615384616, "repo_name": "yytang2012/novels-crawler", "id": "3b92eb1352fad321fe260e61311f5cdd926b1c1b", "si...
from BaseResult import BaseResult; class StringResult(BaseResult): string = ''; def __init__(self, string): self.string = string; def getResultString(self, varList): return self.string;
{ "content_hash": "9c68a00e6cc63e4c6150abb3acafa542", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 36, "avg_line_length": 17.90909090909091, "alnum_prop": 0.7157360406091371, "repo_name": "netgio/voicecount", "id": "90b250d7c88ef7d96d580ed384f1481fcf9dbe0b", "size": "197...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.forms.widgets class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MO...
{ "content_hash": "9eaa7a90d1d65684641d820ae2c38ec5", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 119, "avg_line_length": 38.5, "alnum_prop": 0.6035543403964456, "repo_name": "t-mertz/slurmCompanion", "id": "7fb25e56be6021e15b776e0966d8de9d0c80c77d", "size": "1536", "...
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from django.contrib.auth import get_user_model User = get_user_model() class Migration(SchemaMigration): def forwards(self, orm): # Adding M2M table for field mirror_site on 'Image' m2m_tabl...
{ "content_hash": "7ac171260956d93bc2d12ccf48fc32d8", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 217, "avg_line_length": 71.74444444444444, "alnum_prop": 0.5578442000929225, "repo_name": "YACOWS/opps", "id": "09b2a082903c25f4a54a2fcf346feae7bbec4ce8", "size": "6481", ...
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: DEBUG = False TESTING = False SECRET_KEY = os.environ.get('SECRET_KEY') SSLIFY = 'enable' @staticmethod def init_app(app): pass class ProductionConfig(Config): SQLALCHEMY_DATABASE_URI = os.environ.get('...
{ "content_hash": "9f9fd8f4ef77e1aaef566e12c292d684", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 84, "avg_line_length": 21.779661016949152, "alnum_prop": 0.6529182879377432, "repo_name": "corbincavolt/flask-starter", "id": "33da9cab1c672ba70ab462e7b965c62bd23f7469", "s...
"""Wrapper for sigprocmask(2) operations.""" import logging import os import ctypes from ctypes import ( c_int, c_void_p, ) from ctypes.util import find_library import enum from ._sigsetops import ( SigSet, sigaddset, sigfillset, ) _LOGGER = logging.getLogger(__name__) ######################...
{ "content_hash": "b7b41b527becdcabfb9dfc66c11944a7", "timestamp": "", "source": "github", "line_count": 112, "max_line_length": 79, "avg_line_length": 24.741071428571427, "alnum_prop": 0.5633345362684952, "repo_name": "toenuff/treadmill", "id": "10d9ad1746beed9ab6032d4476f044ca4231e6c1", "size": "2...
import multiprocessing import os import requests class Downloader: def __init__(self, threads, user_agent): self._threads = threads self._user_agent = user_agent self._jobs = [] def add_job(self, url, target_file): self._jobs.append((url, target_file)) def run(self): ...
{ "content_hash": "fa48642a684810f6fa68e5c817831bcd", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 88, "avg_line_length": 33.470588235294116, "alnum_prop": 0.5483304042179262, "repo_name": "flopp/safari", "id": "566e5291e8c777642429dee7162c7006e1abc296", "size": "1162", ...
""" pygments.formatters._mapping ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Formatter mapping defintions. This file is generated by itself. Everytime you change something on a builtin formatter defintion, run this script from the formatters folder to update it. Do not alter the FORMATTERS dictionary by hand....
{ "content_hash": "7e55d7865eee59905bad3bee3320b6d8", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 290, "avg_line_length": 60.20879120879121, "alnum_prop": 0.6656324146742106, "repo_name": "erickt/pygments", "id": "81556276a283eaf1690badf8e57d2553b9cf16b7", "size": "5503...
class OCcsr(OpenShiftCLI): ''' Class to wrap the oc adm certificate command line''' kind = 'csr' # pylint: disable=too-many-arguments def __init__(self, nodes=None, approve_all=False, service_account=None, kubeconfig='/etc/origin/maste...
{ "content_hash": "09d76b36dd504edb3cf8623fa519a586", "timestamp": "", "source": "github", "line_count": 193, "max_line_length": 104, "avg_line_length": 35.943005181347154, "alnum_prop": 0.5228484935851232, "repo_name": "rhdedgar/openshift-tools", "id": "ea11c6ca98ce3e4c50600f0c40b6e4974ab7545e", "s...
""" lmdo system configuration """ # File for lmdo project config data PROJECT_CONFIG_TEMPLATE = 'lmdo.yaml.j2' PROJECT_CONFIG_FILE = 'lmdo.yaml' # PIP PIP_VENDOR_FOLDER = 'vendored' PIP_REQUIREMENTS_FILE = 'requirements.txt' # Cloudformations CLOUDFORMATION_DIRECTORY = 'cloudformation' CLOUDFORMATION_TEMPLATE_ALLOWE...
{ "content_hash": "3b66d115106cc853e3b2c063ba07dc42", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 79, "avg_line_length": 22.010526315789473, "alnum_prop": 0.6303204208512674, "repo_name": "piwell/lmdo", "id": "f59cddf5c071b0fc0777904a789f3216ad96b6f3", "size": "2091", ...
"""advent of code day 1. http://adventofcode.com/2016/day/1 """ import sys import string def face(direction, facing): """Keep track of facing direction.""" try: lr = direction[0] if lr == "R": facing += 1 elif lr == "L": facing -= 1 facing = facing % ...
{ "content_hash": "eaee62733ee4dcbb320dd5ea01716e78", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 61, "avg_line_length": 21.016393442622952, "alnum_prop": 0.515600624024961, "repo_name": "shaggy245/adventofcode", "id": "8e2e98e060cab861c53be4902da9a71055e37c7d", "size":...
from nose.tools import assert_equal from .. import GithubMarkdown def test_single_underscores(): """don't touch single underscores inside words.""" assert_equal( GithubMarkdown.gfm('foo_bar'), 'foo_bar', ) def test_underscores_code_blocks(): """don't touch underscores in code blocks....
{ "content_hash": "6e471c0cc904d25fce59c5748d0711e7", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 74, "avg_line_length": 25.698795180722893, "alnum_prop": 0.5668073136427567, "repo_name": "issuequality/issuequality", "id": "1289ab9ab341b05bc623ef3cd8f766ec1dcb75da", "si...
from __future__ import print_function from django.http import HttpResponse, HttpResponseRedirect, HttpResponseBadRequest, QueryDict from django.shortcuts import render_to_response, get_object_or_404, redirect from django.template import Context, RequestContext, loader from django.contrib.auth.decorators import login_re...
{ "content_hash": "cff7e013d241759fed81512745152f9d", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 104, "avg_line_length": 36.333333333333336, "alnum_prop": 0.6752293577981652, "repo_name": "olebole/astrometry.net", "id": "2b94ab010e75eb595a9ee0c9ba68e85570e5a867", "size...
import functools import re from pathlib import Path from setuptools import find_packages, setup #: Holds a list of packages to install with the binary distribution PACKAGES = find_packages(where="src") META_FILE = Path("src").absolute() / "w1thermsensor" / "__init__.py" KEYWORDS = ["w1", "w1-therm", "therm", "sensor"...
{ "content_hash": "7e77d44f7084887106eb98f1022bd791", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 124, "avg_line_length": 34.168539325842694, "alnum_prop": 0.6537323248931273, "repo_name": "timofurrer/w1thermsensor", "id": "8c345f3bfcdd931f88377590c0c9b84748ce2aed", "si...
from collections import OrderedDict from typing import Dict, Type from .base import BudgetServiceTransport from .grpc import BudgetServiceGrpcTransport from .grpc_asyncio import BudgetServiceGrpcAsyncIOTransport # Compile a registry of transports. _transport_registry = OrderedDict() # type: Dict[str, Type[BudgetServ...
{ "content_hash": "c66a46507f070fbb7eb6ac04e3b9cbca", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 84, "avg_line_length": 34.35294117647059, "alnum_prop": 0.8065068493150684, "repo_name": "googleapis/python-billingbudgets", "id": "bf859369e38ad1097b6af5b9083eb75995fa8e5d",...
from copy import deepcopy import httplib as http import time import mock import pytest import pytz import datetime from nose.tools import * # noqa from tests.base import OsfTestCase, fake from osf_tests.factories import ( UserFactory, NodeFactory, ProjectFactory, AuthUserFactory, RegistrationFactory ) from a...
{ "content_hash": "49dca46ce3de6597652f7c17222fb33f", "timestamp": "", "source": "github", "line_count": 1426, "max_line_length": 139, "avg_line_length": 43.90042075736326, "alnum_prop": 0.6239097792402799, "repo_name": "erinspace/osf.io", "id": "dc6a772c1ef47cd733800b23e42b336ef76de5ba", "size": "6...
"""Provide the WikiPage class.""" from ...const import API_PATH from ..listing.generator import ListingGenerator from .base import RedditBase from .redditor import Redditor class WikiPage(RedditBase): """An individual WikiPage object.""" __hash__ = RedditBase.__hash__ @staticmethod def _revision_gen...
{ "content_hash": "d601cc818a978fa35bfec764fb6a631e", "timestamp": "", "source": "github", "line_count": 199, "max_line_length": 79, "avg_line_length": 36.92964824120603, "alnum_prop": 0.576813171860117, "repo_name": "13steinj/praw", "id": "54ae30219af49f6aa1b664f09764b868e36caa43", "size": "7349", ...
DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( ('jon', 'jon.i.austin@gmail.com'), # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'mysql_old' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'advisoryscan' # Or pa...
{ "content_hash": "ddba4c8bb238b6edaa1a8571b48adafa", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 113, "avg_line_length": 33.909909909909906, "alnum_prop": 0.7162592986184909, "repo_name": "jonaustin/advisoryscan", "id": "7e701a5b28e28c3a56cdfef8bbb10dab627b2aa6", "siz...
import pytest from libqtile import layout import libqtile.config from ..conftest import no_xinerama from .layout_utils import assert_focused, assert_focus_path class MatrixConfig: auto_fullscreen = True main = None groups = [ libqtile.config.Group("a"), libqtile.config.Group("b"), ...
{ "content_hash": "9dbb0067ae4b77fb1a74d0f25dc6853f", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 90, "avg_line_length": 29.5188679245283, "alnum_prop": 0.6347075743048898, "repo_name": "flacjacket/qtile", "id": "209353d5eedabde4214326fc217d7772d416980b", "size": "4467...
""" Track module Provides: o Track - Container for a single track on the diagram, containing FeatureSet and GraphSet objects For drawing capabilities, this module uses reportlab to draw and write the diagram: http://www.reportlab.com For dealing with biological information, ...
{ "content_hash": "c043f144502617c635cbd7c3b6fb4bba", "timestamp": "", "source": "github", "line_count": 411, "max_line_length": 98, "avg_line_length": 37.180048661800484, "alnum_prop": 0.5519926706367384, "repo_name": "bryback/quickseq", "id": "833153f51e3eff2afcfb27133f3e1c0ecdf21257", "size": "15...
""" Flux for Home-Assistant. The idea was taken from https://github.com/KpaBap/hue-flux/ For more details about this component, please refer to the documentation at https://home-assistant.io/components/switch.flux/ """ from datetime import time import logging import voluptuous as vol from homeassistant.components.li...
{ "content_hash": "2c53a25c090082e96e36563f71da95d1", "timestamp": "", "source": "github", "line_count": 222, "max_line_length": 79, "avg_line_length": 39.270270270270274, "alnum_prop": 0.5777701307639367, "repo_name": "robjohnson189/home-assistant", "id": "9fccf75ea4f83d8bb8d16b540b7b142b1264f3e6", ...
""" WSGI config for econordeste project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "econordeste.settings") from djang...
{ "content_hash": "5ed1ae88620f06a030725dfb1017ec62", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 78, "avg_line_length": 28.357142857142858, "alnum_prop": 0.7783375314861462, "repo_name": "klebercode/econordeste", "id": "0aeb851172ced4e1472a99d5dc0f5cd187b4d2dc", "size"...
"""Beaker utilities""" try: import thread as _thread import threading as _threading except ImportError: import dummy_thread as _thread import dummy_threading as _threading from datetime import datetime, timedelta import os import re import string import types import weakref import warnings import sys ...
{ "content_hash": "decdfeb52e1aa21896de0b2c0f953bbf", "timestamp": "", "source": "github", "line_count": 385, "max_line_length": 87, "avg_line_length": 32.127272727272725, "alnum_prop": 0.577896353787695, "repo_name": "anedos/beaker", "id": "151fd66b3a4a229cbe4450d4db201ca2f925f1b1", "size": "12369"...
""" Provides entry point main(argv) when running from the command line. Created on Sat Jul 9 12:45:39 2016 @author: Aaron Beckett """ import os import argparse import ctip.commands as cmd # Version information (parsed by setup.py __version__ = "0.1.1" # Get help text from file in docs folder with open("docs" + o...
{ "content_hash": "dcc7fcf5a1830d129a6b0e4d7268583f", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 67, "avg_line_length": 31.214285714285715, "alnum_prop": 0.6788710907704043, "repo_name": "becketta/ctip", "id": "7ab4b0f33a6eb700d348fec90260bdd406584f9f", "size": "3957"...
from __future__ import unicode_literals from ..dti import DTIRecon def test_DTIRecon_inputs(): input_map = dict(DWI=dict(argstr='%s', mandatory=True, position=1, ), args=dict(argstr='%s', ), b0_threshold=dict(argstr='-b0_th', ), bvals=dict(mandatory=True, ), bvecs=dict(args...
{ "content_hash": "51c24de38cc5b41f519a73402d1729d6", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 67, "avg_line_length": 22.71641791044776, "alnum_prop": 0.580814717477004, "repo_name": "mick-d/nipype", "id": "c5d6a4f31b47633cec10a17f990ecaa119240fcf", "size": "1576", ...
""" WSGI config for test_project project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example_project.settings") from ...
{ "content_hash": "c90e362830b4bd9b073f06991e996fb0", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 78, "avg_line_length": 28.714285714285715, "alnum_prop": 0.7761194029850746, "repo_name": "RamezIssac/django-datatable-view", "id": "8295128819f1b3c22b9684134ee1d73051cddf3a"...
from django.utils.timezone import now from haystack import indexes from djangobb_forum.models import Post class PostIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) author = indexes.CharField(model_attr='user') created = indexes.DateTimeField(model_attr=...
{ "content_hash": "b4cf22a2e52c562c19711c8cfe0f07b2", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 72, "avg_line_length": 34.2, "alnum_prop": 0.7587719298245614, "repo_name": "saifrahmed/DjangoBB", "id": "eb3e80ac6315edcf91f9c898fa20026e26462237", "size": "684", "binar...
from django import forms from django.contrib.comments.forms import CommentForm from django.conf import settings from django.utils.hashcompat import sha_constructor from threadedcomments.models import ThreadedComment class ThreadedCommentForm(CommentForm): parent = forms.IntegerField(required=False, widget=forms.H...
{ "content_hash": "c352c785e3b07bbc45a3b88899b0b1e2", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 82, "avg_line_length": 36.05882352941177, "alnum_prop": 0.6386623164763459, "repo_name": "coxmediagroup/django-threadedcomments", "id": "f402ab9d3bd701a719da36f0392c6f73c02bc...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/medicine/crafted/shared_medpack_revive.iff" result.attribute_template_id = 7 result.stfName("medicine_name","medpack_revive") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "593ce0437564ed305a057754bd22afc1", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 79, "avg_line_length": 24.384615384615383, "alnum_prop": 0.7097791798107256, "repo_name": "obi-two/Rebelion", "id": "da8c15484609e4e863760ef6b0322298a6f3d046", "size": "462...
""" XVM (c) https://modxvm.com 2013-2020 """ import traceback import simplejson from gui.shared import g_eventBus, events from helpers import dependency from skeletons.gui.app_loader import IAppLoader, GuiGlobalSpaceID from xfw import * from xfw_actionscript.python import * import xvm_main.python.config as config f...
{ "content_hash": "b675fab3b27f3d01107a994e3a808a08", "timestamp": "", "source": "github", "line_count": 214, "max_line_length": 100, "avg_line_length": 31.635514018691588, "alnum_prop": 0.6206794682422452, "repo_name": "KnechtRootrechtCH/Mimir", "id": "78159c86ad1f4351ad8d22e5bc94ed2a86e287f0", "si...
import contextlib import fixtures import mock from mox3 import mox import netaddr from oslo_concurrency import processutils from oslo_config import cfg from oslo_db import exception as db_exc from oslo_log import log as logging import oslo_messaging as messaging from oslo_utils import importutils from oslo_utils impor...
{ "content_hash": "e20c3504ed7d6cf743effd4ef7641a23", "timestamp": "", "source": "github", "line_count": 3476, "max_line_length": 79, "avg_line_length": 45.793153049482164, "alnum_prop": 0.5283489448852535, "repo_name": "blueboxgroup/nova", "id": "e0e9da3ad082f115b09973ceae97231b5c5fc67d", "size": "...
import json import os from rest_framework import serializers from rest_framework.reverse import reverse from onadata.apps.logger.models import XForm from onadata.libs.permissions import get_object_users_with_permissions from onadata.libs.serializers.fields.boolean_field import BooleanField from onadata.libs.serialize...
{ "content_hash": "d64e6fb49bbb71e7a2712240d1e94308", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 83, "avg_line_length": 34.41111111111111, "alnum_prop": 0.6289958023894091, "repo_name": "kobotoolbox/kobocat", "id": "aa12127a87bed56181c9e9628444b94747c3432a", "size": "...
''' Created on 2015/04/15 @author: Taiga ''' from nose.core import run if __name__ == "__main__": #import sys;sys.argv = ['', 'Test.testName'] import os os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) run('tests.integration.test_backtest')
{ "content_hash": "2a2144cbf7072bd8d0176f106f9eccc7", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 73, "avg_line_length": 23.333333333333332, "alnum_prop": 0.6285714285714286, "repo_name": "swdtalent/py-metatrader", "id": "53ad9147dbea85981e6957e616c87ae5793062de", "size...
import os import pytest from pyroSAR import SAFE from pyroSAR.xml_util import XMLHandler def test_handler(tmpdir, testdata): id = SAFE(testdata['s1']) id.unpack(str(tmpdir)) testfile = os.path.join(id.scene, 'manifest.safe') xml = XMLHandler(testfile) xml.restoreNamespaces() xml.write(os.path....
{ "content_hash": "faf13ab8f96d8d663df45d015ede2c12", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 57, "avg_line_length": 29.894736842105264, "alnum_prop": 0.6725352112676056, "repo_name": "johntruckenbrodt/pyroSAR", "id": "25c6b6e8a576e14e5cb627dc742016c5caa03d39", "siz...
import os DEBUG = False TEMPLATE_DEBUG = DEBUG DOCUMENT_ROOT = os.path.realpath(os.path.dirname(__file__)) ADMINS = ( ('Halit Alptekin', 'info@halitalptekin.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite...
{ "content_hash": "50732c71188e20034427f7f005b904d2", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 108, "avg_line_length": 31.398373983739837, "alnum_prop": 0.6437079233557742, "repo_name": "halitalptekin/PyTr", "id": "c01fe9f37bbbc39dbea1e23cb78b7e55246a7891", "size": ...
from my.models import QueDoidura # Opcional. Retorna quantas migracoes devem ser rodadas por task (default = 1000) MIGRATIONS_PER_TASK = 2 # Descricao amigavel dessa alteracao no banco DESCRIPTION = 'multiplica por 2' def get_query(): """ Retorna um objeto query das coisas que precisam ser migradas """ retur...
{ "content_hash": "28031bb4324dc42fb44d22ff0d640797", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 81, "avg_line_length": 27.6, "alnum_prop": 0.7270531400966184, "repo_name": "qmagico/gae-migrations", "id": "a827770bdca5a4cf8cae5f41c2a096304bf0b965", "size": "414", "bi...
import time from .connection import Urllib3HttpConnection from .serializer import JSONSerializer from .exceptions import (NOSException, ServiceException, ConnectionError, ConnectionTimeout, InvalidObjectName, InvalidBucketName, FileOpenModeError, ...
{ "content_hash": "1d976a438b415588b6d524db263187e0", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 92, "avg_line_length": 36.263565891472865, "alnum_prop": 0.5316374519025224, "repo_name": "NetEase-Object-Storage/nos-python-sdk", "id": "7aa7bbee899a0978468077f2b2c6691e490...
import pexpect import sys import re from getpass import getpass def main(): ip = '184.105.247.71' username = 'pyclass' password = getpass() ssh_conn = pexpect.spawn('ssh -l {} {}'.format(username, ip)) ssh_conn.logfile = sys.stdout ssh_conn.timeout = 3 ssh_conn.expect('ssword:') ssh_co...
{ "content_hash": "427970e53aa615187de1c92921f2ff21", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 65, "avg_line_length": 21.49019607843137, "alnum_prop": 0.6076642335766423, "repo_name": "daveg999/automation_class", "id": "be4c4bddaeab15c9762c28dfabef336ce8aed136", "siz...
from .partition_safety_check import PartitionSafetyCheck class WaitForPrimarySwapSafetyCheck(PartitionSafetyCheck): """Safety check that waits for the primary replica to be moved out of the node before starting an upgrade to ensure the availability of the primary replica for the partition. :param kin...
{ "content_hash": "c57dc9cdc9fd1156753b21a28c70f9f2", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 86, "avg_line_length": 33.13636363636363, "alnum_prop": 0.6995884773662552, "repo_name": "lmazuel/azure-sdk-for-python", "id": "93f43e6be418a26ee03f10dd62a918776bc7d871", "...
from django.core.management.base import BaseCommand from django.utils.translation import gettext as _ from onadata.apps.api.models.organization_profile import OrganizationProfile from onadata.apps.api.models.project import Project from onadata.apps.logger.models.xform import XForm from onadata.apps.main.models.user_pr...
{ "content_hash": "4fa9c6fd9eff0ffaadfac15023b02fc6", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 76, "avg_line_length": 37.825, "alnum_prop": 0.6926635822868473, "repo_name": "jomolinare/kobocat", "id": "29f574ee640f2d09a27c1ff3b0aae9804e7d20cb", "size": "1513", "bin...
from display_util import show_score from elasticsearch_dsl import Search from elasticsearch_dsl.connections import connections class Hook: """A Hook object is called by the game control at the end of each step or each round, which is indicated by call_every""" def __init__(self, call_every="round"): ...
{ "content_hash": "bac61f11dedcec8ee80732e1668e0be8", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 87, "avg_line_length": 30.008333333333333, "alnum_prop": 0.5667870036101083, "repo_name": "miyyer/qb", "id": "8bd25d6fa213ea00f13c3ddc901195f84ab7b007", "size": "3601", ...
from headers.fat_header import FatHeader from headers.fat_arch import FatArch from mach_o import MachO from utils.byte_range_parser import ByteRangeParser class Fat(ByteRangeParser): def __init__(self, fat_br): super(Fat, self).__init__(fat_br) self.initialize(0, len(fat_br)) # Create the...
{ "content_hash": "dfab9c63a74b66dccdabf8114e4f6d47", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 84, "avg_line_length": 34.92307692307692, "alnum_prop": 0.5814977973568282, "repo_name": "hkkwok/MachOTool", "id": "927eb04e4185229061d5d12e4c3a9c7431927dbe", "size": "1362...
"""This module contains a Google Cloud Vision Hook.""" from __future__ import annotations from copy import deepcopy from typing import Any, Callable, Sequence from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.api_core.retry import Retry from google.cloud.vision_v1 import ImageAnnotatorCl...
{ "content_hash": "7769ba1fa4ba2d5638d5a9a37ec37cc7", "timestamp": "", "source": "github", "line_count": 651, "max_line_length": 115, "avg_line_length": 36.824884792626726, "alnum_prop": 0.6225753973219872, "repo_name": "nathanielvarona/airflow", "id": "5ebdb0e9146dcb283df483f5c12e6fb11b5f6a25", "si...
from msrest.serialization import Model class DatasetReference(Model): """Dataset reference type. Variables are only populated by the server, and will be ignored when sending a request. :ivar type: Dataset reference type. Default value: "DatasetReference" . :vartype type: str :param reference...
{ "content_hash": "4179f112a675cb586dff8cd04aaca2b9", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 75, "avg_line_length": 29.78787878787879, "alnum_prop": 0.624618514750763, "repo_name": "AutorestCI/azure-sdk-for-python", "id": "8bb2730a6588b3b631a30adaa3ad9658c2835ba9", ...
from azure.identity import DefaultAzureCredential from azure.mgmt.datadog import MicrosoftDatadogClient """ # PREREQUISITES pip install azure-identity pip install azure-mgmt-datadog # USAGE python single_sign_on_configurations_list.py Before run the sample, please set the values of the client ID, tena...
{ "content_hash": "9d3170a4f8a79e45d6acfe5c79b8d74c", "timestamp": "", "source": "github", "line_count": 34, "max_line_length": 142, "avg_line_length": 33.970588235294116, "alnum_prop": 0.7333333333333333, "repo_name": "Azure/azure-sdk-for-python", "id": "47b35b14a4cce35d66597ccbe464450a152efb30", "...
from __future__ import absolute_import import difflib from functools import wraps, partial import re from flask import request, url_for, current_app from flask import abort as original_flask_abort from flask import make_response as original_flask_make_response from flask.views import MethodView from flask.signals impor...
{ "content_hash": "f6e2eeee907c4b28f7cf762104acd915", "timestamp": "", "source": "github", "line_count": 711, "max_line_length": 129, "avg_line_length": 39.20112517580872, "alnum_prop": 0.6066661882893226, "repo_name": "whitekid/flask-restful", "id": "649d108f8eddaadaefe99244a32ac576bd1beb35", "size...
from __future__ import print_function import argparse import csv import sys from math import sqrt class PerformanceTestResult: def __init__(self, csv_row): # csv_row[0] is just an ordinal number of the test - skip that self.name = csv_row[1] # Name of the performance test self.sa...
{ "content_hash": "d0e6376e865ad0e3707cbb0d2186265b", "timestamp": "", "source": "github", "line_count": 366, "max_line_length": 79, "avg_line_length": 37.53551912568306, "alnum_prop": 0.5374144708108896, "repo_name": "jtbandes/swift", "id": "8f636364c586c7c8f2850551f183231c067c9a5f", "size": "14295...
import os import re from collections import namedtuple from textwrap import dedent # To avoid adding a new direct dependency, we import markdown from within mkdocs. from mkdocs.structure.pages import markdown from pyspark.java_gateway import launch_gateway SQLConfEntry = namedtuple( "SQLConfEntry", ["name", "d...
{ "content_hash": "ab303e3b8338004c73a9dbd486dfa8b1", "timestamp": "", "source": "github", "line_count": 118, "max_line_length": 99, "avg_line_length": 33.82203389830509, "alnum_prop": 0.549987471811576, "repo_name": "wangmiao1981/spark", "id": "1ce3a6142a7b7e767625f6d91223711f1091b1dd", "size": "47...
import os import shutil from io import BytesIO from typing import Any, Dict, Iterator, List, Set, Tuple from unittest import mock from unittest.mock import ANY from urllib.parse import parse_qs, urlparse import orjson import responses from django.conf import settings from django.utils.timezone import now as timezone_n...
{ "content_hash": "ce10202aebd5c66db95ae2aa1165bb30", "timestamp": "", "source": "github", "line_count": 1215, "max_line_length": 107, "avg_line_length": 41.733333333333334, "alnum_prop": 0.5636216621307143, "repo_name": "eeshangarg/zulip", "id": "841710888d945ac90d403cb99898732c35c53c89", "size": "...
user_race = '' user_class = '' #These are all placeholders for when they come up in the main file race_list = ['Aarakocra', 'Aasimar', 'Bugbear', 'Dragonborn', 'Dwarf', 'Elf', 'Feral Tiefling', 'Firbolg', 'Genasi', 'Gnome', 'Goblin', 'Goliath', 'Half-Elf', 'Halfling', 'Half-Orc', 'H...
{ "content_hash": "e34fdbc231a87be204fe4d41609f39ef", "timestamp": "", "source": "github", "line_count": 39, "max_line_length": 83, "avg_line_length": 32.256410256410255, "alnum_prop": 0.6168521462639109, "repo_name": "PerplexedZombie/Actual-DnD-like-actual", "id": "52b9e4eddf67ae3f4a8f3162c0fb3b9c5a6...
""" WSGI config for test_project project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
{ "content_hash": "eeb5497255737f62ff8f4062e3a84a99", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 79, "avg_line_length": 41.214285714285715, "alnum_prop": 0.7980935875216638, "repo_name": "jazzband/django-configurations", "id": "1bdda2882dbe0dedf6b765f2b32876c0bf72b909", ...
from api_linked_models import * #@UnusedWildImport
{ "content_hash": "641b6d537a3781d2c59ebe789be432d0", "timestamp": "", "source": "github", "line_count": 1, "max_line_length": 50, "avg_line_length": 51, "alnum_prop": 0.803921568627451, "repo_name": "linkedin/indextank-service", "id": "ad66945dd4cc7486311ca7748ceda62cce5f7a12", "size": "51", "bin...
from six.moves import UserDict import logging import time from elasticsearch import Elasticsearch, helpers from ._registry import register_output from .base_output import OutputInterface from topik.vectorizers.vectorizer_output import VectorizerOutput from topik.models.base_model_output import ModelOutput def es_set...
{ "content_hash": "122691edc2fa32e987dd42501e7b9013", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 206, "avg_line_length": 52.096385542168676, "alnum_prop": 0.5783996299722479, "repo_name": "ContinuumIO/topik", "id": "be6ba95b197863f05bbc56c34f3d42d8e2b4a6fb", "size": "...
""" Tests for the I{hosts(5)}-based resolver, L{twisted.names.hosts}. """ from __future__ import division, absolute_import from twisted.trial.unittest import TestCase from twisted.python.filepath import FilePath from twisted.internet.defer import gatherResults from twisted.names.dns import ( A, AAAA...
{ "content_hash": "770b6434bda939479b30ab8c669fa623", "timestamp": "", "source": "github", "line_count": 255, "max_line_length": 80, "avg_line_length": 34.247058823529414, "alnum_prop": 0.5628077407534638, "repo_name": "timkrentz/SunTracker", "id": "42d493aad75bc6f27a06c3fa90b414dcab481d63", "size":...
import datetime import glob import optparse import re import signal import sys import threading import core.initializer core.initializer.Initializer().init() import lib.common import lib.colorprint import lib.processbar import lib.urlentity import core.importer import core.producer import core.consumer import core.c...
{ "content_hash": "f86aef7a017c32838c929978b19b243f", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 105, "avg_line_length": 31.736363636363638, "alnum_prop": 0.5846462331710112, "repo_name": "h4zze1/Florid", "id": "fb677900300e04cec5c5e1978170ec5ba11f813c", "size": "3491...
import imp from migrate.versioning import api from app import db from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO v = api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) migration = SQLALCHEMY_MIGRATE_REPO + ('/versions/{:03d}_migration.py'.format(v+1)) tmp_module = imp...
{ "content_hash": "d362cfeeec869d21a6c2db441aa2128d", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 83, "avg_line_length": 51.333333333333336, "alnum_prop": 0.70995670995671, "repo_name": "ghevcoul/ChicagoCrimeDataAnalysis", "id": "23f2da72c4143bb6bb1dcbad7b246f027c7b65cb",...
"""Render a 'value field' as an image, to make the idea easier to inspect. The 'value field' idea from mel.rotomap.pick_value_from_field() is now important for relating moles together. This visualisation helps check it's behaviour. In this image, there is a blue point in the top-left, and a green point in the bottom-...
{ "content_hash": "33b25f2c1bd2cd31adb66babcd4a85fc", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 79, "avg_line_length": 31.42105263157895, "alnum_prop": 0.626465661641541, "repo_name": "aevri/mel", "id": "732627d557e4f43e877751e7eea933dba39c669e", "size": "1791", "bi...
import re def facts_switch_style(junos, facts): persona = facts['personality'] if persona in ['MX', 'SRX_HIGHEND']: style = 'BRIDGE_DOMAIN' elif persona in ['SWITCH', 'SRX_BRANCH']: model = facts['model'] if re.match('firefly', model, re.IGNORECASE): style = 'NONE' ...
{ "content_hash": "7c6eae3e9719c3b9757328a6b3f068c8", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 53, "avg_line_length": 25.25, "alnum_prop": 0.5306930693069307, "repo_name": "spidercensus/py-junos-eznc", "id": "b54d70e141fb04002f96b7478e111109702bb28d", "size": "505", ...
"""Tests for ast_util module.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import ast from tensorflow.contrib.py2tf.pyct import ast_util from tensorflow.contrib.py2tf.pyct import qual_names from tensorflow.python.platform import test class AstUtilT...
{ "content_hash": "4da8a9e8d4a78f473541839a7ec740f3", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 69, "avg_line_length": 30.584615384615386, "alnum_prop": 0.5885311871227364, "repo_name": "zasdfgbnm/tensorflow", "id": "e0b00c178168f96e656c57cc75a76e6da8af1d8a", "size": ...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0002_joblisting_job_functions'), ] operations = [ migrations.RemoveField( model_name='joblisting', name='job_functio...
{ "content_hash": "22b2b7e26f1d034abb63161db79750e1", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 76, "avg_line_length": 28.28125, "alnum_prop": 0.56353591160221, "repo_name": "MarconiMediaGroup/JobTrak", "id": "27b2a43b25fd634ed0c1ad2e55cd6a3ef0c35eea", "size": "977", ...
from __future__ import absolute_import, division, print_function from stripe import util from stripe.api_resources.abstract import APIResourceTestHelpers from stripe.api_resources.abstract import CreateableAPIResource from stripe.api_resources.abstract import ListableAPIResource from stripe.api_resources.abstract impo...
{ "content_hash": "b527dbdc0428caa1ddefbb1dfcdaec41", "timestamp": "", "source": "github", "line_count": 142, "max_line_length": 117, "avg_line_length": 34.190140845070424, "alnum_prop": 0.5157569515962925, "repo_name": "stripe/stripe-python", "id": "8b9e591090d3c31e4438bf26057041161971ed3c", "size"...
import sys data = open(sys.argv[1], 'rb').read()
{ "content_hash": "ff6a332126c6746b3fc94119824b3791", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 37, "avg_line_length": 16.666666666666668, "alnum_prop": 0.62, "repo_name": "pexip/meson", "id": "66e287d4ac43b40702c0f67c0f2866717d8a5d15", "size": "74", "binary": false,...
import re from social_auth.utils import setting from social_auth.tests.base import SocialAuthTestsCase, FormParserByID, \ FormParser, RefreshParser from django.conf import settings class GoogleTestCase(SocialAuthTestsCase): name = 'google' def setUp(self, *args, **kwargs):...
{ "content_hash": "fe2ac3087bb5b0c69aef28cbd63af966", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 78, "avg_line_length": 40.51282051282051, "alnum_prop": 0.5879746835443038, "repo_name": "MjAbuz/django-social-auth", "id": "0f35968c03d0590bf2a5762d4b6e08cbae15d725", "siz...
import unittest from swift.common.middleware import keystoneauth from swift.common.swob import Request, Response from swift.common.http import HTTP_FORBIDDEN from swift.common.utils import split_path from swift.proxy.controllers.base import _get_cache_key from test.unit import FakeLogger UNKNOWN_ID = keystoneauth.UNK...
{ "content_hash": "235695172599188bd628290ebecfc4dd", "timestamp": "", "source": "github", "line_count": 1543, "max_line_length": 79, "avg_line_length": 47.22294232015554, "alnum_prop": 0.5420709531325053, "repo_name": "heemanshu/swift_liberty", "id": "da9530a06370b1072ab3c425e0bb81cb273f71f9", "siz...
from __future__ import annotations import functools import inspect import json import logging import textwrap from abc import ABC, abstractmethod from contextlib import contextmanager from datetime import datetime, timedelta from typing import ( Any, Callable, cast, Dict, Iterator, Optional, ...
{ "content_hash": "5725e8b54e0f1084298605c1818f40fa", "timestamp": "", "source": "github", "line_count": 336, "max_line_length": 88, "avg_line_length": 33.958333333333336, "alnum_prop": 0.5879929886064855, "repo_name": "apache/incubator-superset", "id": "ecee213ebef29fab74b7ed5d23c645710e538807", "s...
from pikos._internal.function_set import FunctionSet from pikos._internal.attach_decorators import advanced_attach class FocusedLineMixin(object): """ Mixing class to support recording python line events `focused` on a set of functions. The method is used along a line event based monitor. It mainly o...
{ "content_hash": "b8869d802903a652dd0c22c0a184e14c", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 79, "avg_line_length": 34.075471698113205, "alnum_prop": 0.6428571428571429, "repo_name": "enthought/pikos", "id": "50a8f646343ad57866e02e843c8ef129f1bbe8da", "size": "2145...
from pythonforandroid.toolchain import Bootstrap, shprint, current_directory, info, warning, ArchARM, info_main from os.path import join, exists, curdir, abspath from os import walk import glob import sh class WebViewBootstrap(Bootstrap): name = 'webview' recipe_depends = ['webviewjni', ('python2', 'python3cr...
{ "content_hash": "6fc82ab52a5a547d596e9093206661bf", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 135, "avg_line_length": 49.57142857142857, "alnum_prop": 0.5250042380064418, "repo_name": "kived/python-for-android", "id": "315092d7dd38deae1508c833bd049b2d041f5648", "si...
"""Data preprocessing and augmentation.""" # pylint: skip-file import functools from typing import Any, Mapping, Text import jax import jax.numpy as jnp # typing JaxBatch = Mapping[Text, jnp.ndarray] ConfigDict = Mapping[Text, Any] strength = 1.0 augment_config = dict( view1=dict( random_flip=True, # R...
{ "content_hash": "c314c69ea303781ecf850b866286f589", "timestamp": "", "source": "github", "line_count": 503, "max_line_length": 102, "avg_line_length": 35.66799204771372, "alnum_prop": 0.5852516582130316, "repo_name": "google-research/google-research", "id": "7acc6c19e0f9ea98fafaa4f4644c3b84c3c04769"...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from alembic import op # revision identifiers, used by Alembic. revision = '6d709931cc58' down_revision = u'c83c754cc04e' branch_labels = None depends_on = None MAPPIN...
{ "content_hash": "f7436d02d2c9fb0646464be0d7fe9847", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 126, "avg_line_length": 26.48148148148148, "alnum_prop": 0.7244755244755244, "repo_name": "opentrials/collectors", "id": "0556abdc08f89ddc27c584d68bc029d3dbeab6c7", "size":...
import unittest import numpy import pytest import chainer from chainer import backend from chainer.backends import cuda from chainer.backends import intel64 from chainer import testing from chainer.testing import attr import chainerx if chainerx.is_available(): import chainerx.testing class _TestCopyToBase(ob...
{ "content_hash": "74e0f5284d8cdac2d1a3b142169d5825", "timestamp": "", "source": "github", "line_count": 557, "max_line_length": 79, "avg_line_length": 32.039497307001795, "alnum_prop": 0.6305054353916845, "repo_name": "wkentaro/chainer", "id": "1d6c19620206da52a6ceeea8c0d03f6ec5cce410", "size": "17...
import polib import json import os import jasy.item.Abstract as AbstractItem import jasy.core.Console as Console def generateMessageId(basic, plural=None, context=None): """ Returns a unique message ID based on info typically stored in the code: id, plural, context """ result = basic if context...
{ "content_hash": "4b9e3f8361a9584d9ed171e093c57010", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 122, "avg_line_length": 28.236641221374047, "alnum_prop": 0.6080021627466883, "repo_name": "sebastian-software/jasy", "id": "69497faf643624ca9c69f06ac8f0fbc481af9be4", "si...
import numpy as np import scipy.sparse as sp from re import escape from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_false from...
{ "content_hash": "4edd3809d20955b5cf3bc38cc41e6291", "timestamp": "", "source": "github", "line_count": 748, "max_line_length": 79, "avg_line_length": 38.644385026737964, "alnum_prop": 0.6013630388154708, "repo_name": "Titan-C/scikit-learn", "id": "56ec67116a545e1edf85989c552613de5f4e5eda", "size":...
from __future__ import absolute_import, division, print_function from stripe import util from stripe.api_resources.abstract import UpdateableAPIResource from stripe.api_resources.account import Account from stripe.six.moves.urllib.parse import quote_plus class Capability(UpdateableAPIResource): """ This is a...
{ "content_hash": "49a1c6399dfe52e8cac9a6751be6617a", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 96, "avg_line_length": 34.973684210526315, "alnum_prop": 0.6704288939051919, "repo_name": "stripe/stripe-python", "id": "7b6dbd4cb3f9305a63a1b15459e072ca781775c3", "size": ...
from .spectrograph import spectrograph from .sun_flux import sun_flux from .wnum2ang import wnum2ang
{ "content_hash": "b448b3431d89b2232a6e0bd293c9b982", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 38, "avg_line_length": 33.666666666666664, "alnum_prop": 0.8316831683168316, "repo_name": "tschad/schadpy", "id": "c0e244251d1e110629137e9e42d59055905442b8", "size": "102", ...
from django.utils.decorators import method_decorator from corehq import privileges from corehq.apps.accounting.decorators import requires_privilege_with_fallback from corehq.apps.reports.dispatcher import ReportDispatcher, ProjectReportDispatcher, datespan_default from corehq.apps.users.decorators import require_permis...
{ "content_hash": "1667b9e47f15119f55b4d8034f0d6d4c", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 102, "avg_line_length": 49.92, "alnum_prop": 0.7123397435897436, "repo_name": "qedsoftware/commcare-hq", "id": "a74ac3ef547434cfd429e78c597551b58479b042", "size": "3744", ...
from vii.Variables import Variables class Variables_Test: def setup(self): self.fixture = Variables() def test__init__(self): self.fixture.__class__ == Variables assert self.fixture.storage == dict() def test_set_get(self): self.fixture.set("seven", 7) assert self...
{ "content_hash": "d7b2e1946c43b3aa95531189b1d87134", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 45, "avg_line_length": 24.785714285714285, "alnum_prop": 0.6109510086455331, "repo_name": "elmar-hinz/Python.Vii", "id": "f39d4ebee287ada3f84819c85de05fdb04cc9dac", "size":...
from __future__ import print_function # # UNIT TEST # import unittest import numpy as np from six.moves import xrange import theano from theano import gof from theano.compat import OrderedDict, izip from theano.tests import unittest_tools as utt from theano import gradient from theano.tensor.nnet.Conv3D import conv3...
{ "content_hash": "ea4d8433672f0a0b7a99a6603c813af4", "timestamp": "", "source": "github", "line_count": 784, "max_line_length": 124, "avg_line_length": 33.48852040816327, "alnum_prop": 0.5779851456865359, "repo_name": "surgebiswas/poker", "id": "00b264e5073f7351273c599dfab1525f3cfd85cf", "size": "2...
import fcntl import itertools import os from io import FileIO from time import sleep from evdev import InputDevice from pyudev import Context, Monitor from ..backend import Backend from ..exceptions import DeviceError from ..device import DS4Device from ..utils import zero_copy_slice IOC_RW = 3221243904 HIDIOCSFEA...
{ "content_hash": "1b5bdbb81ea9fe6c29571157a8d7ea71", "timestamp": "", "source": "github", "line_count": 179, "max_line_length": 79, "avg_line_length": 29.6536312849162, "alnum_prop": 0.5693293142426527, "repo_name": "chrippa/ds4drv", "id": "b87a67f6d2d9e470fcbbbdef1e1caa5b268121e2", "size": "5308",...
c = get_config() #Export all the notebooks in the current directory to the sphinx_howto format. c.NbConvertApp.notebooks = ['*.ipynb'] c.NbConvertApp.export_format = 'slides' c.Exporter.template_file = 'hide_input' c.Exporter.filters = {'strip_output_prompt': 'strip_output_prompt.strip_output_prompt'}
{ "content_hash": "cb15d1e3358cf6acd963860cce344464", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 87, "avg_line_length": 43.42857142857143, "alnum_prop": 0.7532894736842105, "repo_name": "Konubinix/IPython-notebook-extensions", "id": "396edd1e09cbd63179c3871f3c0914bfc9faba...
""" societies.models ~~~~~~~~~~~~~~~~ :copyright: (c) 2014 Christopher Davis <http://christopherdavis.me> :license: http://opensource.org/licenses/bsd-3-clause """
{ "content_hash": "7258958fc22adcd2f090c76250c5a2da", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 67, "avg_line_length": 23.571428571428573, "alnum_prop": 0.6606060606060606, "repo_name": "chrisguitarguy/GuitarSocieties.org", "id": "b19f24e97d8ec1e94877d4c05f62edabb8c58d34...
""" Auto Encoder Example. Using an auto encoder on MNIST handwritten digits. References: Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner. "Gradient-based learning applied to document recognition." Proceedings of the IEEE, 86(11):2278-2324, November 1998. Links: [MNIST Dataset] http://yann.lecun.com/exdb/...
{ "content_hash": "b47d8d19f2148a1cf410bbc79e70a09e", "timestamp": "", "source": "github", "line_count": 132, "max_line_length": 123, "avg_line_length": 43.734848484848484, "alnum_prop": 0.594145158496449, "repo_name": "kashefy/transform", "id": "dead6cdcf5272dffd4de8551be96747155905cfb", "size": "5...
import roslib; roslib.load_manifest('instructor_plugins') import rospy from std_msgs.msg import * # Qt from PyQt4 import QtGui, QtCore, uic from PyQt4.QtGui import * from PyQt4.QtCore import * # Beetree and Instructor import beetree; from beetree import Node from instructor_core import NodeGUI from instructor_core.ins...
{ "content_hash": "a3ce805626e417c7c570aa1851dd788e", "timestamp": "", "source": "github", "line_count": 109, "max_line_length": 92, "avg_line_length": 36.137614678899084, "alnum_prop": 0.5902513328255903, "repo_name": "cpaxton/predicator", "id": "a01284e8c646c5ff03c6f573dfe5dee9a576fa32", "size": "...
"""TensorFlow ops for autoencoder.""" # Copyright 2015-present The Scikit Flow 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/li...
{ "content_hash": "ebbef895b37f1fdbb6356c6d8fd95842", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 81, "avg_line_length": 42.160714285714285, "alnum_prop": 0.6615840745446845, "repo_name": "plowman/python-mcparseface", "id": "e337b3b1242481c0d17da89a73f7bf2e2be96e96", "s...
"""Handles database requests from other nova services.""" import copy import itertools from oslo_log import log as logging import oslo_messaging as messaging from oslo_serialization import jsonutils from oslo_utils import excutils from oslo_utils import timeutils import six from nova.api.ec2 import ec2utils from nov...
{ "content_hash": "34a623caa67f884ccc513de1f156abe4", "timestamp": "", "source": "github", "line_count": 836, "max_line_length": 79, "avg_line_length": 49.30502392344498, "alnum_prop": 0.558237705912322, "repo_name": "yanheven/nova", "id": "f2353b83e6d2515bf635f28b8a59eda2355c4eb3", "size": "41824",...