text
stringlengths
0
1.05M
meta
dict
"""A module to provide decorators which change methods""" from six import StringIO def _represent_arguments(*arguments, **keyword_arguments): """Represent the aruments in a form suitable as a key (hashable) And which will be recognisable to user in error messages >>> print(_represent_arguments([1, 2], *...
{ "repo_name": "jalanb/dotsite", "path": "pysyte/decorators.py", "copies": "1", "size": "4433", "license": "mit", "hash": 8335084232060323000, "line_mean": 30.2183098592, "line_max": 113, "alpha_frac": 0.6050078953, "autogenerated": false, "ratio": 4.08195211786372, "config_test": true, "has_n...
"""A module to read input files. """ from dmrg_helpers.core.dmrg_exceptions import DMRGException from dmrg_helpers.core.dmrg_logging import logger from collections import Iterable class InputFileReader(object): """A class to read input file data and extract parameter info. Parameters ---------- wa...
{ "repo_name": "iglpdc/dmrg_helpers", "path": "dmrg_helpers/extract/input_file_reader.py", "copies": "1", "size": "5321", "license": "mit", "hash": -2311839348766401000, "line_mean": 36.4718309859, "line_max": 79, "alpha_frac": 0.5782747604, "autogenerated": false, "ratio": 4.163536776212832, "c...
"""A module to receive data from UR CB2 robots.""" # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # 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 witho...
{ "repo_name": "IRIM-Technology-Transition-Lab/ur_cb2", "path": "ur_cb2/receive/cb2_receive.py", "copies": "1", "size": "19023", "license": "mit", "hash": -9197845572874843000, "line_mean": 43.76, "line_max": 80, "alpha_frac": 0.5854491931, "autogenerated": false, "ratio": 4.433232346772314, "co...
"""A module to retrieve astro data from Hong Kong Observatory""" import json import requests import xmltodict BASE_URL = 'http://pda.weather.gov.hk/' URL_UC = 'locspc/android_data/earthquake/eq_app_uc.xml' URL_EN = 'locspc/android_data/earthquake/eq_app_e.xml' def earthquake(lang='UC'): """A function to retr...
{ "repo_name": "nhho/hko", "path": "hko/earthquake.py", "copies": "2", "size": "1088", "license": "mit", "hash": -4383841921384452000, "line_mean": 27.6315789474, "line_max": 70, "alpha_frac": 0.5643382353, "autogenerated": false, "ratio": 3.651006711409396, "config_test": false, "has_no_keywo...
"""A module to retrieve local weather data from Hong Kong Observatory""" import json import pkg_resources from operator import itemgetter import requests from hko.distance_calculation import distance_calculation with open(pkg_resources.resource_filename(__name__, 'assets/grid_location.json')) as f: GRID = json...
{ "repo_name": "slgphantom/hko", "path": "hko/local_weather.py", "copies": "2", "size": "1650", "license": "mit", "hash": -6523315131180840000, "line_mean": 32.6734693878, "line_max": 87, "alpha_frac": 0.5648484848, "autogenerated": false, "ratio": 4.034229828850855, "config_test": false, "has...
"""A module to retrieve major cities weather forecast data from Hong Kong Observatory""" import requests BASE_URL = 'http://pda.weather.gov.hk/' URL_ASIA_UC = 'locspc/android_data/asis_wwic.xml' URL_ASIA_EN = 'locspc/android_data/asis_wwi.xml' URL_AFRICA_UC = 'locspc/android_data/africa_wwic.xml' URL_AFRICA_EN = 'lo...
{ "repo_name": "slgphantom/hko", "path": "hko/major_city_forecast.py", "copies": "2", "size": "6125", "license": "mit", "hash": 8040165586452866000, "line_mean": 31.579787234, "line_max": 100, "alpha_frac": 0.6011428571, "autogenerated": false, "ratio": 3.2001044932079417, "config_test": false, ...
"""A module to retrieve rainfall nowcast data from Hong Kong Observatory""" import json import pkg_resources import re from operator import itemgetter import requests from hko.distance_calculation import distance_calculation with open(pkg_resources.resource_filename(__name__, 'assets/rainfall_nowcast_mapping.json'...
{ "repo_name": "slgphantom/hko", "path": "hko/rainfall_nowcast.py", "copies": "2", "size": "2226", "license": "mit", "hash": 6319064540505614000, "line_mean": 36.7288135593, "line_max": 100, "alpha_frac": 0.5615453729, "autogenerated": false, "ratio": 3.483568075117371, "config_test": false, "...
"""A module to retrieve serval days weather forecast data from Hong Kong Observatory""" import json import requests BASE_URL = 'http://pda.weather.gov.hk/' URL_UC = 'locspc/android_data/fnd_uc.xml' URL_EN = 'locspc/android_data/fnd_e.xml' def serval_days_weather_forecast(lang='UC'): """A function to retrieve...
{ "repo_name": "slgphantom/hko", "path": "hko/serval_days_weather_forecast.py", "copies": "2", "size": "1042", "license": "mit", "hash": 1325616572586007800, "line_mean": 28.7714285714, "line_max": 93, "alpha_frac": 0.5777351248, "autogenerated": false, "ratio": 3.789090909090909, "config_test":...
"""A module to retrieve serval days weather forecast data from Hong Kong Observatory""" import json import requests BASE_URL = 'http://pda.weather.gov.hk/' URL_UC = 'locspc/android_data/sccw_json_uc.xml' URL_EN = 'locspc/android_data/sccw_json.xml' def south_china_coastal_waters(lang='UC'): """A function to ...
{ "repo_name": "nhho/hko", "path": "hko/south_china_coastal_waters.py", "copies": "2", "size": "1050", "license": "mit", "hash": 8802484427759201000, "line_mean": 29, "line_max": 93, "alpha_frac": 0.58, "autogenerated": false, "ratio": 3.736654804270463, "config_test": false, "has_no_keywords"...
"""A module to retrieve tide data from Hong Kong Observatory""" import re import requests BASE_URL = 'http://pda.weather.gov.hk/' URL = 'locspc/android_data/astro_tide.xml' def tide(): """A function to retrieve tide data from Hong Kong Observatory""" response = {} try: data = requests.get(BA...
{ "repo_name": "nhho/hko", "path": "hko/tide.py", "copies": "2", "size": "1239", "license": "mit", "hash": -2916213204858627000, "line_mean": 28.5, "line_max": 69, "alpha_frac": 0.5407586764, "autogenerated": false, "ratio": 3.1607142857142856, "config_test": false, "has_no_keywords": false, ...
"""A module to retrieve weather warning data from Hong Kong Observatory""" import json import requests BASE_URL = 'http://www.weather.gov.hk/' URL_UC = 'wxinfo/json/warnsumc.xml' URL_EN = 'wxinfo/json/warnsum.xml' def weather_warning(lang='UC'): """A function to retrieve weather warning data from Hong Kong O...
{ "repo_name": "nhho/hko", "path": "hko/weather_warning.py", "copies": "2", "size": "1053", "license": "mit", "hash": -331712446974401000, "line_mean": 28.25, "line_max": 99, "alpha_frac": 0.5546058879, "autogenerated": false, "ratio": 3.8713235294117645, "config_test": false, "has_no_keywords...
"""A module to send commands to a UR robot""" # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # 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 without li...
{ "repo_name": "IRIM-Technology-Transition-Lab/ur_cb2", "path": "ur_cb2/send/cb2_send.py", "copies": "1", "size": "26744", "license": "mit", "hash": -5875094746888046000, "line_mean": 39.5212121212, "line_max": 80, "alpha_frac": 0.5746335627, "autogenerated": false, "ratio": 4.491770238495129, "...
"""A module to test the HKO package""" import unittest from hko import astro, blog, earthquake, local_weather, lunar_date,\ major_city_forecast, marine_forecast, rainfall_nowcast,\ regional_weather, serval_days_weather_forecast,\ south_china_coastal_waters, tide, uv_index, weather_warning HONG_KONG_LAT_...
{ "repo_name": "slgphantom/hko", "path": "tests/test_hko.py", "copies": "2", "size": "2342", "license": "mit", "hash": 2719038991160667600, "line_mean": 37.393442623, "line_max": 86, "alpha_frac": 0.6187019641, "autogenerated": false, "ratio": 3.3457142857142856, "config_test": true, "has_no_k...
"""A module to test whether doctest recognizes some 2.2 features, like static and class methods. >>> print('yup') # 1 yup We include some (random) encoded (utf-8) text in the text surrounding the example. It should be ignored: ЉЊЈЁЂ """ import sys import unittest from test import support if sys.flags.optimize >=...
{ "repo_name": "pleaseproject/python-for-android", "path": "python3-alpha/python3-src/Lib/test/test_doctest2.py", "copies": "194", "size": "2359", "license": "apache-2.0", "hash": 1834643503480457700, "line_mean": 18.0975609756, "line_max": 73, "alpha_frac": 0.4465730098, "autogenerated": false, "...
"""A module to to gather metrics about the bootstrap process.""" from collections import OrderedDict from sqlalchemy import and_ from sqlalchemy.orm import sessionmaker from sqlalchemy import Boolean from sqlalchemy import Column from sqlalchemy import DateTime from sqlalchemy import Integer from sqlalchemy import Str...
{ "repo_name": "Victordeleon/os-data-importers", "path": "eu-structural-funds/common/metrics.py", "copies": "1", "size": "2447", "license": "mit", "hash": 5612009688358135000, "line_mean": 29.2098765432, "line_max": 67, "alpha_frac": 0.6518185533, "autogenerated": false, "ratio": 4.300527240773286...
'''A module to visualize the underwater automata learning the best depth to operate at.''' import turtle from lrp import Linear_Reward_Penalty as LRP from mse import MSE from environment import Environment from pinger import Pinger import numpy as np # import tune_lrp as tune import time # setup window window = tur...
{ "repo_name": "0xSteve/detection_learning", "path": "P_model/Visualizations/UUAV_depth_finding/visualize.py", "copies": "1", "size": "4678", "license": "apache-2.0", "hash": 7208277316041361000, "line_mean": 34.1729323308, "line_max": 78, "alpha_frac": 0.6250534416, "autogenerated": false, "ratio...
"""a module to work with higher level transcript objects """ import sys, random, string, uuid from collections import namedtuple from seqtools.range import GenomicRange, Bed from seqtools.range.multi import ranges_to_coverage, merge_ranges from seqtools.sequence import rc import seqtools.graph from math import sqrt fr...
{ "repo_name": "jason-weirather/py-seq-tools", "path": "seqtools/structure/transcript/__init__.py", "copies": "1", "size": "23478", "license": "apache-2.0", "hash": 2354088479183599600, "line_mean": 32.976845152, "line_max": 254, "alpha_frac": 0.6406423034, "autogenerated": false, "ratio": 3.38934...
"""A module to work with slug generation.""" from mongoengine import * import bson.objectid import unicodedata import re from hashlib import sha1 from random import randint from flask import redirect, abort from functools import wraps class Slug( Document): """Represents a slug in the database. Fields are: ...
{ "repo_name": "manasgarg/slugifier", "path": "slugifier/slug.py", "copies": "1", "size": "5327", "license": "bsd-3-clause", "hash": 1705176678568670700, "line_mean": 35.2380952381, "line_max": 108, "alpha_frac": 0.5860709593, "autogenerated": false, "ratio": 4.201104100946372, "config_test": fa...
"""A module used for downloading files.""" import hashlib import os import shutil import subprocess as sp import tempfile from ftplib import FTP import requests from tqdm import tqdm from .logger import geoparse_logger as logger try: from urlparse import urlparse except ImportError: from urllib.parse import ...
{ "repo_name": "guma44/GEOparse", "path": "src/GEOparse/downloader.py", "copies": "1", "size": "8957", "license": "bsd-3-clause", "hash": 2915908222042761700, "line_mean": 35.1169354839, "line_max": 88, "alpha_frac": 0.4924639946, "autogenerated": false, "ratio": 4.360759493670886, "config_test"...
""" A module which helps prevent eventual consistency issues on the Datastore. """ # SYSTEM import logging # 3RD PARTY from django.conf import settings from django.db import models from django.dispatch import receiver from google.appengine.datastore.datastore_rpc import BaseConnection # CONSISTENCY from .caches impo...
{ "repo_name": "adamalton/djangae-consistency", "path": "consistency/consistency.py", "copies": "1", "size": "6066", "license": "mit", "hash": 37994077708953544, "line_mean": 37.1509433962, "line_max": 103, "alpha_frac": 0.6516650181, "autogenerated": false, "ratio": 3.90096463022508, "config_te...
""" A module which helps prevent eventual consistency issues on the Datastore. """ # SYSTEM import logging # 3RD PARTY from django.conf import settings from google.appengine.datastore.datastore_rpc import BaseConnection # CONSISTENCY from djangae.contrib.consistency.caches import get_caches DEFAULT_CONFIG = { ...
{ "repo_name": "kirberich/djangae", "path": "djangae/contrib/consistency/consistency.py", "copies": "11", "size": "5910", "license": "bsd-3-clause", "hash": 4636768681652226000, "line_mean": 36.4050632911, "line_max": 103, "alpha_frac": 0.6473773266, "autogenerated": false, "ratio": 3.900990099009...
"""A module which implements Classical Least Squares Regression.""" from . import * class CLS(RegressionBase): """Classical Least Squares Regression The classical least squares regression approach is to initially swap the roles of the X and Y variables, perform linear regression and then to invert ...
{ "repo_name": "jhumphry/regressions", "path": "regressions/cls.py", "copies": "1", "size": "3530", "license": "isc", "hash": 1642314509265903000, "line_mean": 41.0238095238, "line_max": 78, "alpha_frac": 0.5779036827, "autogenerated": false, "ratio": 4.479695431472082, "config_test": false, "...
"""A module which implements goodness-of-fit statistics.""" try: import scipy.stats _stats_available = True except ImportError: _stats_available = False from . import * def SS(Y): """Implements the Sum of Squares This function calculates the sum of the squared input data. The input data is ...
{ "repo_name": "jhumphry/regressions", "path": "regressions/fitstats.py", "copies": "1", "size": "9732", "license": "isc", "hash": -3045243730217523700, "line_mean": 34.2608695652, "line_max": 78, "alpha_frac": 0.6427250308, "autogenerated": false, "ratio": 3.962540716612378, "config_test": fals...
"""A module which implements kernel PLS.""" import random from . import * class Kernel_PLS(RegressionBase): """Non-linear Kernel PLS regression using the PLS2 algorithm This class implements kernel PLS regression by transforming the input X data into feature space by applying a kernel function between...
{ "repo_name": "jhumphry/regressions", "path": "regressions/kernel_pls.py", "copies": "1", "size": "7288", "license": "isc", "hash": 4389283295795383000, "line_mean": 37.9732620321, "line_max": 79, "alpha_frac": 0.541712404, "autogenerated": false, "ratio": 4.017640573318633, "config_test": fals...
"""A module which implements Multiple Linear Regression.""" from . import * class MLR(RegressionBase): """Multiple Linear Regression Standard multiple linear regression assumes the relationship between the variables (once the means have been subtracted to center both variables) is Y = A X + E where...
{ "repo_name": "jhumphry/regressions", "path": "regressions/mlr.py", "copies": "1", "size": "2866", "license": "isc", "hash": -147947914718275170, "line_mean": 38.2602739726, "line_max": 78, "alpha_frac": 0.5697836706, "autogenerated": false, "ratio": 4.607717041800643, "config_test": false, "...
"""A module which implements Principal Component Regression.""" import random from . import * class PCR_NIPALS(RegressionBase): """Principal Components Regression using the NIPALS algorithm PCR forms a set of new latent variables from the provided X data samples which describe as much of the variance ...
{ "repo_name": "jhumphry/regressions", "path": "regressions/pcr.py", "copies": "1", "size": "11224", "license": "isc", "hash": -4381909593718865400, "line_mean": 39.3741007194, "line_max": 79, "alpha_frac": 0.5892729865, "autogenerated": false, "ratio": 4.394675019577134, "config_test": false, ...
"""A module which implements the continuous wavelet transform with complex Morlet wavelets. Author : Alexandre Gramfort, alexandre.gramfort@telecom-paristech.fr (2011) License : BSD 3-clause inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ from math import sqrt from copy import deepcopy import numpy a...
{ "repo_name": "jaeilepp/eggie", "path": "mne/time_frequency/tfr.py", "copies": "1", "size": "34411", "license": "bsd-2-clause", "hash": 2611984325535475700, "line_mean": 36.5665938865, "line_max": 79, "alpha_frac": 0.5806282875, "autogenerated": false, "ratio": 3.8482442406620443, "config_test"...
"""A module which implements the Partial Least Squares 1 algorithm.""" from . import * class PLS1(RegressionBase): """Regression using the PLS1 algorithm. The PLS1 algorithm forms a set of new latent variables from the provided X and Y data samples based on criteria that balance the need to explain...
{ "repo_name": "jhumphry/regressions", "path": "regressions/pls1.py", "copies": "1", "size": "8404", "license": "isc", "hash": 4906481718369004000, "line_mean": 40.603960396, "line_max": 78, "alpha_frac": 0.5211803903, "autogenerated": false, "ratio": 4.2877551020408164, "config_test": false, ...
"""A module which implements the Partial Least Squares 2 algorithm.""" import random from . import * class PLS2(RegressionBase): """Regression using the PLS2 algorithm. The PLS2 algorithm forms a set of new latent variables from the provided X and Y data samples based on criteria that balance the need...
{ "repo_name": "jhumphry/regressions", "path": "regressions/pls2.py", "copies": "1", "size": "8579", "license": "isc", "hash": -6395002917140847000, "line_mean": 38.7175925926, "line_max": 77, "alpha_frac": 0.5340948829, "autogenerated": false, "ratio": 4.201273261508325, "config_test": false, ...
"""A module which implements the PLS-SB algorithm.""" from . import * class PLS_SB(RegressionBase): """Regression using the PLS-SB algorithm. The PLS-SB sets up the same mathematical problem as the PLS2 module, but then formulates the convergence criteria as an eigenvalue problem and solves it dire...
{ "repo_name": "jhumphry/regressions", "path": "regressions/pls_sb.py", "copies": "1", "size": "5826", "license": "isc", "hash": -4710234365048718000, "line_mean": 39.4583333333, "line_max": 77, "alpha_frac": 0.5449708205, "autogenerated": false, "ratio": 4.212581344902386, "config_test": false,...
"""A module which implements the time frequency estimation. Authors : Alexandre Gramfort, alexandre.gramfort@telecom-paristech.fr Hari Bharadwaj <hari@nmr.mgh.harvard.edu> License : BSD 3-clause Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ import warnings from math import sq...
{ "repo_name": "effigies/mne-python", "path": "mne/time_frequency/tfr.py", "copies": "1", "size": "45989", "license": "bsd-3-clause", "hash": 6825717880582897000, "line_mean": 36.665028665, "line_max": 80, "alpha_frac": 0.5754202092, "autogenerated": false, "ratio": 3.807666832256996, "config_te...
"""A module which implements the time frequency estimation. Authors : Hari Bharadwaj <hari@nmr.mgh.harvard.edu> License : BSD 3-clause Multitaper wavelet method """ import warnings from math import sqrt import numpy as np from scipy import linalg from scipy.fftpack import fftn, ifftn from .utils import logger, ver...
{ "repo_name": "lennyvarghese/ANLffr", "path": "anlffr/tfr.py", "copies": "2", "size": "13583", "license": "bsd-3-clause", "hash": -142506642312031710, "line_mean": 33.1281407035, "line_max": 77, "alpha_frac": 0.5743944637, "autogenerated": false, "ratio": 3.548328108672936, "config_test": false...
"""A module which implements the time-frequency estimation. Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ # Authors : Alexandre Gramfort <alexandre.gramfort@inria.fr> # Hari Bharadwaj <hari@nmr.mgh.harvard.edu> # Clement Moutard <clement.moutard@polytechnique.org> # ...
{ "repo_name": "Eric89GXL/mne-python", "path": "mne/time_frequency/tfr.py", "copies": "2", "size": "96249", "license": "bsd-3-clause", "hash": 2373064867991649300, "line_mean": 38.6412685338, "line_max": 81, "alpha_frac": 0.5660422446, "autogenerated": false, "ratio": 3.8558208476884865, "config...
"""A module which implements the time-frequency estimation. Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ # Authors : Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Hari Bharadwaj <hari@nmr.mgh.harvard.edu> # Clement Moutard <clement.moutard@polytechniq...
{ "repo_name": "teonlamont/mne-python", "path": "mne/time_frequency/tfr.py", "copies": "2", "size": "95190", "license": "bsd-3-clause", "hash": -3097065776452647000, "line_mean": 39.1137800253, "line_max": 81, "alpha_frac": 0.5697132052, "autogenerated": false, "ratio": 3.9023490345590948, "conf...
"""A module which implements the time frequency estimation. Morlet code inspired by Matlab code from Sheraz Khan & Brainstorm & SPM """ # Authors : Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Hari Bharadwaj <hari@nmr.mgh.harvard.edu> # Clement Moutard <clement.moutard@polytechniq...
{ "repo_name": "wronk/mne-python", "path": "mne/time_frequency/tfr.py", "copies": "1", "size": "57568", "license": "bsd-3-clause", "hash": -12549370799085928, "line_mean": 37.7663299663, "line_max": 79, "alpha_frac": 0.5754585881, "autogenerated": false, "ratio": 3.8831703204047217, "config_test...
# A module which manages a queue of images to render in the background # and a UI for the same import copy import gobject import gtk import gtkfractal import dialog import preferences class QueueEntry: def __init__(self, f, name, w, h): self.f = f self.name = name self.w = w sel...
{ "repo_name": "ericchill/gnofract4d", "path": "fract4dgui/renderqueue.py", "copies": "1", "size": "5931", "license": "bsd-3-clause", "hash": 5025205982180082000, "line_mean": 29.4153846154, "line_max": 84, "alpha_frac": 0.553532288, "autogenerated": false, "ratio": 3.725502512562814, "config_te...
'''A module which models finite state machines/automata.''' from util.weighted_digraph import WeightedDigraph import util.dot class Automaton(WeightedDigraph): '''An automaton where each state can have at most one transition per symbol leading out of a state. The fact that there may be no transition on a ...
{ "repo_name": "bdusell/pycfg", "path": "src/cfg/automaton.py", "copies": "1", "size": "2433", "license": "mit", "hash": 8230293499414346000, "line_mean": 34.2608695652, "line_max": 122, "alpha_frac": 0.6214549938, "autogenerated": false, "ratio": 3.6586466165413536, "config_test": false, "has...
"""A module with a few helpful diagnostic tools. """ import pandas as pd def unique_summary(df, subset): """Given a dataframe and a subset of columns, print a summary of unique rows :param df: The dataframe to inspect. :type df: Dataframe. :subset df: The subset of columns to consider. :type df: ...
{ "repo_name": "dssg/homelessness-public", "path": "diagnostics.py", "copies": "2", "size": "1677", "license": "mit", "hash": -3426860802498867700, "line_mean": 28.9464285714, "line_max": 121, "alpha_frac": 0.6285032797, "autogenerated": false, "ratio": 3.5305263157894737, "config_test": false, ...
""" A module with classes for aggregation. An Aggregator has two methods: process and finish. process(group, val) is called to "add" val to the aggregation of the set of values identified by the value of group. The value in group (which could be any hashable type, also a tuple as ('A', 'B')) thus corresponds to the ...
{ "repo_name": "mattharrison/pygrametl", "path": "pygrametl/aggregators.py", "copies": "2", "size": "4071", "license": "bsd-2-clause", "hash": -2168604232220288800, "line_mean": 31.568, "line_max": 80, "alpha_frac": 0.663718988, "autogenerated": false, "ratio": 4.124620060790273, "config_test": ...
"""A module with classes for aggregation. An Aggregator has two methods: process and finish. process(group, val) is called to "add" val to the aggregation of the set of values identified by the value of group. The value in group (which could be any hashable type, also a tuple as ('A', 'B')) thus correspo...
{ "repo_name": "haleemur/pygrametl-python3", "path": "pygrametl/aggregators.py", "copies": "1", "size": "4092", "license": "bsd-2-clause", "hash": -302535253796786370, "line_mean": 32.5409836066, "line_max": 80, "alpha_frac": 0.6612903226, "autogenerated": false, "ratio": 4.158536585365853, "con...
"""A module with classes for aggregation. An Aggregator has two methods: process and finish. process(group, val) is called to "add" val to the aggregation of the set of values identified by the value of group. The value in group (which could be any hashable type, also a tuple as ('A', 'B')) thus correspond...
{ "repo_name": "jpercent/pygrametl", "path": "pygrametl/aggregators.py", "copies": "2", "size": "4098", "license": "bsd-2-clause", "hash": -8389048834220121000, "line_mean": 30.2824427481, "line_max": 80, "alpha_frac": 0.6603221083, "autogenerated": false, "ratio": 4.168870803662259, "config_tes...
"""A module with commonly- and uncommonly-used feature sets for modeling. To be used primarily with :mod:`pipeline`. """ unused = ['ClientUniqueID', 'ClientID', 'HouseholdID', 'Head Of Household?', 'Relationship to HoH', 'Entry Exit GroupID', 'EntryID', ...
{ "repo_name": "math4youbyusgroupillinois/homelessness-public", "path": "features.py", "copies": "2", "size": "7872", "license": "mit", "hash": -1727505506999504400, "line_mean": 35.785046729, "line_max": 113, "alpha_frac": 0.5067327236, "autogenerated": false, "ratio": 4.057731958762886, "confi...
"""A module with functions to aid generating MCOE.""" import pandas as pd import pudl def heat_rate_by_unit(pudl_out): """ Calculate heat rates (mmBTU/MWh) within separable generation units. Assumes a "good" Boiler Generator Association (bga) i.e. one that only contains boilers and generators which ...
{ "repo_name": "catalyst-cooperative/pudl", "path": "src/pudl/analysis/mcoe.py", "copies": "1", "size": "19422", "license": "mit", "hash": 6970634905143909000, "line_mean": 45.5755395683, "line_max": 79, "alpha_frac": 0.5877355576, "autogenerated": false, "ratio": 3.63639767833739, "config_test"...
"""A module with functions to aid in data analysis using the PUDL database. NOTE: Currently the functions here are for reference only. They are not currently being tested and maintained, but are being retained because we are working on similar things right now, and may update or re-purpose them. """ import logging #...
{ "repo_name": "catalyst-cooperative/pudl", "path": "src/pudl/analysis/analysis.py", "copies": "1", "size": "22581", "license": "mit", "hash": 3605611282541193000, "line_mean": 38.7552816901, "line_max": 79, "alpha_frac": 0.6492626544, "autogenerated": false, "ratio": 3.1979889534060333, "config...
"""A module with platform-specific extended precision `numpy.number` subclasses. The subclasses are defined here (instead of ``__init__.pyi``) such that they can be imported conditionally via the numpy's mypy plugin. """ from typing import TYPE_CHECKING import numpy as np from . import ( _80Bit, _96Bit, ...
{ "repo_name": "madphysicist/numpy", "path": "numpy/typing/_extended_precision.py", "copies": "4", "size": "1243", "license": "bsd-3-clause", "hash": 6822020524361552000, "line_mean": 28.5952380952, "line_max": 80, "alpha_frac": 0.7103781175, "autogenerated": false, "ratio": 3.872274143302181, "...
"""a module with some custom QtWidget Classes""" from PyQt5 import QtWidgets, QtCore, QtGui class MdiArea(QtWidgets.QMdiArea): urlsDropped = QtCore.pyqtSignal(object) def __init__(self, parent=None): super(MdiArea, self).__init__(parent) self.setAcceptDrops(True) def dragEnterEvent(sel...
{ "repo_name": "vincentchevrier/dataquick", "path": "dataquick/qt/classes.py", "copies": "1", "size": "7327", "license": "mit", "hash": -2620503415611130000, "line_mean": 40.395480226, "line_max": 114, "alpha_frac": 0.6833629043, "autogenerated": false, "ratio": 4.02803738317757, "config_test": ...
"""A MongoDB-based caching core for cachier.""" # This file is part of Cachier. # https://github.com/shaypal5/cachier # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Shay Palachy <shaypal5@gmail.com> import sys # to make sure that pymongo was imported import ...
{ "repo_name": "shaypal5/cachier", "path": "cachier/mongo_core.py", "copies": "1", "size": "5054", "license": "mit", "hash": 1581484316163732500, "line_mean": 31.3974358974, "line_max": 114, "alpha_frac": 0.5197863079, "autogenerated": false, "ratio": 4.075806451612904, "config_test": false, "...
# A monkey patch of the base distutils.ccompiler to use parallel builds # Tested on 2.7, looks to be identical to 3.3. from multiprocessing import Pool, cpu_count from distutils.ccompiler import CCompiler import os, sys try: MAX_PROCS = int(os.environ.get('MAX_CONCURRENCY', min(4, cpu_count()))) except NotImpleme...
{ "repo_name": "1upon0/rfid-auth-system", "path": "GUI/printer/Pillow-2.7.0/mp_compile.py", "copies": "1", "size": "2192", "license": "apache-2.0", "hash": 1990287201610395000, "line_mean": 33.7936507937, "line_max": 93, "alpha_frac": 0.6656021898, "autogenerated": false, "ratio": 3.65333333333333...
'''A month, as in 200703; immutable Copyright 2017 Roy E. Lowrance Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or...
{ "repo_name": "rlowrance/python_lib", "path": "applied_data_science/Month.py", "copies": "2", "size": "6644", "license": "apache-2.0", "hash": -2165888901364996900, "line_mean": 31.0966183575, "line_max": 88, "alpha_frac": 0.5782661048, "autogenerated": false, "ratio": 3.5836030204962244, "conf...
""" A monthly/quarterly/yearly report of incomes and expenses """ from reports import Report class Books(Report): description = "A monthly/quarterly/yearly report of incomes and " \ "expenses" special_args = True want_csv = True want_scope = True def get_args(self, parser):...
{ "repo_name": "dploeger/fastbillreport", "path": "reports/books.py", "copies": "1", "size": "7082", "license": "mit", "hash": -2434888576352505300, "line_mean": 26.7725490196, "line_max": 88, "alpha_frac": 0.4286924598, "autogenerated": false, "ratio": 4.307785888077859, "config_test": false, ...
# a more accurate name for this would be timer.py, however the "spec" # calls for the pi based timer to be called piMC.py. Who am I to argue. import RPi.GPIO as GPIO, time, os, random from vhsled_spi import * from vhsled_text import * from vhsled_colour import * from vhsled_rain import * def countdown_timer(pixels, ...
{ "repo_name": "ScienceWorldCA/domelights", "path": "backend/examples/VHSled/piMC.py", "copies": "1", "size": "1730", "license": "apache-2.0", "hash": -782133927828071600, "line_mean": 25.6153846154, "line_max": 132, "alpha_frac": 0.6936416185, "autogenerated": false, "ratio": 2.6132930513595167, ...
# a more accurate name for this would be timer.py, however the "spec" # calls for the pi based timer to be called piMC.py. Who am I to argue. import RPi.GPIO as GPIO, time, os, random import datetime from vhsled_spi import * from vhsled_text import * from vhsled_colour import * GPIO.setmode(GPIO.BCM) width = 42 heig...
{ "repo_name": "ScienceWorldCA/domelights", "path": "backend/examples/VHSled/vhsled_fadeclock2.py", "copies": "1", "size": "2965", "license": "apache-2.0", "hash": -4581882270612198000, "line_mean": 28.9494949495, "line_max": 148, "alpha_frac": 0.6863406408, "autogenerated": false, "ratio": 2.7428...
"""A more complex example of do/undo capability with PyTables. Here, names has been assigned to the marks, and jumps are done between marks. """ import tables # Create an HDF5 file fileh = tables.open_file('tutorial3-2.h5', 'w', title='Undo/Redo demo 2') #'-**-**-**-**-**-**- enable undo/redo log -**-**-...
{ "repo_name": "jennolsen84/PyTables", "path": "examples/tutorial3-2.py", "copies": "13", "size": "2611", "license": "bsd-3-clause", "hash": -8551970128654826000, "line_mean": 32.0506329114, "line_max": 79, "alpha_frac": 0.6966679433, "autogenerated": false, "ratio": 2.8566739606126914, "config_...
"""A more liberal autolinker Inspired by Django's urlize function. Positive examples: >>> import markdown >>> md = markdown.Markdown(extensions=['urlize']) >>> md.convert('http://example.com/') u'<p><a href="http://example.com/">http://example.com/</a></p>' >>> md.convert('go to http://example.com') u'<p>go to <a ...
{ "repo_name": "dreikanter/public-static", "path": "publicstatic/urlize.py", "copies": "1", "size": "2224", "license": "bsd-3-clause", "hash": -6062903256282514000, "line_mean": 26.4567901235, "line_max": 92, "alpha_frac": 0.5737410072, "autogenerated": false, "ratio": 3.0217391304347827, "confi...
"""A more or less complete dictionary like interface for the RISC OS environment.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): return cmp(riscos.getenvdict(), dict) def __...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.2/Lib/plat-riscos/riscosenviron.py", "copies": "1", "size": "1293", "license": "mit", "hash": 2431785879574984700, "line_mean": 29.0697674419, "line_max": 84, "alpha_frac": 0.5715390565, "autogenerated": fa...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(*args, **kwargs): if not args: raise TypeError("descriptor '__init__' of 'UserDict' object " "needs an argument") self = args[0] args = args[1:]...
{ "repo_name": "JVenberg/PokemonGo-Bot-Desktop", "path": "pywin/Lib/UserDict.py", "copies": "62", "size": "7060", "license": "mit", "hash": 5384610070043947000, "line_mean": 32.1455399061, "line_max": 79, "alpha_frac": 0.5402266289, "autogenerated": false, "ratio": 4.278787878787878, "config_tes...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(self, dict=None, **kwargs): self.data = {} if dict is not None: if not hasattr(dict,'keys'): dict = type({})(dict) # make mapping from a sequence self...
{ "repo_name": "ilc/imgserv", "path": "paste/util/UserDict24.py", "copies": "28", "size": "5516", "license": "mit", "hash": 5416914502308920000, "line_mean": 32.0299401198, "line_max": 77, "alpha_frac": 0.5549311095, "autogenerated": false, "ratio": 4.150489089541009, "config_test": false, "ha...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(self, dict=None): self.data = {} if dict is not None: self.update(dict) def __repr__(self): return repr(self.data) def __cmp__(self, dict): if isinstance(dict, UserDict): ...
{ "repo_name": "aptana/Pydev", "path": "bundles/org.python.pydev.jython/Lib/UserDict.py", "copies": "9", "size": "2065", "license": "epl-1.0", "hash": -1940962510418171400, "line_mean": 33.4166666667, "line_max": 77, "alpha_frac": 0.5791767554, "autogenerated": false, "ratio": 3.761384335154827, ...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict(object): def __init__(*args, **kwargs): if not args: raise TypeError("descriptor '__init__' of 'UserDict' object " "needs an argument") self = args[0] args = ...
{ "repo_name": "AlexEKoren/grumpy", "path": "third_party/stdlib/UserDict.py", "copies": "1", "size": "7076", "license": "apache-2.0", "hash": -593545378568599700, "line_mean": 32.220657277, "line_max": 79, "alpha_frac": 0.540700961, "autogenerated": false, "ratio": 4.2781136638452235, "config_te...
"""A more or less complete user-defined wrapper around dictionary objects.""" import riscos class _Environ: def __init__(self, initial = None): pass def __repr__(self): return repr(riscos.getenvdict()) def __cmp__(self, dict): if isinstance(dict, UserDict): return cmp(r...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.1/Lib/plat-riscos/riscosenviron.py", "copies": "1", "size": "1330", "license": "mit", "hash": -4022340047597947000, "line_mean": 28.5555555556, "line_max": 77, "alpha_frac": 0.569924812, "autogenerated": fa...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(self, dict=None, **kwargs): self.data = {} if dict is not None: self.update(dict) if len(kwargs): self.update(kwargs) def __repr__(self): return r...
{ "repo_name": "ppyordanov/HCI_4_Future_Cities", "path": "Server/src/virtualenv/Lib/UserDict.py", "copies": "1", "size": "5950", "license": "mit", "hash": 3342588567657734000, "line_mean": 24.4273504274, "line_max": 79, "alpha_frac": 0.5401680672, "autogenerated": false, "ratio": 4.213881019830028...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(*args, **kwargs): if not args: raise TypeError("descriptor '__init__' of 'UserDict' object " "needs an argument") self = args[0] args = ...
{ "repo_name": "nmercier/linux-cross-gcc", "path": "win32/bin/Lib/UserDict.py", "copies": "5", "size": "7273", "license": "bsd-3-clause", "hash": 1512766881308138000, "line_mean": 32.1455399061, "line_max": 79, "alpha_frac": 0.5244053348, "autogenerated": false, "ratio": 4.394561933534743, "conf...
"""A more or less complete user-defined wrapper around dictionary objects.""" class UserDict: def __init__(self, dict=None, **kwargs): self.data = {} if dict is not None: self.update(dict) if len(kwargs): self.update(kwargs) def __repr__(self): return re...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/play-1.1/python/Lib/UserDict.py", "copies": "2", "size": "5904", "license": "mit", "hash": -8293407340814465000, "line_mean": 31.7371428571, "line_max": 79, "alpha_frac": 0.5337059621, "autogenerated": false, "ratio": 4.27206946454...
"""A more or less complete user-defined wrapper around list objects.""" class UserList: def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlist) == type(self.data): self.data[...
{ "repo_name": "Integral-Technology-Solutions/ConfigNOW", "path": "Lib/UserList.py", "copies": "4", "size": "3526", "license": "mit", "hash": -8729001291695121000, "line_mean": 40.4823529412, "line_max": 71, "alpha_frac": 0.5609756098, "autogenerated": false, "ratio": 3.6164102564102563, "config...
"""A more or less complete user-defined wrapper around list objects.""" #Imported from Python 2.3.5 and added _fixindex class UserList: def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlist...
{ "repo_name": "smkr/pyclipse", "path": "plugins/org.python.pydev.jython/Lib/UserList.py", "copies": "8", "size": "3841", "license": "epl-1.0", "hash": -1162657071319461000, "line_mean": 39.8617021277, "line_max": 71, "alpha_frac": 0.5631346004, "autogenerated": false, "ratio": 3.630434782608696, ...
"""A more or less complete user-defined wrapper around list objects.""" class UserList: def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if type(initlist) == type(self.data): se...
{ "repo_name": "ai-ku/langvis", "path": "dependencies/jython-2.1/Lib/UserList.py", "copies": "4", "size": "3611", "license": "mit", "hash": 3017948976506187000, "line_mean": 40.4823529412, "line_max": 71, "alpha_frac": 0.5477707006, "autogenerated": false, "ratio": 3.7035897435897436, "config_te...
"""A more or less complete user-defined wrapper around list objects.""" import collections class UserList(collections.MutableSequence): def __init__(self, initlist=None): self.data = [] if initlist is not None: # XXX should this accept an arbitrary sequence? if typ...
{ "repo_name": "google/google-ctf", "path": "third_party/edk2/AppPkg/Applications/Python/Python-2.7.2/Lib/UserList.py", "copies": "67", "size": "3732", "license": "apache-2.0", "hash": -1574053064305598500, "line_mean": 40.4090909091, "line_max": 71, "alpha_frac": 0.551982851, "autogenerated": false...
""" A more realistic example of exfoliate being used for web scraping. Exfoliate was designed with web scraping in mind. Although Reddit has an API, the has generous robots.txt permissions and also makes for a good demonstration because there are multiple types of requests that can be made (article lists, links to t...
{ "repo_name": "brianjpetersen/exfoliate", "path": "example.py", "copies": "1", "size": "3722", "license": "mit", "hash": -8225017613256445000, "line_mean": 38.1789473684, "line_max": 103, "alpha_frac": 0.6698011822, "autogenerated": false, "ratio": 3.877083333333333, "config_test": false, "ha...
"""A more realtime netcat""" import sys import select import socket from curtsies import FullscreenWindow, Input, FSArray from curtsies.formatstring import linesplit from curtsies.fmtfuncs import blue, red, green class Connection: def __init__(self, sock): self.sock = sock self.received = [] d...
{ "repo_name": "sebastinas/curtsies", "path": "examples/chat.py", "copies": "1", "size": "2519", "license": "mit", "hash": 1486726391699776000, "line_mean": 35.5072463768, "line_max": 115, "alpha_frac": 0.4847161572, "autogenerated": false, "ratio": 4.004769475357711, "config_test": false, "ha...
# a more robust batch generator that only has one font open at the time. from robofab.interface.all.dialogs import GetFolder from robofab.world import RFont, OpenFont import os def collectSources(root): files = [] ext = ['.vfb'] names = os.listdir(root) for n in names: if os.path.splitext(n)[1] in ext: files...
{ "repo_name": "adrientetar/robofab", "path": "Scripts/RoboFabUtils/RobustBatchGenerate.py", "copies": "1", "size": "1024", "license": "bsd-3-clause", "hash": 3258946483289881600, "line_mean": 19.9183673469, "line_max": 72, "alpha_frac": 0.70703125, "autogenerated": false, "ratio": 2.8523676880222...
"""Amorphous silica surface.""" import mbuild as mb class AmorphousSilicaSurface(mb.Compound): """Amorphous silica surface.""" def __init__(self, surface_roughness=1.0): super(AmorphousSilicaSurface, self).__init__() if surface_roughness == 1.0: mb.load( "amorphou...
{ "repo_name": "mosdef-hub/mbuild", "path": "mbuild/lib/surfaces/amorphous_silica_surface.py", "copies": "2", "size": "1398", "license": "mit", "hash": 8993806892370564, "line_mean": 33.0975609756, "line_max": 74, "alpha_frac": 0.5350500715, "autogenerated": false, "ratio": 3.7580645161290325, "...
""" A mostly direct translation of rdradcp.m to python. 1/3/2013: Updated with DKR changes to rdradcp.m """ import sys,os,re,math from numpy import * import scipy.stats.stats as sp import scipy.stats.morestats as ssm from matplotlib.dates import date2num,num2date import datetime import pdb cfac=180.0/(2**31) def ...
{ "repo_name": "esatel/ADCPy", "path": "adcpy/rdradcp.py", "copies": "1", "size": "62286", "license": "mit", "hash": -3457608987792429600, "line_mean": 41.6616438356, "line_max": 120, "alpha_frac": 0.5280319815, "autogenerated": false, "ratio": 3.5476448140342884, "config_test": false, "has_no...
""" A mostly-general Traits UI editor for viewing things in TVTK scenes. """ # Authors: Robert Kern <robert.kern [at] gmail.com> # Prabhu Ramachandran <prabhu [at] aero.iitb.ac.in> # Copyright (c) 2007, Enthought, Inc. # License: BSD Style. # Major library imports. import os from pyface.qt import QtGui # En...
{ "repo_name": "liulion/mayavi", "path": "tvtk/pyface/ui/qt4/actor_editor.py", "copies": "2", "size": "7376", "license": "bsd-3-clause", "hash": -4320403083915985000, "line_mean": 31.2096069869, "line_max": 80, "alpha_frac": 0.5694143167, "autogenerated": false, "ratio": 4.377448071216617, "conf...
# A motion activated stepper motor # A combination of switches.py and stepper.py import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) # PIR config: # red to 5v, black to GND, yellow to #18 pir_pin = 18 # stepper motor config: see adafruit tutorial # https://learn.adafruit.com/adafruits-raspberry-pi-lesson-10-...
{ "repo_name": "egocks/ducking-octo-batman", "path": "motor_switch.py", "copies": "1", "size": "1474", "license": "mit", "hash": -1716159232744238800, "line_mean": 21.3333333333, "line_max": 76, "alpha_frac": 0.6824966079, "autogenerated": false, "ratio": 2.1644640234948604, "config_test": false...
# amounra 0513 : http://www.aumhaa.com from __future__ import with_statement import Live import time import math from itertools import chain from _Framework.ButtonElement import ButtonElement from _Framework.ButtonMatrixElement import ButtonMatrixElement from _Framework.ChannelStripComponent import ChannelStripCompon...
{ "repo_name": "LividInstruments/LiveRemoteScripts", "path": "Livid_OhmModes_2/OhmModes.py", "copies": "1", "size": "40399", "license": "mit", "hash": 2752653151209535000, "line_mean": 33.0345408593, "line_max": 302, "alpha_frac": 0.6827149187, "autogenerated": false, "ratio": 2.9016016663075486, ...
# amounra 0513 : http://www.aumhaa.com from __future__ import with_statement import Live import time import math from _Framework.ButtonElement import ButtonElement from _Framework.ButtonMatrixElement import ButtonMatrixElement from _Framework.ChannelStripComponent import ChannelStripComponent from _Framework.ClipSlotC...
{ "repo_name": "LividInstruments/LiveRemoteScripts", "path": "Livid_OhmModes/OhmModes.py", "copies": "1", "size": "53531", "license": "mit", "hash": -677872570868913900, "line_mean": 32.6038920276, "line_max": 209, "alpha_frac": 0.675440399, "autogenerated": false, "ratio": 2.8990522610343894, "...
# amounra 0513 : http://www.aumhaa.com from __future__ import with_statement import Live import math """ _Framework files """ from _Framework.ButtonElement import ButtonElement # Class representing a button a the controller from _Framework.ButtonMatrixElement import ButtonMatrixElement # Class representing a 2-dimen...
{ "repo_name": "LividInstruments/LiveRemoteScripts", "path": "Livid_Alias8/Alias.py", "copies": "1", "size": "10355", "license": "mit", "hash": 2902908666247174700, "line_mean": 38.6781609195, "line_max": 182, "alpha_frac": 0.7262192178, "autogenerated": false, "ratio": 3.2748260594560406, "conf...
""" A moveable circle shape. """ from traits.api import Float from enable.primitives.shape import Shape class Circle(Shape): """ A moveable circle shape. """ # The radius of the circle. radius = Float # 'CoordinateBox' interface. #--------------------------- def _bounds_changed(self): ...
{ "repo_name": "tommy-u/enable", "path": "examples/enable/shapes/circle.py", "copies": "1", "size": "1398", "license": "bsd-3-clause", "hash": -8108550993690971000, "line_mean": 26.4117647059, "line_max": 78, "alpha_frac": 0.517167382, "autogenerated": false, "ratio": 3.9491525423728815, "config...
"""AMPAL objects that represent ligands.""" from ampal.base_ampal import Polymer, Monomer class LigandGroup(Polymer): """A container for `Ligand` `Monomers`. Parameters ---------- monomers : Monomer or [Monomer], optional Monomer or list containing Monomer objects to form the Polymer(). ...
{ "repo_name": "woolfson-group/isambard", "path": "isambard/ampal/ligands.py", "copies": "1", "size": "4151", "license": "mit", "hash": -4224857303645106000, "line_mean": 34.7844827586, "line_max": 80, "alpha_frac": 0.6270778126, "autogenerated": false, "ratio": 3.995187680461983, "config_test":...
"""AMPAL objects that represent protein.""" from collections import OrderedDict import warnings import numpy from ampal.base_ampal import Polymer, Monomer, Atom from ampal.ligands import Ligand, LigandGroup from ampal.assembly import Assembly from ampal.pseudo_atoms import Primitive from ampal.analyse_protein import...
{ "repo_name": "woolfson-group/isambard", "path": "isambard/ampal/protein.py", "copies": "1", "size": "56780", "license": "mit", "hash": 7422373198088210000, "line_mean": 40.3245997089, "line_max": 96, "alpha_frac": 0.5544029588, "autogenerated": false, "ratio": 3.697095976038547, "config_test":...
# amplicon.py - classes for fitting amplicon distributions from PSDs # # v 1.1.1 # rev 2017-11-29 (MS: minor bug fix) # Notes: import scipy.optimize import scipy.special import scipy.stats import numpy as np import pandas as pd from . import extra_tools def func_logis(x, inter, asym, xmid, scal): """ Return logi...
{ "repo_name": "parklab/PaSDqc", "path": "PaSDqc/amplicon.py", "copies": "1", "size": "11243", "license": "mit", "hash": -1579974794750582000, "line_mean": 31.1228571429, "line_max": 95, "alpha_frac": 0.5198790358, "autogenerated": false, "ratio": 3.503583670925522, "config_test": false, "has_...
# amplitude[i] variables take the amplitude of the pressure wave or the amplitude of the stress ratio. # period[i] variables take the time-period of the wave # cr = color of the line # pressure[i] = mean pressure # deformation[i] = polar deformation # trailno = the trail values # t = thickness # cnc = concentration # s...
{ "repo_name": "kredy/Liquid-Impact-Forming", "path": "graph.py", "copies": "1", "size": "3768", "license": "bsd-3-clause", "hash": -2316760653832739000, "line_mean": 25.9142857143, "line_max": 102, "alpha_frac": 0.6764861996, "autogenerated": false, "ratio": 2.5685071574642127, "config_test": f...
"""Amplitude Spetrum produced in the paper. DVS Benchmark Datasets for Object Tracking, Action Recognition and Object Recognition Please set your environment variable SPIKEFUEL_DATA: export SPIKEFUEL_DATA=/path/to/data and then place all HDF5 format data in this folder, then create a folder `sf_data` in `/path/to/da...
{ "repo_name": "duguyue100/spikefuel", "path": "scripts/create_amplitude_spectrum.py", "copies": "1", "size": "7021", "license": "mit", "hash": 6963519470952872000, "line_mean": 31.2064220183, "line_max": 79, "alpha_frac": 0.6248397664, "autogenerated": false, "ratio": 2.645440844009043, "config...
"""a.m. / p.m. --- layout: post source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY title: a.m. & p.m. date: 2014-06-10 12:31:19 categories: writing --- """ from proselint.tools import existence_check, memoize @memoize def check_lowercase_periods(text): """Check the text....
{ "repo_name": "amperser/proselint", "path": "proselint/checks/dates_times/am_pm.py", "copies": "1", "size": "1441", "license": "bsd-3-clause", "hash": -1123359962359209200, "line_mean": 24.2807017544, "line_max": 67, "alpha_frac": 0.5801526718, "autogenerated": false, "ratio": 2.703564727954972, ...
"""AMQP benchmarking tool.""" from __future__ import print_function import glob import json import logging import os import random import signal import statistics import sys import time from functools import partial, wraps from operator import itemgetter import asgi_rabbitmq from channels.test.liveserver import ( ...
{ "repo_name": "proofit404/asgi_rabbitmq", "path": "libs/amqpstat.py", "copies": "1", "size": "10679", "license": "bsd-3-clause", "hash": 2627948430723636000, "line_mean": 28.6638888889, "line_max": 79, "alpha_frac": 0.6068920311, "autogenerated": false, "ratio": 3.961053412462908, "config_test"...
"""AMQP Channels.""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> from __future__ import absolute_import, unicode_literals import logging import socket from collections import defaultdict from warnings import warn from vine import ensure_promise from . import spec from .abstract_channel import AbstractCh...
{ "repo_name": "kawamon/hue", "path": "desktop/core/ext-py/amqp-2.4.1/amqp/channel.py", "copies": "2", "size": "73292", "license": "apache-2.0", "hash": -4194805293553487000, "line_mean": 34.0847295357, "line_max": 79, "alpha_frac": 0.5727500955, "autogenerated": false, "ratio": 5.060204363435515,...
"""AMQP Channels """ from __future__ import absolute_import, division, print_function __metaclass__ = type import logging import six if six.PY2: from Queue import Queue else: from queue import Queue from .proto import Method from .concurrency import synchronized_connection from .abstract_channel import Abstr...
{ "repo_name": "veegee/amqpy", "path": "amqpy/channel.py", "copies": "1", "size": "55638", "license": "mit", "hash": -8414000878105390000, "line_mean": 40.2438843588, "line_max": 100, "alpha_frac": 0.644793127, "autogenerated": false, "ratio": 4.472508038585209, "config_test": false, "has_no_k...
"""AMQP Channels """ import logging from queue import Queue from .proto import Method from .concurrency import synchronized from .abstract_channel import AbstractChannel from .exceptions import ChannelError, ConsumerCancelled, error_for_code from .spec import basic_return_t, queue_declare_ok_t, method_t from .serializ...
{ "repo_name": "gst/amqpy", "path": "amqpy/channel.py", "copies": "1", "size": "55345", "license": "mit", "hash": -499626030043929900, "line_mean": 40.2714392245, "line_max": 100, "alpha_frac": 0.6433282139, "autogenerated": false, "ratio": 4.465827483256677, "config_test": false, "has_no_keyw...
"""AMQP Connections.""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> from __future__ import absolute_import, unicode_literals import logging import socket import uuid import warnings from vine import ensure_promise from . import __version__, sasl, spec from .abstract_channel import AbstractChannel from ....
{ "repo_name": "cloudera/hue", "path": "desktop/core/ext-py/amqp-2.4.1/amqp/connection.py", "copies": "3", "size": "26305", "license": "apache-2.0", "hash": -3454930289542322000, "line_mean": 34.1671122995, "line_max": 79, "alpha_frac": 0.600456187, "autogenerated": false, "ratio": 4.4091518605430...
"""AMQP Connections """ from __future__ import absolute_import, division, print_function __metaclass__ = type import logging import socket from array import array import pprint import six from threading import Event, Thread, Lock from . import __version__, compat from .proto import Method from .method_io import Metho...
{ "repo_name": "veegee/amqpy", "path": "amqpy/connection.py", "copies": "1", "size": "27811", "license": "mit", "hash": 6925710791181273000, "line_mean": 38.6733238231, "line_max": 100, "alpha_frac": 0.6214447521, "autogenerated": false, "ratio": 4.6922557786401216, "config_test": false, "has_...
"""AMQP Connections """ import logging import socket from array import array import pprint from threading import Event, Thread import time from . import __version__, compat from .proto import Method from .method_io import MethodReader, MethodWriter from .serialization import AMQPWriter from .abstract_channel import Ab...
{ "repo_name": "gst/amqpy", "path": "amqpy/connection.py", "copies": "1", "size": "27569", "license": "mit", "hash": -8458294714909558000, "line_mean": 38.7821067821, "line_max": 100, "alpha_frac": 0.6209147956, "autogenerated": false, "ratio": 4.7078210382513666, "config_test": false, "has_no...
"""AMQP Messages.""" # Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org> from __future__ import absolute_import, unicode_literals from .serialization import GenericContent # Intended to fix #85: ImportError: cannot import name spec # Encountered on python 2.7.3 # "The submodules often need to refer to each other....
{ "repo_name": "cloudera/hue", "path": "desktop/core/ext-py/amqp-2.4.1/amqp/basic_message.py", "copies": "4", "size": "3342", "license": "apache-2.0", "hash": 7161767717731535000, "line_mean": 27.3220338983, "line_max": 75, "alpha_frac": 0.5969479354, "autogenerated": false, "ratio": 4.46791443850...
"""AMQP Messaging Framework for Python""" from __future__ import absolute_import VERSION = (2, 1, 2) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celeryproject.org" __homepage__ = "http://github.com/ask/kombu/" __docformat__ = "restructuredtext en" ...
{ "repo_name": "kumar303/rockit", "path": "vendor-local/kombu/__init__.py", "copies": "1", "size": "2682", "license": "bsd-3-clause", "hash": -9216560969761368000, "line_mean": 30.5529411765, "line_max": 74, "alpha_frac": 0.571961223, "autogenerated": false, "ratio": 3.6639344262295084, "config_...
"""AMQP Messaging Framework for Python""" VERSION = (1, 1, 2) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celeryproject.org" __homepage__ = "http://github.com/ask/kombu/" __docformat__ = "restructuredtext en" import os import sys if not os.environ.g...
{ "repo_name": "disqus/kombu", "path": "kombu/__init__.py", "copies": "1", "size": "2364", "license": "bsd-3-clause", "hash": 3520256919983443000, "line_mean": 35.9375, "line_max": 78, "alpha_frac": 0.5283417936, "autogenerated": false, "ratio": 3.9797979797979797, "config_test": false, "has_n...
"""AMQP Messaging Framework for Python""" VERSION = (1, 1, 3) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celeryproject.org" __homepage__ = "http://github.com/ask/kombu/" __docformat__ = "restructuredtext en" import os import sys if not os.environ.g...
{ "repo_name": "pantheon-systems/kombu", "path": "kombu/__init__.py", "copies": "1", "size": "2364", "license": "bsd-3-clause", "hash": -5658283977309734000, "line_mean": 35.9375, "line_max": 78, "alpha_frac": 0.5283417936, "autogenerated": false, "ratio": 3.9797979797979797, "config_test": fals...
"""AMQP Messaging Framework for Python""" VERSION = (1, 2, 1) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celeryproject.org" __homepage__ = "http://github.com/ask/kombu/" __docformat__ = "restructuredtext en" import os import sys if not os.environ.g...
{ "repo_name": "WoLpH/kombu", "path": "kombu/__init__.py", "copies": "1", "size": "2364", "license": "bsd-3-clause", "hash": -4680261998531073000, "line_mean": 35.9375, "line_max": 78, "alpha_frac": 0.5283417936, "autogenerated": false, "ratio": 3.9797979797979797, "config_test": false, "has_n...
"""AMQP Messaging Framework for Python""" VERSION = (1, 5, 1) __version__ = ".".join(map(str, VERSION[0:3])) + "".join(VERSION[3:]) __author__ = "Ask Solem" __contact__ = "ask@celeryproject.org" __homepage__ = "http://github.com/ask/kombu/" __docformat__ = "restructuredtext en" # -eof meta- import os import sys # La...
{ "repo_name": "softak/webfaction_demo", "path": "vendor-local/lib/python/kombu/__init__.py", "copies": "1", "size": "2206", "license": "bsd-3-clause", "hash": -7674009037040722000, "line_mean": 31.4411764706, "line_max": 74, "alpha_frac": 0.5679963735, "autogenerated": false, "ratio": 3.652317880...
"""AMQP plugin for Henson.""" import asyncio from collections import namedtuple from enum import IntEnum import json import pkg_resources import os import aioamqp from henson import Extension __all__ = ('AMQP', 'Message') try: _dist = pkg_resources.get_distribution(__package__) if not __file__.startswith(os...
{ "repo_name": "iheartradio/Henson-AMQP", "path": "henson_amqp/__init__.py", "copies": "1", "size": "13233", "license": "apache-2.0", "hash": -5321941687908394000, "line_mean": 33.6413612565, "line_max": 96, "alpha_frac": 0.6056827628, "autogenerated": false, "ratio": 4.218361491871215, "config_...
"""AMQPStorm Base.""" import locale import threading from amqpstorm.compatibility import is_string from amqpstorm.exception import AMQPChannelError AUTH_MECHANISM = 'PLAIN' IDLE_WAIT = 0.01 FRAME_MAX = 131072 MAX_CHANNELS = 1024 LOCALE = locale.getdefaultlocale()[0] or 'en_US' class Stateful(object): """Statef...
{ "repo_name": "fake-name/ReadableWebProxy", "path": "amqpstorm/base.py", "copies": "1", "size": "4408", "license": "bsd-3-clause", "hash": 722451481538029800, "line_mean": 21.2626262626, "line_max": 73, "alpha_frac": 0.5360707804, "autogenerated": false, "ratio": 4.142857142857143, "config_test...
"""AMQPStorm Base.""" import locale import threading from amqpstorm.compatibility import is_string from amqpstorm.exception import AMQPChannelError AUTH_MECHANISM = 'PLAIN' IDLE_WAIT = 0.01 LOCALE = locale.getdefaultlocale()[0] or 'en_US' MAX_FRAME_SIZE = 131072 MAX_CHANNELS = 65535 class Stateful(object): """...
{ "repo_name": "eandersson/amqp-storm", "path": "amqpstorm/base.py", "copies": "1", "size": "4414", "license": "mit", "hash": -9129020114919980000, "line_mean": 21.2929292929, "line_max": 73, "alpha_frac": 0.5364748527, "autogenerated": false, "ratio": 4.140712945590995, "config_test": false, ...