text stringlengths 0 1.05M | meta dict |
|---|---|
# Allison Schubauer and Daisy Hernandez
# Created: 6/5/2013
# Last Updated: 6/14/2013
# For JCAP
import numpy as np
from PyQt4 import QtCore, QtGui
import depgraph
import process_deposition_data as pdd
from elements import ELEMENTS
from fractions import Fraction
import re
import sys
""" window that displays a polar d... | {
"repo_name": "johnmgregoire/JCAPdepositionmonitor",
"path": "depositionwindow_data.py",
"copies": "1",
"size": "9160",
"license": "bsd-3-clause",
"hash": 7619644296043303000,
"line_mean": 38.313304721,
"line_max": 101,
"alpha_frac": 0.6037117904,
"autogenerated": false,
"ratio": 3.94997843898232... |
# Allison Schubauer and Daisy Hernandez
# Created: 7/15/2013
# Last Updated: 7/26/2013
# For JCAP
import path_helpers
import os
""" returns a tuple with the most recent version and previous
version of the functiions that we use """
def getRVersions(directory,fullpath=False):
currentVersion = path_helpers.getA... | {
"repo_name": "johnmgregoire/2013JCAPDataProcess",
"path": "fomautomator_helpers.py",
"copies": "1",
"size": "1161",
"license": "bsd-3-clause",
"hash": 301257247374443700,
"line_mean": 34.1818181818,
"line_max": 82,
"alpha_frac": 0.7312661499,
"autogenerated": false,
"ratio": 3.6974522292993632,
... |
# Allison Schubauer and Daisy Hernandez
# Created: 7/17/2013
# Last Updated: 7/25/2013
# For JCAP
import os, sys
import xmltranslator
import jsontranslator
import qhtest
import rawdataparser
import cPickle as pickle
import inspect
import itertools
""" The FileRunner class processes a single raw data file. When the p... | {
"repo_name": "johnmgregoire/2013JCAPDataProcess",
"path": "filerunner.py",
"copies": "1",
"size": "10617",
"license": "bsd-3-clause",
"hash": -6478752838095753000,
"line_mean": 48.3813953488,
"line_max": 269,
"alpha_frac": 0.5972496939,
"autogenerated": false,
"ratio": 4.203087885985748,
"conf... |
# Allison Schubauer and Daisy Hernandez
# Created: 7/25/2013
# Last Updated: 7/26/2013
# For JCAP
import sys, os, argparse
import fomautomator
from fomautomator import pickle
import path_helpers
import fomautomator_helpers
import time
""" this file handles all the commandline flags and runs the fomautomator """
def m... | {
"repo_name": "johnmgregoire/2013JCAPDataProcess",
"path": "fom_commandline.py",
"copies": "1",
"size": "7355",
"license": "bsd-3-clause",
"hash": -3760557640740635600,
"line_mean": 46.4516129032,
"line_max": 175,
"alpha_frac": 0.6184908226,
"autogenerated": false,
"ratio": 4.169501133786848,
"... |
"""All isort specific exception classes should be defined here"""
from pathlib import Path
from typing import Any, Dict, List, Type, Union
from .profiles import profiles
class ISortError(Exception):
"""Base isort exception object from which all isort sourced exceptions should inherit"""
class InvalidSettingsPa... | {
"repo_name": "PyCQA/isort",
"path": "isort/exceptions.py",
"copies": "1",
"size": "6868",
"license": "mit",
"hash": 5134709576445864000,
"line_mean": 34.7708333333,
"line_max": 99,
"alpha_frac": 0.6297320909,
"autogenerated": false,
"ratio": 4.170006071645416,
"config_test": false,
"has_no_k... |
"""All isort specific exception classes should be defined here"""
from pathlib import Path
from typing import Any, Dict, Union
from .profiles import profiles
class ISortError(Exception):
"""Base isort exception object from which all isort sourced exceptions should inherit"""
class InvalidSettingsPath(ISortErro... | {
"repo_name": "glenngillen/dotfiles",
"path": ".vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/python/isort/exceptions.py",
"copies": "1",
"size": "6366",
"license": "mit",
"hash": 6525264289287454000,
"line_mean": 34.3666666667,
"line_max": 99,
"alpha_frac": 0.6284951304,
"aut... |
"""All isort specific exception classes should be defined here"""
from .profiles import profiles
class ISortError(Exception):
"""Base isort exception object from which all isort sourced exceptions should inherit"""
class InvalidSettingsPath(ISortError):
"""Raised when a settings path is provided that is nei... | {
"repo_name": "timothycrosley/isort",
"path": "isort/exceptions.py",
"copies": "1",
"size": "4635",
"license": "mit",
"hash": -8602257969237329000,
"line_mean": 33.5895522388,
"line_max": 99,
"alpha_frac": 0.6267529666,
"autogenerated": false,
"ratio": 4.232876712328767,
"config_test": false,
... |
__all__ = ['is_wellcentered', 'circumcenter', 'circumcenter_barycentric']
from numpy import bmat, hstack, vstack, dot, sqrt, ones, zeros, sum, \
asarray
from numpy.linalg import solve,norm
def is_wellcentered(pts, tol=1e-8):
"""Determines whether a set of points defines a well-centered simplex.
"""
... | {
"repo_name": "pkuwwt/pydec",
"path": "pydec/math/circumcenter.py",
"copies": "7",
"size": "3051",
"license": "bsd-3-clause",
"hash": 8337898047236674000,
"line_mean": 27.7830188679,
"line_max": 87,
"alpha_frac": 0.5706325795,
"autogenerated": false,
"ratio": 3.371270718232044,
"config_test": f... |
__all__ = ['Iter']
from itertools import *
class Iter(object):
'''A wrapper class providing a rich-iterator API.
From the user point of view, this class supersedes the builtin iter()
function: like iter(), it is called as Iter(iterable) or (less frequently)
as Iter(callable,sentinel) and it retur... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/498272_Rich_iterator_wrapper/recipe-498272.py",
"copies": "1",
"size": "2963",
"license": "mit",
"hash": 1024760390141779200,
"line_mean": 40.1527777778,
"line_max": 86,
"alpha_frac": 0.6351670604,
"autogenerated": false,
"ratio": 3.838082... |
__all__ = ["JavaScriptDialogManager"]
from devtools_event_listener import DevToolsEventListener
from status import *
# Tracks the opening and closing of JavaScript dialogs (e.g., alerts).
class JavaScriptDialogManager(DevToolsEventListener):
def __init__(self, client):
DevToolsEventListener.__init__(self)
... | {
"repo_name": "PeterWangIntel/crosswalk-webdriver-python",
"path": "browser/javascript_dialog_manager.py",
"copies": "1",
"size": "2298",
"license": "bsd-3-clause",
"hash": -6216126594878372000,
"line_mean": 36.064516129,
"line_max": 81,
"alpha_frac": 0.6993037424,
"autogenerated": false,
"ratio"... |
__all__ = ['jazAdd', 'jazSubtract', 'jazMultiply', 'jazDivide', 'jazDiv']
class jazAdd:
def __init__(self):
self.command = "+";
def call(self, interpreter, arg):
topValue1 = interpreter.GetScope().stack.pop()
topValue2 = interpreter.GetScope().stack.pop()
result = int(topValue... | {
"repo_name": "joewashear007/jazzy",
"path": "jazzy/functions/ArithmeticOpFunc.py",
"copies": "1",
"size": "1986",
"license": "mit",
"hash": -5812924357601785000,
"line_mean": 31.5573770492,
"line_max": 128,
"alpha_frac": 0.6289023162,
"autogenerated": false,
"ratio": 3.52753108348135,
"config_... |
__all__ = ['jazBegin', 'jazEnd', 'jazReturn', 'jazCall', 'jazStackInfo']
class jazBegin:
def __init__(self):
self.command = "begin";
def call(self, interpreter, arg):
interpreter.BeginSubroutine()
return None
class jazEnd:
def __init__(self):
self.command = "end";
de... | {
"repo_name": "joewashear007/jazzy",
"path": "jazzy/functions/SubprgrmCtrlFunc.py",
"copies": "1",
"size": "2244",
"license": "mit",
"hash": -6608643013356879000,
"line_mean": 30.1666666667,
"line_max": 123,
"alpha_frac": 0.5057932264,
"autogenerated": false,
"ratio": 3.6968698517298186,
"confi... |
__all__ = ['jazGT', 'jazET', 'jazGTET', 'jazLT', 'jazLTET', 'jazGL']
class jazGT:
def __init__(self):
self.command = ">";
def call(self, interpreter, arg):
topValue1 = interpreter.GetScope().stack.pop()
topValue2 = interpreter.GetScope().stack.pop()
if (topValue2 > topValue1):
... | {
"repo_name": "joewashear007/jazzy",
"path": "jazzy/functions/RelationalFunc.py",
"copies": "1",
"size": "2517",
"license": "mit",
"hash": 6844005311187196000,
"line_mean": 30.0740740741,
"line_max": 113,
"alpha_frac": 0.5832340087,
"autogenerated": false,
"ratio": 3.575284090909091,
"config_te... |
__all__ = ['jazHalt', 'jazLabel', 'jazGoto', 'jazGofalse', 'jazGotrue']
import errors
class jazHalt:
def __init__(self):
self.command = "halt";
def call(self, interpreter, arg):
return interpreter.Halt()
class jazLabel:
def __init__(self):
self.command = "label";
def call(sel... | {
"repo_name": "joewashear007/jazzy",
"path": "jazzy/functions/CtrlFunc.py",
"copies": "1",
"size": "1437",
"license": "mit",
"hash": -8296465936847403000,
"line_mean": 26.6346153846,
"line_max": 124,
"alpha_frac": 0.6130828114,
"autogenerated": false,
"ratio": 3.471014492753623,
"config_test": ... |
all__ = ['jazPush', 'jazRvalue', 'jazLvalue', 'jazPop', 'jazAssign', 'jazCopy']
class jazPush:
def __init__(self):
self.command = "push"
def call(self, interpreter, arg):
interpreter.GetScope().stack.append(int(arg))
return None
class jazRvalue:
def __init__(self):
self.co... | {
"repo_name": "joewashear007/jazzy",
"path": "jazzy/functions/StackManipFunc.py",
"copies": "1",
"size": "1644",
"license": "mit",
"hash": 261922464055710050,
"line_mean": 27.3448275862,
"line_max": 139,
"alpha_frac": 0.6259124088,
"autogenerated": false,
"ratio": 3.535483870967742,
"config_tes... |
__all__ = ("JobArtifactsResource",)
from base64 import b64decode
from io import BytesIO
from flask import request
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import joinedload
from werkzeug.datastructures import FileStorage
from zeus.config import celery, db
from zeus.constants import Result, Status... | {
"repo_name": "getsentry/zeus",
"path": "zeus/api/resources/job_artifacts.py",
"copies": "1",
"size": "3443",
"license": "apache-2.0",
"hash": 9171726877903397000,
"line_mean": 30.5871559633,
"line_max": 88,
"alpha_frac": 0.5823409817,
"autogenerated": false,
"ratio": 4.341740226986128,
"config... |
__all__ = ["JSONEncodedDict"]
import json
from collections import MutableMapping
from sqlalchemy.ext.mutable import Mutable
from sqlalchemy.types import TypeDecorator, Unicode
class MutableDict(Mutable, MutableMapping):
def __init__(self, value):
self.value = value or {}
def __setitem__(self, key,... | {
"repo_name": "getsentry/zeus",
"path": "zeus/db/types/json.py",
"copies": "1",
"size": "1514",
"license": "apache-2.0",
"hash": -760559186842882800,
"line_mean": 21.5970149254,
"line_max": 52,
"alpha_frac": 0.5997357992,
"autogenerated": false,
"ratio": 4.350574712643678,
"config_test": false,... |
__all__ = ['Kane']
from sympy import Symbol, zeros, Matrix, diff, solve_linear_system_LU, eye
from sympy.utilities import default_sort_key
from sympy.physics.mechanics.essential import ReferenceFrame, dynamicsymbols
from sympy.physics.mechanics.particle import Particle
from sympy.physics.mechanics.point import Point
f... | {
"repo_name": "ichuang/sympy",
"path": "sympy/physics/mechanics/kane.py",
"copies": "1",
"size": "37447",
"license": "bsd-3-clause",
"hash": 3594795924043980300,
"line_mean": 41.9438073394,
"line_max": 82,
"alpha_frac": 0.5499773013,
"autogenerated": false,
"ratio": 3.6349252572316053,
"config_... |
__all__ = ['KanesMethod']
from sympy import Symbol, zeros, Matrix, diff, solve_linear_system_LU, eye
from sympy.utilities import default_sort_key
from sympy.physics.mechanics.essential import ReferenceFrame, dynamicsymbols
from sympy.physics.mechanics.particle import Particle
from sympy.physics.mechanics.point import ... | {
"repo_name": "amitjamadagni/sympy",
"path": "sympy/physics/mechanics/kane.py",
"copies": "2",
"size": "35912",
"license": "bsd-3-clause",
"hash": -6666104666316898000,
"line_mean": 41.1502347418,
"line_max": 82,
"alpha_frac": 0.5453608822,
"autogenerated": false,
"ratio": 3.6223522291708696,
"... |
__all__ = ['kd_tree']
from math import sqrt
from heapq import heappush,heappop
class kd_tree:
class node:
def point_distance(self,point):
return sqrt(sum([ (a - b)**2 for (a,b) in zip(point,self.point)]))
def separator_distance(self,point):
return point[self.axis] - self.p... | {
"repo_name": "alejospina/pydec",
"path": "pydec/math/kd_tree.py",
"copies": "6",
"size": "6142",
"license": "bsd-3-clause",
"hash": -2458403280235057000,
"line_mean": 29.4059405941,
"line_max": 102,
"alpha_frac": 0.5205144904,
"autogenerated": false,
"ratio": 3.924600638977636,
"config_test": ... |
__all__ = ['Kernel']
from functools import wraps
from copy import copy
class Kernel(object):
def __getstate__(self):
state = {'params': self.params}
return state
def __setstate__(self, state):
self.params = state['params']
def __copy__(self):
return type(self)(*self.par... | {
"repo_name": "jhamrick/gaussian_processes",
"path": "gp/kernels/base.py",
"copies": "1",
"size": "2791",
"license": "mit",
"hash": -8259447839785039000,
"line_mean": 22.0661157025,
"line_max": 71,
"alpha_frac": 0.4994625582,
"autogenerated": false,
"ratio": 4.248097412480974,
"config_test": fa... |
__all__ = ["kFocusScript", \
"kGetElementRegionScript", \
"kIsOptionElementToggleableScript", \
"kExecuteAsyncScriptScript", \
"kAddCookieScript", \
"kCallFunctionScript", \
"kDispatchContextMenuEventScript"]
kFocusScript =\
"function() { // Copyrig... | {
"repo_name": "PeterWangIntel/crosswalk-webdriver-python",
"path": "browser/js.py",
"copies": "1",
"size": "26141",
"license": "bsd-3-clause",
"hash": -3194586607285984000,
"line_mean": 39.7180685358,
"line_max": 93,
"alpha_frac": 0.5309666807,
"autogenerated": false,
"ratio": 3.2923173803526447,... |
__all__ = ["KNN", "Kernel", "DistanceBand"]
__author__ = "Sergio J. Rey <srey@asu.edu>, Levi John Wolf <levi.john.wolf@gmail.com>"
from ..cg.kdtree import KDTree
from ..common import KDTree
from .weights import W, WSP
from .util import isKDTree, get_ids, get_points_array_from_shapefile,\
get_points_... | {
"repo_name": "sjsrey/pysal_core",
"path": "pysal_core/weights/Distance.py",
"copies": "2",
"size": "30007",
"license": "bsd-3-clause",
"hash": -8232578625162884000,
"line_mean": 32.0110011001,
"line_max": 524,
"alpha_frac": 0.5208451361,
"autogenerated": false,
"ratio": 3.799797391414461,
"con... |
__all__ = ["KNN", "Kernel", "DistanceBand"]
__author__ = "Sergio J. Rey <srey@asu.edu>, Levi John Wolf <levi.john.wolf@gmail.com>"
from ..cg.kdtree import KDTree
from .weights import W, WSP
from .util import isKDTree, get_ids, get_points_array_from_shapefile,\
get_points_array, WSP2W
import copy
fro... | {
"repo_name": "lixun910/pysal",
"path": "pysal/lib/weights/distance.py",
"copies": "1",
"size": "30382",
"license": "bsd-3-clause",
"hash": -3654943699476914000,
"line_mean": 32.6084070796,
"line_max": 524,
"alpha_frac": 0.5255085248,
"autogenerated": false,
"ratio": 3.8158754081888975,
"config... |
__all__ = ["kOk", \
"kNoSuchSession", \
"kNoSuchElement", \
"kNoSuchFrame", \
"kUnknownCommand", \
"kStaleElementReference", \
"kElementNotVisible", \
"kInvalidElementState", \
"kUnknownError", \
"kJavaScriptError", \
... | {
"repo_name": "weibohit/tools",
"path": "utility/status.py",
"copies": "1",
"size": "3069",
"license": "mit",
"hash": -7218027666580658000,
"line_mean": 26.9,
"line_max": 75,
"alpha_frac": 0.6565656566,
"autogenerated": false,
"ratio": 3.860377358490566,
"config_test": false,
"has_no_keywords... |
__all__ = ["label_overlap_measures"]
import pandas as pd
from .. import utils
def label_overlap_measures(source_image, target_image):
"""
Get overlap measures from two label images (e.g., Dice)
ANTsR function: `labelOverlapMeasures`
Arguments
---------
source image : ANTsImage
Sour... | {
"repo_name": "ANTsX/ANTsPy",
"path": "ants/utils/label_overlap_measures.py",
"copies": "1",
"size": "1162",
"license": "apache-2.0",
"hash": 3252259534047474000,
"line_mean": 26.023255814,
"line_max": 84,
"alpha_frac": 0.6325301205,
"autogenerated": false,
"ratio": 3.339080459770115,
"config_t... |
__all__ = ['LagrangesMethod']
from sympy import diff, zeros, Matrix, eye, sympify
from sympy.physics.mechanics import (dynamicsymbols, ReferenceFrame, Point)
class LagrangesMethod(object):
"""Lagrange's method object.
This object generates the equations of motion in a two step procedure. The
first step ... | {
"repo_name": "amitjamadagni/sympy",
"path": "sympy/physics/mechanics/lagrange.py",
"copies": "2",
"size": "12348",
"license": "bsd-3-clause",
"hash": -1034947941472113200,
"line_mean": 36.0810810811,
"line_max": 86,
"alpha_frac": 0.598558471,
"autogenerated": false,
"ratio": 3.8757062146892656,
... |
__all__ = ['Lattice']
import numpy as np
from collections import defaultdict
from copy import deepcopy
from six import string_types
import itertools as it
import mbuild as mb
class Lattice(object):
"""Develop crystal structure from user defined inputs.
Lattice, the abstract building block of a crystal cell... | {
"repo_name": "sallai/mbuild",
"path": "mbuild/lattice.py",
"copies": "1",
"size": "23132",
"license": "mit",
"hash": 2154797063597299500,
"line_mean": 45.4497991968,
"line_max": 93,
"alpha_frac": 0.5022911983,
"autogenerated": false,
"ratio": 4.59606596463342,
"config_test": false,
"has_no_k... |
__all__ = ["LaunchXwalk"]
from browser.status import *
from browser.version import kMinimumSupportedXwalkBuildNo
from browser.version import GetMinimumSupportedXwalkVersion
from browser.xwalk_android_impl import XwalkAndroidImpl
from browser.devtools_http_client import DevToolsHttpClient
from browser.devtools_http_cli... | {
"repo_name": "PeterWangIntel/crosswalk-webdriver-python",
"path": "misc/xwalk_launcher.py",
"copies": "1",
"size": "4990",
"license": "bsd-3-clause",
"hash": 5151309034880616000,
"line_mean": 39.5691056911,
"line_max": 134,
"alpha_frac": 0.6346693387,
"autogenerated": false,
"ratio": 4.261315115... |
__all__ = ('LicenseManager', 'assign_license')
from pypushover import BaseManager, send, base_url
_assign_url = base_url + "licenses/assign.json"
class LicenseManager(BaseManager):
def __init__(self, app_token, user_key=None, email=None):
"""
"""
super().__init__(app_token, user_key=use... | {
"repo_name": "KronosKoderS/py_pushover",
"path": "pypushover/license.py",
"copies": "2",
"size": "1161",
"license": "mit",
"hash": -2065689831176171500,
"line_mean": 20.9056603774,
"line_max": 86,
"alpha_frac": 0.579672696,
"autogenerated": false,
"ratio": 3.6974522292993632,
"config_test": fa... |
# all lifetimes in years
import numpy as np
CO2 = np.nan # dummy - to preserve indexing order
CH4 = 9.3 # for constant lifetime runs
N2O = 121.
CF4 = 50000.
C2F6 = 10000.
C3F8 = 2600.
C4F10 = 2600.
C5F12 = 4100.
C6F14 = 3100.
C7F16 = 3000.
C8F18... | {
"repo_name": "OMS-NetZero/FAIR",
"path": "fair/constants/lifetime.py",
"copies": "1",
"size": "1433",
"license": "apache-2.0",
"hash": 7071400135743000000,
"line_mean": 24.1403508772,
"line_max": 76,
"alpha_frac": 0.5484996511,
"autogenerated": false,
"ratio": 2.1420029895366217,
"config_test"... |
__all__ = ('lights', 'light', 'item_for_light', 'toggle_item_for_light',
'group', 'item_for_group', 'scenes_item_for_group',
'scenes', 'scene', 'item_for_scene_name',
'connected')
HUE_PRODUCTS = dict(
LLC014='aura',
HBL001='beyond_ceiling_pendant_table',
HBL002='beyond_ceil... | {
"repo_name": "nriley/LBHue",
"path": "Hue.lbaction/Contents/Scripts/hue.py",
"copies": "1",
"size": "5705",
"license": "apache-2.0",
"hash": -3830354016009577500,
"line_mean": 32.7573964497,
"line_max": 79,
"alpha_frac": 0.5872042068,
"autogenerated": false,
"ratio": 3.1536760641238253,
"confi... |
__all__ = ["linear_assignment"]
import numpy as np
"""
Solve the unique lowest-cost assignment problem using the
Hungarian algorithm (also known as Munkres algorithm).
"""
# Based on original code by Brain Clapper, adapted to NumPy by Gael Varoquaux.
# Heavily refactored by Lars Buitinck.
# Copyright (c) 2008 Brian... | {
"repo_name": "epfl-cosmo/glosim",
"path": "libmatch/lap/munkres.py",
"copies": "2",
"size": "9701",
"license": "mit",
"hash": -5228540074930737000,
"line_mean": 31.9965986395,
"line_max": 78,
"alpha_frac": 0.6177713638,
"autogenerated": false,
"ratio": 3.6456219466366027,
"config_test": false,... |
__all__ = ['lineMin']
import numpy as np
import scipy.optimize as op
def lineMin(spectrum, x=None, findMax=False, estimated=None, rangeAround=None, rangeFit=3, order=4):
"""
Find the minimum of a spectral line with subpixel precision
Args:
spectrum (TYPE): spectrum containing spectral lines
... | {
"repo_name": "aasensio/pyiacsun",
"path": "pyiacsun/util/lineMin.py",
"copies": "1",
"size": "2036",
"license": "mit",
"hash": -2820999100456805000,
"line_mean": 31.8387096774,
"line_max": 141,
"alpha_frac": 0.6173870334,
"autogenerated": false,
"ratio": 3.3989983305509184,
"config_test": fals... |
NOTIFY = True # enable notifications
# create images with Pokémon image and optionally include IVs and moves
# requires cairo and ENCOUNTER = 'notifying' or 'all'
TWEET_IMAGES = True
# IVs and moves are now dependant on level, so this is probably not useful
IMAGE_STATS = False
# As many hashtags as can fit will be i... | {
"repo_name": "RobTwoThree/Monocle",
"path": "config.example.py",
"copies": "1",
"size": "21923",
"license": "mit",
"hash": 8266774958109310000,
"line_mean": 47.8794642857,
"line_max": 459,
"alpha_frac": 0.7441775505,
"autogenerated": false,
"ratio": 3.233608978145304,
"config_test": false,
"... |
NOTIFY = False # enable notifications
# create images with Pokémon image and optionally include IVs and moves
# requires cairo and ENCOUNTER = 'notifying' or 'all'
TWEET_IMAGES = True
# IVs and moves are now dependant on level, so this is probably not useful
IMAGE_STATS = False
# As many hashtags as can fit will be ... | {
"repo_name": "evenly-epic-mule/Monocle",
"path": "config.example.py",
"copies": "1",
"size": "17704",
"license": "mit",
"hash": 3148601697731995000,
"line_mean": 45.8912466844,
"line_max": 231,
"alpha_frac": 0.739676434,
"autogenerated": false,
"ratio": 3.1973232049195155,
"config_test": false... |
NOTIFY = False # enable notifications
# create images with Pokémon stats for Tweets
# requires cairo and ENCOUNTER = 'notifying' or 'all'
TWEET_IMAGES = True
# As many hashtags as can fit will be included in your tweets, these will
# be combined with landmark-specific hashtags (if applicable).
HASHTAGS = {AREA_NAME,... | {
"repo_name": "Claod44/GokemonReborn",
"path": "config.example.py",
"copies": "1",
"size": "13751",
"license": "mit",
"hash": -3842499384715967000,
"line_mean": 45.693877551,
"line_max": 231,
"alpha_frac": 0.7424970862,
"autogenerated": false,
"ratio": 3.258485639686684,
"config_test": false,
... |
### All lines that are commented out (and some that aren't) are optional ###
DB_ENGINE = 'sqlite:///db.sqlite'
#DB_ENGINE = 'mysql://user:pass@localhost/monocle'
#DB_ENGINE = 'postgresql://user:pass@localhost/monocle
AREA_NAME = 'SLC' # the city or region you are scanning
LANGUAGE = 'EN' # ISO 639-1 ... | {
"repo_name": "FreddyPoGo/Monocle",
"path": "config.example.py",
"copies": "1",
"size": "17810",
"license": "mit",
"hash": -4910511717187167000,
"line_mean": 44.9234828496,
"line_max": 231,
"alpha_frac": 0.724302744,
"autogenerated": false,
"ratio": 3.1939655172413794,
"config_test": false,
"... |
__all__ = ["LoadDataFromStaticDir", \
"LoadDataFromCST", \
"LoadS11FromCST"]
import os
import math
import sys
from status import *
def LoadDataFromStaticDir(path):
if not os.path.isfile(path):
return Status(kUnknownError, path + " doesn't exist.")
try:
fd = open(path, 'r')
except ... | {
"repo_name": "weibohit/tools",
"path": "utility/file_helper.py",
"copies": "1",
"size": "3704",
"license": "mit",
"hash": 1560950192740460000,
"line_mean": 23.5298013245,
"line_max": 62,
"alpha_frac": 0.5637149028,
"autogenerated": false,
"ratio": 2.833970925784239,
"config_test": false,
"ha... |
__all__ = ['load_dictionary_from_file', 'save_dictionary_to_file']
import json
import logging
import os
import pickle
try: import yaml
except ImportError: pass
from uriutils import uri_open
logger = logging.getLogger(__name__)
def load_dictionary_from_file(file_or_filename, *, force_format=None, title='dictionary... | {
"repo_name": "skylander86/ycml",
"path": "ycml/utils/settings.py",
"copies": "1",
"size": "1718",
"license": "apache-2.0",
"hash": -8676047487569119000,
"line_mean": 30.8148148148,
"line_max": 126,
"alpha_frac": 0.6367869616,
"autogenerated": false,
"ratio": 3.4087301587301586,
"config_test": ... |
__all__ = ['load_ds14', 'load_ds14_a', 'load_ds14_b']
from itertools import product
import numpy as np
from sdfpy import SDFRead, SDFIndex
def _fields2dtype(fields):
return np.dtype([(f, int if f.endswith('id') else float) for f in fields])
class load_ds14:
def __init__(self, basename, midx_level=7):
... | {
"repo_name": "mclaughlin6464/pearce",
"path": "bin/covmat/load_ds14.py",
"copies": "1",
"size": "3875",
"license": "mit",
"hash": -1685271538166204700,
"line_mean": 34.5504587156,
"line_max": 95,
"alpha_frac": 0.543483871,
"autogenerated": false,
"ratio": 3.509963768115942,
"config_test": fals... |
__all__ = ['load', 'dump', 'EXTENSION']
EXTENSION = '.stl'
def load(f, existing_mesh=None):
from baiji.serialization.util.openlib import ensure_file_open_and_call
return ensure_file_open_and_call(f, _load, mode='rb', mesh=existing_mesh)
def dump(mesh, f, name="mesh", ascii=True):
from baiji.serializati... | {
"repo_name": "bodylabs/lace",
"path": "lace/serialization/stl.py",
"copies": "1",
"size": "2479",
"license": "bsd-2-clause",
"hash": 133583859921684510,
"line_mean": 35.4558823529,
"line_max": 103,
"alpha_frac": 0.5425574829,
"autogenerated": false,
"ratio": 3.629575402635432,
"config_test": f... |
__all__ = ['load_headers', 'getsascurve', 'getsasexposure', 'getheaders', 'getdists', 'filter_headers', 'load_exposure',
'load_mask']
from typing import List, Tuple, Union
import numpy as np
from IPython.core.getipython import get_ipython
from sastool.classes2.curve import Curve
from sastool.classes2.exposu... | {
"repo_name": "awacha/credolib",
"path": "credolib/io.py",
"copies": "1",
"size": "4915",
"license": "bsd-3-clause",
"hash": -4738564507141617000,
"line_mean": 36.5190839695,
"line_max": 120,
"alpha_frac": 0.603051882,
"autogenerated": false,
"ratio": 3.6488492947290276,
"config_test": false,
... |
__all__ = ['load_instances', 'shuffle_instances']
from argparse import ArgumentParser
from collections import Counter
import json
import logging
import numpy as np
from tabulate import tabulate
from uriutils import URIFileType
from .timer import Timer
logger = logging.getLogger(__name__)
def load_instances(inst... | {
"repo_name": "skylander86/ycml",
"path": "ycml/utils/instances.py",
"copies": "1",
"size": "4177",
"license": "apache-2.0",
"hash": -3735897725730938000,
"line_mean": 36.2946428571,
"line_max": 245,
"alpha_frac": 0.5819966483,
"autogenerated": false,
"ratio": 4.181181181181181,
"config_test": ... |
__all__ = ('load', 'loads', 'dump', 'dumps')
SECTION_START = '{'
SECTION_END = '}'
def loads(data, wrapper=dict):
"""
Loads ACF content into a Python object.
:param data: An UTF-8 encoded content of an ACF file.
:param wrapper: A wrapping object for key-value pairs.
:return: An Ordered Dictionary... | {
"repo_name": "leovp/steamfiles",
"path": "steamfiles/acf.py",
"copies": "2",
"size": "3360",
"license": "mit",
"hash": 861717872898333200,
"line_mean": 27.9655172414,
"line_max": 93,
"alpha_frac": 0.5735119048,
"autogenerated": false,
"ratio": 4,
"config_test": false,
"has_no_keywords": fals... |
__all__ = ['Lock', 'Event', 'Condition', 'Semaphore', 'BoundedSemaphore']
from . import futures
from .coroutines import coroutine
class _ContextManager:
"""Context manager.
This enables the following idiom for acquiring and releasing a
lock around a block:
with (yield from lock):
<b... | {
"repo_name": "jonathanverner/brython",
"path": "www/src/Lib/asyncio/locks.py",
"copies": "3",
"size": "13510",
"license": "bsd-3-clause",
"hash": -8237336423572267000,
"line_mean": 29.2914798206,
"line_max": 79,
"alpha_frac": 0.5807549963,
"autogenerated": false,
"ratio": 4.509345794392523,
"c... |
__all__ = ['Locus','StrandPos']
class StrandPos(object):
def __init__(self, sense, lower, higher):
"""
sense: True or False
always, lower < higher
for sense, lower,higher = start,end
for antisense, lower,higher = end,start
chr -------------------------------... | {
"repo_name": "mizuy/seqtool",
"path": "seqtool/db/locus.py",
"copies": "1",
"size": "4169",
"license": "mit",
"hash": -8332029214209553000,
"line_mean": 27.3605442177,
"line_max": 86,
"alpha_frac": 0.4833293356,
"autogenerated": false,
"ratio": 4.087254901960784,
"config_test": false,
"has_n... |
__all__=['log', 'emitters', 'add_emitters', 'devel_log', 'filters', 'formats', 'outputs', 'levels', 'quick_setup']
from datetime import datetime
import sys
import os
import logger
import filters
import formats
import outputs
import levels
## globals creation is wrapped in a function so that we can do sane testing
de... | {
"repo_name": "alessandrod/twiggy",
"path": "twiggy/__init__.py",
"copies": "1",
"size": "2655",
"license": "bsd-3-clause",
"hash": -246798721034722940,
"line_mean": 36.3943661972,
"line_max": 124,
"alpha_frac": 0.6900188324,
"autogenerated": false,
"ratio": 3.6671270718232045,
"config_test": f... |
__all__ = ['_logger', '_log', '_message', '_message_exception', '_confirm']
"""
Yes, everything is underscored.
Its internal foo that is not for public use.
"""
import logging
import sys
from typing import Any, Optional, TextIO
if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_exten... | {
"repo_name": "k4cg/nichtparasoup",
"path": "nichtparasoup/_internals/__init__.py",
"copies": "1",
"size": "2213",
"license": "mit",
"hash": 8825198710572629000,
"line_mean": 28.9054054054,
"line_max": 95,
"alpha_frac": 0.6330772707,
"autogenerated": false,
"ratio": 3.69449081803005,
"config_te... |
__all__ = ["login", "logout", "register"]
# Selenium WebDriver
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
#from selenium.webdriver.common.keys import Keys
from gluon import current
from s3 import s3_debug
from .utils import *
# -------------------------------------... | {
"repo_name": "flavour/cedarbluff",
"path": "modules/tests/core/auth.py",
"copies": "1",
"size": "3757",
"license": "mit",
"hash": 4939109493945927000,
"line_mean": 26.4306569343,
"line_max": 80,
"alpha_frac": 0.5682725579,
"autogenerated": false,
"ratio": 4.110503282275711,
"config_test": true... |
__all__ = ['logspace', 'linspace']
import numeric as _nx
from numeric import array
def linspace(start, stop, num=50, endpoint=True, retstep=False):
"""
Return evenly spaced numbers over a specified interval.
Returns `num` evenly spaced samples, calculated over the
interval [`start`, `stop` ].
Th... | {
"repo_name": "chadnetzer/numpy-gaurdro",
"path": "numpy/core/function_base.py",
"copies": "4",
"size": "5201",
"license": "bsd-3-clause",
"hash": 7922392389336117000,
"line_mean": 31.7106918239,
"line_max": 79,
"alpha_frac": 0.5698904057,
"autogenerated": false,
"ratio": 3.4835900870730074,
"c... |
__all__ = ['loop_subdivision','triangulate_ncube']
from pydec.math.combinatorial import combinations
from scipy import concatenate,matrix,ravel,array,rank,vstack,hstack,zeros,arange,tile
def loop_subdivision(vertices,simplices):
"""
Given a triangle mesh represented by the matrices (vertices,simplices), retu... | {
"repo_name": "whereisravi/pydec",
"path": "pydec/mesh/subdivision.py",
"copies": "6",
"size": "3209",
"license": "bsd-3-clause",
"hash": 3953870684506354000,
"line_mean": 30.1553398058,
"line_max": 95,
"alpha_frac": 0.5892801496,
"autogenerated": false,
"ratio": 2.8754480286738353,
"config_tes... |
"""All low level structures used for parsing eddystone packets."""
from construct import Struct, Byte, Switch, OneOf, Int8sl, Array, \
GreedyString, Int16ub, Int16ul, Int32ub
from ..const import EDDYSTONE_URL_SCHEMES, EDDYSTONE_TLM_UNENCRYPTED, EDDYSTONE_TLM_ENCRYPTED
# pylint: disable=invalid-n... | {
"repo_name": "citruz/beacontools",
"path": "beacontools/structs/eddystone.py",
"copies": "1",
"size": "1380",
"license": "mit",
"hash": 2812762262583590400,
"line_mean": 27.75,
"line_max": 93,
"alpha_frac": 0.665942029,
"autogenerated": false,
"ratio": 2.905263157894737,
"config_test": false,
... |
"""All low level structures used for parsing Estimote packets."""
from construct import Struct, Byte, Switch, Int8sl, Array, Int8ul, Const, Int16ul
from ..const import ESTIMOTE_TELEMETRY_SUBFRAME_A, ESTIMOTE_TELEMETRY_SUBFRAME_B, \
ESTIMOTE_NEARABLE_FRAME
# pylint: disable=invalid-name
EstimoteTe... | {
"repo_name": "citruz/beacontools",
"path": "beacontools/structs/estimote.py",
"copies": "1",
"size": "1193",
"license": "mit",
"hash": -2497620158452391400,
"line_mean": 29.5897435897,
"line_max": 83,
"alpha_frac": 0.6797988265,
"autogenerated": false,
"ratio": 2.924019607843137,
"config_test"... |
__all__ = ["LtcRabbit"]
__version__ = "0.2.3"
import requests
class LtcRabbit(object):
"""Main class to access LTCRabbit.com API.
"""
DEFAULT_ENDPOINT = "https://www.ltcrabbit.com/index.php?page=api"
appname = "PyLtcRabbit"
appversion = __version__
def __init__(self, api_key=None):
... | {
"repo_name": "syntaxsugar/ltcrabbit",
"path": "ltcrabbit.py",
"copies": "1",
"size": "1765",
"license": "bsd-3-clause",
"hash": -6925408742665004000,
"line_mean": 24.2142857143,
"line_max": 91,
"alpha_frac": 0.5609065156,
"autogenerated": false,
"ratio": 3.7236286919831225,
"config_test": fals... |
__all__ = ['magma', 'inferno', 'plasma', 'viridis']
_magma_data = [[0.001462, 0.000466, 0.013866],
[0.002258, 0.001295, 0.018331],
[0.003279, 0.002305, 0.023708],
[0.004512, 0.003490, 0.029965],
[0.005950, 0.004843, 0.037130],
[0.007588,... | {
"repo_name": "mkcor/datavis-tut",
"path": "colormaps.py",
"copies": "1",
"size": "50911",
"license": "cc0-1.0",
"hash": 6071503964369288000,
"line_mean": 46.7653256705,
"line_max": 51,
"alpha_frac": 0.4282375125,
"autogenerated": false,
"ratio": 2.632692108801324,
"config_test": false,
"has_... |
__all__ = ["make_graph", "add_edges", "Results",
"find_solution", "add_edges_numerical", "find_solution_numerical"]
import numpy as np
import copy
import networkx as nx
def make_graph(node_ids, node_labels):
"""
Make an undirected graph with the nodes specified
in `node_ids`. Each node will hav... | {
"repo_name": "dhuppenkothen/AstroChairs",
"path": "astrochairs/graphscheduler.py",
"copies": "1",
"size": "19634",
"license": "mit",
"hash": 6692629967773894000,
"line_mean": 33.2055749129,
"line_max": 103,
"alpha_frac": 0.5770602017,
"autogenerated": false,
"ratio": 4.370881567230632,
"config... |
__all__ = ["make_node", "CM_Node"]
import bpy
import bpy.types
import bpy_types
import bmesh
import bmesh.ops
import math
import mathutils
import pyconspack as cpk
from array import array
from pyconspack import Conspack
from mathutils import Matrix
import io_scene_consmodel.consmodel as consmodel
from io_scene_con... | {
"repo_name": "rpav/io_scene_consmodel",
"path": "nodes.py",
"copies": "1",
"size": "6385",
"license": "bsd-2-clause",
"hash": -6084708919340452000,
"line_mean": 29.6971153846,
"line_max": 120,
"alpha_frac": 0.5527016445,
"autogenerated": false,
"ratio": 3.362295945234334,
"config_test": false,... |
__all__ = ['makeRequests', 'NoResultsPending', 'NoWorkersAvailable',
'ThreadPool', 'WorkRequest', 'WorkerThread']
__author__ = "Christopher Arndt"
__version__ = "1.1"
__date__ = "2005-07-19"
import threading, Queue
class NoResultsPending(Exception):
"""All work requests have been processed."""
pass
class N... | {
"repo_name": "ActiveState/code",
"path": "recipes/Python/435883_Easy_use_objectoriented_thread_pool/recipe-435883.py",
"copies": "1",
"size": "8124",
"license": "mit",
"hash": -9193059858623190000,
"line_mean": 33.7179487179,
"line_max": 78,
"alpha_frac": 0.6202609552,
"autogenerated": false,
"r... |
__all__ = ['manage_text_buffer']
import tornado.httpserver
import tornado.websocket
import tornado.ioloop
import tornado.web
import bus
from commands import BROADCAST_APPLICATION_TITLE, CLEAR_BUFFER_COMMAND
from process_utils import spawn_daemon_process
def manage_buffer_on_app_switch(host='localhost'):
_in = ... | {
"repo_name": "drocco007/vox_linux",
"path": "vox/text_buffer.py",
"copies": "1",
"size": "1459",
"license": "mit",
"hash": -2231743618420156000,
"line_mean": 25.0535714286,
"line_max": 77,
"alpha_frac": 0.6209732694,
"autogenerated": false,
"ratio": 3.9972602739726026,
"config_test": false,
... |
__all__ = ('MapManager')
from pocketthrone.tools.maploader import MapLoader
from pocketthrone.managers.pipe import L
from pocketthrone.managers.filemanager import FileManager
from pocketthrone.managers.eventmanager import EventManager
from pocketthrone.entities.event import *
from pocketthrone.entities.enum import Til... | {
"repo_name": "herrschr/prey-game",
"path": "pocketthrone/managers/mapmanager.py",
"copies": "2",
"size": "5316",
"license": "bsd-2-clause",
"hash": 3385090867237716000,
"line_mean": 31.0240963855,
"line_max": 86,
"alpha_frac": 0.6980812641,
"autogenerated": false,
"ratio": 3.029059829059829,
"... |
__all__ = ["Map"]
import datetime
import logging
from collections import defaultdict
from io import BytesIO
from math import ceil, floor
from pathlib import Path
from urllib.parse import urlparse
import aiohttp
import dateutil.tz
import discord
from PIL import Image, ImageDraw, ImageFont
from dog.ext.time.drawing im... | {
"repo_name": "sliceofcode/dogbot",
"path": "dog/ext/time/map.py",
"copies": "2",
"size": "8457",
"license": "mit",
"hash": -6958644727490546000,
"line_mean": 36.7544642857,
"line_max": 87,
"alpha_frac": 0.548421426,
"autogenerated": false,
"ratio": 4.149656526005888,
"config_test": false,
"h... |
__all__ = ['MappingDihedrals', 'Mapping', 'MappingPChi', 'MappingX', 'MappingXY'] # noqa: E501
import logging
from typing import Optional # noqa: F401
from abc import ABCMeta, abstractmethod
import numpy as np
import miles.dihedrals as dihedrals
class Mapping(metaclass=ABCMeta):
colvars_dim = None ... | {
"repo_name": "clsb/miles",
"path": "miles/mapping.py",
"copies": "1",
"size": "1775",
"license": "mit",
"hash": -8430671549760056000,
"line_mean": 25.4925373134,
"line_max": 95,
"alpha_frac": 0.6428169014,
"autogenerated": false,
"ratio": 3.6004056795131847,
"config_test": false,
"has_no_key... |
__all__=('MapWidget')
import copy
from pprint import pprint
from kivy.graphics import Color, Ellipse, Rectangle
from kivy.core.window import Window
from kivy.uix.widget import Widget
from kivy.core.image import Image
from pocketthrone.managers.pipe import L
from pocketthrone.entities.event import *
from pocketthrone... | {
"repo_name": "herrschr/pocket-throne",
"path": "pocketthrone/widgets/mapwidget.py",
"copies": "2",
"size": "13792",
"license": "bsd-2-clause",
"hash": -4615968555159540000,
"line_mean": 33.223325062,
"line_max": 112,
"alpha_frac": 0.688950116,
"autogenerated": false,
"ratio": 2.9526867908370797,... |
__all__ = ['Mark', 'MarkedError', 'echoerr', 'NON_PRINTABLE']
import sys
import re
try:
from __builtin__ import unichr
except ImportError:
unichr = chr # NOQA
NON_PRINTABLE = re.compile('[^\t\n\x20-\x7E' + unichr(0x85) + (unichr(0xA0) + '-' + unichr(0xD7FF)) + (unichr(0xE000) + '-' + unichr(0xFFFD)) + ']')
de... | {
"repo_name": "wezhang/vim-setup",
"path": "bundle/powerline/powerline/lint/markedjson/error.py",
"copies": "2",
"size": "2710",
"license": "apache-2.0",
"hash": 3371481879619585500,
"line_mean": 26.3737373737,
"line_max": 148,
"alpha_frac": 0.6346863469,
"autogenerated": false,
"ratio": 2.852631... |
__all__ = ['mask_image']
import numpy as np
from .threshold_image import threshold_image
def mask_image(image, mask, level=1, binarize=False):
"""
Mask an input image by a mask image. If the mask image has multiple labels,
it is possible to specify which label(s) to mask at.
ANTsR function: `maskIm... | {
"repo_name": "ANTsX/ANTsPy",
"path": "ants/utils/mask_image.py",
"copies": "1",
"size": "1536",
"license": "apache-2.0",
"hash": 3349894536309338600,
"line_mean": 27.9811320755,
"line_max": 166,
"alpha_frac": 0.6197916667,
"autogenerated": false,
"ratio": 3.639810426540284,
"config_test": fals... |
__all__ = [ "match_template" ]
"""
template.py - Template matching
Original 2D code from scikit-image:
https://github.com/scikit-image/scikit-image/tree/master/skimage/feature
"""
import numpy as np
import _template
def match_template(image, template, pad_input=True, index=True):
"""Match a template to an imag... | {
"repo_name": "BioMedIA/IRTK",
"path": "wrapping/cython/irtk/ext/template.py",
"copies": "5",
"size": "3185",
"license": "apache-2.0",
"hash": -5165036487542428000,
"line_mean": 33.247311828,
"line_max": 79,
"alpha_frac": 0.5230769231,
"autogenerated": false,
"ratio": 2.9627906976744187,
"confi... |
#__all__ = ['matlab_to_complex','complex_to_matlab','sparse_to_ijv']
#
#from pydec.dec import SimplicialComplex,d,star,delta
#from pydec.dec.cochain import Cochain
#
##from scipy import concatenate,random,rand,sparse,zeros,shape,Int,array,matrix,arange,ArrayType
#from scipy import *
#from scipy.io.mio import loadmat,sa... | {
"repo_name": "alejospina/pydec",
"path": "pydec/io/complex_io.py",
"copies": "7",
"size": "4761",
"license": "bsd-3-clause",
"hash": -7785472304321749000,
"line_mean": 30.74,
"line_max": 113,
"alpha_frac": 0.5496744381,
"autogenerated": false,
"ratio": 2.8022366097704534,
"config_test": true,
... |
__all__ = ['matrix', 'bmat', 'mat', 'asmatrix']
import sys
import numeric as N
from numeric import concatenate, isscalar, binary_repr, identity
from numerictypes import issubdtype
# make translation table
_table = [None]*256
for k in range(256):
_table[k] = chr(k)
_table = ''.join(_table)
_numchars = '0123456789... | {
"repo_name": "houseind/robothon",
"path": "GlyphProofer/dist/GlyphProofer.app/Contents/Resources/lib/python2.6/numpy/core/defmatrix.py",
"copies": "1",
"size": "19242",
"license": "mit",
"hash": -7176391480697144000,
"line_mean": 28.5122699387,
"line_max": 78,
"alpha_frac": 0.5445899595,
"autogene... |
__all__ = ['matrix', 'bmat', 'mat', 'asmatrix']
import sys
import numeric as N
from numeric import concatenate, isscalar, binary_repr
# make translation table
_table = [None]*256
for k in range(256):
_table[k] = chr(k)
_table = ''.join(_table)
_numchars = '0123456789.-+jeEL'
_todelete = []
for k in _table:
i... | {
"repo_name": "santisiri/popego",
"path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/core/defmatrix.py",
"copies": "1",
"size": "15402",
"license": "bsd-3-clause",
"hash": 8850184814180088000,
"line_mean": 30.1781376518,
"line_max": 79,
"alpha_frac": 0.533... |
__all__ = ['matrix', 'bmat', 'mat', 'asmatrix']
import sys
import numpy.core.numeric as N
from numpy.core.numeric import concatenate, isscalar, binary_repr, identity, asanyarray
from numpy.core.numerictypes import issubdtype
# make translation table
_numchars = '0123456789.-+jeEL'
if sys.version_info[0] >= 3:
cl... | {
"repo_name": "dagss/numpy_svn",
"path": "numpy/matrixlib/defmatrix.py",
"copies": "4",
"size": "28444",
"license": "bsd-3-clause",
"hash": 2503907721913108500,
"line_mean": 25.4595348837,
"line_max": 87,
"alpha_frac": 0.4555266489,
"autogenerated": false,
"ratio": 3.7411548073129026,
"config_t... |
__all__ = ['matrix', 'bmat', 'mat', 'asmatrix']
import sys
import warnings
import ast
import numpy.core.numeric as N
from numpy.core.numeric import concatenate, isscalar
from numpy.core.overrides import set_module
# While not in __all__, matrix_power used to be defined here, so we import
# it for backward compatibilit... | {
"repo_name": "seberg/numpy",
"path": "numpy/matrixlib/defmatrix.py",
"copies": "11",
"size": "30667",
"license": "bsd-3-clause",
"hash": 583846701550420000,
"line_mean": 26.5534591195,
"line_max": 89,
"alpha_frac": 0.4725600809,
"autogenerated": false,
"ratio": 3.9626566739888873,
"config_test... |
__all__ = ['MAVLinkMessage', 'CommandLong', 'MAVLinkConnection']
import logging
from typing import Any, List, Callable, Dict
import pymavlink
from pymavlink.mavutil import mavlink
import attr
import dronekit
from ..connection import Message, Connection
logger = logging.getLogger(__name__) # type: logging.Logger
log... | {
"repo_name": "squaresLab/Houston",
"path": "houston/ardu/connection.py",
"copies": "1",
"size": "4111",
"license": "mit",
"hash": -7868300042382610000,
"line_mean": 34.747826087,
"line_max": 78,
"alpha_frac": 0.5001216249,
"autogenerated": false,
"ratio": 4.48309705561614,
"config_test": false... |
__all__ = ["maxCtxFont"]
def maxCtxFont(font):
"""Calculate the usMaxContext value for an entire font."""
maxCtx = 0
for tag in ("GSUB", "GPOS"):
if tag not in font:
continue
table = font[tag].table
if not table.LookupList:
continue
for lookup in ta... | {
"repo_name": "google/material-design-icons",
"path": "update/venv/lib/python3.9/site-packages/fontTools/otlLib/maxContextCalc.py",
"copies": "6",
"size": "3187",
"license": "apache-2.0",
"hash": -2650463720066251000,
"line_mean": 32.1979166667,
"line_max": 88,
"alpha_frac": 0.594603075,
"autogener... |
__all__ = ['maxpool', 'maxpool_back']
import os
import math
import numpy
import pycuda.gpuarray as gpuarray
import pycuda.autoinit
import pycuda.driver as cuda
from pycuda.compiler import SourceModule
from .utils import gpu_func
from .enums import MAX_BLOCK_SIZE, CUR_DIR, CACHE_DIR
mod = SourceModule(open(os.path.jo... | {
"repo_name": "Captricity/sciguppy",
"path": "sciguppy/maxpool.py",
"copies": "1",
"size": "1813",
"license": "mit",
"hash": -8986094293709814000,
"line_mean": 34.5490196078,
"line_max": 96,
"alpha_frac": 0.666850524,
"autogenerated": false,
"ratio": 2.575284090909091,
"config_test": false,
"... |
__all__ = ("MDAdaptiveWidget",)
from kivy.properties import BooleanProperty
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.label import Label
from kivy.uix.screenmanager import Screen
from kivymd.uix.behaviors import SpecificBackgroundColorBehavior
class MDAdaptiveWidget(SpecificBackgroundColorBehavior)... | {
"repo_name": "kivymd/KivyMD",
"path": "kivymd/uix/__init__.py",
"copies": "1",
"size": "2623",
"license": "mit",
"hash": -1618883528161815300,
"line_mean": 29.5,
"line_max": 75,
"alpha_frac": 0.5897826916,
"autogenerated": false,
"ratio": 4.1242138364779874,
"config_test": false,
"has_no_key... |
__all__ = ('memberfn', 'composefn', 'partialfn', 'reduce')
from .operator import identity
from operator import methodcaller
from itertools import starmap
from functools import reduce, partial as partialfn
import inspect
class memberfn:
"""Binds arguments for instance(-like) method calls.
Instances of this class ... | {
"repo_name": "davidfoerster/schema-matching",
"path": "src/schema_matching/utilities/functional.py",
"copies": "1",
"size": "2096",
"license": "mit",
"hash": -5804084209981438000,
"line_mean": 22.2888888889,
"line_max": 78,
"alpha_frac": 0.6488549618,
"autogenerated": false,
"ratio": 3.224615384... |
__all__ = ['memmap']
import mmap
from numeric import uint8, ndarray, dtype
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_equivalents = {
"readonly":"r",
"copyonwrite":"c",
"readwrite":"r+",
"write":"w+"
}
class memmap(ndarray):
__array_pri... | {
"repo_name": "santisiri/popego",
"path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/numpy-1.0.4-py2.5-linux-x86_64.egg/numpy/core/memmap.py",
"copies": "1",
"size": "2899",
"license": "bsd-3-clause",
"hash": 2649401202457018000,
"line_mean": 27.145631068,
"line_max": 77,
"alpha_frac": 0.48464987... |
__all__ = ['memmap']
import warnings
from numeric import uint8, ndarray, dtype
import sys
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_equivalents = {
"readonly":"r",
"copyonwrite":"c",
"readwrite":"r+",
"write":"w+"
}
class memmap(ndarray):
... | {
"repo_name": "illume/numpy3k",
"path": "numpy/core/memmap.py",
"copies": "2",
"size": "9312",
"license": "bsd-3-clause",
"hash": 6892627211105326000,
"line_mean": 32.0212765957,
"line_max": 78,
"alpha_frac": 0.5038659794,
"autogenerated": false,
"ratio": 4.027681660899654,
"config_test": false... |
__all__ = ['memmap']
import warnings
from numeric import uint8, ndarray, dtype
import sys
from numpy.compat import asbytes
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_equivalents = {
"readonly":"r",
"copyonwrite":"c",
"readwrite":"r+",
"write":"... | {
"repo_name": "xxd3vin/spp-sdk",
"path": "opt/Python27/Lib/site-packages/numpy/core/memmap.py",
"copies": "22",
"size": "9611",
"license": "mit",
"hash": 1640594137118762000,
"line_mean": 30.9302325581,
"line_max": 78,
"alpha_frac": 0.5023410675,
"autogenerated": false,
"ratio": 4.06384778012685,... |
__all__ = ['memmap']
import warnings
from numeric import uint8, ndarray, dtype
import sys
import numpy as np
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_equivalents = {
"readonly":"r",
"copyonwrite":"c",
"readwrite":"r+",
"write":"w+"
}
cla... | {
"repo_name": "ewmoore/numpy",
"path": "numpy/core/memmap.py",
"copies": "9",
"size": "9870",
"license": "bsd-3-clause",
"hash": -1832399329919741400,
"line_mean": 31.7906976744,
"line_max": 78,
"alpha_frac": 0.5171225937,
"autogenerated": false,
"ratio": 4.068425391591097,
"config_test": false... |
__all__ = ['memmap']
import warnings
from numeric import uint8, ndarray, dtype
dtypedescr = dtype
valid_filemodes = ["r", "c", "r+", "w+"]
writeable_filemodes = ["r+","w+"]
mode_equivalents = {
"readonly":"r",
"copyonwrite":"c",
"readwrite":"r+",
"write":"w+"
}
class memmap(ndarray):
"""
... | {
"repo_name": "qpython-android/QPypi-numpy",
"path": "numpy/core/memmap.py",
"copies": "2",
"size": "8986",
"license": "bsd-3-clause",
"hash": 7659638965702073000,
"line_mean": 31.795620438,
"line_max": 78,
"alpha_frac": 0.5017805475,
"autogenerated": false,
"ratio": 4.027790228597041,
"config_... |
__all__ = ['MemTable']
import bisect
class MemTable(object):
def __init__(self, table, *args, **kwargs):
self.table = table
self.items = []
for k, row in args:
self.items.append(k, row)
for k, row in kwargs.items():
self.items.append(k, row)
self.... | {
"repo_name": "yadb/yadb",
"path": "backup/store/memtable.py",
"copies": "1",
"size": "2199",
"license": "mit",
"hash": -7096600232905539000,
"line_mean": 23.9886363636,
"line_max": 65,
"alpha_frac": 0.5261482492,
"autogenerated": false,
"ratio": 3.640728476821192,
"config_test": false,
"has_... |
__all__ = ("mesh")
def bu_to_inches(d):
"""Return Blender unit d in inches."""
import bpy
import mathutils
# 1bu = 1 / 0.3048 ft
convert = lambda v: (12.0 * bpy.context.scene.unit_settings.scale_length * v) / 0.3048
if isinstance(d, mathutils.Vector):
return mathutils.Vector((convert(d... | {
"repo_name": "ijacquez/blender-tools",
"path": "modules/helper_utils/lib/__init__.py",
"copies": "1",
"size": "3519",
"license": "mit",
"hash": -1408136661349772000,
"line_mean": 35.2783505155,
"line_max": 114,
"alpha_frac": 0.5603864734,
"autogenerated": false,
"ratio": 3.7636363636363637,
"c... |
__all__ = ['Message']
import sys
import traceback
from string import Template
class Message(object):
"""A log message. All attributes are read-only."""
__slots__ = ['fields', 'suppress_newlines', 'traceback', 'text']
#: default option values. Don't change these!
_default_options = {'suppress_newlin... | {
"repo_name": "alessandrod/twiggy",
"path": "twiggy/message.py",
"copies": "1",
"size": "3768",
"license": "bsd-3-clause",
"hash": -4688547152563604000,
"line_mean": 33.8888888889,
"line_max": 108,
"alpha_frac": 0.5483014862,
"autogenerated": false,
"ratio": 4.507177033492823,
"config_test": fa... |
__all__ = ("MetaBuildSchema", "BuildSchema", "BuildCreateSchema")
from marshmallow import Schema, fields, post_load, post_dump
from zeus.models import Build, Hook
from .author import AuthorSchema
from .fields import ResultField, RevisionRefField, StatusField
from .repository import RepositorySchema
from .revision im... | {
"repo_name": "getsentry/zeus",
"path": "zeus/api/schemas/build.py",
"copies": "1",
"size": "3720",
"license": "apache-2.0",
"hash": -519822130779695040,
"line_mean": 37.3505154639,
"line_max": 84,
"alpha_frac": 0.6674731183,
"autogenerated": false,
"ratio": 3.7804878048780486,
"config_test": f... |
_ALL_METAD_3141592 = {
'__bool__',
'__bytes__',
'__str__',
'__format__',
'__len__',
'__length_hint__',
'__call__',
'__getitem__',
'__missing__',
'__setitem__',
'__delitem__',
'__iter__',
'__reversed__',
'... | {
"repo_name": "Badg/py_hypergolix",
"path": "meta/dunders.py",
"copies": "2",
"size": "43256",
"license": "unlicense",
"hash": 2527399543671487500,
"line_mean": 37.4839857651,
"line_max": 78,
"alpha_frac": 0.5632513409,
"autogenerated": false,
"ratio": 4.647185217017619,
"config_test": false,
... |
"""All methods needed to bootstrap a Home Assistant instance."""
from __future__ import annotations
import asyncio
import logging.handlers
from timeit import default_timer as timer
from types import ModuleType
from typing import Awaitable, Callable
from homeassistant import config as conf_util, core, loader, requirem... | {
"repo_name": "sander76/home-assistant",
"path": "homeassistant/setup.py",
"copies": "2",
"size": "13601",
"license": "apache-2.0",
"hash": -2862184848026300000,
"line_mean": 31.2298578199,
"line_max": 88,
"alpha_frac": 0.645246673,
"autogenerated": false,
"ratio": 4.160599571734475,
"config_te... |
"""All methods needed to bootstrap a Home Assistant instance."""
import asyncio
import logging.handlers
from timeit import default_timer as timer
from types import ModuleType
from typing import Awaitable, Callable, Dict, List, Optional
from homeassistant import config as conf_util, core, loader, requirements
from home... | {
"repo_name": "leppa/home-assistant",
"path": "homeassistant/setup.py",
"copies": "1",
"size": "10472",
"license": "apache-2.0",
"hash": -9131344862157798000,
"line_mean": 31.1226993865,
"line_max": 88,
"alpha_frac": 0.6453399542,
"autogenerated": false,
"ratio": 4.2725418196654426,
"config_tes... |
"""All methods needed to bootstrap a Home Assistant instance."""
import asyncio
import logging.handlers
from timeit import default_timer as timer
from types import ModuleType
from typing import Awaitable, Callable, Optional, Dict, List
from homeassistant import requirements, core, loader, config as conf_util
from hom... | {
"repo_name": "Cinntax/home-assistant",
"path": "homeassistant/setup.py",
"copies": "1",
"size": "10168",
"license": "apache-2.0",
"hash": -7068150463206766000,
"line_mean": 30.3827160494,
"line_max": 88,
"alpha_frac": 0.6421125098,
"autogenerated": false,
"ratio": 4.247284878863827,
"config_te... |
"""All methods needed to bootstrap a Home Assistant instance."""
import asyncio
import logging.handlers
from timeit import default_timer as timer
from types import ModuleType
from typing import Optional, Dict, List
from homeassistant import requirements, core, loader, config as conf_util
from homeassistant.config imp... | {
"repo_name": "aronsky/home-assistant",
"path": "homeassistant/setup.py",
"copies": "3",
"size": "7913",
"license": "apache-2.0",
"hash": -2121623753580017400,
"line_mean": 30.652,
"line_max": 78,
"alpha_frac": 0.6322507267,
"autogenerated": false,
"ratio": 4.233814874264312,
"config_test": tru... |
"""All methods needed to bootstrap a Home Assistant instance."""
import asyncio
import logging.handlers
import os
from timeit import default_timer as timer
from types import ModuleType
from typing import Optional, Dict
import homeassistant.config as conf_util
import homeassistant.core as core
import homeassistant.loa... | {
"repo_name": "stefan-jonasson/home-assistant",
"path": "homeassistant/setup.py",
"copies": "3",
"size": "8485",
"license": "mit",
"hash": -4118323445681925600,
"line_mean": 30.5427509294,
"line_max": 79,
"alpha_frac": 0.6281673542,
"autogenerated": false,
"ratio": 4.268108651911469,
"config_te... |
__all__ = [ 'MicropolygonMesh' ]
import numpy as np
from .Pixel import FloatPixel
from handsome.capi import fill_bounds_buffer, generate_numpy_begin
# TODO: Flexible vertex types
Position = np.dtype([
('x', np.float32),
('y', np.float32),
('z', np.float32),
('w', np.float32),
],
... | {
"repo_name": "bracket/rasterizer",
"path": "handsome/MicropolygonMesh.py",
"copies": "2",
"size": "1597",
"license": "bsd-2-clause",
"hash": -5267755986470963000,
"line_mean": 23.5692307692,
"line_max": 79,
"alpha_frac": 0.5710707577,
"autogenerated": false,
"ratio": 3.8762135922330097,
"confi... |
"""All middleware for the WeGovNow extension."""
from importlib import import_module
from datetime import datetime
from pytz import utc
from django.core.urlresolvers import reverse
from django.shortcuts import redirect
from django.http import JsonResponse, HttpResponseRedirect
from django.contrib.auth import logout a... | {
"repo_name": "ExCiteS/geokey-wegovnow",
"path": "geokey_wegovnow/middleware.py",
"copies": "1",
"size": "9055",
"license": "mit",
"hash": -5712200357545611000,
"line_mean": 39.9728506787,
"line_max": 79,
"alpha_frac": 0.6136940917,
"autogenerated": false,
"ratio": 4.467192895905279,
"config_te... |
__all__ = ['Mission', 'MissionOutcome', 'CrashedMissionOutcome',
'MissionSuite']
from typing import Dict, Any, List, Iterator, Tuple,\
Type, Union, Optional
import attr
from bugzoo.client import Client as BugZooClient
from bugzoo import Bug as Snapshot
from .configuration import Configuration
from .c... | {
"repo_name": "squaresLab/Houston",
"path": "houston/mission.py",
"copies": "1",
"size": "6021",
"license": "mit",
"hash": 3522323861451369000,
"line_mean": 32.2651933702,
"line_max": 79,
"alpha_frac": 0.5822952998,
"autogenerated": false,
"ratio": 3.943025540275049,
"config_test": true,
"has... |
__all__ = ['MissionTrace', 'CommandTrace', 'TraceRecorder']
from typing import Tuple, Iterator, Dict, Any, Optional, Type
import attr
import json
import threading
from bugzoo.core.fileline import FileLineSet
from .command import Command
from .state import State
from .connection import Message
class TraceRecorder(o... | {
"repo_name": "squaresLab/Houston",
"path": "houston/trace.py",
"copies": "1",
"size": "3130",
"license": "mit",
"hash": 5170250722805557000,
"line_mean": 29.6862745098,
"line_max": 72,
"alpha_frac": 0.5747603834,
"autogenerated": false,
"ratio": 3.8641975308641974,
"config_test": false,
"has... |
__all__ = ['MLDataset', 'cli_run', 'check_compatibility']
import argparse
import copy
import logging
import numpy as np
import os
import pickle
import random
import sys
import traceback
from warnings import warn, catch_warnings, filterwarnings, simplefilter
from collections.abc import Sequence
from collections import ... | {
"repo_name": "raamana/pyradigm",
"path": "pyradigm/pyradigm.py",
"copies": "1",
"size": "60913",
"license": "mit",
"hash": -1971107769309418000,
"line_mean": 33.2785593697,
"line_max": 110,
"alpha_frac": 0.5637384466,
"autogenerated": false,
"ratio": 4.643113042152603,
"config_test": false,
... |
"""All model factories for tests."""
import factory
from django.core.files import File
from geokey.users.tests.model_factories import UserFactory
from geokey.projects.tests.model_factories import ProjectFactory
from geokey.categories.tests.model_factories import CategoryFactory
from .helpers import file_helpers
fro... | {
"repo_name": "ExCiteS/geokey-dataimports",
"path": "geokey_dataimports/tests/model_factories.py",
"copies": "1",
"size": "1568",
"license": "mit",
"hash": -893420441730745900,
"line_mean": 24.7049180328,
"line_max": 77,
"alpha_frac": 0.7110969388,
"autogenerated": false,
"ratio": 4.1925133689839... |
__all__ = ['Model', 'ModelUnexpectedError']
from copy import copy
import inspect
from utils import errorutils
from utils import timeutils
## ERRORS ---------------------------------------------------------------------
class ModelUnexpectedError(errorutils.UnexpectedError):
pass
## MODEL CLASSES --------------... | {
"repo_name": "colevscode/quickdata",
"path": "quickdata/model.py",
"copies": "1",
"size": "9296",
"license": "mit",
"hash": -253947606458507620,
"line_mean": 28.6996805112,
"line_max": 88,
"alpha_frac": 0.5682013769,
"autogenerated": false,
"ratio": 4.63872255489022,
"config_test": false,
"h... |
"""All models for the extension."""
from django.conf import settings
from django.core import mail
from django.dispatch import receiver
from django.db import models
from django.template.loader import get_template
from django.contrib.gis.db import models as gis
try:
from django.contrib.postgres.fields import JSONFi... | {
"repo_name": "ExCiteS/geokey-airquality",
"path": "geokey_airquality/models.py",
"copies": "1",
"size": "8817",
"license": "mit",
"hash": 1651301922004508400,
"line_mean": 28.5872483221,
"line_max": 79,
"alpha_frac": 0.6087104457,
"autogenerated": false,
"ratio": 4.216642754662841,
"config_tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.