text
stringlengths
4
1.02M
meta
dict
import unittest import tempfile from AlphaLineupPuzzle import lineup_puzzle from AlphaLineupPuzzle.preprocessing import game_converter class TestGameConverter(unittest.TestCase): def setUp(self): self.save = 'tests/data/save.json' self.gs = lineup_puzzle.GameState.create() def test_to_file(...
{ "content_hash": "7059cdbbdcca8b4d91a1646d666ee4e0", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 68, "avg_line_length": 29.82758620689655, "alnum_prop": 0.6682080924855491, "repo_name": "zhaipro/AlphaLineupPuzzle", "id": "808117df1d406b270e9ab8b1a3cad16e7547a18f", "siz...
from msrest.serialization import Model class BasicDependency(Model): """ Deployment dependency information. :param id: Gets or sets the ID of the dependency. :type id: str :param resource_type: Gets or sets the dependency resource type. :type resource_type: str :param resource_name: Gets ...
{ "content_hash": "a58c0e40f17238cfd3a45a94430e0727", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 72, "avg_line_length": 31.24, "alnum_prop": 0.6209987195902689, "repo_name": "BurtBiel/azure-cli", "id": "3d7e750a316d3270d985b3a1948b3a61dbe14e8e", "size": "1468", "bina...
""" Add FLAGS_GOLD to detection catalog. Spencer Everett """ import sys import fitsio from astropy.table import Table, join from argparse import ArgumentParser parser = ArgumentParser() parser.add_argument( 'detfile', type=str, help='Detection catalog filename' ) parser.add_argument( 'matchfile', ...
{ "content_hash": "09dd833fc6d518de45790d907acc1e22", "timestamp": "", "source": "github", "line_count": 89, "max_line_length": 94, "avg_line_length": 24.280898876404493, "alnum_prop": 0.6260990282276724, "repo_name": "sweverett/Balrog-GalSim", "id": "e0ff73a1c594e1e4cdcd6d0575eba932253f5986", "size...
import unittest from maskgen.algorithms.retinex import * from tests.test_support import TestSupport import os from maskgen.image_wrap import ImageWrapper, openImageFile import numpy as np #import colorcorrect.algorithm from maskgen.image_wrap import ImageWrapper class TestRetinex(TestSupport): def test_retinex...
{ "content_hash": "c56a1054ac29ae5792e98fb40f7187f5", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 85, "avg_line_length": 28.80952380952381, "alnum_prop": 0.5421487603305785, "repo_name": "rwgdrummer/maskgen", "id": "7facce05620e49c93ea9773e23b7a4708accc2c0", "size": "12...
import os """ the get_password function tries to find a file called <arg>_password.txt containing the txt. By default it looks in application root folder parent. get_password('db') - > ../db_password.txt Import it if you want to pass some password to your configs. """ # from quokka.utils.settings import get_passwor...
{ "content_hash": "6772fcd5a9566b87b72df07dc2cfd4c8", "timestamp": "", "source": "github", "line_count": 291, "max_line_length": 77, "avg_line_length": 27.38487972508591, "alnum_prop": 0.6837746266783787, "repo_name": "SiryjVyiko/quokka", "id": "b246f99a0b7a3286ae746e125f17cfddaaf0497e", "size": "79...
def hello(): print("Hello world!")
{ "content_hash": "7a820db47dbeaab07e90d820bdb6f74e", "timestamp": "", "source": "github", "line_count": 2, "max_line_length": 25, "avg_line_length": 19.5, "alnum_prop": 0.5897435897435898, "repo_name": "jdgwartney/fabric-examples", "id": "e64f971ebd8760b723360894d7707a5a19f75a19", "size": "39", "...
from mxnet.test_utils import * from common import setup_module, with_seed import random import warnings def is_scalar(var): return False if hasattr(var, "__len__") else True def get_result_type(call, dflt_stype): """Try to infer result storage type for a sparse matrix and a given unary operation""" if cal...
{ "content_hash": "34fd96b2a333ab1d5fa29a9575a1cb44", "timestamp": "", "source": "github", "line_count": 1968, "max_line_length": 122, "avg_line_length": 47.8714430894309, "alnum_prop": 0.4781925677468661, "repo_name": "CodingCat/mxnet", "id": "347948665461e8d0fc726da9ebe357d6a0635c5f", "size": "949...
"""XmlDumper server class for uicd. This class does the following things: 1. check&install&start xml dumper server on Device 2. fetches current xml. """ import json import logging import sys import time from .adb import Adb from .constant import DEFAULT_APK_DUMPER_VERSION from .constant import DEFAULT_DUMPER_POR...
{ "content_hash": "9af554e1ada9f48fce54849d8d5894ad", "timestamp": "", "source": "github", "line_count": 423, "max_line_length": 115, "avg_line_length": 33.05673758865248, "alnum_prop": 0.6425659729671744, "repo_name": "google/android-uiconductor", "id": "fe853bccd7c3aff9ba7f824ac874b319d3c1fabf", "...
import requests from datetime import datetime, timedelta from jobs import AbstractJob from lxml import etree class Yr(AbstractJob): def __init__(self, conf): self.url = conf['url'] self.interval = conf['interval'] self.timeout = conf.get('timeout') def _parse_tree(self, tree, date=No...
{ "content_hash": "4ba7b22c569045e992a5b8ddbf974c05", "timestamp": "", "source": "github", "line_count": 51, "max_line_length": 79, "avg_line_length": 35.15686274509804, "alnum_prop": 0.5488008923591746, "repo_name": "Foxboron/Frank", "id": "039d89609c893a1deb838da52fc425337f728032", "size": "1816",...
import urlparse import logging from django.views.generic import FormView, TemplateView from django.contrib import auth from django.contrib.auth import REDIRECT_FIELD_NAME, login from django.http import HttpResponseRedirect, HttpResponsePermanentRedirect, HttpResponseGone from django.utils.decorators import method_decor...
{ "content_hash": "0bc0d6c3945a0ad9e6978d165bbb01a0", "timestamp": "", "source": "github", "line_count": 78, "max_line_length": 93, "avg_line_length": 35.5, "alnum_prop": 0.6644998194293968, "repo_name": "dsimandl/teamsurmandl", "id": "bc61cfe47b784792f7b5002d8dc6e43ffb7f9ab9", "size": "2769", "bi...
import sys import os from invoke import task # You might need the following line so that alembic can traverse # the application properly # export PYTHONPATH=$(pwd) IS_TTY = False if os.getenv('DOCKER') else sys.stdout.isatty() @task def clean(ctx): patterns = ( '**/*.pyc', '**/__pycache__', ...
{ "content_hash": "9604ea8d33db5d132778a5a0f11f931e", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 71, "avg_line_length": 19.75, "alnum_prop": 0.6127733026467204, "repo_name": "CanopyTax/toggle-meister", "id": "a826233a3cfb9029dbf0a08af4d0b9f0f7c72ba4", "size": "1738", ...
import base64 import datetime import os import re import StringIO import tempfile from functools import wraps import bleach from flask import Blueprint, g, jsonify, request from PIL import Image from PIL.ExifTags import TAGS from sqlalchemy.orm.exc import NoResultFound import settings from database import db from mod...
{ "content_hash": "f458277e33ee21845a916589535b2cc4", "timestamp": "", "source": "github", "line_count": 231, "max_line_length": 79, "avg_line_length": 34.76623376623377, "alnum_prop": 0.5687959158261736, "repo_name": "ednapiranha/detour", "id": "96ff663b6b71e641da1acd7d78bb32e748b83906", "size": "8...
from PyObjCTools.TestSupport import * from Quartz.CoreGraphics import * class TestCGAffineTransform (TestCase): def testStruct(self): v = CGAffineTransform() self.assertTrue(hasattr(v, "a")) self.assertTrue(hasattr(v, "b")) self.assertTrue(hasattr(v, "c")) self.assertTrue(ha...
{ "content_hash": "7dc4db7a0af8e6951252983d04cff0c0", "timestamp": "", "source": "github", "line_count": 88, "max_line_length": 87, "avg_line_length": 39.18181818181818, "alnum_prop": 0.6635730858468677, "repo_name": "albertz/music-player", "id": "3726e1188ec55602763cfb1e8b2a282e4d0408f2", "size": "...
""" Script for plotting cross sections generated by FEFF found in xmu.dat files. """ __author__ = "Alan Dozier" __credits__ = "Anubhav Jain, Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "1.0.2" __maintainer__ = "Alan Dozier" __email__ = "adozier@uky.edu" __date__ = "April 7, 20...
{ "content_hash": "aa9227174c08e1ab1f257a7f66aef02a", "timestamp": "", "source": "github", "line_count": 65, "max_line_length": 82, "avg_line_length": 28.70769230769231, "alnum_prop": 0.5884244372990354, "repo_name": "mbkumar/pymatgen", "id": "909c1ecd8f4d9bd247fcc236db6404594e7ca10c", "size": "2000...
import json from flask import request from redash import models from redash.handlers.base import BaseResource from redash.permissions import (require_access, require_object_modify_permission, require_permission, view_only) class WidgetListResource(BaseR...
{ "content_hash": "c51e566c8eab2907d79a6d2a215b6ff0", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 111, "avg_line_length": 39.22222222222222, "alnum_prop": 0.6444759206798867, "repo_name": "easytaxibr/redash", "id": "530e217dc8a5981425ea6714f0602a9228bbe7be", "size": "28...
import os import re from subprocess import PIPE, Popen from textwrap import dedent from zipfile import ZipFile from pants.base.build_environment import get_buildroot from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest from pants.util.contextutil import temporary_dir class ScopeRuntimeIntegr...
{ "content_hash": "6ffd39c6f69ed923efb1e4cb8875cf80", "timestamp": "", "source": "github", "line_count": 188, "max_line_length": 93, "avg_line_length": 42.47872340425532, "alnum_prop": 0.48221888304532934, "repo_name": "wisechengyi/pants", "id": "d323d2ada3252562f3a445604c5fcb06a1424d3a", "size": "8...
"""Tests for the EcoData Retriever""" import os from StringIO import StringIO from retriever.lib.engine import Engine from retriever.lib.table import Table from retriever.lib.templates import BasicTextTemplate from retriever.lib.tools import getmd5 from retriever import DATA_WRITE_PATH from nose.tools import with_setu...
{ "content_hash": "38d67bf4da28807367171ba904ba2647", "timestamp": "", "source": "github", "line_count": 145, "max_line_length": 126, "avg_line_length": 37.26896551724138, "alnum_prop": 0.6615470022205774, "repo_name": "davharris/retriever", "id": "7f171fef1f97f556e113db263dbf5320d239cffe", "size": ...
from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("hordak", "0001_initial")] operations = [ migrations.RunSQL( """ CREATE OR REPLACE FUNCTION check_leg() RETURNS trigger AS...
{ "content_hash": "6d9d23858c53581d0ed797b74ead5177", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 122, "avg_line_length": 33.17777777777778, "alnum_prop": 0.48894842598794375, "repo_name": "waldocollective/django-hordak", "id": "edd42620fa3f6d3fb811c8b357f23e63fc5d6888", ...
from share.provider import ProviderAppConfig from .harvester import DailySSRNHarvester class AppConfig(ProviderAppConfig): name = 'providers.com.dailyssrn' version = '0.0.1' title = 'dailyssrn' long_title = 'Social Science Research Network' home_page = 'http://papers.ssrn.com/' harvester = Dai...
{ "content_hash": "6d639a10fea14493e76c37f92e78bda7", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 75, "avg_line_length": 34.333333333333336, "alnum_prop": 0.7305825242718447, "repo_name": "zamattiac/SHARE", "id": "a9a038756a7bf7ccda63844c8de740f292ffb36c", "size": "412"...
""" This module contains translators for both Cinder and EBS volumes. """ from heat2arm.translators.storage.volumes.cinder_volume import ( CinderVolumeARMTranslator, ) from heat2arm.translators.storage.volumes.ebs_volume import ( EBSVolumeARMTranslator, ) from heat2arm.translators.storage.volumes.volume_at...
{ "content_hash": "bfe0bbe61cfe7ea31489fa924f75dfe4", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 69, "avg_line_length": 30, "alnum_prop": 0.8, "repo_name": "aznashwan/heat2arm", "id": "371c68e1634949c3e337dedee0e7e51f3b51a064", "size": "1059", "binary": false, "cop...
import kfp.deprecated as kfp from kfp.samples.test.utils import TestCase, relative_path, run_pipeline_func run_pipeline_func([ TestCase( pipeline_file=relative_path(__file__, 'pipeline_transformers.py'), mode=kfp.dsl.PipelineExecutionMode.V1_LEGACY, ), ])
{ "content_hash": "0f8815743bacb8249afdf5f95cfa3964", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 77, "avg_line_length": 31.22222222222222, "alnum_prop": 0.7117437722419929, "repo_name": "kubeflow/pipelines", "id": "2fd190338446c02024068d002c2aab2bbc2befd5", "size": "867...
''' Creates keyspace, column family, and performs basic bootstraping for the examples to run. This file MUST be executed before running any example ''' from pycassa.pool import ConnectionPool from pycassa.system_manager import * from pycassa.types import * keyspace = 'mastering_cassandra' #Open connection sys = Syst...
{ "content_hash": "79972a0f0f7229973ed877ff9cb94042", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 100, "avg_line_length": 37.134328358208954, "alnum_prop": 0.7688906752411575, "repo_name": "naishe/mastering_cassandra", "id": "0402ca7cec189646962888b6c079c3cba9640431", "...
_DEBUG = True def set_debug(enabled): """ Enable or disable the debug mode. In debug mode, a bunch of extra checks in claripy will be executed. You'll want to disable debug mode if you are running performance critical code. """ global _DEBUG _DEBUG = enabled
{ "content_hash": "c13f5c421c7da2e3074c835f5150b53d", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 120, "avg_line_length": 26, "alnum_prop": 0.6818181818181818, "repo_name": "angr/claripy", "id": "e7578ebe4627c8782de656f93027621589e10c13", "size": "363", "binary": fals...
import argparse import shutil import subprocess import re import subprocess import os import zipfile import io import codecs from subprocess import PIPE, STDOUT, Popen from os import listdir from os.path import isfile, join def ParseArguments(): argMap = {} parser = argparse.ArgumentParser(description="Genera...
{ "content_hash": "87ed543b45a930830e9cdb895f4d4bf8", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 205, "avg_line_length": 40.204301075268816, "alnum_prop": 0.6509761968440759, "repo_name": "ambasta/aws-sdk-cpp", "id": "7d6b5dc599752bc14ced0f4d6853495add2d1690", "size": ...
import errno import socket import unittest dummy_app = object() class TestWSGIServer(unittest.TestCase): def _makeOne(self, application=dummy_app, host='127.0.0.1', port=0, _dispatcher=None, adj=None, map=None, _start=True, _sock=None, _server=None): from waitress.server...
{ "content_hash": "792874631d0a83f3ec5b62e01c85981a", "timestamp": "", "source": "github", "line_count": 333, "max_line_length": 80, "avg_line_length": 31.06906906906907, "alnum_prop": 0.5968490237773052, "repo_name": "WillisXChen/django-oscar", "id": "0ff887175bd4689c8807c092c6c0f6d565a856f9", "siz...
from __future__ import division, print_function import time import numpy as np import pyqtgraph as pg import pyqtgraph.console from ..fitting.psp import StackedPsp from .user_test import UserTestUi class PspFitUI(object): """Used to display details of PSP/PSC fitting analysis. """ def __init__(self, titl...
{ "content_hash": "26c68d62fa0fcb7069992b406e0751d3", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 73, "avg_line_length": 31.14, "alnum_prop": 0.6242774566473989, "repo_name": "campagnola/neuroanalysis", "id": "755160e12e166e1302c68b1eeb799a4fd818e8e5", "size": "1557", ...
__author__ = 'Simone Campagna' import re import string import collections from .debug import PRINT class _FormatSpecData(object): KEYS = ('fill', 'align', 'sign', 'alternate', 'zero', 'width', 'comma', 'precision', 'type') #RE_FORMAT_SPEC = re.compile(r"(?P<fill>[^\{\}])?(?P<align>[\<\>\=\^])?(?P<sign>[\+\- ...
{ "content_hash": "e4c9e5582611941d965b5a9450d82281", "timestamp": "", "source": "github", "line_count": 343, "max_line_length": 282, "avg_line_length": 40.011661807580175, "alnum_prop": 0.5041533080734479, "repo_name": "simone-campagna/zapper", "id": "222c4986ad95cd8aad9effc192c140cf78daf085", "siz...
import os # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/1.10/howto/deployment/checklist/ # SECURITY WARNING: keep th...
{ "content_hash": "9649a47db247d8c2aae10a422c4a0989", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 91, "avg_line_length": 26.70909090909091, "alnum_prop": 0.6684819605173588, "repo_name": "nowackie/leaven", "id": "254603e76d1086e9f40ce9a8e123a84a4784105b", "size": "2938...
"""Keystone Client functionality for use by resources.""" import collections import uuid import weakref from keystoneauth1 import exceptions as ks_exception from keystoneauth1.identity import generic as ks_auth from keystoneclient.v3 import client as kc_v3 from oslo_config import cfg from oslo_log import log as logg...
{ "content_hash": "0864d2e97ccb2f6880f10a5303e29606", "timestamp": "", "source": "github", "line_count": 559, "max_line_length": 79, "avg_line_length": 43.1788908765653, "alnum_prop": 0.6018146414218835, "repo_name": "noironetworks/heat", "id": "f91c2c134e97dda70b98436c25fb80cb8f10dc23", "size": "24...
from __future__ import annotations import unittest from unittest import mock from urllib.parse import quote_plus from parameterized import parameterized from airflow.models import Connection from airflow.providers.microsoft.mssql.hooks.mssql import MsSqlHook PYMSSQL_CONN = Connection( conn_type="mssql", host="i...
{ "content_hash": "c9eefd94e962470b4bed2ebe39b54d1e", "timestamp": "", "source": "github", "line_count": 150, "max_line_length": 103, "avg_line_length": 38.24, "alnum_prop": 0.622907949790795, "repo_name": "nathanielvarona/airflow", "id": "832fb49754d42795e24442706be419da0fb4f722", "size": "6523", ...
from pyfbsdk import * ################################################################################## # Script for selecting effecting character and control rig from model selection # Author Sergey Solohin (Neill3d) 2014 # e-mail to: s@neill3d.com # www.neill3d.com # # Github repo - https://github.com/Neill3d/M...
{ "content_hash": "83b8ad3b234eb92afc94738360631cb4", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 82, "avg_line_length": 30.162790697674417, "alnum_prop": 0.5643793369313801, "repo_name": "Neill3d/MoPlugs", "id": "f3161839cadbd4423ef0e04d8cac5adfeac1e23a", "size": "1298...
"""Model classes for datastore objects and properties for models.""" import datetime import inspect import json import pickle import zlib from google.cloud.datastore import helpers from google.cloud.ndb import _datastore_types from google.cloud.ndb import exceptions from google.cloud.ndb import key as key_module ...
{ "content_hash": "a6a8bd482cb3a524e881971437680288", "timestamp": "", "source": "github", "line_count": 3035, "max_line_length": 79, "avg_line_length": 31.97825370675453, "alnum_prop": 0.5746079502132834, "repo_name": "jonparrott/google-cloud-python", "id": "a45135173c03b6082a4e98b84d4d00a395e44e14",...
from muntjac.ui.text_field import TextField from muntjac.demo.sampler.APIResource import APIResource from muntjac.demo.sampler.Feature import Feature, Version class TextFieldSingle(Feature): def getSinceVersion(self): return Version.OLD def getName(self): return 'Text field' def getD...
{ "content_hash": "e6ae3090657845c84c308dae3082923c", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 91, "avg_line_length": 29.634146341463413, "alnum_prop": 0.6962962962962963, "repo_name": "rwl/muntjac", "id": "ddc043472af8ce5294c50f05b9a3724907b7e609", "size": "1216", ...
__author__ = 'mpetyx' from django.db import models import tweepy class TwitterInteraction(models.Model): user_name = models.TextField() post_id = models.TextField() created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(auto_now=True) screen_name = models.TextField() ...
{ "content_hash": "050fe1d20c5425f9176d32629f523a39", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 137, "avg_line_length": 28.12121212121212, "alnum_prop": 0.5858477011494253, "repo_name": "mpetyx/pychatbot", "id": "03e88eed36f2324f0dc31c341cbb6b230a81c6eb", "size": "278...
import unittest import mock class DynamicFieldsMixinTestCase(unittest.TestCase): """Test functionality of the DynamicFieldsMixin class.""" def test_restrict_dynamic_fields(self):
{ "content_hash": "35e69858f9b44390d8d46cb96183de64", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 61, "avg_line_length": 17.545454545454547, "alnum_prop": 0.7668393782383419, "repo_name": "chewse/djangorestframework-dynamic-fields", "id": "ca9198c77845cbc0a2b089f49a673c12...
"""Settings reused by other settings.""" import os DEBUG = False SANDBOX = False PROJECT_ROOT = os.path.realpath( os.path.join(os.path.dirname(__file__), "../.."))
{ "content_hash": "067e8a77518b6f2282830bf7b6688682", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 53, "avg_line_length": 21.25, "alnum_prop": 0.6529411764705882, "repo_name": "bitmazk/webfaction-django1.4-boilerplate", "id": "2306cc9aba1f5fd27c57864be05af5b1e53831b4", "s...
def extractChococatshomeWpcomstagingCom(item): ''' Parser for 'chococatshome.wpcomstaging.com' ''' vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or "preview" in item['title'].lower(): return None tagmap = [ ('PRC', 'PRC', 'translated...
{ "content_hash": "3089e6fe435db9d94de8f2914fafe619", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 104, "avg_line_length": 27.19047619047619, "alnum_prop": 0.6427320490367776, "repo_name": "fake-name/ReadableWebProxy", "id": "be57c5eca9c77641626fb65512596a353c174c7b", "s...
import os import logging import uuid import urlparse from google.appengine.api import users from google.appengine.api import urlfetch from google.appengine.api import taskqueue from google.appengine.ext import db import webapp2 from webapp2_extras import jinja2 from webapp2_extras import sessions import datetime from...
{ "content_hash": "942ffbfc26456a7b6d5bd69ac67c3bea", "timestamp": "", "source": "github", "line_count": 666, "max_line_length": 117, "avg_line_length": 34.7987987987988, "alnum_prop": 0.5859509837763204, "repo_name": "blairconrad/LibraryHippo", "id": "72a9ab38e657a8004e003bb6736448fb57b348ee", "siz...
import re import os import sys import warnings from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler from numpy.distutils.exec_command import exec_command from numpy.distutils.misc_util import msvc_runtime_library compilers = ['GnuFCompiler', 'Gnu95FCompiler'] class GnuFCompiler(FCo...
{ "content_hash": "c9cdf227394658894f939dc366b10b86", "timestamp": "", "source": "github", "line_count": 387, "max_line_length": 109, "avg_line_length": 37.354005167958654, "alnum_prop": 0.5278085224128389, "repo_name": "santisiri/popego", "id": "b281cb5c1513aeee18b742a7f94205315a3f8563", "size": "1...
from __future__ import absolute_import import hashlib import jwt from six.moves.urllib.parse import quote from sentry.shared_integrations.exceptions import ApiError def percent_encode(val): # see https://en.wikipedia.org/wiki/Percent-encoding return quote(val.encode("utf8", errors="replace")).replace("%7E"...
{ "content_hash": "c60152f3035965ee0cc869ef28411f06", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 100, "avg_line_length": 39.77142857142857, "alnum_prop": 0.6767241379310345, "repo_name": "beeftornado/sentry", "id": "8cc28aea3c06f6aa32d4e7ec6ea390ae07958b22", "size": "2...
from __future__ import print_function from __future__ import absolute_import from __future__ import division import compas_rhino from compas.artists import PrimitiveArtist from compas.colors import Color from .artist import RhinoArtist class PointArtist(RhinoArtist, PrimitiveArtist): """Artist for drawing points...
{ "content_hash": "166ca0cbb892414a5f5e02f240279ace", "timestamp": "", "source": "github", "line_count": 53, "max_line_length": 107, "avg_line_length": 29.81132075471698, "alnum_prop": 0.5974683544303797, "repo_name": "compas-dev/compas", "id": "fb9ca67ff4ad0b4c1ed0084aeb9784482bec33f3", "size": "15...
from conans.util.files import load, save from conans.model.version import Version from conans.errors import ConanException import os CONAN_VERSION = "version.txt" class Migrator(object): def __init__(self, conf_path, store_path, current_version, out): self.conf_path = conf_path self.store_path =...
{ "content_hash": "620ebfa450f9873a66e764ab2b2a93fd", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 91, "avg_line_length": 30.85, "alnum_prop": 0.6345218800648298, "repo_name": "mropert/conan", "id": "8be5f257bc5d3d737bc9842efd4a99cd450cb764", "size": "1234", "binary": ...
""" Herald core beans definition :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.4 :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with t...
{ "content_hash": "edd2f7920cd0cc086986e4728b70c5f7", "timestamp": "", "source": "github", "line_count": 591, "max_line_length": 93, "avg_line_length": 26.008460236886634, "alnum_prop": 0.5244291197709974, "repo_name": "ahmadshahwan/cohorte-herald", "id": "9915185e15f64047c68f0b27670da43749742754", ...
import abc import signal import sys import six from oslo_log import log as logging @six.add_metaclass(abc.ABCMeta) class StressAction(object): def __init__(self, manager, max_runs=None, stop_on_error=False): full_cname = self.__module__ + "." + self.__class__.__name__ self.logger = logging.getL...
{ "content_hash": "447fb4c5ae2897c34029301060f653e1", "timestamp": "", "source": "github", "line_count": 82, "max_line_length": 75, "avg_line_length": 32.4390243902439, "alnum_prop": 0.5710526315789474, "repo_name": "zsoltdudas/lis-tempest", "id": "cf0a08a463e4afd70e068b8cd56eca7ca74c8547", "size": ...
from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('studygroups', '0021_auto_20150506_0036'), ] operations = [ migrations.AlterField( model_name='application', name='contact_method', field=models.CharField...
{ "content_hash": "6dcaa0872667e7834ca14abbd3e1ab31", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 103, "avg_line_length": 25.4375, "alnum_prop": 0.5847665847665847, "repo_name": "p2pu/learning-circles", "id": "34ab5b339568b02c82533b11e5e725efa230a39e", "size": "433", ...
from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kolibriauth', '0002_auto_20170208_0110'), ] operations = [ migrations.AlterField( model_name='collection',...
{ "content_hash": "050ece86598c9efa42f07f316c8e1495", "timestamp": "", "source": "github", "line_count": 29, "max_line_length": 284, "avg_line_length": 45, "alnum_prop": 0.6482758620689655, "repo_name": "aronasorman/kolibri", "id": "46a42aeffe7d49a416990aeab9a01e581138684a", "size": "1377", "binar...
""" WSGI config for nspaces 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.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_SETT...
{ "content_hash": "c35dc2ebc9aef4610cbdfd5e837af18b", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 24.3125, "alnum_prop": 0.7686375321336761, "repo_name": "jstoledano/nspaces", "id": "05300a07f3c8778bf38e95545f72b424c5ca2030", "size": "389", "bin...
from enum import Enum class EventType(Enum): """Enum containing the various types of events that can occur.""" CLIENT_READY = "CLIENT_READY" CLIENT_RESUMED = "CLIENT_RESUMED" MESSAGE_RECEIVED = "MESSAGE_RECEIVED" SERVER_MESSAGE_RECEIVED = "SERVER_MESSAGE_RECEIVED" PRIVATE_MESSAGE_RECEIVED = "...
{ "content_hash": "1e58935a09a4eb775e01a3c4fe36cd8c", "timestamp": "", "source": "github", "line_count": 57, "max_line_length": 69, "avg_line_length": 29.05263157894737, "alnum_prop": 0.6884057971014492, "repo_name": "nint8835/NintbotForDiscordV2", "id": "60336ec8abc6b32d869ad96e29ffb9eebe0a5c03", "...
import datetime from functools import reduce import logging from typing import Any, Type from flask_babel import lazy_gettext from .filters import BaseFilterConverter, Filters try: import enum _has_enum = True except ImportError: _has_enum = False log = logging.getLogger(__name__) class BaseInterface...
{ "content_hash": "effe1dd395b536c80db38f862d1dfeca", "timestamp": "", "source": "github", "line_count": 360, "max_line_length": 117, "avg_line_length": 26.752777777777776, "alnum_prop": 0.5453223964282006, "repo_name": "dpgaspar/Flask-AppBuilder", "id": "6a1529e6e146bfd9c96a2a263e35dbd5a9e400bf", "...
from ..excel_comparsion_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.maxDiff = None filename = 'chart_data_labels05.xls...
{ "content_hash": "ecf9e790f3bfb61c258024d55c9ebb9e", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 68, "avg_line_length": 26.07936507936508, "alnum_prop": 0.5349969567863664, "repo_name": "jkyeung/XlsxWriter", "id": "fa1f0b11c8e03238b5e0441eefe33dde8ff73cf3", "size": "18...
import numpy as np import pandas as pd from pandas import DataFrame, Series import random class Population(object): """ Genotypes are biallelic in the form of (0, 1) where 0 is a recessive allele and 1 is a dominant allele. Each genotype is associated with a character of the organism (e.g., seed color...
{ "content_hash": "3c0fd090ac8e10d0a5aef179afe7b88f", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 95, "avg_line_length": 33.270270270270274, "alnum_prop": 0.6169780666125102, "repo_name": "huddlej/populations", "id": "4be224b42b8b240f798aab4a550cbd08334c9d9f", "size": "...
from hazelcast.serialization.bits import * from hazelcast.protocol.client_message import ClientMessage from hazelcast.protocol.custom_codec import * from hazelcast.util import ImmutableLazyDataList from hazelcast.protocol.codec.replicated_map_message_type import * REQUEST_TYPE = REPLICATEDMAP_PUT RESPONSE_TYPE = 105 R...
{ "content_hash": "c48f1dba78c8e2ded1f0555112a06b73", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 86, "avg_line_length": 32.02272727272727, "alnum_prop": 0.7310149041873669, "repo_name": "cangencer/hazelcast-python-client", "id": "e64dfe4c78f42bff69e665e0211cd45ce5022ded"...
#!/usr/bin/env python """ runtests.py [OPTIONS] [-- ARGS] Run tests, building the project first. Examples:: $ python runtests.py $ python runtests.py -s {SAMPLE_SUBMODULE} $ python runtests.py -t {SAMPLE_TEST} $ python runtests.py --ipython $ python runtests.py --python somescript.py $ python...
{ "content_hash": "892159d463722f1be12e628fac1b038d", "timestamp": "", "source": "github", "line_count": 458, "max_line_length": 103, "avg_line_length": 34.98471615720524, "alnum_prop": 0.5384759408350496, "repo_name": "Shaswat27/scipy", "id": "88f873c6c3734f664e13fb8734d6369f2300eec2", "size": "160...
from __future__ import print_function # This is hacky code to analyze data on our support stream. The main # reusable bits are get_recent_messages and get_words. import zulip import re import collections def get_recent_messages(client, narrow, count=100): narrow = [word.split(':') for word in narrow.split()] ...
{ "content_hash": "5a3c24c1927a3a6d67715e6b0544e5df", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 91, "avg_line_length": 32.4625, "alnum_prop": 0.568348093954563, "repo_name": "alliejones/zulip", "id": "50959463dc1a424fad3371ebe29d23be7d995542", "size": "2597", "binar...
"""read the idf file by just parsing the text""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import eppy.modeleditor as modeleditor from eppy.modeleditor import IDF def nocomment(astr, com='!'): """ just l...
{ "content_hash": "4b0263066b361872055e73e00255135b", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 78, "avg_line_length": 29.340425531914892, "alnum_prop": 0.5402465554749819, "repo_name": "eayoungs/eppy", "id": "7c4f3d1c7e31807f71f6f2da8c3ed79233e8bd6f", "size": "3064",...
import logging import asyncio from domopyc.subscribers.toolbox import AverageMemoryMessageHandler logging.basicConfig(format='%(asctime)s [%(name)s] %(levelname)s: %(message)s') LOGGER = logging.getLogger('domopyc') class MysqlCurrentCostMessageHandler(AverageMemoryMessageHandler): CREATE_TABLE_SQL = '''CREATE ...
{ "content_hash": "f16678554ce91196cf317f68b2b47568", "timestamp": "", "source": "github", "line_count": 81, "max_line_length": 128, "avg_line_length": 46.851851851851855, "alnum_prop": 0.5588932806324111, "repo_name": "bamthomas/DomoPyc", "id": "d5803700ac2a8deadb3b6ad744de009743f48ea6", "size": "3...
"""Includes all the fields classes from `marshmallow.fields` as well as fields for serializing JSON API-formatted hyperlinks. """ from marshmallow import ValidationError # Make core fields importable from marshmallow_jsonapi from marshmallow.fields import * # noqa from marshmallow.utils import get_value, is_collection...
{ "content_hash": "648801f86861125bd320b3208565828c", "timestamp": "", "source": "github", "line_count": 163, "max_line_length": 95, "avg_line_length": 36.49079754601227, "alnum_prop": 0.6114660390047074, "repo_name": "Tim-Erwin/marshmallow-jsonapi", "id": "129a69d0282ae52ab35170e690feb39ce19d36d8", ...
from django.contrib.auth.models import User from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase, Client from django.test import override_settings from .settings import FLATPAGES_TEMPLATES @override_settings( LOGIN_URL='/accounts/login/', MIDDLEWARE_CLASSES=( ...
{ "content_hash": "8c82f532fe5bbd9f97517c7c47274966", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 118, "avg_line_length": 45.68421052631579, "alnum_prop": 0.6984447004608295, "repo_name": "iambibhas/django", "id": "7b35f621fdaf77f3c4a540a4a578a224e3a60608", "size": "347...
""" Tools for converting PyPI packages to conda recipes. """ from __future__ import absolute_import, division, print_function import requests import keyword import os import re import subprocess import sys from collections import defaultdict from os import makedirs, listdir, getcwd, chdir from os.path import join, i...
{ "content_hash": "02b2006b2130d9d65544dddb0000755a", "timestamp": "", "source": "github", "line_count": 812, "max_line_length": 107, "avg_line_length": 35.80541871921182, "alnum_prop": 0.5546192474375731, "repo_name": "rmcgibbo/conda-build", "id": "4be696e52fddee2a117494c80feef6dddd071d54", "size":...
from setuptools import setup, find_packages from distutils.command.build import build as distutils_build from os import chdir from os.path import abspath, dirname ######################################################################## chdir(dirname(abspath(__file__))) #########################################...
{ "content_hash": "70cf61774e75379d0bb2a5724bf1d8d3", "timestamp": "", "source": "github", "line_count": 83, "max_line_length": 80, "avg_line_length": 28.759036144578314, "alnum_prop": 0.48847926267281105, "repo_name": "ndim/weight-calendar-grid", "id": "252e3f02d079f9d289705cf6e320bb0710e7c9b2", "s...
import tarfile import os os.mkdir('outdir') with tarfile.open('example.tar', 'r') as t: t.extractall('outdir', members=[t.getmember('README.txt')], ) print(os.listdir('outdir'))
{ "content_hash": "6dac016c04e1f7698ded1fe153a0c6e4", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 53, "avg_line_length": 24.11111111111111, "alnum_prop": 0.5806451612903226, "repo_name": "jasonwee/asus-rt-n14uhp-mrtg", "id": "41ac764be85973e719b1731f2e7962cbfd3fc22c", "s...
from google.cloud import networkconnectivity_v1alpha1 async def sample_delete_spoke(): # Create a client client = networkconnectivity_v1alpha1.HubServiceAsyncClient() # Initialize request argument(s) request = networkconnectivity_v1alpha1.DeleteSpokeRequest( name="name_value", ) # Ma...
{ "content_hash": "7411e4660bd06a88f5e658a7f529d9aa", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 75, "avg_line_length": 26.26086956521739, "alnum_prop": 0.7317880794701986, "repo_name": "googleapis/python-network-connectivity", "id": "f41b6ba53a0dfec14f27da2c6749698870a8...
from numpy import * # - given a vector containing all parameters, return a list of unrolled parameters # - specifically, these parameters, as described in section 3 of the paper, are: # - rel_dict, dictionary of {dependency relation r: composition matrix W_r} # - Wv, the matrix for lifting a word embedding to the ...
{ "content_hash": "4c5d2fbdb3109253ce3a0a3b3d219466", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 82, "avg_line_length": 23.933333333333334, "alnum_prop": 0.6072423398328691, "repo_name": "ernan/quanta", "id": "12a1aea01bc8945d78530c2256677a3967318699", "size": "1795", ...
""" Django settings for wot_clan_battles project. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ imp...
{ "content_hash": "085045366cbe4ae1ff8e230ae59d41e7", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 96, "avg_line_length": 25.851190476190474, "alnum_prop": 0.6343541330877274, "repo_name": "monester/wot-battles", "id": "d81495cb69b19c27e075ff987f5e9eeffe8a1b18", "size":...
from mailchimp import MailChimp client = MailChimp('didierserrat', 'dde1a01e091c530def679e42f2390b46-us9') # print client.authorized_app.all() # print client.authorized_app.get('870970111619') # print client.automation.all() # print client.automation.start('870970111619') print client.growth.all('2822d76480')
{ "content_hash": "c85f14567ce382adf205f1e8d48e23d5", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 74, "avg_line_length": 22.714285714285715, "alnum_prop": 0.779874213836478, "repo_name": "s0x90/python-mailchimp", "id": "9ad256d579a7a5974ecc5a7392840f06920e7510", "size":...
"""IoticAgent.IOT module provides a simple wrapper for IoticAgent.Core with helper objects for Thing, Point, etc. """ __version__ = '0.7.0' from .Client import Client, SearchScope, DescribeScope # NOQA
{ "content_hash": "cc0110ac7364562bad14feb153433662", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 75, "avg_line_length": 29.285714285714285, "alnum_prop": 0.7365853658536585, "repo_name": "Iotic-Labs/py-IoticAgent", "id": "54f6a4ac9975884960ca6fa47e40d7cc12cf56cf", "size...
import os from setuptools import setup, find_packages from digits.extensions.view import GROUP as DIGITS_PLUGIN_GROUP # Utility function to read the README file. def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="digits_image_gradients_view_plugin", version...
{ "content_hash": "d05bcecd89217d46f2293052b0f00e69", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 70, "avg_line_length": 25.692307692307693, "alnum_prop": 0.6781437125748503, "repo_name": "ethantang95/DIGITS", "id": "9f23022d96fdc66123f1085e780deebf798eff54", "size": "7...
from airflow.contrib.hooks.gcs_hook import GoogleCloudStorageHook from airflow.models import BaseOperator from airflow.utils.decorators import apply_defaults from airflow.exceptions import AirflowException WILDCARD = '*' class GoogleCloudStorageToGoogleCloudStorageOperator(BaseOperator): """ Copies objects f...
{ "content_hash": "393170f4d72efe27ce678f26f36c9901", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 93, "avg_line_length": 45.81111111111111, "alnum_prop": 0.6274557361144798, "repo_name": "owlabs/incubator-airflow", "id": "4516e6210043a78390c03123f532e51925866cbb", "siz...
from __future__ import print_function, unicode_literals from six.moves import zip from past.builtins import basestring import unicodecsv as csv import itertools import re import subprocess import time from tempfile import NamedTemporaryFile import hive_metastore from airflow import configuration as conf from airflow....
{ "content_hash": "91bd188a7212ec60a1dfd1c219c4ea45", "timestamp": "", "source": "github", "line_count": 830, "max_line_length": 104, "avg_line_length": 38.665060240963854, "alnum_prop": 0.535554032157547, "repo_name": "Tagar/incubator-airflow", "id": "d278483afcbcbdd6cef5919372e1134f1c98cada", "siz...
"""Definitions for the `AllTimes` class.""" from collections import OrderedDict import numpy as np from mosfit.modules.arrays.array import Array from mosfit.utils import frequency_unit # Important: Only define one ``Module`` class per file. class AllTimes(Array): """Generate all times for which observations wil...
{ "content_hash": "a4c26e982c5d3e7e1eb29584c04edf21", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 79, "avg_line_length": 44.89247311827957, "alnum_prop": 0.5233532934131736, "repo_name": "bmockler/MOSFiT", "id": "4276238172bec6aee80c22e8d19e67fac5374f59", "size": "4175"...
import sys import os sys.path.append(sys.path[0]+'/..') # Set the path so we can find procgame. We are assuming (stupidly?) that the first member is our directory. import pinproc from procgame import * from threading import Thread import random import string import time import locale import math import copy locale.se...
{ "content_hash": "95354fe6039c528202f8a8d3dffd5120", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 143, "avg_line_length": 24.567164179104477, "alnum_prop": 0.7108140947752126, "repo_name": "mjocean/PyProcGameHD-SkeletonGame", "id": "7fa43c63d6405e6d6fb9d15b9dc7aab2c702666...
import _plotly_utils.basevalidators class HovermodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="hovermode", parent_name="layout.scene", **kwargs): super(HovermodeValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_n...
{ "content_hash": "720f352b85d2d5311187fb1bde52fd06", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 86, "avg_line_length": 39.666666666666664, "alnum_prop": 0.6239495798319328, "repo_name": "plotly/plotly.py", "id": "89f547c020c929b5436baad5d45b2b27d4e5d8f3", "size": "476...
"""Support for Ankuoo RecSwitch MS6126 devices.""" import logging import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice from homeassistant.const import CONF_HOST, CONF_MAC, CONF_NAME import homeassistant.helpers.config_validation as cv _LOGGER = logging.getLogger(__name...
{ "content_hash": "ff82d630814b847891a042416d7135b3", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 75, "avg_line_length": 31.04255319148936, "alnum_prop": 0.6394790952707334, "repo_name": "molobrakos/home-assistant", "id": "c43064c56749a3321dc68d470f92472a50061895", "siz...
import pytest import json from indy_node.test.validator_info.helper import sdk_get_validator_info from plenum.common.exceptions import RequestRejectedException from indy_common.constants import VALIDATOR_INFO from plenum.common.constants import REPLY, TXN_TYPE, DATA from plenum.common.types import f from plenum.test....
{ "content_hash": "45dd49383d9faeb9d14d26aadcbf7a38", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 78, "avg_line_length": 37.65853658536585, "alnum_prop": 0.6502590673575129, "repo_name": "spivachuk/sovrin-node", "id": "5c79dda9ad8c2d47adaba15d14eff709d5fdb69c", "size": ...
from frappe.tests.utils import FrappeTestCase class TestDropboxSettings(FrappeTestCase): pass
{ "content_hash": "0a181190271f304a7e97a15f41a71e6f", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 45, "avg_line_length": 19.4, "alnum_prop": 0.845360824742268, "repo_name": "StrellaGroup/frappe", "id": "1c95b130e856d4f532088ed82576f830a521e2c5", "size": "200", "binary"...
from cx_Freeze import setup, Executable import os from os.path import dirname, join import subprocess import sys from app.util import autoversioning from app.util.process_utils import is_windows buildOptions = { 'excludes': [], 'append_script_to_exe': False, 'build_exe': 'dist', 'compressed': True, ...
{ "content_hash": "d4658751b8482281c3c82ef2e6b67aed", "timestamp": "", "source": "github", "line_count": 73, "max_line_length": 111, "avg_line_length": 35.49315068493151, "alnum_prop": 0.6819760710150521, "repo_name": "Medium/ClusterRunner", "id": "5992553f11f6b0e6c5f3f2f19be8b2dbe0950a42", "size": ...
from __future__ import unicode_literals from django.conf import settings from django.db import migrations class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('projects', '0006_auto_20170921_2218'), ] operations = [ ...
{ "content_hash": "0f094f89db35d71ff00163f87898c291", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 66, "avg_line_length": 24.36842105263158, "alnum_prop": 0.6436285097192225, "repo_name": "srtab/alexandria-docs", "id": "adc264223ebe2dcb0f266b0857a8226f9cc685d7", "size": ...
import requests from bs4 import BeautifulSoup import sys import csv # Scraping URL for the Names of the top numTeams NCAA Team Names def teamsNameScraper(URL): page = requests.get(URL) soup = BeautifulSoup(page.content, 'html.parser') dat = [] rows = soup.find_all("tr", {"class": ["odd", "even"]}) ...
{ "content_hash": "8add68918689fab37efc43f640a28c73", "timestamp": "", "source": "github", "line_count": 79, "max_line_length": 104, "avg_line_length": 26.72151898734177, "alnum_prop": 0.5153955471340597, "repo_name": "parekhmitchell/NCAA-ML", "id": "7eab7db2badd2f73a7bcbdbbdb79ad8aa7ba3cd9", "size"...
import time import wpan from wpan import verify #----------------------------------------------------------------------------------------------------------------------- # Test description: verifies `ChannelManager` channel change process test_name = __file__[:-3] if __file__.endswith('.py') else __file__ print '-' * ...
{ "content_hash": "96ad057b928f9d8245cc56096ab755f3", "timestamp": "", "source": "github", "line_count": 120, "max_line_length": 120, "avg_line_length": 34.175, "alnum_prop": 0.5703486954401366, "repo_name": "erja-gp/openthread", "id": "82744799a90c32f009ef91ab648bbec051876a43", "size": "5703", "b...
from malcolm.yamlutil import check_yaml_names, make_include_creator compoundmotor_collection = make_include_creator( __file__, "compoundmotor_collection.yaml" ) cs_collection = make_include_creator(__file__, "cs_collection.yaml") motor_records = make_include_creator(__file__, "motor_records.yaml") rawmotor_collect...
{ "content_hash": "d0580160eaa94ce60e075a33f711976f", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 84, "avg_line_length": 46.27272727272727, "alnum_prop": 0.7485265225933202, "repo_name": "dls-controls/pymalcolm", "id": "8aed9050e21b340a8ad7d78668bdeffe7a281efb", "size":...
from __future__ import unicode_literals, print_function, absolute_import import sys import json import logging import argparse import re from marklogic.connection import Connection from marklogic.models.database import Database from marklogic import MarkLogic from requests.auth import HTTPDigestAuth from resources imp...
{ "content_hash": "87de4e7b677eef467ea3271bd09495dc", "timestamp": "", "source": "github", "line_count": 227, "max_line_length": 83, "avg_line_length": 35.83700440528634, "alnum_prop": 0.47215734480639215, "repo_name": "supriyantomaftuh/python_api", "id": "dda5eabc96d5e5abf5400aaa4c6040ec526f7f5c", ...
from fabric.api import sudo, put, run, cd from fabric.contrib.files import append, exists, comment def install(): sudo("apt-get update") sudo("apt-get install python-dev python-pip python-opencv libevent-dev python-virtualenv nginx ajaxterm") sudo("service apache2 stop") sudo("update-rc.d apache2 disa...
{ "content_hash": "6387dd5537f5f6824a6730b75e422f97", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 109, "avg_line_length": 30.583333333333332, "alnum_prop": 0.6026339691189827, "repo_name": "xiaocong/remote-task-http-server-fab", "id": "ca7ffbd92c50f217e25ba545b11a2f94ff6b...
import os import logging import optparse from django.db import models from django.utils.daemonize import become_daemon from django.core.management.base import NoArgsCommand from ...utils import get_backend, get_middleware, configure_logging from ...runner import runner class Command(NoArgsCommand): option_list =...
{ "content_hash": "d817ba59820ab87d7157bec4b89ba50b", "timestamp": "", "source": "github", "line_count": 74, "max_line_length": 91, "avg_line_length": 33.445945945945944, "alnum_prop": 0.593939393939394, "repo_name": "prophile/django-lightweight-queue", "id": "248fff7eee2608482552d1ffa49acb4c5f6dc0ae"...
import os import sys import imp import pkg_resources import mimetypes from paste import request from paste import fileapp from paste.util import import_string from paste.deploy import converters from paste import httpexceptions from paste.httpheaders import ETAG from paste.urlparser import StaticURLParser class Cache...
{ "content_hash": "e0ebe35b26cbe2076ee8f1807a8e3ca3", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 72, "avg_line_length": 39.34, "alnum_prop": 0.6273512963904423, "repo_name": "jmchilton/galaxy-central", "id": "7fd9467c216eda5a42b7531d4eb1f7bdb0cc22e9", "size": "1967", ...
""" proxy.py ~~~~~~~~ ⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on Network monitoring, controls & Application development, testing, debugging. :copyright: (c) 2013-present by Abhinav Singh and contributors. :license: BSD, see LICENSE for more details. """ i...
{ "content_hash": "21121b1b1b07dbb7e04d4415e6704d6e", "timestamp": "", "source": "github", "line_count": 101, "max_line_length": 115, "avg_line_length": 33.40594059405941, "alnum_prop": 0.5880260818020154, "repo_name": "abhinavsingh/proxy.py", "id": "936e455b76ef7df9be28759a11944cc677d2cf22", "size"...
""" Revision ID: 0208_fix_unique_index Revises: 0207_set_callback_history_type Create Date: 2018-07-25 13:55:24.941794 """ from alembic import op revision = "84c3b6eb16b3" down_revision = "0207_set_callback_history_type" def upgrade(): op.create_unique_constraint("uix_service_callback_type", "service_callback_...
{ "content_hash": "9c519cd4aa630ac64ceb4500e1d8afec", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 117, "avg_line_length": 38.56521739130435, "alnum_prop": 0.7215332581736189, "repo_name": "alphagov/notifications-api", "id": "0ad53f814d3c85ef714b8ec7b1c2dad9a47e4e76", "s...
"""Creates a grd file for packaging the inspector files.""" import os import shlex import sys from xml.dom import minidom kDevToolsResourcePrefix = 'IDR_DEVTOOLS_' kGrdTemplate = '''<?xml version="1.0" encoding="UTF-8"?> <grit latest_public_release="0" current_release="1" output_all_resource_defines="false"> ...
{ "content_hash": "3d57b8a1cab6bfc4317d26c572f7f2c6", "timestamp": "", "source": "github", "line_count": 95, "max_line_length": 156, "avg_line_length": 35.27368421052632, "alnum_prop": 0.6559236048940614, "repo_name": "ChromeDevTools/devtools-frontend", "id": "be215c0181090f90383db3cc7f3c4bc736b238f1"...
from .abstract_data_converter import AbstractDataConverter from .pickle_data_converter import PickleDataConverter from .json_data_converter import JSONDataConverter
{ "content_hash": "605b522092193c3308812ecbd5c3be4e", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 58, "avg_line_length": 55, "alnum_prop": 0.8727272727272727, "repo_name": "darjus/botoflow", "id": "996b1969f3c7df5e2264429194773d23287b6d9c", "size": "727", "binary": fal...
import sys import os import servicemanager import logging import logging.handlers import weakref import traceback #from winsys import event_logs import util class EventLog: # The singleton instance of our logger class _LOG_INSTANCE = None _OPE_STATE_LOG_INSTANCE = None @staticmethod def ge...
{ "content_hash": "b25f6e70bbfa925b73e26efb7b8f5f1f", "timestamp": "", "source": "github", "line_count": 331, "max_line_length": 107, "avg_line_length": 37, "alnum_prop": 0.5106556707765167, "repo_name": "operepo/ope", "id": "4730a1cc2b3c00f94de4872aec50c9ee22b33948", "size": "12247", "binary": fa...
try: # For Django >= 1.5, use get_user_model() and store result User from django.contrib.auth import get_user_model User = get_user_model() except ImportError: # Django < 1.5, load User from registration.models from django.contrib.auth.models import User
{ "content_hash": "9a3a88445667db34ec442d94ff85ca76", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 67, "avg_line_length": 39.285714285714285, "alnum_prop": 0.7054545454545454, "repo_name": "bruth/django-registration2", "id": "f18f729f606aed721fd21a863c273226e4d5af2b", "si...
from builtins import range import sys, os sys.path.insert(1, os.path.join("..","..","..")) import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator from h2o.estimators.random_forest import H2ORandomForestEstimator from h2o.estimators.isolation_forest import H2OIsolationFores...
{ "content_hash": "2ac1109dfc9b877ed692e55cf6469846", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 101, "avg_line_length": 35.26829268292683, "alnum_prop": 0.7344398340248963, "repo_name": "h2oai/h2o-3", "id": "0a58a74d7ff1c89e64d8689fb0289a27f38c2ecb", "size": "1446", ...
import base64 import binascii import os import re import StringIO from boto.exception import BotoClientError from boto.s3.key import Key as S3Key from boto.s3.keyfile import KeyFile from boto.utils import compute_hash from boto.utils import get_utf8_value class Key(S3Key): """ Represents a key (object) in a GS...
{ "content_hash": "44f4f7a53ff94d41377817ab7628729a", "timestamp": "", "source": "github", "line_count": 919, "max_line_length": 91, "avg_line_length": 45.05549510337323, "alnum_prop": 0.597328889532918, "repo_name": "ric03uec/boto", "id": "277e7c715075e97fdba5bfbd6ea18387d00cea62", "size": "42479",...
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('../sphinxext')) sys.path...
{ "content_hash": "174f4aa6843f119325d096958765c1ff", "timestamp": "", "source": "github", "line_count": 305, "max_line_length": 80, "avg_line_length": 32.38032786885246, "alnum_prop": 0.7055488051842851, "repo_name": "edublancas/sklearn-model-evaluation", "id": "fc05ad6a1c8b5dd190a45f7829f667db2379fd...
"""Simple diagnostic bandit environment. Observation is a single pixel of 0 - this is an independent arm bandit problem! Rewards are [0, 0.1, .. 1] assigned randomly to 11 arms and deterministic """ from typing import Optional from bsuite.environments import base from bsuite.experiments.bandit import sweep import d...
{ "content_hash": "4e5bf4c8b96e0cffb9300f67257f803b", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 80, "avg_line_length": 32.10344827586207, "alnum_prop": 0.7019334049409237, "repo_name": "deepmind/bsuite", "id": "6365a9d1b3f47766d6e803498b5841b0b027a536", "size": "2592"...
from __future__ import print_function from screenFlags import ScreenFlags MANPAGE_HEADER = '''= fpp(1) ''' MANPAGE_NAME_SECTION = ''' == NAME fpp - Facebook PathPicker; a command line tool for selecting files out of bash output ''' USAGE_INTRO_PRE = ''' Welcome to fpp, the Facebook PathPicker! We hope your stay wit...
{ "content_hash": "e77635154448604e9eec03a4afd3686b", "timestamp": "", "source": "github", "line_count": 178, "max_line_length": 85, "avg_line_length": 23.252808988764045, "alnum_prop": 0.6764919062575502, "repo_name": "slackorama/PathPicker", "id": "cd6db3a861e1f7f5b4390965e01d99346909e9c7", "size"...
from __future__ import print_function import collections import string import sys import threading import time import ddt import mock from six.moves import queue as Queue import testtools from rally.common import utils from rally import exceptions from tests.unit import test class ImmutableMixinTestCase(test.TestCa...
{ "content_hash": "f36461d6a4a82abbd279c51258520942", "timestamp": "", "source": "github", "line_count": 790, "max_line_length": 79, "avg_line_length": 35.562025316455696, "alnum_prop": 0.5621840962483092, "repo_name": "yeming233/rally", "id": "e21fa50f83b8bfc3c45594a839fae8d7ff0acf23", "size": "287...
c.NotebookApp.open_browser = False # Hashed password to use for web authentication. # # To generate, type in a python/IPython shell: # # from notebook.auth import passwd; passwd() # # The string should be of the form type:salt:hashed-password. # c.NotebookApp.password = u'' # extra paths to look for Javascript n...
{ "content_hash": "6405594e2c5acb2336961eb257ce725d", "timestamp": "", "source": "github", "line_count": 342, "max_line_length": 100, "avg_line_length": 37.08479532163743, "alnum_prop": 0.6610423401403454, "repo_name": "ioam/topographica", "id": "7c4b4c848d08b6796e7fae973360d60f5ae82c46", "size": "1...
""" .. module:: parser_mp :synopsis: Definition of the command line options .. moduleauthor:: Benjamin Audren <benjamin.audren@epfl.ch> .. moduleauthor:: Francesco Montesano <franz.bergesund@gmail.com> Defines the command line options and their help messages in :func:`create_parser` and read the input command line...
{ "content_hash": "a677b46d1e884c3ff49600497488aae3", "timestamp": "", "source": "github", "line_count": 869, "max_line_length": 144, "avg_line_length": 42.45454545454545, "alnum_prop": 0.5804082075190415, "repo_name": "miguelzuma/montepython_zuma", "id": "e56c9850b9b826f757fd8ccbbac00a13ed173cf4", ...
from django.contrib import admin from website.models import Project, Result, ExperimentConf, DBConf class ExperimentConfAdmin(admin.ModelAdmin): list_display = [ 'name', 'project', 'benchmark_type', 'creation_time' ] list_filter = [ 'creation_time' ] class ProjectAdmin(admin.ModelAdmin): fields = ['user'...
{ "content_hash": "f7a3a60dbbfbff5385b6aa69ca4ed636", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 75, "avg_line_length": 37.22222222222222, "alnum_prop": 0.7059701492537314, "repo_name": "oltpbenchmark/website", "id": "cc6833a26b494b075e2acb69fd6d8f165b7bb2a0", "size": ...
import examples.connect """ Find a resource from the Compute service. For a full guide see https://docs.openstack.org/openstacksdk/latest/user/guides/compute.html """ def find_image(conn): print("Find Image:") image = conn.compute.find_image(examples.connect.IMAGE_NAME) print(image) return image ...
{ "content_hash": "e8be212c0fb01b2c31015d886485a12b", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 71, "avg_line_length": 16.92105263157895, "alnum_prop": 0.702954898911353, "repo_name": "openstack/python-openstacksdk", "id": "64ca9e3559d0f9bdcf0886a3fe528f554e6feca0", "...