text
stringlengths
4
1.02M
meta
dict
""" This file contains a minimal set of tests for compliance with the extension array interface test suite, and should contain no other tests. The test suite for the full functionality of the array is located in `pandas/tests/arrays/`. The tests in this file are inherited from the BaseExtensionTests, and only minimal ...
{ "content_hash": "e40987a9f1baf11ba1bdeeb56b84b32c", "timestamp": "", "source": "github", "line_count": 393, "max_line_length": 87, "avg_line_length": 33.10178117048346, "alnum_prop": 0.603044046429395, "repo_name": "jreback/pandas", "id": "ced7ea92613105784cbc96b2aef490ff313bdd52", "size": "13009"...
import bpy import bl_ui from . import render from . import scene from . import world from . import camera from . import objects from . import materials from . import lamps import bl_ui.properties_texture as properties_texture INCLUDE_TEXTURE = ['TEXTURE_MT_specials', 'TEXTURE_PT_context_texture', 'TEXTURE_PT_image', '...
{ "content_hash": "28b4a44b502c4886454b856122e85ccb", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 149, "avg_line_length": 27.841269841269842, "alnum_prop": 0.6972633979475484, "repo_name": "jasperges/blenderseed", "id": "2846fe658dea4b556d720f8216657e519bd977f0", "size"...
from twisted.internet import defer from buildbot.clients import usersclient from buildbot.process.users import users from buildbot.util import in_reactor @in_reactor @defer.inlineCallbacks def user(config): master = config.get('master') op = config.get('op') username = config.get('username') passwd = ...
{ "content_hash": "a73f0ca8445b7e451918d3bb629d68d8", "timestamp": "", "source": "github", "line_count": 33, "max_line_length": 67, "avg_line_length": 29.515151515151516, "alnum_prop": 0.6581108829568788, "repo_name": "denny820909/builder", "id": "4f231e769d0d6c5ce86af091620fe52cec019135", "size": "...
from installed_clients.DataFileUtilClient import DataFileUtil from .utils import report_utils from .utils.TemplateUtil import TemplateUtil from .utils.validation_utils import validate_simple_report_params, validate_extended_report_params import os from configparser import ConfigParser #END_HEADER class KBaseReport: ...
{ "content_hash": "cb1ce1d2a588c665c518a9eae432d205", "timestamp": "", "source": "github", "line_count": 382, "max_line_length": 100, "avg_line_length": 58.397905759162306, "alnum_prop": 0.6270844540075309, "repo_name": "msneddon/KBaseReport", "id": "784f8eb93c7567a3df4963f626bd672a59ca5bbe", "size"...
""" Test suite for codestream oddities """ # Standard library imports ... import importlib.resources as ir from io import BytesIO import struct import unittest import warnings # Local imports ... import glymur from glymur import Jp2k from . import fixtures, data class TestSuite(unittest.TestCase): """Test suite...
{ "content_hash": "b18d35c7005b1c90725e3212bc98c7a7", "timestamp": "", "source": "github", "line_count": 186, "max_line_length": 78, "avg_line_length": 32.26881720430107, "alnum_prop": 0.577307564145285, "repo_name": "quintusdias/glymur", "id": "cf84698309ebd3f4cfdfb60f1f337b535f191de9", "size": "60...
"""predictions_app URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') ...
{ "content_hash": "64c5555325af08263bf7687161b66aee", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 81, "avg_line_length": 42, "alnum_prop": 0.6865079365079365, "repo_name": "Thing342/FRCPredictionsApp", "id": "616a33b2beb9f5a5b37b4e02ef042144c6fe15cd", "size": "1008", ...
""" A node and corresponding command to constrain the first twist joint in a shoulder. The node also outputs the shoulder's spine-space elevation angle for other nodes to use. \b Creation \b Info: \b Donations: http://adammechtley.com/donations/ \b License: The MIT License Copyright (c) 2011 Adam Mechtley (http://a...
{ "content_hash": "8d583200b21487169161d519cc1ea1c6", "timestamp": "", "source": "github", "line_count": 895, "max_line_length": 151, "avg_line_length": 55.270391061452514, "alnum_prop": 0.6146724078678715, "repo_name": "CountZer0/PipelineConstructionSet", "id": "ff94f8daba148380dff86641987f219fe3f360...
import distutils.spawn import logging import os import re import stat import subprocess from telemetry.core.platform import desktop_platform_backend from telemetry.core.platform import ps_util class PosixPlatformBackend(desktop_platform_backend.DesktopPlatformBackend): # This is an abstract class. It is OK to hav...
{ "content_hash": "5c4e522527324bd181b8fff92e180f2d", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 79, "avg_line_length": 35.72641509433962, "alnum_prop": 0.6601531555320834, "repo_name": "anirudhSK/chromium", "id": "9f76b5205a49b6920024cff52d0da61ee1d6a6b1", "size": "3...
from fonction_py.tools import * from fonction_py.preprocess import * from scipy.optimize import minimize from sklearn import linear_model import matplotlib.pyplot as plt import pandas as pd import numpy as np from pandas.tools.plotting import scatter_matrix import matplotlib.pyplot as plt from sklearn import cross_vali...
{ "content_hash": "6e65452d01e7fc99206b4ebdd64ec45a", "timestamp": "", "source": "github", "line_count": 100, "max_line_length": 366, "avg_line_length": 38.5, "alnum_prop": 0.6901298701298701, "repo_name": "LaRiffle/axa_challenge", "id": "63dd50bcec5944165ea1a9f032b00ec7298b5764", "size": "3855", ...
from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = Client(account_sid, auth_token) credential_list_mappings = client.sip \ .domains("SD32a3c49700934481addd5ce1659f04d2") \ .cre...
{ "content_hash": "be79b695cb67f2fb682723a1c7811485", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 62, "avg_line_length": 34.25, "alnum_prop": 0.7718978102189781, "repo_name": "teoreteetik/api-snippets", "id": "caeb5e3af2f5a40ba1112b016a5ccc979dea2442", "size": "621", ...
import m5 from m5.objects import * class MyCache(BaseCache): assoc = 2 block_size = 64 latency = '1ns' mshrs = 10 tgts_per_mshr = 5 cpu = TimingSimpleCPU(cpu_id=0) cpu.addTwoLevelCacheHierarchy(MyCache(size = '128kB'), MyCache(size = '256kB'), MyCache(size = '2MB', la...
{ "content_hash": "c36b856394b6dc351f418cfcc815bdf8", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 79, "avg_line_length": 26.80952380952381, "alnum_prop": 0.6145648312611013, "repo_name": "liangwang/m5", "id": "0ed985a17dbcbdf8b13189282f7509bb159ad832", "size": "2145", ...
import os.path import sys import string import xbmc import xbmcgui import resources.lib.common as common import database_tv as tv_db from bs4 import BeautifulSoup import listtv pluginhandle = common.pluginHandle if common.get_setting('libraryfolder') == '0': MOVIE_PATH = os.path.join(xbmc.translatePath(common._...
{ "content_hash": "09993ee5ca8720552fb1b9f26381cffd", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 126, "avg_line_length": 31.06878306878307, "alnum_prop": 0.6374318801089919, "repo_name": "bradyemerson/plugin.video.pftv", "id": "7be5e84ab69d5e38be8fb72bddb24d7f298e2357",...
""" Copyright (c) 2008 Dustin Sallings <dustin@spy.net> """ import sys from twisted.internet import reactor, defer from twittytwister import twitter fetchCount = 0 @defer.deferredGenerator def getSome(tw, user): global fetchCount fetchCount = 0 def gotEntry(msg): global fetchCount fe...
{ "content_hash": "2973aafbd30b58d8d534c17d2c0498eb", "timestamp": "", "source": "github", "line_count": 45, "max_line_length": 81, "avg_line_length": 20.4, "alnum_prop": 0.6089324618736384, "repo_name": "praekelt/twitty-twister", "id": "86c084ea29d1e2a51efead05fb6894029416f64a", "size": "940", "b...
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 30, transform = "Difference", sigma = 0.0, exog_count = 100, ar_order = 0);
{ "content_hash": "732fd302d499d2ae918f8947b37ded1b", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 172, "avg_line_length": 38.857142857142854, "alnum_prop": 0.7132352941176471, "repo_name": "antoinecarme/pyaf", "id": "b54a58f78fa8a731c47941416f786e12a425d2b0", "size": "27...
import copy import os import urlparse import uuid from keystone.common import cms from keystone.common.sql import migration from keystone import config from keystone import contrib from keystone.contrib import oauth1 from keystone.contrib.oauth1 import controllers from keystone.openstack.common import importutils from...
{ "content_hash": "6431fe5427c23ebef194136460b8165d", "timestamp": "", "source": "github", "line_count": 558, "max_line_length": 78, "avg_line_length": 42.57885304659498, "alnum_prop": 0.5901763542236627, "repo_name": "raildo/keystone", "id": "a398cffbed20d921d7629f5f40394b9629aed5d3", "size": "2439...
'''This script runs all tests in a directory. It does not need to know about the tests ahead of time. It recursively descends from the current directory and automatically builds up a list of tests to run. Only directories named 'tests' are processed. The path to each 'tests' directory is added to the PYTHONPATH. Only p...
{ "content_hash": "468dd207318b6e31999ae4435a67b53c", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 64, "avg_line_length": 33.101694915254235, "alnum_prop": 0.65847414234511, "repo_name": "rockaboxmedia/pexpect", "id": "68b2a2bcee5e3816afb31a7eec2a7297c216e2a9", "size": "...
from __future__ import absolute_import import os import logging import re from hamster_bridge.listeners import ( HamsterListener, ConfigValue, ) logger = logging.getLogger(__name__) class RedmineHamsterListener(HamsterListener): """ Redmine listener for hamster tasks, Tested with Redmine 2.5.1...
{ "content_hash": "ff25cfce83e0fd73cfb6ec0b563cd84c", "timestamp": "", "source": "github", "line_count": 265, "max_line_length": 128, "avg_line_length": 37.18490566037736, "alnum_prop": 0.5862593870509438, "repo_name": "kraiz/hamster-bridge", "id": "c1d2b95279e413b5236983dbb45206af58d53740", "size":...
import sys import os.path import math import random import time import numpy as np from ginga.misc import Bunch, Callback from ginga.fonts import font_asst import ginga.icons import ginga.toolkit import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk # noqa from gi.repository import Gdk # noqa fr...
{ "content_hash": "7536517451531de58e5ca1005ae0dea2", "timestamp": "", "source": "github", "line_count": 1788, "max_line_length": 132, "avg_line_length": 31.095078299776286, "alnum_prop": 0.540217274002662, "repo_name": "pllim/ginga", "id": "f9adde7ecc876c2f551a9cf339a755bdb78d4250", "size": "55752"...
from setuptools import setup setup( name='slacker', version='0.7.3', packages=['slacker'], description='Slack API client', author='Oktay Sancak', author_email='oktaysancak@gmail.com', url='http://github.com/os/slacker/', install_requires=['requests >= 2.2.1'], license='http://www.a...
{ "content_hash": "6feb75885c63b977fa5433aa8a3ef6b7", "timestamp": "", "source": "github", "line_count": 27, "max_line_length": 61, "avg_line_length": 31.74074074074074, "alnum_prop": 0.6021003500583431, "repo_name": "kashyap32/slacker", "id": "b80d2b4e8d1f00937a9f28e257d8dbcbe5f80385", "size": "857...
import os import thread import admin try: virtenv = os.environ.get('OPENSHIFT_PYTHON_DIR', '.') + '/virtenv/' virtualenv = os.path.join(virtenv, 'bin/activate_this.py') execfile(virtualenv, dict(__file__=virtualenv)) except IOError: pass # # IMPORTANT: Put any additional includes below this line. If p...
{ "content_hash": "4693f50b001584d9b3c83374a46a4aaf", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 106, "avg_line_length": 34.947916666666664, "alnum_prop": 0.6560357675111773, "repo_name": "icclab/hurtle_sample_so", "id": "238da830cda384750a6a5a15ca69efbba3dc718d", "siz...
import os import tempfile from kripodb.hdf5 import SimilarityMatrix from kripodb.frozen import FrozenSimilarityMatrix def tmpname(): tmpf = tempfile.NamedTemporaryFile() out_file = tmpf.name tmpf.close() return out_file class SimilarityMatrixInMemory(object): def __init__(self): self.ma...
{ "content_hash": "73de736ae47921b68d8cd82ea9b508e1", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 114, "avg_line_length": 25.76086956521739, "alnum_prop": 0.6354430379746835, "repo_name": "3D-e-Chem/python-modified-tanimoto", "id": "d2e258c924fce10b29b3519000d28285a5225e6...
"""The data layer used during training to train a Fast R-CNN network. RoIDataLayerPi implements a Caffe Python layer for reading in multiple images into the blobs. This is useful for datasets like NYUD2 and UCF 101. """ import caffe from fast_rcnn.config import cfg from roi_data_layer.minibatch import get_minibatch i...
{ "content_hash": "7df940d81ee883d450097362997e480b", "timestamp": "", "source": "github", "line_count": 175, "max_line_length": 126, "avg_line_length": 40.38857142857143, "alnum_prop": 0.5922467458970005, "repo_name": "xiaolonw/fast-rcnn-distillation", "id": "0caf1ab2d7d59b2842eb2d0632bbb463ab843a95"...
import os import MySQLdb import subprocess from time import sleep from celery.task import task from MySQLdb import escape_string from config import COMPILE_DIR from config import TESTDATA_DIR from config import CARETAKER_PATH from config import MYSQL_DB from config import MYSQL_HOST from config import MYSQL_PORT from...
{ "content_hash": "2bec0558a39828301b0d4c585641cd86", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 115, "avg_line_length": 33.891752577319586, "alnum_prop": 0.524106463878327, "repo_name": "ptphp/PyLib", "id": "c2393146ba5969398475c37fc354da318f3af05c", "size": "6726", ...
"""A non-blocking, single-threaded HTTP server. Typical applications have little direct interaction with the `HTTPConnection` class, which is the HTTP parser executed on incoming connections. It is a protocol class that inherits Twisted's `LineReceiver <http://twistedmatrix.com/documents/current/api/ twisted.protocol...
{ "content_hash": "405111bdef5783e3fd5df3140e82b198", "timestamp": "", "source": "github", "line_count": 368, "max_line_length": 89, "avg_line_length": 36.35597826086956, "alnum_prop": 0.5906271021750504, "repo_name": "fiorix/cyclone", "id": "23a3482a84b775bfe5eceec5679df9f9ffc19bda", "size": "14021...
""" Copyright (C) 2013-2014 TopCoder Inc., All Rights Reserved. This module defines the web controller classes by using cherrypy. This module resides in Python source file httpservices.py Thread Safety: The implementation should be thread safe. v1.1 - Healthcare Fraud Prevention Release Assembly v1.0 - updated f...
{ "content_hash": "e0c2d2a137f7d28a1a4ec617404a45d1", "timestamp": "", "source": "github", "line_count": 396, "max_line_length": 117, "avg_line_length": 50.67171717171717, "alnum_prop": 0.6001196053025017, "repo_name": "NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention", "id": "71cf23d8f4d188e...
import fnmatch import logging import os import shutil import urllib import urlparse import jinja2 import misaka import pygments import pygments.formatters import pygments.lexers import requests import yaml from .document import Document, iter_all DATA_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), 'd...
{ "content_hash": "51dabceedbd436aa0399abc237c345aa", "timestamp": "", "source": "github", "line_count": 96, "max_line_length": 82, "avg_line_length": 32.4375, "alnum_prop": 0.615606936416185, "repo_name": "noonat/yup", "id": "5bb421e973579e822a6b32e3b99e98425f77cf5d", "size": "3114", "binary": fa...
import cgi import json import urllib import logging import string import random from httplib2 import Http from django.conf import settings from django.core.urlresolvers import reverse from keystoneclient.exceptions import Conflict from keystoneclient.v2_0 import client as keystone_client from django.contrib import mes...
{ "content_hash": "1ee7b3daec24174620dcdc21454356e8", "timestamp": "", "source": "github", "line_count": 184, "max_line_length": 138, "avg_line_length": 40.26086956521739, "alnum_prop": 0.5718142548596112, "repo_name": "trystack/python-django-horizon-facebook", "id": "be24c94ef72c65f2519096eb6bd46c96f...
import sys class Trace(object): "A tracing class" debugmode = False quietmode = False showlinesmode = False prefix = None def debug(cls, message): "Show a debug message" if not Trace.debugmode or Trace.quietmode: return Trace.show(message, sys.stdout) def message(cls, message): ...
{ "content_hash": "23a0fa709f2e2c16e821b989fd395d65", "timestamp": "", "source": "github", "line_count": 5344, "max_line_length": 538, "avg_line_length": 33.01309880239521, "alnum_prop": 0.6145945516999014, "repo_name": "lmregus/Portfolio", "id": "9872cbc6b25827afc81bc48bc5ccc8b461df2ee7", "size": "...
from msrest.serialization import Model class ApplicationUpgradeProgressInfo(Model): """Describes the parameters for an application upgrade. :param name: :type name: str :param type_name: :type type_name: str :param target_application_type_version: :type target_application_type_version: st...
{ "content_hash": "0cdb4c1ff259626a80e46bdc73a84651", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 518, "avg_line_length": 58.683673469387756, "alnum_prop": 0.7169187967310033, "repo_name": "v-iam/azure-sdk-for-python", "id": "2cc394942de50d4246e6dada4d7242a7fd0f9242", "...
"""Functions and classes to make testing easier.""" import os from absl import flags import mock from perfkitbenchmarker import benchmark_spec from perfkitbenchmarker import sample from perfkitbenchmarker.configs import benchmark_config_spec import six from six.moves import range _BENCHMARK_NAME = 'test_benchmark'...
{ "content_hash": "c24cfbbf996fca28cab0866b5680d506", "timestamp": "", "source": "github", "line_count": 122, "max_line_length": 79, "avg_line_length": 35.459016393442624, "alnum_prop": 0.6410078594544614, "repo_name": "GoogleCloudPlatform/PerfKitBenchmarker", "id": "a98e9647e75a5558002a33e9f523ca52c4...
""" Module that defines the interface between the `manager` (i.e Django) and the `broker` (i.e. RabbitMQ). Defines three functions involved in a job's lifecycle: - `dispatch_job` - send a job to a queue - `update_job` - update the status of a job by checking it's (intermediate) result - `check_job` - for a parent job...
{ "content_hash": "e288d7f4a07a3b681df4c693185678c1", "timestamp": "", "source": "github", "line_count": 288, "max_line_length": 102, "avg_line_length": 37.142361111111114, "alnum_prop": 0.5897915303356082, "repo_name": "stencila/hub", "id": "29a7fecfec58a37e5770387c0619949240d50800", "size": "10697...
""" Principal Component Analysis. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis A. Engemann <denis-alexander.engemann@inria.fr> # Michael Eickenberg <michael.eickenberg@inria.fr...
{ "content_hash": "976484b53a6260d1a975bd6373d2b167", "timestamp": "", "source": "github", "line_count": 646, "max_line_length": 97, "avg_line_length": 36.87461300309597, "alnum_prop": 0.595566936736493, "repo_name": "amueller/scikit-learn", "id": "01a2d7ac461dccb2c5e624c07375635a60abf4a6", "size": ...
import datetime from django.conf import settings from jira.client import JIRA def get_jira(): jira_kwargs = { 'options': {'server': settings.JIRA_SERVER}, 'basic_auth': (settings.JIRA_USER, settings.JIRA_PASSWORD), } return JIRA(**jira_kwargs) def default_newissue_kwargs(): duedate...
{ "content_hash": "e61ba4c168fb739004effcea70e197e0", "timestamp": "", "source": "github", "line_count": 40, "max_line_length": 87, "avg_line_length": 28.05, "alnum_prop": 0.6301247771836007, "repo_name": "theirc/ServiceInfo", "id": "e20fcdc3d78a531504ebd25839e808904ec819d8", "size": "1122", "bina...
import os, sys, py_compile source_dir = sys.argv[ 1 ] binary_dir = sys.argv[ 2 ] if not source_dir.endswith('/'): source_dir += '/' if not binary_dir.endswith('/'): binary_dir += '/' tree = list( os.walk( source_dir ) ) if source_dir != binary_dir: replace = True else: replace = False for idir, dirs, files...
{ "content_hash": "85d09f8e5c37948040379db4a8fcc77a", "timestamp": "", "source": "github", "line_count": 37, "max_line_length": 100, "avg_line_length": 29.54054054054054, "alnum_prop": 0.5096065873741995, "repo_name": "mrpPhys/Isis", "id": "1306dba96a10141bb275c094fa288bd280529953", "size": "1438", ...
""" minimap.py """ from __future__ import absolute_import, division, print_function, unicode_literals from collections import namedtuple from OpenGL import GL from PySide import QtCore, QtGui import logging import numpy from mcedit2.rendering import compass, scenegraph, rendergraph from mcedit2.rendering.layers imp...
{ "content_hash": "31d0910072a7c25aee3e1d8a071e1b4d", "timestamp": "", "source": "github", "line_count": 220, "max_line_length": 124, "avg_line_length": 31.186363636363637, "alnum_prop": 0.6257105378224749, "repo_name": "Rubisk/mcedit2", "id": "f33416c4dd42ecdf80e6f79757c391c29e774511", "size": "686...
''' The MIT License (MIT) Copyright (c) 2015 Thami Rusdi Agus - https://github.com/janglapuk/SPB-OpenCV-Recognizer Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including w...
{ "content_hash": "248387c267123f645320e068acc728e4", "timestamp": "", "source": "github", "line_count": 30, "max_line_length": 88, "avg_line_length": 41.733333333333334, "alnum_prop": 0.7755591054313099, "repo_name": "janglapuk/SPB-OpenCV-Recognizer", "id": "5d16c7dab8dee30cb91efee202b07f872d957ff5",...
"""A platform which allows you to get information from Tautulli.""" from datetime import timedelta from pytautulli import Tautulli import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA, SensorEntity from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_MONITORED_CO...
{ "content_hash": "b1084da520729928e7aade969d1fd6f0", "timestamp": "", "source": "github", "line_count": 153, "max_line_length": 86, "avg_line_length": 33.23529411764706, "alnum_prop": 0.6389380530973451, "repo_name": "kennedyshead/home-assistant", "id": "c50efb00ed79602fcf2bf40bb5806dbafbaf3b60", "...
''' URL class and transformations for the cocrawler. We apply "safe" transformations early and often. We apply "unsafe" transformations right after parsing an url out of a webpage. (These represent things that browsers do but aren't in the RFC, like discarding /r/n in the middle of hostnames.) See cocrawler/data/htm...
{ "content_hash": "911b4086341cae07f8f362e63735504c", "timestamp": "", "source": "github", "line_count": 471, "max_line_length": 116, "avg_line_length": 32.740976645435246, "alnum_prop": 0.6031385772647688, "repo_name": "cocrawler/cocrawler", "id": "75504b957b196b5d241e510b65682554a923fe59", "size":...
from distutils.core import setup setup( name='storm-indicator', version='0.2', packages=['storm_indicator'], url='https://github.com/emre/storm-indicator', license='MIT', author='Emre Yilmaz', author_email='mail@emreyilmaz.me', description='A unity indicator for connecting to your SSH c...
{ "content_hash": "51fb29d7bb6cda50cb1dfdde3e659ae6", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 83, "avg_line_length": 28.125, "alnum_prop": 0.6622222222222223, "repo_name": "emre/storm-indicator", "id": "ce948f6aa2410983a64266f6bf6e7b7212624c73", "size": "450", "bi...
from __future__ import annotations from typing import TYPE_CHECKING import pandas as pd import pandas.testing as tm import pytest import ibis import ibis.expr.operations as ops from ibis.expr.scope import Scope from ibis.expr.timecontext import adjust_context if TYPE_CHECKING: from ibis.expr.typing import TimeC...
{ "content_hash": "091d01763413f3b53e5ae2d1d2b8a9fe", "timestamp": "", "source": "github", "line_count": 121, "max_line_length": 84, "avg_line_length": 34.107438016528924, "alnum_prop": 0.623939907923431, "repo_name": "ibis-project/ibis", "id": "4a30f719c177a4a6921a9f52fb7e0c453c84fb85", "size": "41...
from swgpy.object import * def create(kernel): result = Static() result.template = "object/static/particle/shared_particle_test_44.iff" result.attribute_template_id = -1 result.stfName("obj_n","unknown_object") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "2ab20ce1bd821967bf8b327c119b65c5", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 71, "avg_line_length": 23.076923076923077, "alnum_prop": 0.69, "repo_name": "obi-two/Rebelion", "id": "c24da76824e83c721407647da71c42db2292bf7d", "size": "445", "binary":...
import webtest import main def test_get(): app = webtest.TestApp(main.app) response = app.get('/') assert response.status_int == 200 assert response.body == "Hello, World! It's Saymore here"
{ "content_hash": "11879da5d127e01b35f2a5e5cd635b1a", "timestamp": "", "source": "github", "line_count": 12, "max_line_length": 61, "avg_line_length": 17.666666666666668, "alnum_prop": 0.6556603773584906, "repo_name": "saymorec/mzansi_yarona", "id": "5178acc7bf64f1ea68eae2388ce5451b7ea73e6d", "size"...
from utils import connect class Query_Seq_Idx_Cache(object): def __init__(self): pass class Query_Seq_Idx(object): def __init__(self, unique_id=0): self.query=""" SELECT relid, relname, seq_scan, seq_tup_read, idx_scan, ...
{ "content_hash": "91efcd89a656d2ec71b7df5bcac8a967", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 92, "avg_line_length": 24.661290322580644, "alnum_prop": 0.525833878351864, "repo_name": "ragged/yapgt", "id": "2e955deddd61369c19fdfd8d6a8e165ac43c7ea7", "size": "1554", ...
import os, sys, time # add current script path libs #pathname = os.path.dirname(sys.argv[0]) #sys.path.insert(0, os.path.join(pathname, 'lib', 'debug')) pathname = os.path.dirname(os.path.realpath(__file__)) #sys.path.append(os.path.join(pathname, 'lib', 'debug')) sys.path.append(pathname) # import functools, used t...
{ "content_hash": "542c294d604323b6c5eb56974b956990", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 229, "avg_line_length": 30.994082840236686, "alnum_prop": 0.656930126002291, "repo_name": "lrq3000/pyFileFixity", "id": "7a4fa7b36f5105e0d3a82a420fa755e1ad10fb1c", "size":...
def wait_until_existing(self, timeout=None): """ Wait until page object is existing in the DOM. :param int timeout: number of seconds to wait, if not provided PageObject.DEFAULT_WAIT_TIMEOUT is used """ if timeout is None: timeout = self.DEFAULT_WAIT_TIMEOUT self.logger.info(('...
{ "content_hash": "61093f5655afcfd442882337e0b9951e", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 77, "avg_line_length": 35.25, "alnum_prop": 0.6565349544072948, "repo_name": "lukas-linhart/pageobject", "id": "e56a0be496c5f372b3a99f179e8547bcf68f31d9", "size": "987", ...
""" 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": "30d0db7f03adc11deae760ec471355cb", "timestamp": "", "source": "github", "line_count": 148, "max_line_length": 114, "avg_line_length": 38.16216216216216, "alnum_prop": 0.6738668555240793, "repo_name": "arenadata/ambari", "id": "6a869c0a87278e7f1e065f00352b9e45e53b5006", "size": "56...
from typing import List from flask import Flask from flask_migrate import Migrate from flask_security import RoleMixin from flask_security import SQLAlchemyUserDatastore from flask_sqlalchemy import SQLAlchemy from sqlalchemy import and_ from sqlalchemy.exc import OperationalError from opwen_email_client.domain.email...
{ "content_hash": "24aa63fd3994e64df1cc53e2633483d9", "timestamp": "", "source": "github", "line_count": 87, "max_line_length": 107, "avg_line_length": 32.310344827586206, "alnum_prop": 0.6431874777659196, "repo_name": "ascoderu/opwen-cloudserver", "id": "c76462afb356ca18ae59bb97f97ac22652bbaeae", "...
"""Utility function to get information from graph.""" from __future__ import absolute_import as _abs import tvm from . import graph_attr def infer_shape(graph, **shape): """Infer the shape given the shape of inputs. Parameters ---------- graph : Graph The graph to perform shape inference from...
{ "content_hash": "6709e5332c7cd6a5f84167bce8053077", "timestamp": "", "source": "github", "line_count": 90, "max_line_length": 75, "avg_line_length": 27.18888888888889, "alnum_prop": 0.6297507151614221, "repo_name": "imai-lm/nnvm", "id": "dcad54a8b778f0da83b656a742e13aba47468548", "size": "2478", ...
"""Class implementation of Python Bernoulli Bandit environment.""" from typing import Callable, Optional import gin import numpy as np from tf_agents.bandits.environments import bandit_py_environment from tf_agents.specs import array_spec from tf_agents.typing import types @gin.configurable class PiecewiseBernoull...
{ "content_hash": "16044d40804d08cafb736e585560cae9", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 115, "avg_line_length": 39.325581395348834, "alnum_prop": 0.6798738419081412, "repo_name": "tensorflow/agents", "id": "9dbcc2a82040b501183c4254c538caec3b3fe6c7", "size": "...
from __future__ import absolute_import, division, print_function, unicode_literals import os import shutil from pants.backend.jvm.tasks.nailgun_task import NailgunTask from pants.util.dirutil import safe_mkdir class BundleEntries(NailgunTask): @classmethod def prepare(cls, options, round_manager): super(Bun...
{ "content_hash": "5f72b853daf0b58b83ed739e8e20852c", "timestamp": "", "source": "github", "line_count": 42, "max_line_length": 92, "avg_line_length": 40.595238095238095, "alnum_prop": 0.6404692082111437, "repo_name": "twitter/pants", "id": "0652884c97453952b774dcd5063a92fd021452ab", "size": "1852",...
import collections import copy import os import sys import traceback from oslo_utils import encodeutils from oslo_utils import reflection import six from taskflow import exceptions as exc from taskflow.utils import iter_utils from taskflow.utils import mixins from taskflow.utils import schema_utils as su _exception...
{ "content_hash": "ae1b61ce73e0e3704b137e62fa6ca36d", "timestamp": "", "source": "github", "line_count": 511, "max_line_length": 79, "avg_line_length": 39.99021526418787, "alnum_prop": 0.5653046244188892, "repo_name": "jimbobhickville/taskflow", "id": "31c30ce8f676a0944528c914a1a16e4955d5c920", "siz...
""" Test functions for the sparse.linalg.isolve module """ from __future__ import division, print_function, absolute_import import warnings import numpy as np from numpy.testing import TestCase, assert_equal, assert_array_equal, \ assert_, assert_allclose, assert_raises from numpy import zeros, ones, arange, ...
{ "content_hash": "643546f165b087315ee4642d2725de0f", "timestamp": "", "source": "github", "line_count": 358, "max_line_length": 122, "avg_line_length": 30.972067039106147, "alnum_prop": 0.5572691197691197, "repo_name": "kmspriyatham/symath", "id": "4b524dac1374baad99c0850759ed06fbc61ec9f9", "size":...
import argparse import json import logging import sys from validator import constants from validator.validate import validate def main(): 'Main function. Handles delegation to other functions.' logging.basicConfig() type_choices = {'any': constants.PACKAGE_ANY, 'extension': constant...
{ "content_hash": "cc6d38baa4b90f992d7d632f34959153", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 78, "avg_line_length": 43.651006711409394, "alnum_prop": 0.5195264452644527, "repo_name": "kmaglione/amo-validator", "id": "e0f904aef0fc47753914550b1a70d6003b6a329d", "siz...
class Solution: def findMaxValueOfEquation(self, points: List[List[int]], k: int) -> int: # Elements of q are [y-x, x], increasing order. q=collections.deque() answer=-sys.maxsize for point in points: while q and point[0]-q[0][1]>k: q.popleft() ...
{ "content_hash": "b234f211ba7b1c1eeb0a71eeb11d2e04", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 91, "avg_line_length": 40.375, "alnum_prop": 0.5309597523219814, "repo_name": "Magic07/online-judge-solutions", "id": "d4c59ba5fd67ab6971a8a45fa56bccfa2db1719b", "size": "6...
""" test_zbsensor.py By James Saunders, 2017 Tests PyAlertMe Module. """ import sys sys.path.insert(0, '../') from pyalertme import * import unittest from mock_serial import Serial class TestZBSensor(unittest.TestCase): """ Test PyAlertMe ZBSensor Class. """ def setUp(self): """ Crea...
{ "content_hash": "92ff2f5462c62cb9951e00f92be7ea45", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 125, "avg_line_length": 23.76595744680851, "alnum_prop": 0.5666965085049239, "repo_name": "jamesleesaunders/pi-hive", "id": "bf12c77527dc97c625f196f23933c2cf91056803", "siz...
description = """ Kurisu, the bot for the 3DS Hacking Discord! """ # import dependencies import os from discord.ext import commands import discord import datetime import json, asyncio import copy import configparser import traceback import sys import os import re # sets working directory to bot's folder dir_path = os...
{ "content_hash": "b9c935e4a640c0dc14713f17d65cac46", "timestamp": "", "source": "github", "line_count": 230, "max_line_length": 189, "avg_line_length": 39.33913043478261, "alnum_prop": 0.6345048629531388, "repo_name": "T3CHNOLOG1C/Kurisu", "id": "40c94563c1604c504a27e3ad1ff563f0c8282555", "size": "...
import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_ethereum_events', '0001_initial'), ] operations = [ migrations.CreateModel( name='MonitoredEvent', fields=[ ('id...
{ "content_hash": "5e5441c89263c7815ef498cb616e9a6d", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 148, "avg_line_length": 41, "alnum_prop": 0.5940204563335956, "repo_name": "artemistomaras/django-ethereum-events", "id": "3c3cc32ecc8b67e921898ee610bfc9f35c1016e0", "size"...
"""Django's command-line utility for administrative tasks.""" import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'huxley.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Cou...
{ "content_hash": "3d8d9bd158cc901ae3d3968a0b8f6998", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 73, "avg_line_length": 30.2, "alnum_prop": 0.6556291390728477, "repo_name": "bmun/huxley", "id": "3269a55b62a2e3566bba1865d8baa4d3906e2c55", "size": "774", "binary": fals...
import distutils.version as dist_version import os import migrate from migrate.versioning import util as migrate_util import sqlalchemy from tuskar.common import exception from tuskar.db import migration from tuskar.openstack.common.db.sqlalchemy import session as db_session @migrate_util.decorator def patched_with...
{ "content_hash": "b325f73651665099c2ae8474517a99a6", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 78, "avg_line_length": 32.5531914893617, "alnum_prop": 0.6666666666666666, "repo_name": "tuskar/tuskar", "id": "125a6ff533e65325f33bb19a8752f43d4e2f7f5c", "size": "3837", ...
from django.core.urlresolvers import reverse from django.template.defaultfilters import slugify from django.core.paginator import Paginator, InvalidPage, EmptyPage from django.http import Http404, HttpResponseForbidden, HttpResponseServerError, HttpResponseRedirect from django.shortcuts import render_to_response, get_o...
{ "content_hash": "5e4b9421ef6295b6c360421d374d85f6", "timestamp": "", "source": "github", "line_count": 180, "max_line_length": 187, "avg_line_length": 33.94444444444444, "alnum_prop": 0.6641571194762684, "repo_name": "weijia/django-contacts", "id": "b86e0572f8c1b370cadfbfc5f10e7b08c0c2a4e5", "size...
#---------------------------------------------------------------------- # Copyright (c) 2016 Inria/iMinds by Arthur Garnier # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
{ "content_hash": "1ef292b14bea932e30652cc33767f27e", "timestamp": "", "source": "github", "line_count": 414, "max_line_length": 241, "avg_line_length": 48.15458937198068, "alnum_prop": 0.5755417335473515, "repo_name": "wvdemeer/docker-am", "id": "bd5714e5cbbd691f5c2662c6ed3c32db9304fc49", "size": "...
import os from setuptools import setup, find_packages VERSION = __import__("nashvegas").__version__ def read(*path): return open(os.path.join(os.path.abspath(os.path.dirname(__file__)), *path)).read() tests_require = [ 'nose>=1.1.2', 'django-nose>=0.1.3', ] setup( name="nashvegas", version=VE...
{ "content_hash": "e0bb15159ea0802ad808d6dd83be9893", "timestamp": "", "source": "github", "line_count": 41, "max_line_length": 92, "avg_line_length": 27.853658536585368, "alnum_prop": 0.637478108581436, "repo_name": "iivvoo/nashvegas", "id": "b4947cd8f61d45cf65ad47b55410b862553af2a5", "size": "1142...
""" Example 8: Interfacing with Verilog. While there is much more about PyRTL design to discuss, at some point somebody might ask you to do something with your code other than have it print pretty things out to the terminal. We provide import from and export to Verilog of designs, export of waveforms...
{ "content_hash": "eb5ef6c358179d473e0e27c420a16af0", "timestamp": "", "source": "github", "line_count": 149, "max_line_length": 93, "avg_line_length": 35.53691275167785, "alnum_prop": 0.7246458923512747, "repo_name": "deekshadangwal/PyRTL", "id": "e9ec2a491f90f38e781cb577faa5061ba59deb04", "size": ...
import sys from pyasn1.codec.der import decoder as der_decoder from pyasn1.codec.der import encoder as der_encoder from pyasn1_modules import pem from pyasn1_modules import rfc5280 from pyasn1_modules import rfc8103 try: import unittest2 as unittest except ImportError: import unittest class CAEADChaCha20Po...
{ "content_hash": "d73def9f03870f46c0406b2bb86f56c7", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 115, "avg_line_length": 31.46511627906977, "alnum_prop": 0.7228381374722838, "repo_name": "kawamon/hue", "id": "921b9db6eb5a5a51e235100c1526b36ab5ed3f1c", "size": "1527", ...
import itertools import functools import operator import warnings from distutils.version import LooseVersion import numpy as np from pandas import compat from pandas._libs import tslib, algos, lib from pandas.core.dtypes.common import ( _get_dtype, is_float, is_scalar, is_integer, is_complex, is_float_dtyp...
{ "content_hash": "7a49322efe5e10fdce6ea2886e9021de", "timestamp": "", "source": "github", "line_count": 819, "max_line_length": 79, "avg_line_length": 29.500610500610502, "alnum_prop": 0.578204544513886, "repo_name": "DGrady/pandas", "id": "b2bbf1c75b7ea06d69e18307e7ba3877f509d95f", "size": "24161"...
class RandomListNode(object): def __init__(self, x): self.label = x self.next = None self.random = None def dump(self): s = self.label if self.random is not None: s += ' rand={}'.format(self.random.label) print(s) if self.next is not None: ...
{ "content_hash": "8b88c15eda89dc919916d1f6ec6bf195", "timestamp": "", "source": "github", "line_count": 70, "max_line_length": 60, "avg_line_length": 20.714285714285715, "alnum_prop": 0.48551724137931035, "repo_name": "mmcloughlin/interviews", "id": "35287cbb67e5fea3367e0e5732216d006937ab40", "size...
"""The vroom test runner.""" import os import signal import subprocess import sys import vroom.args import vroom.color import vroom.output import vroom.runner import vroom.vim def main(argv=None): if argv is None: argv = sys.argv try: args = vroom.args.Parse(argv[1:]) except ValueError as e: sys.s...
{ "content_hash": "01e6828daf19a0d4fba33c30af5c27f8", "timestamp": "", "source": "github", "line_count": 76, "max_line_length": 82, "avg_line_length": 26.013157894736842, "alnum_prop": 0.6317653009610521, "repo_name": "martindemello/vroom", "id": "45f6bd821dab7a1857fe9c152643ee88f1a0937a", "size": "...
""" Parser for to pofile translation format. """ from datetime import datetime import polib from pontoon.base.formats.base import ParsedResource from pontoon.base.vcs_models import VCSTranslation class POEntity(VCSTranslation): def __init__(self, po_entry, order): self.po_entry = po_entry if po...
{ "content_hash": "871efb8d179e6e7f5e6c7cd2efed8e5e", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 93, "avg_line_length": 32.40816326530612, "alnum_prop": 0.5802896725440806, "repo_name": "Osmose/pontoon", "id": "f821beffc2b390810466899085df0fe53b7e4155", "size": "3176",...
"""Support for Fronius devices.""" from __future__ import annotations from typing import TYPE_CHECKING, Any, Final from homeassistant.components.sensor import ( DOMAIN as SENSOR_DOMAIN, SensorDeviceClass, SensorEntity, SensorEntityDescription, SensorStateClass, ) from homeassistant.config_entries ...
{ "content_hash": "2ea6e0c45b6b825cd1ee811ed4c647dc", "timestamp": "", "source": "github", "line_count": 844, "max_line_length": 112, "avg_line_length": 36.088862559241704, "alnum_prop": 0.6574411503988968, "repo_name": "toddeye/home-assistant", "id": "c3b219c4b22d29ba0ab1bc2f0e2e4cf777a35756", "siz...
import pygame from pygame.locals import * # ti = pygame.init() # print(ti) # f = pygame.font.init() # print(f) pygame.init() display_width = 800 display_height = 600 game_display = pygame.display.set_mode((display_width, display_height)) pygame.display.update() #while True: #for event in pygame.event.get(): #...
{ "content_hash": "c547fba52ac43ea3341306d8b2b05768", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 71, "avg_line_length": 18.125, "alnum_prop": 0.6781609195402298, "repo_name": "mykespb/pythoner", "id": "37255e9045a872c34201caa7583bc771c8326b23", "size": "472", "binary...
from qqweibo.auth import OAuthHandler from qqweibo.api import API from qqweibo.parsers import (ModelParser, JSONParser, XMLRawParser, XMLDomParser, XMLETreeParser) from qqweibo.error import QWeiboError from qqweibo.cache import MemoryCache, FileCache __all__ = ['OAuthHandler', 'API', 'QWe...
{ "content_hash": "62cf7b1a18de171f59d3f51b7d105b61", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 67, "avg_line_length": 35.785714285714285, "alnum_prop": 0.6766467065868264, "repo_name": "de1o/moedj", "id": "4368a59aa0f84edcc152e74707c2a8e40634ebb4", "size": "664", "...
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module:...
{ "content_hash": "838e97d5ca75e5b2946edcb6a3549cdd", "timestamp": "", "source": "github", "line_count": 2766, "max_line_length": 84, "avg_line_length": 37.87816341287057, "alnum_prop": 0.5816208683700642, "repo_name": "paweljasinski/ironpython3", "id": "c7a2cf8833f00bf4f5642d6e6224aa71502333e5", "s...
import argparse import os.path import queue import subprocess import threading import time from watchdog.events import FileSystemEventHandler from watchdog.observers import Observer def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--video_dir', '-d', dest='video_dir', ...
{ "content_hash": "f6233d203fbf0bebfb9f238f769ed50f", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 80, "avg_line_length": 29.16793893129771, "alnum_prop": 0.5870191049463491, "repo_name": "hasegaw/IkaLog", "id": "4b88795be4a1021ff4261771c5b28d5c5c9bd15d", "size": "4943"...
import doctest import unittest import typeschema import typeschema.properties as ty class TestCase(unittest.TestCase): def test_properties_doc(self): fails, tested = doctest.testmod(ty) if fails > 0: self.fail('Doctest failed!') def test_mutable_default(self): l = [1, 2, ...
{ "content_hash": "298775344c1c11733e98a89cd14fb80d", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 74, "avg_line_length": 24.04, "alnum_prop": 0.5806988352745425, "repo_name": "tcard/typeschema", "id": "6f3abc521f81c7df3946d9b75981ae80b7b6d5d5", "size": "601", "binary"...
from typing import TYPE_CHECKING, Optional, Sequence from airflow.models import BaseOperator from airflow.providers.mysql.hooks.mysql import MySqlHook from airflow.providers.trino.hooks.trino import TrinoHook if TYPE_CHECKING: from airflow.utils.context import Context class TrinoToMySqlOperator(BaseOperator): ...
{ "content_hash": "f41691bbb958764b2d17e10eb695c8bf", "timestamp": "", "source": "github", "line_count": 67, "max_line_length": 91, "avg_line_length": 38.11940298507463, "alnum_prop": 0.6601409553641346, "repo_name": "mistercrunch/airflow", "id": "081a3163a15184282de2871a70b5e0a103485c8e", "size": "...
""" WSGI config for rest_svc_template 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.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJ...
{ "content_hash": "855242dfdf4110594ebbbb187bc34d5d", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 78, "avg_line_length": 25.6875, "alnum_prop": 0.7712895377128953, "repo_name": "DePaul-Medix/SmartCAD", "id": "4f0451002163d6d623715d8a61de58f427bda4bd", "size": "411", "...
import xml.etree.ElementTree as ET import os import cPickle import numpy as np def parse_rec(filename): """ Parse a PASCAL VOC xml file """ tree = ET.parse(filename) objects = [] for obj in tree.findall('object'): obj_struct = {} obj_struct['name'] = obj.find('name').text obj_st...
{ "content_hash": "39415e37f0293de85b5e9da203c69688", "timestamp": "", "source": "github", "line_count": 194, "max_line_length": 78, "avg_line_length": 34.597938144329895, "alnum_prop": 0.524284862932062, "repo_name": "HaydenFaulkner/bottom-up-attention", "id": "137930820c0664872dd5e041ddf3e60a4730b13...
from django.views import generic from gwells.models import Survey class RegistryView(generic.TemplateView): template_name = 'gwells/registry.html' def get_context_data(self, **kwargs): """ Return the context for the page. """ context = super(RegistryView, self).get_context_data...
{ "content_hash": "d6fe1789d4eabd4cb675f76b2cd7da07", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 70, "avg_line_length": 29.9375, "alnum_prop": 0.6388308977035491, "repo_name": "rstens/gwells", "id": "36112268726e06b671112c197a8ded722655280c", "size": "479", "binary":...
from .components import ComponentMeta data_statistic_cpn_meta = ComponentMeta("DataStatistics") @data_statistic_cpn_meta.bind_param def data_statistics_param(): from federatedml.param.statistics_param import StatisticsParam return StatisticsParam @data_statistic_cpn_meta.bind_runner.on_guest.on_host def d...
{ "content_hash": "346c71e4ae4551c57e44e77cbe2d1ffe", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 68, "avg_line_length": 25.941176470588236, "alnum_prop": 0.7981859410430839, "repo_name": "FederatedAI/FATE", "id": "1794486c1e4efb9dcfd867e99be78c28390e61e1", "size": "105...
from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/lair/base/shared_poi_all_lair_warren_small_fog_gray.iff" result.attribute_template_id = -1 result.stfName("lair_n","warren") #### BEGIN MODIFICATIONS #### #### END MODIFICATIONS #### return result
{ "content_hash": "1f999d68b19cf3f604d595a1784b3c19", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 92, "avg_line_length": 24.307692307692307, "alnum_prop": 0.6930379746835443, "repo_name": "anhstudios/swganh", "id": "86c77a5d1309f7f7445a141ddbbc8a9bb2a5d2e6", "size": "46...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('academics', '0003_teacher_unique_name'), ] operations = [ migrations.AlterField( model_name='teacher', name='teacher_id', ...
{ "content_hash": "71d404310e2afa4021997c23fbe12bd6", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 62, "avg_line_length": 22.11111111111111, "alnum_prop": 0.6005025125628141, "repo_name": "rectory-school/rectory-apps", "id": "2d66513a7d0d8bbec01db786d0772f523e3f3d54", "s...
import unittest import os, sys, commands import comm class TestWebAppFunctions(unittest.TestCase): def test_create(self): comm.setUp() app_name = "helloworld" pkg_name = "com.example." + app_name.lower() content = "<a href='http://www.intel.com'>Intel</a>\n</body>" key = "</...
{ "content_hash": "8772ddc16a7aa876b27641156b8f5df4", "timestamp": "", "source": "github", "line_count": 16, "max_line_length": 82, "avg_line_length": 31.5, "alnum_prop": 0.6031746031746031, "repo_name": "pk-sam/crosswalk-test-suite", "id": "c2d7b812a7bac35c6eeaa15c6afafc77e3106b99", "size": "2059",...
from model import GoogleNet m = GoogleNet() m.load("bvlc_googlenet.caffemodel") m.load_label("labels.txt") m.print_prediction("image.png")
{ "content_hash": "5cfbca85a6506f39fce6c2ddea6535f0", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 35, "avg_line_length": 23.333333333333332, "alnum_prop": 0.75, "repo_name": "dsanno/chainer-recognize", "id": "6424ff267e715119f3f31acd1f21cef9df447698", "size": "140", "b...
import unittest from unittest import mock from airflow.exceptions import AirflowException from airflow.providers.amazon.aws.hooks.sagemaker import SageMakerHook from airflow.providers.amazon.aws.sensors.sagemaker_tuning import SageMakerTuningSensor DESCRIBE_TUNING_INPROGRESS_RESPONSE = { 'HyperParameterTuningJobS...
{ "content_hash": "6d9407b328da86ac07a3d8102626f875", "timestamp": "", "source": "github", "line_count": 71, "max_line_length": 98, "avg_line_length": 34.25352112676056, "alnum_prop": 0.6817434210526315, "repo_name": "airbnb/airflow", "id": "32b2553f1f5c63c9957cadda9e03dfbfe1627a90", "size": "3220",...
""" profiling.remote.background ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Utilities to run a profiler in a background thread. """ from __future__ import absolute_import import os import signal import threading from ..profiler import ProfilerWrapper __all__ = ['BackgroundProfiler'] class BackgroundProfiler(ProfilerWr...
{ "content_hash": "524fc6a904e2c7ddbc34ed130da561f5", "timestamp": "", "source": "github", "line_count": 52, "max_line_length": 78, "avg_line_length": 24.403846153846153, "alnum_prop": 0.6091410559495666, "repo_name": "JeanPaulShapo/profiling", "id": "4aa735edd83e48c1d12e9d026657fc9c5df36dc7", "size...
from setuptools import setup setup( name='drone-tower', version='0.2', description="Ansible Tower plugin for Drone.", url="https://github.com/msteinert/drone-tower", maintainer="Drone Contributors", maintainer_email="support@drone.io", packages=["drone_tower"], scripts=["bin/drone-towe...
{ "content_hash": "bf45ad8ee594d2322b938d8efc38e95d", "timestamp": "", "source": "github", "line_count": 14, "max_line_length": 57, "avg_line_length": 27.5, "alnum_prop": 0.6675324675324675, "repo_name": "msteinert/drone-tower", "id": "551cc9990cc24c067badfbdea3b4739cd208ff05", "size": "385", "bin...
from __future__ import division import sys, glob, re, math, datetime, argparse import imp ntl = imp.load_source('ntl', 'steps/nnet3/nnet3_train_lib.py') #exp/nnet3/lstm_self_repair_ld5_sp/log/progress.9.log:component name=Lstm3_i type=SigmoidComponent, dim=1280, self-repair-scale=1e-05, count=1.96e+05, value-avg=[per...
{ "content_hash": "08b4664a7a032211d747631444e521e3", "timestamp": "", "source": "github", "line_count": 228, "max_line_length": 624, "avg_line_length": 49.81578947368421, "alnum_prop": 0.6341785525620708, "repo_name": "keighrim/kaldi-yesno-tutorial", "id": "7d01400310288d4165fbbfff13d7affc679cfa4c", ...
from urllib.parse import urlencode try: import json as simplejson except ImportError: try: import simplejson except ImportError: from django.utils import simplejson from social_auth.backends import BaseOAuth2, OAuthBackend from social_auth.utils import dsa_urlopen FOURSQUARE_SERVER = 'fo...
{ "content_hash": "ae49d9496bb4d8dfe084e5c9ca5f8010", "timestamp": "", "source": "github", "line_count": 59, "max_line_length": 75, "avg_line_length": 32.13559322033898, "alnum_prop": 0.6656118143459916, "repo_name": "limdauto/django-social-auth", "id": "f641c9681985c58fb6dc24ae12443f19567e232b", "s...
import os # We'll render HTML templates and access data sent by POST # using the request object from flask. Redirect and url_for # will be used to redirect the user once the upload is done # and send_from_directory will help us to send/show on the # browser the file that the user just uploaded from flask import Flask, ...
{ "content_hash": "74a32c34e152511892d955c4558c97e6", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 74, "avg_line_length": 40.0875, "alnum_prop": 0.672903024633614, "repo_name": "pconrad/heroku-try-file-upload", "id": "c775bda6bd5beaacdb0cf5511fcbe1fb0613169d", "size": "3...
import logging import threading import warnings from django.db import models from django.http import HttpResponse from django.contrib.auth import get_user_model from django.conf import settings from django.dispatch import Signal from .json import jsondumps, JsonResponse transaction_commit = Signal(providing_args=['...
{ "content_hash": "4ab69dfb61d68e4af4fb7c6f94d6ecc4", "timestamp": "", "source": "github", "line_count": 254, "max_line_length": 139, "avg_line_length": 29.846456692913385, "alnum_prop": 0.687508244294948, "repo_name": "CodeYellowBV/django-binder", "id": "698f93770e67482b4a3eca988577e3c0d087b9dd", "...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:49876") else: access = Se...
{ "content_hash": "485c97d3a032c9c31fc426f30c756479", "timestamp": "", "source": "github", "line_count": 324, "max_line_length": 79, "avg_line_length": 24.188271604938272, "alnum_prop": 0.661860405767513, "repo_name": "goldbuck/goldbuck", "id": "660a4d0b7ec56d904b99c102f3403a29d0553446", "size": "78...
"""Defines the InstrumentationOptions named tuple.""" import collections InstrumentationOptions = collections.namedtuple('InstrumentationOptions', [ 'tool', 'annotations', 'exclude_annotations', 'test_filter', 'test_data', 'save_perf_json', 'screenshot_failures', 'wait_for_debugger', ...
{ "content_hash": "e702b553f167e656215ef777eb2d498c", "timestamp": "", "source": "github", "line_count": 24, "max_line_length": 75, "avg_line_length": 23.333333333333332, "alnum_prop": 0.6321428571428571, "repo_name": "Workday/OpenFrame", "id": "b5276b77134b8cd4293619e2768da216aba5f313", "size": "72...
version_info = (5, 6, 1) pre_info = '' dev_info = '' def create_valid_version(release_info, epoch=None, pre_input='', dev_input=''): ''' Creates a pep440 valid version of version number given a tuple integers and optional epoch, prerelease and developmental info. Parameters ---------- release_...
{ "content_hash": "8022e6571b290bf1f5ba8656ebe2df97", "timestamp": "", "source": "github", "line_count": 63, "max_line_length": 90, "avg_line_length": 31.047619047619047, "alnum_prop": 0.5587934560327198, "repo_name": "sserrot/champion_relationships", "id": "3598207218f67f87264df16fb9e39b62f524097f", ...
import sys import math def readline(): return sys.stdin.readline().strip() def main(): while True: record = readline() if record == "#": break charging_step, phone_num, start_hour, start_minute, end_hour, end_minute = [x for x in record.split()] breakdown = break_down_into_categories(int(start_hour), int...
{ "content_hash": "ccf1df87ab30ba7caf7e93e0e75b694c", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 167, "avg_line_length": 33.107142857142854, "alnum_prop": 0.6521035598705501, "repo_name": "andrey-yemelyanov/competitive-programming", "id": "1fbb879614f2e426d275423dc9f440e...
from mock import patch, Mock from nose.tools import raises from twilio.rest.resources import Transcriptions from tools import create_mock_json BASE_URI = "https://api.twilio.com/2010-04-01/Accounts/AC123" ACCOUNT_SID = "AC123" AUTH = (ACCOUNT_SID, "token") transcriptions = Transcriptions(BASE_URI, AUTH) @patch("twi...
{ "content_hash": "61314317ac3dabfac72fa80f03b295b2", "timestamp": "", "source": "github", "line_count": 44, "max_line_length": 75, "avg_line_length": 26.272727272727273, "alnum_prop": 0.7257785467128027, "repo_name": "RobSpectre/twilio-python", "id": "3d10a5f7e1b25c651aca0288b9b3aec169fbb663", "siz...
"""Python binding of Joystick wrapper of LetMeCreate library.""" import ctypes _LIB = ctypes.CDLL('libletmecreate_click.so') def get_x(): """Returns the X position of the joystick. Note: An exception is thrown if it fails to read the X position from the chip. """ pos_x = ctypes.c_int8(0) re...
{ "content_hash": "88afe6d5507eeef2a1a56d32c6742221", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 76, "avg_line_length": 27.565217391304348, "alnum_prop": 0.6246056782334385, "repo_name": "francois-berder/PyLetMeCreate", "id": "a9391b96568c6bac2f8fe2e5ef17a43b46df3099", ...
"""Tests for IPython.utils.module_paths.py""" #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #...
{ "content_hash": "80d4f47a90adaf9dbc9ff2dbdf1f921d", "timestamp": "", "source": "github", "line_count": 138, "max_line_length": 78, "avg_line_length": 27.202898550724637, "alnum_prop": 0.597229621736814, "repo_name": "mattvonrocketstein/smash", "id": "4e7c25b2855c5e2ee3f7aa39d3914c1f292ba91e", "siz...
import argparse import multiprocessing import os import site import sys from configparser import ConfigParser from configparser import ExtendedInterpolation from pathlib import Path from typing import Any from typing import AnyStr from maps_generator.utils.md5 import md5_ext from maps_generator.utils.system import tot...
{ "content_hash": "b9b743696f7d6c8523d0327f112a25a9", "timestamp": "", "source": "github", "line_count": 339, "max_line_length": 102, "avg_line_length": 32.528023598820056, "alnum_prop": 0.6528520903237508, "repo_name": "mapsme/omim", "id": "a16dd0a0fd8bbd56171056eb6848c5ff3e03b3f6", "size": "11027"...
import unittest import matplotlib.pyplot as plt import numpy as np from numpy.testing import assert_array_almost_equal import control as ctrl from control.statesp import StateSpace from control.xferfcn import TransferFunction from control.matlab import ss, tf, bode, rss from control.exception import slycot_check cla...
{ "content_hash": "564362c412f8d4cdd8c7aaf31ca1e6e3", "timestamp": "", "source": "github", "line_count": 233, "max_line_length": 93, "avg_line_length": 37.1587982832618, "alnum_prop": 0.6008316008316008, "repo_name": "roryyorke/python-control", "id": "9d59a1972e5af7a07cb9d6a50d4eed0aeec71f8f", "size...
import os import subprocess import sys import unittest # Since we execute this script directly as part of the unit tests, we need to ensure # that Tools/Scripts is in sys.path for the next imports to work correctly. script_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))...
{ "content_hash": "4da74cc479e3a48dd99171e8dbc6b4e1", "timestamp": "", "source": "github", "line_count": 159, "max_line_length": 130, "avg_line_length": 42.56603773584906, "alnum_prop": 0.6459810874704491, "repo_name": "youtube/cobalt", "id": "f457650e741e8c9a0bd3415a44776f1163649867", "size": "8373...