text
stringlengths
4
1.02M
meta
dict
from locust import HttpUser, task, tag import yaml, json, os def get_name(opts): if opts.get('alias'): return opts['alias'] if opts.get('query'): return str(opts['query']) return opts['path'] def response_printer(opts, response): if response.status_code == 0: print(response.error) ex...
{ "content_hash": "d66aa741a8caddaa5778920a3bdcb63e", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 113, "avg_line_length": 31.09, "alnum_prop": 0.5342553875844323, "repo_name": "puppetlabs/puppetdb", "id": "d2471e1c2ed848fa6958a75ae04df27fc789273e", "size": "3132", "b...
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name='chicagotransit', version='0.5.0', description='A package for int...
{ "content_hash": "82287fce393542880ea9d131d975cbd3", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 115, "avg_line_length": 37.78787878787879, "alnum_prop": 0.627906976744186, "repo_name": "Conway/chicagotransit", "id": "b77c9a69ed5417023cb7d1ba79070ec66d0895cd", "size": ...
from lib.web2py.dal import * # DAL reference: http://www.web2py.com/book/default/chapter/06#The-database-abstraction-layer db = DAL('sqlite://database/usdadb.sqlite') #db = DAL('postgres://username:password@localhost/database') #db = DAL('mysql://username:password@localhost/database') #db=DAL('mssql://username:passwor...
{ "content_hash": "13917a2a760347aea05969e700fcb9e4", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 101, "avg_line_length": 45.30864197530864, "alnum_prop": 0.6547683923705722, "repo_name": "ionelanton/web2py-usdadb", "id": "00a167c2730bdcab4c6dba906e707617ce60feee", "siz...
from ..excel_comparison_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """ Test file created by XlsxWriter against a file created by Excel. """ def setUp(self): self.set_filename('image06.xlsx') def test_create_file(sel...
{ "content_hash": "73cab31dffaa9b20ba91857a878c4b3a", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 74, "avg_line_length": 25.642857142857142, "alnum_prop": 0.5821727019498607, "repo_name": "jmcnamara/XlsxWriter", "id": "2e43eb490bb31b15032efaaeb7b546187a9a35a8", "size": ...
import requests import bs4 from colorama import Fore def get_html(episode_number: int) -> str: print(Fore.YELLOW + f"Getting HTML for episode {episode_number}", flush=True) url = f'https://talkpython.fm/{episode_number}' resp = requests.get(url) resp.raise_for_status() return resp.text def get...
{ "content_hash": "f3294b127f0267b68285c41e82fc633b", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 81, "avg_line_length": 23.775, "alnum_prop": 0.6330178759200841, "repo_name": "Wintellect/WintellectWebinars", "id": "656647c7ee35c634f1285e28a94c417bb50876c8", "size": "95...
PANEL_GROUP = 'rating' PANEL_DASHBOARD = 'admin' PANEL = 'pyscripts' ADD_PANEL = 'cloudkittydashboard.dashboards.admin.pyscripts.panel.PyScripts'
{ "content_hash": "06429d282377b28012f1a29c3762788b", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 76, "avg_line_length": 29.4, "alnum_prop": 0.7755102040816326, "repo_name": "openstack/cloudkitty-dashboard", "id": "cd4c2d21ace08745ca15d4db97c789af1506bebe", "size": "147"...
from __future__ import print_function from getpass import getpass try: # These are for python3 support from urllib.request import urlopen, Request from urllib.error import HTTPError from urllib.parse import urlencode unistr = str except ImportError: # Fallback to python2 from urllib2 import ...
{ "content_hash": "776fe2dedf3297ee2b092ac988a3c102", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 79, "avg_line_length": 32.37869822485207, "alnum_prop": 0.5942982456140351, "repo_name": "vially/xbmc-gmusicapi", "id": "c5693b2b840e82e646a40999e4850051c07dbe4e", "size":...
import binascii import copy from castellan.common.objects import symmetric_key as key import mock from oslo_concurrency import processutils import six import uuid from nova import exception from nova.tests.unit.volume.encryptors import test_base from nova.volume.encryptors import cryptsetup def fake__get_key(contex...
{ "content_hash": "0d95960e35ea1ee4d08e5dc29f5e3ac7", "timestamp": "", "source": "github", "line_count": 154, "max_line_length": 78, "avg_line_length": 42.798701298701296, "alnum_prop": 0.6164466697011076, "repo_name": "hanlind/nova", "id": "53eb1098c2120e9106e463198313b9b83ecb5b90", "size": "7267",...
from google.cloud import aiplatform_v1beta1 async def sample_delete_hyperparameter_tuning_job(): # Create a client client = aiplatform_v1beta1.JobServiceAsyncClient() # Initialize request argument(s) request = aiplatform_v1beta1.DeleteHyperparameterTuningJobRequest( name="name_value", ) ...
{ "content_hash": "e8f932ceda31a4d282ea100a89ef0f3f", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 83, "avg_line_length": 27.82608695652174, "alnum_prop": 0.740625, "repo_name": "googleapis/python-aiplatform", "id": "b714aacd5be5378f4a0fc4d0d1c4a74e32ac9315", "size": "20...
""" Script for building and saving the model for the ``SkLearnBallTreeHashIndex`` implementation of ``HashIndex``. """ import logging, cPickle, os from smqtk.algorithms.nn_index.hash_index.sklearn_balltree import SkLearnBallTreeHashIndex from smqtk.utils.bin_utils import ( initialize_logging, report_progress, ...
{ "content_hash": "73b28ab2eea77d07cdbe327dca99af60", "timestamp": "", "source": "github", "line_count": 69, "max_line_length": 90, "avg_line_length": 32.27536231884058, "alnum_prop": 0.6641221374045801, "repo_name": "Purg/SMQTK", "id": "0af102994d74a43963db2253012f60317b03f496", "size": "2227", "...
from __future__ import division import MySQLdb import scipy.sparse as ss import numpy as np, numpy.linalg as nlg from nltk.stem.snowball import SnowballStemmer import gaussianRandomFeatures as grf import time import re import string import sys import os from multiprocessing import Process, Queue import datetime from ...
{ "content_hash": "829d1d1164c19031aca54aada173c235", "timestamp": "", "source": "github", "line_count": 811, "max_line_length": 169, "avg_line_length": 33.61898890258939, "alnum_prop": 0.6689895470383276, "repo_name": "AutonlabCMU/ActiveSearch", "id": "e2d452ac7c10a44463f9acf1bad6595b40c039b4", "si...
""" Unit tests for OpenStack Cinder volume driver """ import base64 import urllib2 import mox as mox_lib from cinder import context from cinder import db from cinder import test from cinder import units from cinder.volume import configuration as conf from cinder.volume.drivers import nexenta from cinder.volume.drive...
{ "content_hash": "1cf4c2731208feaaab36a8998f2cf6a1", "timestamp": "", "source": "github", "line_count": 650, "max_line_length": 79, "avg_line_length": 40.284615384615385, "alnum_prop": 0.5860225319839603, "repo_name": "cloudbau/cinder", "id": "b5318320c3bce258e8d3bd9443b746838072bfdb", "size": "268...
from __future__ import unicode_literals from django.conf import settings from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import models from django.dispatch.dispatcher import receiver from model_utils.models import TimeStampedModel from registrati...
{ "content_hash": "85f7dee85ba6de3d5a267ea68a913604", "timestamp": "", "source": "github", "line_count": 107, "max_line_length": 88, "avg_line_length": 25.757009345794394, "alnum_prop": 0.6556603773584906, "repo_name": "pmeier82/spike_gnode", "id": "2411abbf4b4c2c62fd144aaa9261d587c405219b", "size":...
import sys import os sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) # import cocos from cocos.director import director from cocos.sprite import Sprite from cocos import draw import pyglet import random ri = random.randint class TestFigure(draw.Canvas): def render(self): x,y = director...
{ "content_hash": "f374a6374bc239bd0d6d0c125e96455f", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 65, "avg_line_length": 25.431818181818183, "alnum_prop": 0.5460232350312779, "repo_name": "adamwiggins/cocos2d", "id": "8783e8ccfea9c33d2f5482634f8c88e8c155c202", "size": "...
import contextlib import socket import mock import testtools from tempest.common import ssh from tempest import exceptions from tempest.tests import base class TestSshClient(base.TestCase): def test_pkey_calls_paramiko_RSAKey(self): with contextlib.nested( mock.patch('paramiko.RSAKey.from_p...
{ "content_hash": "ced1143603fcdcf907419a5ae9cfd79c", "timestamp": "", "source": "github", "line_count": 188, "max_line_length": 78, "avg_line_length": 35.62234042553192, "alnum_prop": 0.5950425563685232, "repo_name": "ntymtsiv/tempest", "id": "a6eedc46681bd0b38132ba21b30a7046fb40c0d0", "size": "731...
__author__ = 'Alex' def boop(my_value): # Has spaces around both. print my_value def beep(): value = "Hello" boop(value) # Space only on the end. if __name__ == "__main__": beep() # Spaces between empty braces.
{ "content_hash": "fdba73c61fb47cff9dbb9c402a099d1b", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 46, "avg_line_length": 18.076923076923077, "alnum_prop": 0.5787234042553191, "repo_name": "Ahuge/Pepperoni", "id": "33b8467bb3aa36d3f183f4ec590935b06cdf6080", "size": "267"...
""" The default perspective. """ # Standard library imports. import logging # Enthought library imports. from traits.api import Bool, HasTraits, List, provides, Str, Tuple # Local imports. from i_perspective import IPerspective from perspective_item import PerspectiveItem # Logging. logger = logging.getLogger(__n...
{ "content_hash": "b6892729185dad15b2f6241c5b7fe435", "timestamp": "", "source": "github", "line_count": 193, "max_line_length": 79, "avg_line_length": 32.55440414507772, "alnum_prop": 0.5414610854687252, "repo_name": "pankajp/pyface", "id": "5fc2496b2a6cfa29a6caa3aabe8627592e93e6d0", "size": "6283"...
import _plotly_utils.basevalidators class ColorsrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__(self, plotly_name="colorsrc", parent_name="bar.marker", **kwargs): super(ColorsrcValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
{ "content_hash": "3186b59d30f22c82ef7947de376b3c18", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 83, "avg_line_length": 37, "alnum_prop": 0.6081081081081081, "repo_name": "plotly/python-api", "id": "8e3d2ef1768d7d1b7de1b4647085ceef87ef28eb", "size": "444", "binary": ...
import os import sys import time from distutils.version import LooseVersion from wlauto.core.extension import Parameter, ExtensionMeta, ListCollection from wlauto.core.workload import Workload from wlauto.common.android.resources import ApkFile from wlauto.common.resources import ExtensionAsset, File from wlauto.exce...
{ "content_hash": "dfc9b040ca17c3b4d9d83089ccb58d3f", "timestamp": "", "source": "github", "line_count": 735, "max_line_length": 111, "avg_line_length": 45.42857142857143, "alnum_prop": 0.6109014675052411, "repo_name": "bjackman/workload-automation", "id": "541b8b242c08218674227ff70bb82a96f6f174fe", ...
import urllib2 import json import time class GoogleFinanceAPI: def __init__(self): self.prefix = "http://finance.google.com/finance/info?client=ig&q=" def get(self,symbol,exchange): url = self.prefix+"%s:%s"%(exchange,symbol) u = urllib2.urlopen(url) content = u.read() ...
{ "content_hash": "19165b7e0117b2fee4461b544bf3fe91", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 75, "avg_line_length": 17.64516129032258, "alnum_prop": 0.5484460694698354, "repo_name": "iamaris/pystock", "id": "925070194a6b9e5310cae0cb76dd96fa7782b8ac", "size": "547",...
import json import os from datetime import datetime, timedelta from urllib.parse import urlencode from django.conf import settings from django.core import mail from django.core.files.storage import default_storage as storage from django.test import RequestFactory from django.utils.encoding import force_text from djan...
{ "content_hash": "0c12c70026075bff5ed353d86a1e22d2", "timestamp": "", "source": "github", "line_count": 2043, "max_line_length": 79, "avg_line_length": 41.90846793930494, "alnum_prop": 0.6199792102220302, "repo_name": "eviljeff/olympia", "id": "93f0f413f6064160c15783bafc6c6ffe0fa0e696", "size": "85...
"""Denon HEOS Media Player.""" import asyncio from functools import reduce, wraps import logging from operator import ior from typing import Sequence from homeassistant.components.media_player import MediaPlayerDevice from homeassistant.components.media_player.const import ( DOMAIN, MEDIA_TYPE_MUSIC, MEDIA_TYPE_UR...
{ "content_hash": "1f2895af7acb82fb042f34b1e1703973", "timestamp": "", "source": "github", "line_count": 342, "max_line_length": 79, "avg_line_length": 36.12280701754386, "alnum_prop": 0.6210134369435001, "repo_name": "DavidLP/home-assistant", "id": "18ed3fd736228b26d6de95888224dbf7067b31d4", "size"...
from core.himesis import Himesis import uuid class HTransitionHListenBranch(Himesis): def __init__(self): """ Creates the himesis graph representing the DSLTrans rule TransitionHListenBranch. """ # Flag this instance as compiled now self.is_compiled = True ...
{ "content_hash": "18f04ab1b0571c70d426309c4fb0d7aa", "timestamp": "", "source": "github", "line_count": 282, "max_line_length": 241, "avg_line_length": 40.93617021276596, "alnum_prop": 0.5025121275121275, "repo_name": "levilucio/SyVOLT", "id": "96049b3b3898a23c291e64a781f9917370398c64", "size": "11...
import sphinx_rtd_theme # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state it here. # needs_sphinx = '1.4' # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*')...
{ "content_hash": "59d9056d1e9b3aee5447fed73a8f3a86", "timestamp": "", "source": "github", "line_count": 330, "max_line_length": 93, "avg_line_length": 29.306060606060605, "alnum_prop": 0.6923792782545756, "repo_name": "rtrlib/handbook", "id": "07c26c0122fb976cd16097e0133c9716caa82c02", "size": "104...
import pytest import io import simplejson from pymongo import MongoClient class MongoTestInitializer(object): """ """ def __init__(self, host="localhost", port=27017, db_name="twinkle_unittest_db", collection_name="tweets"): self.host = host self.port = port self.db_name = db_name self.collection_name = ...
{ "content_hash": "7c46fce0ff5e0ee6f893d962294f7b73", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 107, "avg_line_length": 20.11111111111111, "alnum_prop": 0.6817679558011049, "repo_name": "emCOMP/twinkle", "id": "09cd0c02f42678ad9be97924a6e5fdf3127fda16", "size": "952",...
### ## * << Haru Free PDF Library 2.0.0 >> -- outline_demo.c ## * ## * Copyright (c) 1999-2006 Takeshi Kanno <takeshi_kanno@est.hi-ho.ne.jp> ## * ## * Permission to use, copy, modify, distribute and sell this software ## * and its documentation for any purpose is hereby granted without fee, ## * provided that ...
{ "content_hash": "4361ed043e7b10daf23529b6eb275371", "timestamp": "", "source": "github", "line_count": 126, "max_line_length": 80, "avg_line_length": 28.841269841269842, "alnum_prop": 0.631535498073748, "repo_name": "frnde/libhpdf-AndroidLibrary", "id": "33f65b967db7415f0250e05927a589b323135577", ...
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from .lapjv import lapjv __all__ = ['lapjv']
{ "content_hash": "0ee1a7298e65a66ddb52f3bbfd1324a1", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 39, "avg_line_length": 21.88888888888889, "alnum_prop": 0.7208121827411168, "repo_name": "bnoi/scikit-tracker", "id": "efb03e1c994c0928660abe58e18642a4622d019b", "size": "22...
import json import os from wlgen import PerfMessaging, PerfPipe from test_wlgen import WlgenSelfBase class PerfBenchBase(WlgenSelfBase): """Base class for common testing of PerfBench workloads""" def _do_test_performance_json(self, fields): """Test performance.json was created with the required field...
{ "content_hash": "b01259049e71769abcabc72e755a075e", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 77, "avg_line_length": 31.033333333333335, "alnum_prop": 0.6192266380236305, "repo_name": "bjackman/lisa", "id": "c6ecd9c26e33c654a88806eab990ab2a8feee2f8", "size": "2499",...
import json from contentcuration.models import User from django import forms from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, UserChangeForm, PasswordChangeForm from le_utils.constants import exercises, licenses class RegistrationForm(UserCreationForm): password1 = forms.CharField(widget...
{ "content_hash": "c1caa7cda33380609e2aacaf05b1054d", "timestamp": "", "source": "github", "line_count": 209, "max_line_length": 190, "avg_line_length": 47.229665071770334, "alnum_prop": 0.6572788977813798, "repo_name": "jonboiser/content-curation", "id": "cb7de1b2bf6d6e47f7a1babf471c1e150af179ac", ...
import json import time import urllib from tempest.common.rest_client import RestClient from tempest import exceptions from tempest.openstack.common import log as logging LOG = logging.getLogger(__name__) class SnapshotsClientJSON(RestClient): """Client class to send CRUD Volume API requests.""" def __init...
{ "content_hash": "e53aaaff36b59b75bcb0cf58c527be75", "timestamp": "", "source": "github", "line_count": 174, "max_line_length": 79, "avg_line_length": 38.839080459770116, "alnum_prop": 0.5836046167505179, "repo_name": "BeenzSyed/tempest", "id": "1a34898f957c5cbbc38e750e6e3502bac358db59", "size": "7...
from ...ags._geoprocessing import * from ..._abstract import abstract ######################################################################## class analysis(abstract.BaseAGOLClass): """ ArcGIS Online is a collaborative, cloud-based platform that lets members of an organization create, share, and acce...
{ "content_hash": "ae0b663bff1c548f7e3c75fc8e851b0a", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 75, "avg_line_length": 41.81818181818182, "alnum_prop": 0.5246376811594203, "repo_name": "jgravois/ArcREST", "id": "4d734fec16834bd31f1e72edebedceac08bc00d8", "size": "4140...
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import HAS_SPATIAL_DB, mysql, oracle, no_mysql, no_oracle, no_spatialite from django.test import TestCase from django.utils.unittest import skipUnless if HAS_GEOS: fro...
{ "content_hash": "7f1fe9eb218a6be46cfbfd1197f8d7bd", "timestamp": "", "source": "github", "line_count": 307, "max_line_length": 155, "avg_line_length": 48.68078175895766, "alnum_prop": 0.6396788223486116, "repo_name": "eltonsantos/django", "id": "6320edcff5d9dbf078fe9277e099c24a5db7a984", "size": "...
""" Unit test suite for the docx.opc.parts.coreprops module """ from __future__ import ( absolute_import, division, print_function, unicode_literals ) from datetime import datetime, timedelta import pytest from docx.opc.coreprops import CoreProperties from docx.opc.parts.coreprops import CorePropertiesPart from...
{ "content_hash": "fc2f3d702b57e623f1db1820185050fa", "timestamp": "", "source": "github", "line_count": 54, "max_line_length": 77, "avg_line_length": 36.629629629629626, "alnum_prop": 0.6976744186046512, "repo_name": "holli-holzer/python-docx", "id": "f324f15db65a63a7b9be4e97a2b6ce809fffcbaa", "siz...
""" ======= Entropy ======= In information theory, information entropy is the log-base-2 of the number of possible outcomes for a message. For an image, local entropy is related to the complexity contained in a given neighborhood, typically defined by a structuring element. The entropy filter can detect subtle variat...
{ "content_hash": "42e7b553f5355be8bf664a61f23fa213", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 80, "avg_line_length": 30.602739726027398, "alnum_prop": 0.7211280214861235, "repo_name": "ofgulban/scikit-image", "id": "248436fb16c8d5bf79e8b56848bc9e4bc5a259d0", "size":...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('foodroller', '0007_auto_20160926...
{ "content_hash": "ec6ca4b3bec99b8b698752699482f652", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 137, "avg_line_length": 34.54838709677419, "alnum_prop": 0.6414565826330533, "repo_name": "zenith0/foodroller", "id": "1814576d40cab1a1654c70f13251a70f8f0c6cf5", "size": "1...
from email.MIMEText import MIMEText message = """ Hello, This is a test message from Chapter 9. I hope you enjoy it! -- Anonymous""" msg = MIMEText(message) msg['TO'] = '987102818@qq.com' msg['FROM'] = '987102818@qq.com' msg['Subject'] = 'Test Message, Chapter 9' print msg.as_string()
{ "content_hash": "1759bee9f6ba158e7691fccd530543e7", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 59, "avg_line_length": 26.181818181818183, "alnum_prop": 0.6944444444444444, "repo_name": "chenzhengchen200821109/github-python", "id": "71ae8256b36a83907e0675dc8f1a3674349c1...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/engine/shared_eng_sfs_modified_imperial_3.iff" result.attribute_template_id = 8 result.stfName("space/space_item","eng_sfs_modified_imperial_3_n") #### BEGIN MODIFICATIONS #### #### END MO...
{ "content_hash": "ccef2376ef16bfa54f24176d59ba8ae9", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 98, "avg_line_length": 27.23076923076923, "alnum_prop": 0.7146892655367232, "repo_name": "anhstudios/swganh", "id": "a87110c4e6af6629c18df43a449be2092863f241", "size": "499...
''' Created on 2013-8-8 @author: lan (www.9miao.com) ''' from gfirefly import management import sys if __name__ == "__main__": args = sys.argv management.execute_commands(*args)
{ "content_hash": "3d923c9a34b12a2a6218e2823dde3fc9", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 38, "avg_line_length": 17, "alnum_prop": 0.6524064171122995, "repo_name": "yangdw/repo.python", "id": "96087b66a223a23a4a7eb112d9bde753a3c00de5", "size": "200", "binary":...
import atexit import os import shutil import tempfile # Put gen_py cache in temp directory. supportdir = tempfile.mkdtemp() # gen_py has to be put into directory 'gen_py'. genpydir = os.path.join(supportdir, 'gen_py') # Create 'gen_py' directory. This directory does not need # to contain '__init__.py' file. try: ...
{ "content_hash": "3473c4199695744e523e0147f99f072e", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 83, "avg_line_length": 30.875, "alnum_prop": 0.7319838056680162, "repo_name": "deandunbar/bitwave", "id": "e37b73fbcf9a53f41bd1a3e35ebc1463358519ac", "size": "2127", "bin...
"""Upload Expressions.""" import gzip import io import json from pathlib import Path import pandas as pd from resolwe.process import ( DataField, FileField, JsonField, Persistence, SchedulingClass, StringField, ) from resolwe_bio.process.runtime import ProcessBio def parse_expression_file(e...
{ "content_hash": "b9595988841b44d408467903c8ec072f", "timestamp": "", "source": "github", "line_count": 441, "max_line_length": 89, "avg_line_length": 32.29478458049886, "alnum_prop": 0.5535037213874456, "repo_name": "genialis/resolwe-bio", "id": "68d0ffc15f7a9488c876f1c016eef1352b7ee60e", "size": ...
def get_sync_indel_window(wildcards): return params["popoolation2"]["find_indels"]["indel_window"] def get_sync_min_count(wildcards): return params["popoolation2"]["find_indels"]["min_count"] def compose_mpileups_comma(wildcards): chromosome = wildcards.chromosome mpileups = [ MPILEUP_RAW + ...
{ "content_hash": "05252d5ef0b190bbbe29ca0f120cf079", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 78, "avg_line_length": 28.43069306930693, "alnum_prop": 0.56312032039004, "repo_name": "jlanga/smsk_popoolation", "id": "f2f0147b4198fd04798765ad7e843e9279fe524d", "size":...
from __future__ import absolute_import from chaco.color_bar import *
{ "content_hash": "fe45f6f7ea4469432927c3da6e8c1471", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 38, "avg_line_length": 34.5, "alnum_prop": 0.7681159420289855, "repo_name": "enthought/etsproxy", "id": "88085a075617230efd3136f3e0351463df4db461", "size": "84", "binary":...
import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Create the RenderWindow and Renderer ren1 = vtk.vtkRenderer() renWin = vtk.vtkRenderWindow() renWin.AddRenderer(ren1) renWin.SetAlphaBitPlanes(1) iren = vtk.vtkRenderWindowInteractor() iren.SetRenderWind...
{ "content_hash": "d40af3a3003d83d8411ddd9845a2e1d8", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 68, "avg_line_length": 26.43661971830986, "alnum_prop": 0.7671816728822589, "repo_name": "hendradarwin/VTK", "id": "6cb4afd2a72855bce6c6c612576b818eef35d388", "size": "1899...
class Other(object): def override(self): print("OTHER override()") def implicit(self): print("OTHER implicit()") def altered(self): print("OTHER altered()") class Child(object): def __init__(self): self.other = Other() def implicit(self): self.other.impl...
{ "content_hash": "e8dbf5574b2238ad628b840dd68de86f", "timestamp": "", "source": "github", "line_count": 32, "max_line_length": 46, "avg_line_length": 18.5, "alnum_prop": 0.581081081081081, "repo_name": "Akagi201/learning-python", "id": "f03ae31d7dac9bff23f4a2bb7938229d74de53a0", "size": "662", "b...
from __future__ import unicode_literals import copy import inspect import warnings from itertools import chain from django.apps import apps from django.conf import settings from django.core import checks from django.core.exceptions import ( NON_FIELD_ERRORS, FieldDoesNotExist, FieldError, MultipleObjectsReturned,...
{ "content_hash": "7ca22e9009d9949ae90b315618fbc2da", "timestamp": "", "source": "github", "line_count": 1816, "max_line_length": 114, "avg_line_length": 41.684471365638764, "alnum_prop": 0.5397825598752956, "repo_name": "sarthakmeh03/django", "id": "53b761f45ab7543f66f3d551f5231719a58746bd", "size"...
import pytest import os from polyglotdb.io import inspect_mfa from polyglotdb import CorpusContext from polyglotdb.exceptions import TextGridError, GraphQueryError, ParseError from textgrid import TextGrid, IntervalTier from polyglotdb.io.parsers.mfa import MfaParser def test_load_mfa(mfa_test_dir, graph_db): w...
{ "content_hash": "39a8a8fde0aaf5115c5ee7a19cd58ed4", "timestamp": "", "source": "github", "line_count": 91, "max_line_length": 84, "avg_line_length": 33.604395604395606, "alnum_prop": 0.5964682799215173, "repo_name": "samihuc/PolyglotDB", "id": "01718e47750359be3e36cdcbc131cb62ac80c47b", "size": "3...
import argparse import json import os.path import requests import getpass try: input = raw_input except: pass def get_token(username, password): # the client id we can borrow from azure xplat cli client_id = '04b07795-8ddb-461a-bbee-02f9e1bf7b46' grant_type = 'password' resource = 'https://m...
{ "content_hash": "661630ed6c1c06d45906ce6f5ec98b7d", "timestamp": "", "source": "github", "line_count": 108, "max_line_length": 113, "avg_line_length": 27.39814814814815, "alnum_prop": 0.6336600202771207, "repo_name": "crwilcox/azure-sdk-for-python", "id": "de3cd349778f1bc20c9efa752ca035082b705d99", ...
file_size = raw_input("Please input the size of the file you want to download:") download_speed = raw_input("Please input your speed of downloading(KB/S or MB/S):")
{ "content_hash": "2950d2539eda8b329a0b56bd51574763", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 83, "avg_line_length": 55.666666666666664, "alnum_prop": 0.7305389221556886, "repo_name": "CodeSheng/LPLHW", "id": "a691b63a777b6e340a8f9b6b60025228e8a1ae8c", "size": "211",...
import contextlib import uuid from eventlet import greenthread import fixtures import mock from mox3 import mox from oslo_concurrency import lockutils from oslo_concurrency import processutils from oslo_config import cfg from oslo_config import fixture as config_fixture from oslo_utils import fixture as utils_fixture ...
{ "content_hash": "1b873a9aa6a80ebc133978702f1beccc", "timestamp": "", "source": "github", "line_count": 2486, "max_line_length": 79, "avg_line_length": 40.43765084473049, "alnum_prop": 0.5791620245105841, "repo_name": "HybridF5/jacket", "id": "c9aa2cff91c5d0eadd9165370d4a9313be1615ba", "size": "101...
from django.forms.fields import * from corehq.apps.sms.forms import BackendForm from dimagi.utils.django.fields import TrimmedCharField class UnicelBackendForm(BackendForm): username = TrimmedCharField() password = TrimmedCharField() sender = TrimmedCharField()
{ "content_hash": "eb8368df0d3b24ca534d650b9e939b51", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 55, "avg_line_length": 30.666666666666668, "alnum_prop": 0.7898550724637681, "repo_name": "gmimano/commcaretest", "id": "390b548ad8058d8f1c2095ddfedffaf4e9a620fc", "size": "...
""" Adaptive thresholding when image has different lighting conditions in different areas, simple thresholding no good Adaptive: algorithm calculates threshold for small regions of image - different thresholds for different regions of same image - gives better results for images with varying illumination """ ...
{ "content_hash": "e8e3442deb498881265d4bef2433622a", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 124, "avg_line_length": 38, "alnum_prop": 0.7297297297297297, "repo_name": "SSG-DRD-IOT/commercial-iot-security-system", "id": "96d6bc336e73ebd9d80ee8c2b7971e03b8472ad6", "...
import os import sys import unittest from importlib import reload from shutil import copyfile from unittest.mock import patch from tests.utils import (CaptureOutput, assemble_for_selfie, for_all_test_results, list_files) import self as grader from lib.checks import execute from self import as...
{ "content_hash": "f12721ba0f3ddf02c6940f681558261c", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 84, "avg_line_length": 31.49122807017544, "alnum_prop": 0.6022284122562674, "repo_name": "cksystemsteaching/selfie", "id": "650b908424d0d368b72adcc01adcd186545c0c8e", "size...
from flexbe_core import Behavior, Autonomy, OperatableStateMachine, ConcurrencyContainer, PriorityContainer, Logger from sara_flexbe_states.gen_gripper_pose import GenGripperPose from flexbe_states.check_condition_state import CheckConditionState from sara_flexbe_states.moveit_move import MoveitMove # Additional import...
{ "content_hash": "41600c26df29cf0b4b35680645de1e7b", "timestamp": "", "source": "github", "line_count": 92, "max_line_length": 115, "avg_line_length": 32, "alnum_prop": 0.6518342391304348, "repo_name": "WalkingMachine/sara_behaviors", "id": "964acf6bcfdb818f7ae341ce8f450e261785e925", "size": "3351"...
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 model 'Template' db.create_table('reports_template', ( ('object_ptr', self.gf('django.db.models.fields.related...
{ "content_hash": "76d32d6bd042da522920fc09c6cb5c37", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 203, "avg_line_length": 70.8840579710145, "alnum_prop": 0.5510120629728072, "repo_name": "havard024/prego", "id": "6d8f7a4012aa84dba4fbac69f18c07c8970edabd", "size": "9913...
""" WSGI config for mysite 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", "pythonwetter.settings") fr...
{ "content_hash": "5dbac514f00b1401ed718d62b2968a83", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 78, "avg_line_length": 29.071428571428573, "alnum_prop": 0.7493857493857494, "repo_name": "PatteWi/pythonwetter", "id": "f9d60e293fc9de2c01d40f7441f94a1176c79b3a", "size": ...
import ConfigParser import sys, os, fnmatch import re import copy import gen_utils import glob from meta_module import MetaModule import modules import mutex from random import choice from module_base import DefaultConfigClass import time import types import traceback # some notes with regards to extra module state/lo...
{ "content_hash": "d298bf7acff63bebfc0d32157266855b", "timestamp": "", "source": "github", "line_count": 1690, "max_line_length": 93, "avg_line_length": 40.418343195266274, "alnum_prop": 0.5656521293571669, "repo_name": "ivoflipse/devide", "id": "694a8d9bac6db3cd11db16cdaa4b6b7595972775", "size": "6...
import json from django.http import HttpResponse from unittest import mock import pytest import requests import settings from olympia import amo from olympia.amo.tests import addon_factory from olympia.discovery.models import DiscoveryItem from olympia.discovery.utils import ( call_recommendation_server, get...
{ "content_hash": "f5b5623ad86648a4977b233d557afcca", "timestamp": "", "source": "github", "line_count": 276, "max_line_length": 88, "avg_line_length": 37.13768115942029, "alnum_prop": 0.6863414634146342, "repo_name": "bqbn/addons-server", "id": "a7ed2ef36d456173c5fd79d3faa937cd0982d602", "size": "1...
""" Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
{ "content_hash": "f26201e5cd3d1f46f4dd2bc31f229ab1", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 72, "avg_line_length": 28.617021276595743, "alnum_prop": 0.7650557620817844, "repo_name": "arenadata/ambari", "id": "8ae64b9e6f3f6aae32e1aa1c31e706930d3203fa", "size": "136...
import unittest from zang.inboundxml.elements.number import Number from zang.inboundxml.elements.base_node import BaseNode class TestNumber(unittest.TestCase): def setUp(self): self.number = '(555)555-555' def test_init_with_required_values(self): expected = '<Number>' + self.number + '</Num...
{ "content_hash": "cff637c353b0202442854e4cc806a51a", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 79, "avg_line_length": 33.833333333333336, "alnum_prop": 0.657283603096411, "repo_name": "zang-cloud/zang-python", "id": "0458d786af025ccb1c9fb4ef6f785a2dc34251c9", "size":...
from plenum.common.constants import CONFIG_LEDGER_ID from plenum.common.messages.node_messages import Ordered from plenum.test.helper import freshness, assertExp from plenum.test.replica.conftest import * from plenum.test.test_node import getPrimaryReplica from stp_core.loop.eventually import eventually FRESHNESS_TIM...
{ "content_hash": "836b3c136df689d0787f404e1c4fdcb9", "timestamp": "", "source": "github", "line_count": 208, "max_line_length": 116, "avg_line_length": 35.04326923076923, "alnum_prop": 0.6830840993277542, "repo_name": "evernym/zeno", "id": "7963188c3630378f25072a53111a57acbc12df36", "size": "7289",...
''' Datadog www.datadoghq.com ---- Make sense of your IT Data Licensed under Simplified BSD License (see LICENSE) (C) Boxed Ice 2010 all rights reserved (C) Datadog, Inc. 2010-2014 all rights reserved ''' # set up logging before importing any other components from config import get_version,...
{ "content_hash": "eb3df21002a45fc83a8594a36d55bb22", "timestamp": "", "source": "github", "line_count": 393, "max_line_length": 110, "avg_line_length": 32.87277353689567, "alnum_prop": 0.5914544469386176, "repo_name": "polynomial/dd-agent", "id": "80c397ef6d9f1e023afdaf2fe1b131c6f0a5af3a", "size": ...
from pyjamas import DOM from pyjamas import Factory from ComplexPanel import ComplexPanel class DeckPanel(ComplexPanel): def __init__(self, **kwargs): self.visibleWidget = None if kwargs.has_key('Element'): element = kwargs.pop('Element') else: element = DOM.createD...
{ "content_hash": "c885850c451f31148b89879956782267", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 73, "avg_line_length": 29.21311475409836, "alnum_prop": 0.6290684624017957, "repo_name": "jaredly/pyjamas", "id": "f54cb73936651a0ccc5da70421934728dbd046bf", "size": "2442"...
from __future__ import unicode_literals try: from django.contrib.sites.shortcuts import get_current_site except ImportError: from django.contrib.sites.models import get_current_site from django.core.exceptions import ObjectDoesNotExist from django.db.models import get_model from cms.utils.compat.dj import pytho...
{ "content_hash": "2a6b5256c288d8424b02000ad11459a7", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 99, "avg_line_length": 36.7037037037037, "alnum_prop": 0.669021190716448, "repo_name": "aldryn/djangocms-cascade", "id": "df2603db18b87e99886238ea21f6254dce7f7c75", "size":...
import sys import time from django.conf import settings from django.utils.datastructures import DictWrapper # The prefix to put on the default database name when creating # the test database. TEST_DATABASE_PREFIX = 'test_' class BaseDatabaseCreation(object): """ This class encapsulates all backen...
{ "content_hash": "187e7920de6e58cfa4ba3e2aeea8af72", "timestamp": "", "source": "github", "line_count": 492, "max_line_length": 148, "avg_line_length": 45.89837398373984, "alnum_prop": 0.572491364803826, "repo_name": "bernardokyotoku/skillplant", "id": "3932a1740e228256fca1b81f2b6cba96e7858650", "s...
'''OpenGL extension EXT.texture_snorm This module customises the behaviour of the OpenGL.raw.GL.EXT.texture_snorm to provide a more Python-friendly API Overview (from the spec) Fixed-point textures in unextended OpenGL have integer components, but those values are taken to represent floating-point values in th...
{ "content_hash": "6a4f183046cb04eb685550273e55d3dd", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 71, "avg_line_length": 37.111111111111114, "alnum_prop": 0.7829341317365269, "repo_name": "alexus37/AugmentedRealityChess", "id": "f424b40c409ff2e044cc8b3613eccc3e9b2ad026", ...
"""The tests for the Scene component.""" import io import unittest from homeassistant.setup import setup_component from homeassistant.components import light, scene from homeassistant.util.yaml import loader as yaml_loader from tests.common import get_test_home_assistant from tests.components.light import common as c...
{ "content_hash": "b505a0231582cacd0593f038804304c8", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 76, "avg_line_length": 32.479674796747965, "alnum_prop": 0.5476846057571965, "repo_name": "aequitas/home-assistant", "id": "99364d51e6c5ef0a6a42665671c8a75df58d6975", "siz...
__author__ = 'fahadadeel' import jpype import os.path from programmingwithdocuments import ExtractContent asposeapispath = os.path.join(os.path.abspath("../../../../"), "lib") print "You need to put your Aspose.Words for Java APIs .jars in this folder:\n"+asposeapispath jpype.startJVM(jpype.getDefaultJVMPath(), "-Dj...
{ "content_hash": "a70e45752aa360117b3c18d5b3779827", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 94, "avg_line_length": 29.571428571428573, "alnum_prop": 0.7367149758454107, "repo_name": "aspose-words/Aspose.Words-for-Java", "id": "86f85d73230c02b8179ecb5d45ea538ed0eca91...
from functools import partial from typing import Any, Callable, Dict import numpy as np import pandas as pd from flask_babel import gettext as _ from pandas import DataFrame, NamedAgg from superset.exceptions import InvalidPostProcessingError NUMPY_FUNCTIONS = { "average": np.average, "argmin": np.argmin, ...
{ "content_hash": "5da76ddc144b5c279ce7a4333e5dfcbc", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 85, "avg_line_length": 30.891304347826086, "alnum_prop": 0.5730119634060521, "repo_name": "zhouyao1994/incubator-superset", "id": "3d14f643c54b56f196528356d1457227e01b2084",...
''' Created on May 20, 2014 @author: PengAn ''' from app.lib import pdfMinerHelper, pyPdfHelper from flask import render_template import urllib2 from flask import Response def parseRequest(request,fileStream): parserChoice = request.form['parser'] if parserChoice == 'html': resultHtml = pdfMinerHelper...
{ "content_hash": "035a3682f7520890a974d53bde9ed97c", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 112, "avg_line_length": 35.05263157894737, "alnum_prop": 0.7102102102102102, "repo_name": "pengan1987/pythonDev", "id": "2f1bb13f9efdcabb68797a54691373109c7cb5b1", "size": ...
"""Simple tokenizer for Javanese sentences. """ from __future__ import unicode_literals import re from utils import utf8 SPLIT = re.compile(r'[/\s]+') TOKEN = re.compile(r"[-'a-zâåèéêìòù]+$") def main(unused_argv): for line in utf8.stdin: for token in SPLIT.split(line.strip().rstrip('?').lower()): if ...
{ "content_hash": "fcb5f6c2bdb2a942216e578df3c263f0", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 63, "avg_line_length": 19.076923076923077, "alnum_prop": 0.6129032258064516, "repo_name": "googlei18n/language-resources", "id": "bc685301d48d9b49a60d78aa8103c27311e15fb6", ...
from src.base.solution import Solution from src.tests.part2.q074_test_search_2d_matrix import Search2dMatrixTestCases class Search2dMatrix(Solution): def gen_test_cases(self): return Search2dMatrixTestCases() def run_test(self, input): return self.searchMatrix(input[0], input[1]) def sear...
{ "content_hash": "194f28848cb0b35019c32e1d1c78c9a0", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 78, "avg_line_length": 23.913793103448278, "alnum_prop": 0.4578226387887527, "repo_name": "hychrisli/PyAlgorithms", "id": "864f908f33339859670ffed368a2266da1e2d607", "size"...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 32 , FREQ = 'D', seed = 0, trendtype = "Lag1Trend", cycle_length = 0, transform = "Anscombe", sigma = 0.0, exog_count = 0, ar_order = 12);
{ "content_hash": "9741520d2b4a35c3ed5e010245e003f5", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 162, "avg_line_length": 37.42857142857143, "alnum_prop": 0.7022900763358778, "repo_name": "antoinecarme/pyaf", "id": "844bf2453e28bb4cfcdccf8a0e25a7d114be109e", "size": "262...
''' static typed pystone ''' from time import clock TRUE = 1 FALSE = 0 IntGlob = 0 BoolGlob = FALSE Char1Glob = '\0' Char2Glob = '\0' Ident1 = 1 Ident2 = 2 Ident3 = 3 Ident4 = 4 Ident5 = 5 let PtrGlb : Record = None let PtrGlbNext : Record = None class Record: def __init__(self, PtrComp:Record = None, Discr ...
{ "content_hash": "aa17201bc25a940d1148c2afc50d78bf", "timestamp": "", "source": "github", "line_count": 239, "max_line_length": 108, "avg_line_length": 23.297071129707113, "alnum_prop": 0.6979166666666666, "repo_name": "tempbottle/Rusthon", "id": "00e57b1ed03f3591d8e8a7f72aede49a11f1ecfe", "size": ...
import unittest import error_handling as er class FileLike(object): def __init__(self, fail_something=True): self.is_open = False self.was_open = False self.did_something = False self.fail_something = fail_something def open(self): self.was_open = False self.i...
{ "content_hash": "d575532f6ce2558defa3562eed2617cf", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 79, "avg_line_length": 35.63636363636363, "alnum_prop": 0.6221301020408163, "repo_name": "pheanex/xpython", "id": "a7a76f7fa79a29def0f914118b419c012c6c6ad6", "size": "3136"...
import logging from typing import Dict, Optional, TYPE_CHECKING from ray.rllib.env.base_env import _DUMMY_AGENT_ID from ray.rllib.evaluation.episode import MultiAgentEpisode from ray.rllib.evaluation.per_policy_sample_collector import \ _PerPolicySampleCollector from ray.rllib.evaluation.sample_collector import _S...
{ "content_hash": "89f9ba4a0dd45616fa107769a9e5177f", "timestamp": "", "source": "github", "line_count": 249, "max_line_length": 79, "avg_line_length": 45.06827309236948, "alnum_prop": 0.5891106754589199, "repo_name": "robertnishihara/ray", "id": "7c21b0bec22f9c746e172362c36623703a0a83bd", "size": "...
import onirim.agent import onirim.action import onirim.card import onirim.data import onirim.tool import itertools import logging import operator def max_index(iterator): return max(enumerate(iterator), key=operator.itemgetter(1))[0] def _can_obtain_door(content): """ Check if the explored cards can ob...
{ "content_hash": "cb01f1fdebdfe57c3ae7974c73c084bf", "timestamp": "", "source": "github", "line_count": 216, "max_line_length": 92, "avg_line_length": 35.486111111111114, "alnum_prop": 0.6211350293542074, "repo_name": "cwahbong/onirim-py", "id": "806ca0e75f367d1ac6283da08607df7b176e433e", "size": "...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("agenda", "0007_backfill_edims_id"), ] operations = [ migrations.CreateModel( name="ScrapeLog", fields=[ ( "id", ...
{ "content_hash": "092dd0f56ec330d56b0d31c32e125584", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 84, "avg_line_length": 32.08695652173913, "alnum_prop": 0.4010840108401084, "repo_name": "crccheck/atx-bandc", "id": "a56d94d98ddbc2039aa68aa177ec5edc08819a5c", "size": "15...
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Logit'] , ['MovingAverage'] , ['NoCycle'] , ['LSTM'] );
{ "content_hash": "c46ac71320c4dedccfb19eca2fa39f13", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 78, "avg_line_length": 37.75, "alnum_prop": 0.7019867549668874, "repo_name": "antoinecarme/pyaf", "id": "a5775c68e5c5a8552bb80efa749edf3f56865b0c", "size": "151", "binary"...
import logging import t411, re from termcolor import colored, cprint class search_t411(object): """ Main class: search torrents from t411 server """ def __init__(self, username, password, title="", season=None, episode=None, seeders_min=0): self.username = username sel...
{ "content_hash": "daae538ad8f29cce9412d9a2b44785ce", "timestamp": "", "source": "github", "line_count": 123, "max_line_length": 141, "avg_line_length": 31.3739837398374, "alnum_prop": 0.5167141746566468, "repo_name": "Bilb/t411todeluge", "id": "4ba4558bf6a982ef25261429ab0207c27c26e977", "size": "39...
import warnings import logging import unittest import ssl from itertools import chain from mock import patch, Mock from urllib3 import add_stderr_logger, disable_warnings from urllib3.util.request import make_headers from urllib3.util.timeout import Timeout from urllib3.util.url import ( get_host, parse_url, ...
{ "content_hash": "f983340c5630220d64ba5fb9826f84e7", "timestamp": "", "source": "github", "line_count": 406, "max_line_length": 140, "avg_line_length": 38.97290640394089, "alnum_prop": 0.5697402515325791, "repo_name": "gardner/urllib3", "id": "19ba57e3a682bfba0201ac6c7c36f69002cb184a", "size": "158...
import io import os import sys from shutil import rmtree from setuptools import find_packages, setup, Command # Package meta-data. NAME = 'funannotate' DESCRIPTION = 'funannotate: eukaryotic genome annotation pipeline' URL = 'https://github.com/nextgenusfs/funannotate' EMAIL = 'nextgenusfs@gmail.com' AUTHOR = 'Jon Pa...
{ "content_hash": "792df635d90236ec26be5172707b5dc0", "timestamp": "", "source": "github", "line_count": 127, "max_line_length": 86, "avg_line_length": 28.023622047244096, "alnum_prop": 0.6285473447597639, "repo_name": "nextgenusfs/funannotate", "id": "984abb21647625e816310bfd544e7dad1faf139e", "siz...
"""A helper class for reading in and dealing with tests expectations for layout tests. """ from collections import defaultdict import logging import re from webkitpy.layout_tests.models.test_configuration import TestConfigurationConverter _log = logging.getLogger(__name__) # Test expectation and specifier constan...
{ "content_hash": "908cadd17b2ed6916c84e797f9db5ad0", "timestamp": "", "source": "github", "line_count": 1145, "max_line_length": 214, "avg_line_length": 45.83318777292576, "alnum_prop": 0.6225918939004174, "repo_name": "was4444/chromium.src", "id": "df9e5ec35b06e1a5ea170e62dfb3517e34b3024f", "size"...
from .core import Clusteror from .plot import scatter_plot_two_dim_group_data from .plot import hist_plot_one_dim_group_data from ._version import get_versions __version__ = get_versions()['version'] del get_versions
{ "content_hash": "a12e65a3128d545649e20ff4aa178c31", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 49, "avg_line_length": 36.166666666666664, "alnum_prop": 0.7695852534562212, "repo_name": "enfeizhan/clusteror", "id": "39add29349aace9f5dbd1e0fdd3f1c097e528295", "size": "2...
import pytest pytestmark = [pytest.mark.setone, pytest.mark.working, pytest.mark.schema] @pytest.fixture def antibody_data(lab, award): return { 'lab': lab['@id'], 'award': award['@id'], 'description': 'Test Antibody', 'antibody_name': 'test-Ab', 'antibody_product_no': '1...
{ "content_hash": "e992d21dfec6e9f5532d7b56a2f46826", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 74, "avg_line_length": 27.75609756097561, "alnum_prop": 0.6124780316344464, "repo_name": "4dn-dcic/fourfront", "id": "0a44f8d7495d0e430795beab06168a8091e17415", "size": "11...
import testtools from neutron.hacking import checks from neutron.tests import base class HackingTestCase(base.BaseTestCase): def assertLinePasses(self, func, line): with testtools.ExpectedException(StopIteration): next(func(line)) def assertLineFails(self, func, line): self.asse...
{ "content_hash": "7e17370be876a38cbc3c276d79ee4c9d", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 79, "avg_line_length": 40.24305555555556, "alnum_prop": 0.4999137187230371, "repo_name": "NeCTAR-RC/neutron", "id": "7e2d81c0c130b3993c67b662c3d5f42e2cba3995", "size": "63...
"""Test state helpers.""" import asyncio from datetime import timedelta from unittest.mock import patch import pytest from homeassistant.components.sun import STATE_ABOVE_HORIZON, STATE_BELOW_HORIZON from homeassistant.const import ( SERVICE_TURN_OFF, SERVICE_TURN_ON, STATE_CLOSED, STATE_HOME, STA...
{ "content_hash": "53eac05653d21c01aee7c49af22daaf7", "timestamp": "", "source": "github", "line_count": 215, "max_line_length": 88, "avg_line_length": 32.70232558139535, "alnum_prop": 0.6424406201109373, "repo_name": "turbokongen/home-assistant", "id": "89b0f3c685088f423cdd8c4b007ccfb1f36fe0ef", "s...
"""empty message Revision ID: f67a9b8459d Revises: 10d66bb5392e Create Date: 2015-01-06 23:38:59.524326 """ # revision identifiers, used by Alembic. revision = 'f67a9b8459d' down_revision = '10d66bb5392e' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - pl...
{ "content_hash": "65045573de47c25b67d9e19217641c11", "timestamp": "", "source": "github", "line_count": 61, "max_line_length": 99, "avg_line_length": 37.90163934426229, "alnum_prop": 0.6371107266435986, "repo_name": "qqalexqq/monkeys", "id": "86af94f5deaa0dcf0bb04457d8fcdde645359ecc", "size": "2312...
from django.http import HttpResponse from demoapp import tasks def foo(request): r = tasks.add.delay(2, 2) return HttpResponse(r.task_id)
{ "content_hash": "1c398ebfafb67f16c8ff4b4a8620e395", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 36, "avg_line_length": 18.625, "alnum_prop": 0.7248322147651006, "repo_name": "planorama/django-celery", "id": "a1aab48cd7e69584feda2709460bc8c256f14466", "size": "176", "...
from panda3d.core import * class DNAStorage(): def __init__(self): self.nodes = {} self.catalogCodes = {} self.fonts = [] self.textures = [] self.hoodNodes = {} self.placeNodes = {} self.visGroups = [] self.visGroupsAI = [] self.dnaGroups = [] def storeNode(self, node, p): self.nodes[node] = p ...
{ "content_hash": "a20e32d08844cd5cf0b5f70e89e95831", "timestamp": "", "source": "github", "line_count": 60, "max_line_length": 86, "avg_line_length": 24.633333333333333, "alnum_prop": 0.6671177266576455, "repo_name": "SkippsDev/libdna", "id": "24f7fc5af8f5e595d74c81df886f5801b059dfcd", "size": "147...
from autotable import AutoTable from datalog import DataHandler, StoreToH5, StoreToTxt, TextPrinter, DataLog from bunch import * from params import param_file from backup import copy, copy_source, copy_directory, backup, initialise_backup, logfilename, saveplot #Also note that misc changes default numpy output! fro...
{ "content_hash": "a4ca6b749170e3b609000f28c81c1270", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 102, "avg_line_length": 32.81818181818182, "alnum_prop": 0.8116343490304709, "repo_name": "chrhartm/SORN", "id": "e884d93e68ca061e4fb4c36190a2a198ccf551f4", "size": "362", ...
from keywords import Keywords from spot import Spot class Bot: def __init__(self): self.keyword_fetcher = Keywords() self.spot_client = Spot() def fetch_spot(self, sentence): result = self.keyword_fetcher.extract_from_sentence(sentence) message = {} message_body = '' ...
{ "content_hash": "2fcd0b9751b1e8d6400782da1df7fcb6", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 77, "avg_line_length": 30.071428571428573, "alnum_prop": 0.5486935866983373, "repo_name": "yustoris/tis2016", "id": "70c58b9eeb4497f219540abec3883a425e4775d7", "size": "926...
from distutils.core import setup import sys reload(sys).setdefaultencoding('Utf-8') setup( name='gipsy_toolbar', version='0.0.1', author='Guillaume Pousseo', author_email='guillaumepousseo@revsquare.com', description='Manages a toolbar for admins with shortcuts to easily navigate to most\ ...
{ "content_hash": "bdcda6787b579c8250323b2433fc4335", "timestamp": "", "source": "github", "line_count": 36, "max_line_length": 88, "avg_line_length": 32.80555555555556, "alnum_prop": 0.628281117696867, "repo_name": "RevSquare/gipsy_toolbar", "id": "577fc4ca81478ef37f7bd3a27356ade85e3dfe6c", "size":...
from django.core.management import BaseCommand from django.core import management import game.runtime as Runtime import argparse import json #The class must be named Command, and subclass BaseCommand class Command(BaseCommand): # Show this when the user types help help = "Start game creating map and other stuff" ...
{ "content_hash": "f3f6e7ad17f3b21d4e319f8fd9874e22", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 58, "avg_line_length": 22.158730158730158, "alnum_prop": 0.660458452722063, "repo_name": "DanAurea/Trisdanvalwen", "id": "580062e79cf32647a0b3ddbec4e54b216a5dc2d2", "size":...
from __future__ import unicode_literals import curses from rtv.submission_page import SubmissionPage try: from unittest import mock except ImportError: import mock def test_submission_page_construct(reddit, terminal, config, oauth): window = terminal.stdscr.subwin url = ('https://www.reddit.com/r/P...
{ "content_hash": "38f89ed258954e877a934ad5f14e6d2e", "timestamp": "", "source": "github", "line_count": 451, "max_line_length": 78, "avg_line_length": 33.92017738359202, "alnum_prop": 0.6655771996339391, "repo_name": "shaggytwodope/rtv", "id": "eb98a8de64bdcdb79f8729079a3b0bff1bc67b25", "size": "15...
from keywords._pagetests import _PageTestsKeywords from keywords._draganddrop import _DragAndDropKeywords from keywords._actionchains import _ActionChainsKeywords class Selenium2LibraryExtensions(_PageTestsKeywords, _DragAndDropKeywords, _ActionChainsKeywords): """Selenium2Library...
{ "content_hash": "5f2d9f9f9983fbc6c7a6d69f2f921e0c", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 74, "avg_line_length": 40.18181818181818, "alnum_prop": 0.6877828054298643, "repo_name": "idumpling/robotx", "id": "5a6734f3a224c559046e5e45d4c90b42283320ef", "size": "884"...
""" Provides an unused network Provides workaround for limit of 31 networks with default docker setup by providing a free network that can be specified to docker manually. Known performance issues when creating many docker networks, after 50 or so networks the time it takes to create a new network starts becoming ve...
{ "content_hash": "1b32af5c67e4d04d510f6969db612f23", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 128, "avg_line_length": 32.52046783625731, "alnum_prop": 0.6038482287358389, "repo_name": "thorgate/tg-hammer", "id": "9f669e7ee8d4d51782b35ea639f1e04ed6df779a", "size": "...
""" Unit tests for gluon.dal (NoSQL adapters) """ import sys import os import glob if sys.version < "2.7": import unittest2 as unittest else: import unittest import datetime try: import cStringIO as StringIO except: from io import StringIO def fix_sys_path(): """ logic to have always th...
{ "content_hash": "590c70f2ae532e209b4fbf335d97fd7f", "timestamp": "", "source": "github", "line_count": 1430, "max_line_length": 159, "avg_line_length": 41.42517482517483, "alnum_prop": 0.5448192038893953, "repo_name": "uwdata/termite-data-server", "id": "a4eb0dadf49f7d910d4698f53962f9b99d6a19a4", ...
""" This module provides utility functions for the models package """ from collections import deque, MutableMapping from inspect import signature import numpy as np from ..utils import isiterable, check_broadcast from ..utils.compat import NUMPY_LT_1_14 from .. import units as u __all__ = ['ExpressionTree', 'Ali...
{ "content_hash": "7d803d67fd34b2d045abfb88d0d53e09", "timestamp": "", "source": "github", "line_count": 647, "max_line_length": 83, "avg_line_length": 32.304482225656876, "alnum_prop": 0.5675326539400029, "repo_name": "funbaker/astropy", "id": "614cc27f615e102ee72f56c4085ae86b063f2741", "size": "20...
import inspect import os import sys import django from django.utils.encoding import force_str from django.utils.html import strip_tags from oscar import get_version, get_short_version oscar_folder = os.path.realpath( os.path.join(os.path.dirname(__file__), '../..')) sandbox_folder = os.path.realpath( os.pat...
{ "content_hash": "59f2eb2d44e87cf51fbc9247636b8500", "timestamp": "", "source": "github", "line_count": 298, "max_line_length": 80, "avg_line_length": 31.348993288590606, "alnum_prop": 0.680796403339756, "repo_name": "solarissmoke/django-oscar", "id": "211d023f1499403493189a489021fda3d8b78e24", "si...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('userprofile', '0012_auto_20190408_1820'), ] operations = [ migrations.AlterField( model_name='profile', name='social_discord', field=models.CharField(bla...
{ "content_hash": "482778d8c10060dd5ffb91d2f99eb754", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 101, "avg_line_length": 25.0625, "alnum_prop": 0.6034912718204489, "repo_name": "hackerspace-ntnu/website", "id": "c37feddbea55cae5477a39625ff44dd7c28b241d", "size": "451",...