text
stringlengths
0
1.05M
meta
dict
"""An IPython notebook manager with GridFS as the backend.""" from tornado import web import pymongo import gridfs import datetime import json from IPython.html.services.contents.manager import ContentsManager from IPython.utils import tz from IPython import nbformat from IPython.utils.traitlets import Unicode class...
{ "repo_name": "gaumire/ipynbstore-gridfs", "path": "ipynbstore_gridfs/__init__.py", "copies": "2", "size": "12704", "license": "mit", "hash": -2485769811300935000, "line_mean": 32.0833333333, "line_max": 79, "alpha_frac": 0.5479376574, "autogenerated": false, "ratio": 4.334356874786762, "config...
"""an irc bridge relays messages between in-world chat, and an irc channel. notifies of users joining & leaving the scene on irc too. """ import naali import circuits import ircclient from circuits.net.protocols import irc #IRC, PRIVMSG, USER, NICK, JOIN, Nick IRCCHANNEL = "#realxtend-dev" NICKNAME = "tundraserver"...
{ "repo_name": "antont/tundra", "path": "src/Application/PythonScriptModule/pymodules_old/irc/serverrelay.py", "copies": "1", "size": "4373", "license": "apache-2.0", "hash": -3468946457752006000, "line_mean": 34.5528455285, "line_max": 122, "alpha_frac": 0.6139949691, "autogenerated": false, "rat...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id$ import sys import time from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ PostQueuedCompletionStatus, CloseHandle from win32security i...
{ "repo_name": "ArcherSys/ArcherSys", "path": "Lib/site-packages/isapi/threaded_extension.py", "copies": "7", "size": "7213", "license": "mit", "hash": -8243819027181860000, "line_mean": 41.1812865497, "line_max": 85, "alpha_frac": 0.6241508388, "autogenerated": false, "ratio": 4.360943168077388, ...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id: threaded_extension.py,v 1.4 2006/02/17 04:04:24 mhammond Exp $ import sys from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ PostQueue...
{ "repo_name": "windyuuy/opera", "path": "chromium/src/third_party/python_26/Lib/site-packages/isapi/threaded_extension.py", "copies": "17", "size": "7180", "license": "bsd-3-clause", "hash": -3612584868695917600, "line_mean": 41.7380952381, "line_max": 94, "alpha_frac": 0.6378830084, "autogenerated...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id: threaded_extension.py,v 1.5 2008/11/26 08:39:33 mhammond Exp $ import sys from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ PostQueue...
{ "repo_name": "slozier/ironpython2", "path": "Src/StdLib/Lib/site-packages/isapi/threaded_extension.py", "copies": "2", "size": "7180", "license": "apache-2.0", "hash": -1416467206210230300, "line_mean": 41.7380952381, "line_max": 94, "alpha_frac": 0.6378830084, "autogenerated": false, "ratio": 4...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id: threaded_extension.py,v 1.6 2009/03/02 04:41:10 mhammond Exp $ import sys import time from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ ...
{ "repo_name": "igemsoftware/SYSU-Software2013", "path": "project/Python27/Lib/site-packages/isapi/threaded_extension.py", "copies": "2", "size": "7722", "license": "mit", "hash": -1441987978785695700, "line_mean": 41.9, "line_max": 85, "alpha_frac": 0.6323491323, "autogenerated": false, "ratio": ...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id$ import sys import time from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ PostQueuedCompletionStatus, CloseHandle from win32s...
{ "repo_name": "ntuecon/server", "path": "pyenv/Lib/site-packages/isapi/threaded_extension.py", "copies": "1", "size": "7373", "license": "bsd-3-clause", "hash": 1530243079445874200, "line_mean": 41.1169590643, "line_max": 85, "alpha_frac": 0.6089787061, "autogenerated": false, "ratio": 4.41497005...
"""An ISAPI extension base class implemented using a thread-pool.""" # $Id: threaded_extension.py,v 1.4 2006/02/17 04:04:24 mhammond Exp $ import sys from isapi import isapicon, ExtensionError import isapi.simple from win32file import GetQueuedCompletionStatus, CreateIoCompletionPort, \ Po...
{ "repo_name": "Southpaw-TACTIC/Team", "path": "src/python/Lib/site-packages/isapi/threaded_extension.py", "copies": "1", "size": "7348", "license": "epl-1.0", "hash": 6838582442933431000, "line_mean": 41.7380952381, "line_max": 94, "alpha_frac": 0.6232988568, "autogenerated": false, "ratio": 4.34...
# anis_coefficients.py import healpy as hp import numpy as np import scipy.special as ss """ Script to compute the correlation basis-functions for various anisotropic configurations of the GW background energy-density -- Rutger van Haasteren (June 2014) -- Stephen Taylor (modifications, February 2016) """ def re...
{ "repo_name": "jellis18/enterprise", "path": "enterprise/signals/anis_coefficients.py", "copies": "2", "size": "10948", "license": "mit", "hash": -6896222370989619000, "line_mean": 28.912568306, "line_max": 119, "alpha_frac": 0.6084216295, "autogenerated": false, "ratio": 3.038578961976131, "co...
# An island in matrix is a group of linked areas, all having the same value. # This code counts number of islands in a given matrix, with including diagonal # connections. class matrix: # Public class to implement a graph def __init__(self, row: int, col: int, graph: list): self.ROW = row self.CO...
{ "repo_name": "TheAlgorithms/Python", "path": "matrix/count_islands_in_matrix.py", "copies": "1", "size": "1383", "license": "mit", "hash": 7517766221948299000, "line_mean": 37.4166666667, "line_max": 86, "alpha_frac": 0.5372378886, "autogenerated": false, "ratio": 3.4064039408866993, "config_t...
"""An IsoSurface module that allows the user to make contours of input point data. """ # Author: Prabhu Ramachandran <prabhu_r@users.sf.net> # Copyright (c) 2005, Enthought, Inc. # License: BSD Style. # Enthought library imports. from traits.api import Instance, Bool # Local imports from mayavi.core.module import Mo...
{ "repo_name": "dmsurti/mayavi", "path": "mayavi/modules/iso_surface.py", "copies": "5", "size": "5755", "license": "bsd-3-clause", "hash": 4028035085261461500, "line_mean": 35.4240506329, "line_max": 76, "alpha_frac": 0.5259774109, "autogenerated": false, "ratio": 4.648626817447496, "config_tes...
''' Anisotropic to isotropic voxel conversion ''' from __future__ import division, print_function, absolute_import from dipy.align.reslice import reslice from warnings import warn def resample(data, affine, zooms, new_zooms, order=1, mode='constant', cval=0): """Reslice data with new voxel resolution defined by `...
{ "repo_name": "demianw/dipy", "path": "dipy/align/aniso2iso.py", "copies": "9", "size": "2138", "license": "bsd-3-clause", "hash": -4638538385889578000, "line_mean": 32.40625, "line_max": 79, "alpha_frac": 0.6122544434, "autogenerated": false, "ratio": 3.415335463258786, "config_test": false, ...
''' Anisotropic to isotropic voxel conversion ''' import numpy as np from scipy.ndimage import affine_transform def resample(data,affine,zooms,new_zooms,order=1): ''' Resample data from anisotropic to isotropic voxel size Parameters ---------- data : array, shape (I,J,K) or (I,J,K,N) 3d ...
{ "repo_name": "maurozucchelli/dipy", "path": "dipy/align/aniso2iso.py", "copies": "1", "size": "2788", "license": "bsd-3-clause", "hash": 8148681448779873000, "line_mean": 35.6842105263, "line_max": 122, "alpha_frac": 0.6076040172, "autogenerated": false, "ratio": 3.1361079865016874, "config_te...
''' Anisotropic to isotropic voxel conversion ''' import numpy as np from scipy.ndimage import affine_transform def resample(data, affine, zooms, new_zooms, order=1, mode='constant', cval=0): """Resample data from anisotropic to isotropic voxel size Parameters ---------- data : array, shape (I,J,K) ...
{ "repo_name": "samuelstjean/dipy", "path": "dipy/align/aniso2iso.py", "copies": "1", "size": "3299", "license": "bsd-3-clause", "hash": -6086811539444071000, "line_mean": 36.0674157303, "line_max": 79, "alpha_frac": 0.5819945438, "autogenerated": false, "ratio": 3.4045407636738907, "config_test...
""" An item in a Perspective contents list. """ # Enthought library imports. from enthought.traits.api import Enum, Float, HasTraits, Str, implements # Local imports. from i_perspective_item import IPerspectiveItem class PerspectiveItem(HasTraits): """ An item in a Perspective contents list. """ implement...
{ "repo_name": "enthought/traitsgui", "path": "enthought/pyface/workbench/perspective_item.py", "copies": "1", "size": "2040", "license": "bsd-3-clause", "hash": -1413222829714755000, "line_mean": 34.7894736842, "line_max": 79, "alpha_frac": 0.6357843137, "autogenerated": false, "ratio": 3.8345864...
""" An item in a Perspective contents list. """ # Enthought library imports. from traits.api import Enum, Float, HasTraits, provides, Str # Local imports. from i_perspective_item import IPerspectiveItem @provides(IPerspectiveItem) class PerspectiveItem(HasTraits): """ An item in a Perspective contents list. ""...
{ "repo_name": "brett-patterson/pyface", "path": "pyface/workbench/perspective_item.py", "copies": "2", "size": "2021", "license": "bsd-3-clause", "hash": -4456797159542711300, "line_mean": 35.7454545455, "line_max": 79, "alpha_frac": 0.635329045, "autogenerated": false, "ratio": 3.820415879017013...
""" An item in a Perspective contents list. """ # Enthought library imports. from traits.api import Enum, Float, HasTraits, provides, Str # Local imports. from .i_perspective_item import IPerspectiveItem @provides(IPerspectiveItem) class PerspectiveItem(HasTraits): """ An item in a Perspective contents list. "...
{ "repo_name": "geggo/pyface", "path": "pyface/workbench/perspective_item.py", "copies": "3", "size": "2022", "license": "bsd-3-clause", "hash": 5774729741490628000, "line_mean": 35.7636363636, "line_max": 79, "alpha_frac": 0.6350148368, "autogenerated": false, "ratio": 3.8150943396226413, "conf...
# An iterator for stepping through invoice emails via imap. import os try: address = os.environ['WIRECARD_EMAIL'] password = os.environ['WIRECARD_EMAIL_PASSWORD'] except: print "Set your email and password in environment variables WIRECARD_EMAIL and WIRECARD_EMAIL_PASSWORD." print print "For example" print " ex...
{ "repo_name": "Bemmu/wirecard_email_parser", "path": "iterators/iterate_all_wirecard_invoices.py", "copies": "1", "size": "1158", "license": "mit", "hash": -536077513841945100, "line_mean": 26.5714285714, "line_max": 105, "alpha_frac": 0.7029360967, "autogenerated": false, "ratio": 2.924242424242...
# An iterator is an interface like construct that Python supports. # Many things are iterable, as we saw above. # There are some other useful tools in the itertools module. # In general, don't import * on a library. from itertools import * # assuming we still have string from earlier. # Make an iterator that cycles th...
{ "repo_name": "jeremyosborne/python", "path": "iters/itools.py", "copies": "1", "size": "1301", "license": "mit", "hash": -6827493893068646000, "line_mean": 32.358974359, "line_max": 70, "alpha_frac": 0.6894696387, "autogenerated": false, "ratio": 3.5546448087431695, "config_test": false, "ha...
A=[] limit = 10 ** 6 def fillA() : B = [] inp = file('matrix.txt') t = inp.readline() while t!="": # K = t.strip().split() K = t.strip().split(',') B.append(K) t = inp.readline() # print B for i in range(0,len(B)): A.append([]) for b in B: for i in range(0,len(B)): A[i].append(int(b[i])) # prin...
{ "repo_name": "nguyenkims/projecteuler-python", "path": "src/p82.py", "copies": "1", "size": "1603", "license": "mit", "hash": -7209763780339564000, "line_mean": 22.231884058, "line_max": 77, "alpha_frac": 0.5651902682, "autogenerated": false, "ratio": 2.1989026063100137, "config_test": false, ...
"""An LRU bounded set. This module implements a Least Recently Used bounded set. """ class _Node(object): __slots__ = ('value', 'previous', 'next') # For use as a doubly linked list. def __init__(self, value, previous_node=None, next_node=None): self.value = value self.previous = previous...
{ "repo_name": "jamesls/lruset", "path": "lruset.py", "copies": "1", "size": "3394", "license": "bsd-3-clause", "hash": 674682309699385900, "line_mean": 32.2745098039, "line_max": 66, "alpha_frac": 0.5421331762, "autogenerated": false, "ratio": 4.2531328320802, "config_test": false, "has_no_ke...
''' anlyzClassifTree: annotate dot trees produced by weka's graphviz plugin Created on Apr 28, 2019 @version 0.1 191020 @author: rik ''' import math import re import pygraphviz as pgv import pygraphml class DTNode(): def __init__(self,id): self.id = id self.name = '' self.leaf = None # if self.leaf s...
{ "repo_name": "rbelew/rikHak", "path": "anlyzClassifTree.py", "copies": "1", "size": "8355", "license": "apache-2.0", "hash": -2588295067356979000, "line_mean": 24.2447129909, "line_max": 108, "alpha_frac": 0.6488330341, "autogenerated": false, "ratio": 2.562883435582822, "config_test": false, ...
"""An LZW-based string packer. LzwLib stores a set of strings as compressed binary data. It can also generate Pico-8 Lua code capable of accessing a string given a string's ID ( returned by the encoder method). The goal is to make it easy to write Pico-8 games that use a large quantity of English text without storing ...
{ "repo_name": "dansanderson/p8advent", "path": "p8advent/lzwlib.py", "copies": "1", "size": "10643", "license": "mit", "hash": 7100040366224698000, "line_mean": 29.3219373219, "line_max": 79, "alpha_frac": 0.5711735413, "autogenerated": false, "ratio": 3.294026617146394, "config_test": false, ...
""" An (master) roi experiment for the catreward project. """ from roi.base import Roi, Mean class Catreward(Roi): """ A Roi analysis class, customized for the catreward project. """ def __init__(self, TR, roi_name, trials, durations, data): Roi.__init__(self, TR, roi_name, trials, durations, data) ...
{ "repo_name": "parenthetical-e/fmri", "path": "catreward/roi/archive/base.py", "copies": "1", "size": "11286", "license": "bsd-2-clause", "hash": 136113654652819020, "line_mean": 25.6808510638, "line_max": 78, "alpha_frac": 0.5436824384, "autogenerated": false, "ratio": 3.310648283954239, "conf...
# Anna and Brian order n items at a restaurant, but Anna declines to eat any of # the kth item (where 0 <= k < n) due to an allergy. When the check comes, they # decide to split the cost of all the items they shared; however, Brian may # have forgotten that they didn't split the kth item and accidentally charged # Anna...
{ "repo_name": "chinhtle/python_fun", "path": "hacker_rank/algorithms/implementation/bonappetit.py", "copies": "1", "size": "1588", "license": "mit", "hash": -3780393130072891400, "line_mean": 38.7, "line_max": 79, "alpha_frac": 0.6958438287, "autogenerated": false, "ratio": 3.1445544554455447, ...
""" Annabel Droste program to combine the datasets with the countrynames and the coordinates with their observations, consequently the data is put in the correct format """ ## [{"country": "countryname", ## "observation": [{"genus": "genusname", ## "details": [{"species": "speciesname", ## ...
{ "repo_name": "AnnabelD/Project", "path": "code/scriptspython/final_datastructure.py", "copies": "1", "size": "2577", "license": "mit", "hash": 3778327865455890400, "line_mean": 37.4626865672, "line_max": 165, "alpha_frac": 0.65774156, "autogenerated": false, "ratio": 3.4223107569721116, "confi...
# Annabel Droste # removes all the superfluous information from the dataset and creates a json file with the necessary info. import csv import json input_file1 = csv.DictReader(open("C:\Users\Annabel\Documents\GitHub\Project\data\dataset_eu2_1.txt"), delimiter='\t') output_file1 = "C:\Users\Annabel\Documents\GitHub\Pr...
{ "repo_name": "AnnabelD/Project", "path": "code/scriptspython/tsv_json_dump_small.py", "copies": "1", "size": "1598", "license": "mit", "hash": 5443658930186019000, "line_mean": 42.1891891892, "line_max": 154, "alpha_frac": 0.6852315394, "autogenerated": false, "ratio": 3.2612244897959184, "con...
# Annales Xantenses import sqlite3 import urllib import re from urllib.request import urlopen from bs4 import BeautifulSoup from phyllo.phyllo_logger import logger # Case 1: Sections split by numbers (Roman or not) followed by a period, or bracketed. Subsections split by <p> tags def parsecase1(ptags, c, colltitle, ...
{ "repo_name": "oudalab/phyllo", "path": "phyllo/extractors/xanten.py", "copies": "1", "size": "2765", "license": "apache-2.0", "hash": 5289074177057845000, "line_mean": 35.3815789474, "line_max": 116, "alpha_frac": 0.5967450271, "autogenerated": false, "ratio": 3.8998589562764456, "config_test"...
# Anna Mokrushina & RomanDubinin drawer from bokeh.plotting import figure, output_file, show from math import e import numpy as np from lab5 import L, f, real_func from methods import runge_kutta, explicit_euler, recount_euler, get_next_m, progon def main(): n = 30 # int(sys.argv[1]) x_points = np.linspace...
{ "repo_name": "neseleznev/urfu-CompExp", "path": "Lab5/lab5bokeh.py", "copies": "1", "size": "1684", "license": "mit", "hash": 2153719290687806500, "line_mean": 32.68, "line_max": 93, "alpha_frac": 0.5789786223, "autogenerated": false, "ratio": 2.707395498392283, "config_test": false, "has_no...
"""An NNTP client class based on: - RFC 977: Network News Transfer Protocol - RFC 2980: Common NNTP Extensions - RFC 3977: Network News Transfer Protocol (version 2) Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'ha...
{ "repo_name": "batermj/algorithm-challenger", "path": "code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/nntplib.py", "copies": "2", "size": "43262", "license": "apache-2.0", "hash": -1032273884095721, "line_mean": 36.5864465682, "line_max": 96, "alpha_frac": 0.579284...
"""An NNTP client class based on RFC 977: Network News Transfer Protocol. Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print('Group', name, 'has', count, 'articles, range', first, 'to', last) Group comp.lang.python has 51 articles, ran...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.1/Lib/nntplib.py", "copies": "1", "size": "21051", "license": "mit", "hash": -3656283571190994400, "line_mean": 33.1737012987, "line_max": 83, "alpha_frac": 0.5614935157, "autogenerated": false, "ratio": ...
"""An NNTP client class based on RFC 977: Network News Transfer Protocol. Example: >>> from nntplib import NNTP >>> s = NNTP('news') >>> resp, count, first, last, name = s.group('comp.lang.python') >>> print 'Group', name, 'has', count, 'articles, range', first, 'to', last Group comp.lang.python has 51 articl...
{ "repo_name": "nmercier/linux-cross-gcc", "path": "win32/bin/Lib/nntplib.py", "copies": "4", "size": "22106", "license": "bsd-3-clause", "hash": 4298727355898352000, "line_mean": 32.7578616352, "line_max": 80, "alpha_frac": 0.5397629603, "autogenerated": false, "ratio": 4.217092712705075, "conf...
"""anno2 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-base...
{ "repo_name": "grvsmth/anno2-storage", "path": "anno2/urls.py", "copies": "1", "size": "1424", "license": "apache-2.0", "hash": 3955696940711991000, "line_mean": 36.4736842105, "line_max": 79, "alpha_frac": 0.6917134831, "autogenerated": false, "ratio": 3.5073891625615765, "config_test": false,...
"""annodomini: utilities for Anno Domini dates and ranges""" def to_ad(year): """Takes an integer year and returns an AD/BC formatted string. No calendar adjustments of any kind are made. Example: >>> print to_ad(1900) AD 1900 >>> print to_ad(-100) 100 BC """ if y...
{ "repo_name": "isawnyu/pleiades-gane", "path": "annodomini.py", "copies": "1", "size": "1493", "license": "bsd-3-clause", "hash": 63982091504369110, "line_mean": 28.2745098039, "line_max": 76, "alpha_frac": 0.5693235097, "autogenerated": false, "ratio": 3.1901709401709404, "config_test": false,...
"""Annotated computation graph management.""" import logging from collections import OrderedDict from itertools import chain import numpy import theano from picklable_itertools.extras import equizip from theano import Variable from theano.gof import graph from theano.sandbox.rng_mrg import MRG_RandomStreams from thean...
{ "repo_name": "nke001/attention-lvcsr", "path": "libs/blocks/blocks/graph.py", "copies": "1", "size": "24047", "license": "mit", "hash": -1561981364276055300, "line_mean": 37.4137380192, "line_max": 79, "alpha_frac": 0.6063958082, "autogenerated": false, "ratio": 4.416345270890726, "config_test...
"""Annotated variant VCF files with additional information. - GATK variant annotation with snpEff predicted effects. """ import os from bcbio import broad, utils from bcbio.distributed.transaction import file_transaction from bcbio.provenance import do from bcbio.variation import vcfutils def get_gatk_annotations(co...
{ "repo_name": "Cyberbio-Lab/bcbio-nextgen", "path": "bcbio/variation/annotation.py", "copies": "1", "size": "4309", "license": "mit", "hash": 5816760880851995000, "line_mean": 47.9659090909, "line_max": 99, "alpha_frac": 0.591320492, "autogenerated": false, "ratio": 3.6455160744500845, "config_...
"""annotate fusion outputs from STAR and Tophat Supported: oncofuse: http://www.unav.es/genetica/oncofuse.html github: https://github.com/mikessh/oncofuse """ from __future__ import print_function import os import pysam from bcbio.utils import file_exists from bcbio.distributed.transaction import file_transaction...
{ "repo_name": "biocyberman/bcbio-nextgen", "path": "bcbio/rnaseq/oncofuse.py", "copies": "1", "size": "7546", "license": "mit", "hash": -340276373305822660, "line_mean": 41.156424581, "line_max": 117, "alpha_frac": 0.6172806785, "autogenerated": false, "ratio": 3.324229074889868, "config_test":...
'''annotate_rnp - add information to the output from RNPxl ======================================================= :Author: Tom Smith :Release: $Id$ :Date: |today| :Tags: Python RNP Proteomics Purpose ------- This script takes the xlsx output from RNPxl and annotates the table with useful information for downstream ...
{ "repo_name": "TomSmithCGAT/CamProt", "path": "camprot/scripts/annotate_rnp.py", "copies": "1", "size": "18349", "license": "mit", "hash": 6903634075899758000, "line_mean": 39.7755555556, "line_max": 117, "alpha_frac": 0.6380729195, "autogenerated": false, "ratio": 3.433570359281437, "config_te...
# Annotate stacktrace # Use `print-stack 100` in Bochs # Use `x /100gx $esp` in Qemu import re import sys from pathlib import Path from subprocess import Popen, PIPE elf_file = Path(sys.argv[1]).resolve(strict=True) return_addr_names = {} # return_addr -> function_name # Read objdump address to assembly mappings wi...
{ "repo_name": "Dentosal/rust_os", "path": "tools/stack.py", "copies": "1", "size": "1601", "license": "mit", "hash": -1540108680090027500, "line_mean": 25.6833333333, "line_max": 79, "alpha_frac": 0.5596502186, "autogenerated": false, "ratio": 2.9215328467153285, "config_test": false, "has_no...
"""Annotate structural variant calls with associated genes. """ import os import sys from bcbio import utils from bcbio.bam import ref from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import datadict as dd from bcbio.provenance import do from bcbio.structural import regions from bcbio.var...
{ "repo_name": "lbeltrame/bcbio-nextgen", "path": "bcbio/structural/annotate.py", "copies": "4", "size": "4732", "license": "mit", "hash": 5022151497180512000, "line_mean": 45.8514851485, "line_max": 104, "alpha_frac": 0.6181318681, "autogenerated": false, "ratio": 3.203791469194313, "config_tes...
"""Annotate structural variant calls with associated genes. """ import os from bcbio import utils from bcbio.bam import ref from bcbio.distributed.transaction import file_transaction from bcbio.pipeline import datadict as dd from bcbio.provenance import do from bcbio.structural import regions from bcbio.variation impo...
{ "repo_name": "gifford-lab/bcbio-nextgen", "path": "bcbio/structural/annotate.py", "copies": "4", "size": "2474", "license": "mit", "hash": -3524383843515285000, "line_mean": 49.4897959184, "line_max": 107, "alpha_frac": 0.5840743735, "autogenerated": false, "ratio": 3.46013986013986, "config_t...
"""Annotate structural variant calls with associated genes. """ import os from bcbio import utils from bcbio.distributed.transaction import file_transaction from bcbio.provenance import do from bcbio.structural import regions import pybedtools def add_genes(in_file, data, max_distance=10000): """Add gene annotat...
{ "repo_name": "elkingtonmcb/bcbio-nextgen", "path": "bcbio/structural/annotate.py", "copies": "4", "size": "2146", "license": "mit", "hash": 8552635327902342000, "line_mean": 48.9069767442, "line_max": 107, "alpha_frac": 0.5838769804, "autogenerated": false, "ratio": 3.6372881355932205, "config...
"""Annotate the segmented tissue.""" import skimage.draw from jicbioimage.core.transform import transformation from jicbioimage.illustrate import AnnotatedImage from jicbioimage.core.util.color import pretty_color from util import argparse_get_image from segment import segment from transform import rotate def anno...
{ "repo_name": "JIC-CSB/wheat-leaf-segmentation", "path": "scripts/annotate.py", "copies": "1", "size": "1442", "license": "mit", "hash": -2509996194728047000, "line_mean": 25.2181818182, "line_max": 63, "alpha_frac": 0.6671289875, "autogenerated": false, "ratio": 3.9291553133514987, "config_tes...
"""Annotate tweets with stance markers""" from twit.models import Tweet from twit.util import identify_stance, queryset_iterator from twit.tqdm import tqdm from . import DataProcessingCommand class Command(DataProcessingCommand): """Annotate tweets with stance markers""" help = __doc__ def process(self,...
{ "repo_name": "arunchaganty/aeschines", "path": "django/twit/management/commands/annotate_stance.py", "copies": "2", "size": "1168", "license": "mit", "hash": -8944245264627378000, "line_mean": 28.9487179487, "line_max": 87, "alpha_frac": 0.636130137, "autogenerated": false, "ratio": 3.8933333333...
"""Annotate with potential DNA damage artifacts by examining strand/read bias. Uses DKFZBiasFilter to identify strand and PCR bias and converts these into INFO level annotations of low frequency variants: https://github.com/bcbio/bcbio.github.io/blob/master/_posts/2017-01-31-damage-filters.md """ import io import os ...
{ "repo_name": "a113n/bcbio-nextgen", "path": "bcbio/variation/damage.py", "copies": "4", "size": "4334", "license": "mit", "hash": 3467379691616597500, "line_mean": 47.6966292135, "line_max": 116, "alpha_frac": 0.6054453161, "autogenerated": false, "ratio": 3.456140350877193, "config_test": fal...
"""Annotation and rtyping support for the result of os.stat(), os.lstat() and os.fstat(). In RPython like in plain Python the stat result can be indexed like a tuple but also exposes the st_xxx attributes. """ import os import sys from rpython.annotator import model as annmodel from rpython.rtyper.llannotation impor...
{ "repo_name": "jptomo/rpython-lang-scheme", "path": "rpython/rtyper/module/ll_os_stat.py", "copies": "1", "size": "21189", "license": "mit", "hash": 1755075832420172000, "line_mean": 34.7922297297, "line_max": 103, "alpha_frac": 0.5988956534, "autogenerated": false, "ratio": 3.346864634338967, ...
"""Annotation Extension for relational expressions. https://link.springer.com/protocol/10.1007/978-1-4939-3743-1_17 Correlated function associations between genes and GOs containing contextual information. With contextual information identify gene products that perform a role: - only under certain condi...
{ "repo_name": "tanghaibao/goatools", "path": "goatools/anno/extensions/extensions.py", "copies": "1", "size": "1426", "license": "bsd-2-clause", "hash": -4486748324802402300, "line_mean": 30.6888888889, "line_max": 92, "alpha_frac": 0.6486676017, "autogenerated": false, "ratio": 3.675257731958762...
'''Annotation of ir. Handles simple annotations, particularly marking results that are ignored. ''' from __future__ import absolute_import from ..runtime.multimethod import MultiMethod, defmethod from . import ir as I def annotate(ir): annotate_node(ir) annotate_children(ir) annotate_node = MultiMetho...
{ "repo_name": "matthagy/Jamenson", "path": "jamenson/compiler/annotate.py", "copies": "1", "size": "1916", "license": "apache-2.0", "hash": 8430256325796180000, "line_mean": 24.2105263158, "line_max": 97, "alpha_frac": 0.7030271399, "autogenerated": false, "ratio": 3.130718954248366, "config_te...
"""Annotation parsing. For links inside annotations see test_inspect.TypeLinks.""" import sys from typing import List, Tuple, Dict, Any, Union, Optional, Callable, TypeVar, Generic, Iterator class Foo: """A class with properties""" @property def a_property(self) -> List[bool]: """A property with...
{ "repo_name": "mosra/m.css", "path": "documentation/test_python/inspect_annotations/inspect_annotations.py", "copies": "1", "size": "4294", "license": "mit", "hash": -2427413527489259500, "line_mean": 34.4876033058, "line_max": 153, "alpha_frac": 0.688402422, "autogenerated": false, "ratio": 3.72...
"""annotations Revision ID: ddd6ebdd853b Revises: ca69c70ec99b Create Date: 2017-09-13 16:36:39.144489 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'ddd6ebdd853b' down_revision = 'ca69c70ec99b' def upgrade(): # ### commands auto generated by Alembic - p...
{ "repo_name": "alanmcruickshank/superset-dev", "path": "superset/migrations/versions/ddd6ebdd853b_annotations.py", "copies": "1", "size": "2198", "license": "apache-2.0", "hash": -1824422606638072600, "line_mean": 38.25, "line_max": 75, "alpha_frac": 0.6237488626, "autogenerated": false, "ratio":...
"""Announcement configuration. The announcement configuration allows to adapt JSON objects for user data administration, template adaptation, and changing the values to use for substitutions into the templates, and global common settings for your scenario. This file needs adaptation work to match your surrounding env...
{ "repo_name": "OMerkel/Announcement", "path": "announcementconfig.py", "copies": "1", "size": "5548", "license": "mit", "hash": -4968152670703105000, "line_mean": 47.6666666667, "line_max": 149, "alpha_frac": 0.6387887527, "autogenerated": false, "ratio": 3.0416666666666665, "config_test": fals...
"""AnnouncementExternalFeeds API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from .base import BaseCanvasAPI from .base import BaseModel class AnnouncementExternalFeedsAPI(BaseCanvasAPI): """Anno...
{ "repo_name": "tylerclair/py3canvas", "path": "py3canvas/apis/announcement_external_feeds.py", "copies": "1", "size": "8916", "license": "mit", "hash": -6139625142390800000, "line_mean": 36.3054393305, "line_max": 322, "alpha_frac": 0.6166442351, "autogenerated": false, "ratio": 4.050885960926851...
"""AnnouncementExternalFeeds API Version 1.0. This API client was generated using a template. Make sure this code is valid before using it. """ import logging from datetime import date, datetime from base import BaseCanvasAPI from base import BaseModel class AnnouncementExternalFeedsAPI(BaseCanvasAPI): ...
{ "repo_name": "PGower/PyCanvas", "path": "pycanvas/apis/announcement_external_feeds.py", "copies": "1", "size": "9151", "license": "mit", "hash": 4290146231184314400, "line_mean": 36.2887029289, "line_max": 322, "alpha_frac": 0.6005900994, "autogenerated": false, "ratio": 4.151996370235935, "co...
"""Announcement SMTP based library. The announcement SMTP based library with a simplified command line startup. MIT licensed, Copyright (c) 2015 @author Oliver Merkel, Merkel(dot)Oliver(at)web(dot)de. All rights reserved. """ from announcementconfig import * from smtplib import SMTP from string import Template from ...
{ "repo_name": "OMerkel/Announcement", "path": "announcement.py", "copies": "1", "size": "6834", "license": "mit", "hash": 5222722947725391000, "line_mean": 33.6903553299, "line_max": 108, "alpha_frac": 0.655253146, "autogenerated": false, "ratio": 3.5612298071912454, "config_test": false, "ha...
# Announces data from flight and science files as merged # JSON documents to ZeroMQ # # ZMQ JSON Messages: # * set_start: Announces the start time and glider # - Use start time and glider to differentiate sets if necessary # * set_data: Announces a row of data # * set_end: Announces the end of a glider data set # # B...
{ "repo_name": "USF-COT/GSPS", "path": "glider_singleton_publishing_service/processor.py", "copies": "1", "size": "4655", "license": "mit", "hash": -5789365784431935000, "line_mean": 30.6666666667, "line_max": 79, "alpha_frac": 0.5435016112, "autogenerated": false, "ratio": 3.7845528455284554, "...
"""An NTM's memory implementation.""" import torch import torch.nn.functional as F from torch import nn import numpy as np def _convolve(w, s): """Circular convolution implementation.""" assert s.size(0) == 3 t = torch.cat([w[-1:], w, w[:1]]) c = F.conv1d(t.view(1, 1, -1), s.view(1, 1, -1)).view(-1) ...
{ "repo_name": "loudinthecloud/pytorch-ntm", "path": "ntm/memory.py", "copies": "1", "size": "3159", "license": "bsd-3-clause", "hash": 8435238546008898000, "line_mean": 30.7676767677, "line_max": 93, "alpha_frac": 0.5720190779, "autogenerated": false, "ratio": 3.2931937172774868, "config_test":...
#annual summaries import pandas as pd import numpy as np import matplotlib.pyplot as pylab import os import hashlib import re from datetime import datetime as dt from StringIO import StringIO import subprocess def build_wallet(dataframe): ''' creates/updates a wallet column in the dataframe based up...
{ "repo_name": "stuliveshere/Python-Wallets", "path": "wallet/build_report.py", "copies": "1", "size": "15113", "license": "mit", "hash": -5811005723400855000, "line_mean": 27.871541502, "line_max": 134, "alpha_frac": 0.6250909813, "autogenerated": false, "ratio": 2.8275023386342375, "config_tes...
""" An oauthlib.oauth2 request valditator for Vumi Go. """ from oauthlib.oauth2 import RequestValidator, WebApplicationServer class StaticAuthValidator(RequestValidator): """ An oauthlib.oauth2 request validator. A validator built on top of a dictionary of access tokens. :param dict auth_store: ...
{ "repo_name": "praekelt/go-auth", "path": "go_auth/validator.py", "copies": "1", "size": "3068", "license": "bsd-3-clause", "hash": 8799157789749055000, "line_mean": 34.2643678161, "line_max": 79, "alpha_frac": 0.6261408083, "autogenerated": false, "ratio": 4.382857142857143, "config_test": fal...
#An object can be a class, id, element, etc, or the contents such as background-color, width, etc. import Variable import Error # processObject parses .syn file contents into a list. The parameter string is one of the lines from the .syn file global prevString global prevName global elements global element prevSt...
{ "repo_name": "Wezro/Syntax", "path": "src/Objects.py", "copies": "1", "size": "4676", "license": "mit", "hash": -6505067442664966000, "line_mean": 37.6446280992, "line_max": 196, "alpha_frac": 0.6755774166, "autogenerated": false, "ratio": 4.2202166064981945, "config_test": false, "has_no_ke...
"""An object-local variable management scheme.""" # Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # 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/l...
{ "repo_name": "apark263/tensorflow", "path": "tensorflow/python/training/checkpointable/base.py", "copies": "2", "size": "36593", "license": "apache-2.0", "hash": -7203584268363516000, "line_mean": 41.6491841492, "line_max": 112, "alpha_frac": 0.6970458831, "autogenerated": false, "ratio": 4.4625...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # netrc.py copied from python 2.7.3 source code, modified to call # str instead of repr for serializing the netrc file # and pep8 modification import os import shlex __all__ = ["netrc", "NetrcParseError"] ...
{ "repo_name": "wercker/wercker-cli", "path": "werckercli/netrc.py", "copies": "1", "size": "4558", "license": "mit", "hash": -8761095514677393000, "line_mean": 34.3333333333, "line_max": 77, "alpha_frac": 0.4460289601, "autogenerated": false, "ratio": 4.473012757605495, "config_test": false, ...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 from __future__ import with_statement import os, shlex __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __in...
{ "repo_name": "liangazhou/django-rdp", "path": "packages/eclipse/plugins/org.python.pydev.jython_4.4.0.201510052309/Lib/netrc.py", "copies": "11", "size": "4372", "license": "apache-2.0", "hash": -3521046479452475000, "line_mean": 35.7394957983, "line_max": 80, "alpha_frac": 0.4590576395, "autogene...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import io, os, shlex __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __init__(self, msg, filename=None, lin...
{ "repo_name": "rockyzhang/zhangyanhit-python-for-android-mips", "path": "python3-alpha/python3-src/Lib/netrc.py", "copies": "54", "size": "4462", "license": "apache-2.0", "hash": 2974576033136968700, "line_mean": 36.1833333333, "line_max": 80, "alpha_frac": 0.4594352308, "autogenerated": false, "...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __init__(self, msg, filename=None, lineno=...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-3.2/Lib/netrc.py", "copies": "1", "size": "4335", "license": "mit", "hash": 6075586930331784000, "line_mean": 35.7372881356, "line_max": 80, "alpha_frac": 0.4562860438, "autogenerated": false, "ratio": 4.36...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex, stat if os.name == 'posix': import pwd __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" de...
{ "repo_name": "timm/timmnix", "path": "pypy3-v5.5.0-linux64/lib-python/3/netrc.py", "copies": "2", "size": "5747", "license": "mit", "hash": 372927955630068740, "line_mean": 39.1888111888, "line_max": 80, "alpha_frac": 0.4402296851, "autogenerated": false, "ratio": 4.532334384858044, "config_te...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex, stat __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __init__(self, msg, filename=None, l...
{ "repo_name": "batermj/algorithm-challenger", "path": "code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/netrc.py", "copies": "34", "size": "5566", "license": "apache-2.0", "hash": -6009561102566695000, "line_mean": 39.0431654676, "line_max": 80, "alpha_frac": 0.43801...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, stat, shlex if os.name == 'posix': import pwd __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" de...
{ "repo_name": "cloudfoundry/php-buildpack-legacy", "path": "builds/runtimes/python-2.7.6/lib/python2.7/netrc.py", "copies": "71", "size": "5865", "license": "mit", "hash": -7070861124604151000, "line_mean": 39.4482758621, "line_max": 80, "alpha_frac": 0.441943734, "autogenerated": false, "ratio":...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, shlex __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc file.""" def __init__(self, msg, filename=No...
{ "repo_name": "babyliynfg/cross", "path": "tools/project-creator/Python2.6.6/Lib/netrc.py", "copies": "10", "size": "4222", "license": "mit", "hash": 2222925342219004400, "line_mean": 36.036036036, "line_max": 80, "alpha_frac": 0.4445760303, "autogenerated": false, "ratio": 4.4867162592986185, ...
"""An object-oriented interface to .netrc files.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 import os, stat, shlex if os.name == 'posix': import pwd __all__ = ["netrc", "NetrcParseError"] class NetrcParseError(Exception): """Exception raised on syntax errors in the .netrc fil...
{ "repo_name": "Jeff-Tian/mybnb", "path": "Python27/Lib/netrc.py", "copies": "3", "size": "6010", "license": "apache-2.0", "hash": -1610442442750848000, "line_mean": 39.4482758621, "line_max": 80, "alpha_frac": 0.431281198, "autogenerated": false, "ratio": 4.619523443504996, "config_test": false...
# An object oriented model of a circuit. from cvxpy import * import abc class Node(object): """ A node connecting devices. """ def __init__(self): self.voltage = Variable() self.current_flows = [] # The current entering a node equals the current leaving the node. def constraints(self):...
{ "repo_name": "riadnassiffe/Simulator", "path": "src/tools/ecos/cvxpy/examples/advanced/circuits.py", "copies": "12", "size": "3057", "license": "mit", "hash": 8882112684060921000, "line_mean": 29.58, "line_max": 80, "alpha_frac": 0.6391887471, "autogenerated": false, "ratio": 3.6742788461538463,...
"""An object oriented processor to ingest csv, json and excel files.""" # Design considerations # --------------------- # # This processor is a replacement for the `stream_from_path` processor, # whose functional approach became somewhat unreadable and brittle to changes. # This new object oriented approach should imp...
{ "repo_name": "Victordeleon/os-data-importers", "path": "eu-structural-funds/common/processors/ingest_local_file.py", "copies": "1", "size": "11570", "license": "mit", "hash": 8253615151956443000, "line_mean": 30.4402173913, "line_max": 83, "alpha_frac": 0.5866032844, "autogenerated": false, "rat...
"""An object-oriented wrapper around RPi.GPIO""" import RPi.GPIO as GPIO import gpiocrust.edges as edges from gpiocrust.pin_mode import PinMode _edge_to_rpi_edge = { edges.RISING: GPIO.RISING, edges.FALLING: GPIO.FALLING, edges.BOTH: GPIO.BOTH, } _pinmode_to_rpi_mode = { PinMode.BCM: GPIO.BCM, Pi...
{ "repo_name": "zourtney/gpiocrust", "path": "gpiocrust/raspberry_pi.py", "copies": "1", "size": "4103", "license": "mit", "hash": 6270946800015393000, "line_mean": 25.8169934641, "line_max": 99, "alpha_frac": 0.60272971, "autogenerated": false, "ratio": 3.709764918625678, "config_test": false, ...
# An object that wraps the PShape. class Wiggler(object): def __init__(self): # For 2D Perlin noise self.yoff = 0 # Its location self.x = width / 2 self.y = height / 2 # The "original" locations of the vertices make up a circle. # We are using a list to keep ...
{ "repo_name": "mashrin/processing.py", "path": "mode/examples/Topics/Create Shapes/WigglePShape/wiggler.py", "copies": "2", "size": "1665", "license": "apache-2.0", "hash": 5550498217108037000, "line_mean": 31.6470588235, "line_max": 74, "alpha_frac": 0.5261261261, "autogenerated": false, "ratio"...
"""An object to represent arc records http://archive.org/web/researcher/ArcFileFormat.php """ import re from hanzo.warctools.record import ArchiveRecord, ArchiveParser from hanzo.warctools.archive_detect import register_record_type # URL<sp>IP-address<sp>Archive-date<sp>Content-type<sp> #Result-code<sp>Checksum<sp>L...
{ "repo_name": "internetarchive/warctools", "path": "hanzo/warctools/arc.py", "copies": "1", "size": "6499", "license": "mit", "hash": 4692719745122951000, "line_mean": 31.9898477157, "line_max": 95, "alpha_frac": 0.5753192799, "autogenerated": false, "ratio": 4.064415259537211, "config_test": f...
"""An object to represent arc records""" import re from hanzo.warctools.record import ArchiveRecord, ArchiveParser from hanzo.warctools.archive_detect import register_record_type # URL<sp>IP-address<sp>Archive-date<sp>Content-type<sp> #Result-code<sp>Checksum<sp>Location<sp> Offset<sp>Filename<sp> #Archive-length<nl...
{ "repo_name": "alard/warctozip", "path": "hanzo/warctools/arc.py", "copies": "1", "size": "6341", "license": "mit", "hash": -3359917911969275400, "line_mean": 31.6855670103, "line_max": 77, "alpha_frac": 0.563948904, "autogenerated": false, "ratio": 4.298983050847458, "config_test": false, "h...
"""An object to represent warc records, using the abstract record in record.py""" import re import hashlib from hanzo.warctools.record import ArchiveRecord, ArchiveParser from hanzo.warctools.archive_detect import register_record_type import uuid bad_lines = 5 # when to give up looking for the version stamp @Archiv...
{ "repo_name": "internetarchive/warctools", "path": "hanzo/warctools/warc.py", "copies": "1", "size": "11905", "license": "mit", "hash": 4394548616748940300, "line_mean": 31.6164383562, "line_max": 106, "alpha_frac": 0.5495170097, "autogenerated": false, "ratio": 3.8829093281148075, "config_test...
"""An observer keeping track of running average positions of atoms. """ from asap3.Internal.Subject import Subject class RunningAverage: """Calculate running average positions of atoms. Attach this observer to the atoms to make average positions available e.g. for CNA analysis. The filter is called...
{ "repo_name": "auag92/n2dm", "path": "Asap-3.8.4/Python/asap3/analysis/averagepositions.py", "copies": "1", "size": "6218", "license": "mit", "hash": -7141423477147109000, "line_mean": 40.4533333333, "line_max": 95, "alpha_frac": 0.6383081377, "autogenerated": false, "ratio": 4.273539518900344, ...
"""A node, and related classes, for use in expression trees.""" import itertools from collections import deque from tt.definitions import ( MAX_OPERATOR_STR_LEN, OPERATOR_MAPPING, SYMBOLIC_OPERATOR_MAPPING, TT_AND_OP, TT_IMPL_OP, TT_NAND_OP, TT_NOR_OP, TT_NOT_OP, TT_OR_OP, TT_...
{ "repo_name": "welchbj/tt", "path": "tt/trees/tree_node.py", "copies": "1", "size": "41273", "license": "mit", "hash": 1425965594857478700, "line_mean": 35.2361720808, "line_max": 79, "alpha_frac": 0.5726019432, "autogenerated": false, "ratio": 4.4475215517241375, "config_test": false, "has_n...
# >> a = Node.append(None, 2) # >> a = Node.prepend(a, 1) # >> print a # [ 1 2 ] # >> b = Node.generateSequence(5) # >> print b # [ 1 2 3 4 5 ] class Node: def __init__(self, value): if value <= 0: self.value = 0 self.next = None @staticmethod def generateSe...
{ "repo_name": "bourneagain/pythonBytes", "path": "whatsapp_interview1.py", "copies": "1", "size": "1231", "license": "mit", "hash": 2247321914042706200, "line_mean": 18.234375, "line_max": 42, "alpha_frac": 0.4281072299, "autogenerated": false, "ratio": 4.117056856187291, "config_test": false, ...
# anodi from backports import inspect empty = inspect.Signature.empty def returns (annotation): """ Decorator to add ``annotation`` to ``func``'s ``return`` annotation, as though it were a Python 3 ``-> ...`` annotation. >>> from anodi import returns >>> @returns(int) ... def examp...
{ "repo_name": "agoraplex/anodi", "path": "anodi/__init__.py", "copies": "1", "size": "3973", "license": "bsd-3-clause", "hash": 3316148378849363000, "line_mean": 33.850877193, "line_max": 70, "alpha_frac": 0.5766423358, "autogenerated": false, "ratio": 4.545766590389016, "config_test": false, ...
"""An offshore wind farm model @moduleauthor:: Juan P. Murcia <jumu@dtu.dk> """ import numpy as np MATPLOTLIB = True try: import matplotlib.pyplot as plt except Exception as e: MATPLOTLIB = False print("WARNING: Matplotlib isn't installed correctly:", e) from .WindTurbine import WindTurbineDICT from wind...
{ "repo_name": "DTUWindEnergy/FUSED-Wake", "path": "fusedwake/WindFarm.py", "copies": "1", "size": "8900", "license": "mit", "hash": 2069431523932385500, "line_mean": 32.8403041825, "line_max": 142, "alpha_frac": 0.5308988764, "autogenerated": false, "ratio": 3.4711388455538223, "config_test": f...
"""An offshore wind farm model @moduleauthor:: Juan P. Murcia <jumu@dtu.dk> """ import numpy as np try: import scipy as sp from scipy.interpolate import interp1d as interpolator except Exception as e: print(e.message) # from scipy.interpolate import pchipInterpolator as interpolator class WindTurbine(obj...
{ "repo_name": "DTUWindEnergy/FUSED-Wake", "path": "fusedwake/WindTurbine.py", "copies": "1", "size": "7224", "license": "mit", "hash": -5740627513500712000, "line_mean": 29.1, "line_max": 95, "alpha_frac": 0.5150885936, "autogenerated": false, "ratio": 3.4630872483221475, "config_test": false, ...
# An old-skool scrolling game for the BBC microbit. # You are in a spaceship decending to the surface of an unknown a planet. Use the buttons to manoeuvre left and # right to avoid the accumulated space junk that is suspended in orbit around he planet. # Your spaceship is the bright dot on the top line of the display. ...
{ "repo_name": "burrowsa/microbit-projects", "path": "descender.py", "copies": "1", "size": "3293", "license": "bsd-2-clause", "hash": 6301568811550781000, "line_mean": 28.1415929204, "line_max": 111, "alpha_frac": 0.6061342241, "autogenerated": false, "ratio": 3.2189638318670575, "config_test":...
# An old version of OpenAI Gym's multi_discrete.py. (Was getting affected by Gym updates) # (https://github.com/openai/gym/blob/1fb81d4e3fb780ccf77fec731287ba07da35eb84/gym/spaces/multi_discrete.py) import numpy as np import gym from gym.spaces import prng class MultiDiscrete(gym.Space): """ - The multi-disc...
{ "repo_name": "openai/multiagent-particle-envs", "path": "multiagent/multi_discrete.py", "copies": "1", "size": "2344", "license": "mit", "hash": -6337018165133105000, "line_mean": 52.2954545455, "line_max": 122, "alpha_frac": 0.6616894198, "autogenerated": false, "ratio": 3.3014084507042254, "...
# An OLE file format parser import os import struct import logging import datetime PIDSI = {'PIDSI_CODEPAGE':0x01, 'PIDSI_TITLE':0x02, 'PIDSI_SUBJECT':0x03, 'PIDSI_AUTHOR':0x04, 'PIDSI_KEYWORDS':0x05, 'PIDSI_COMMENTS':0x06, 'PIDSI_TEMPLATE':0x07, 'PIDSI_LASTAUTHOR':0x08, 'PIDSI_REVNUMBER':0x09, 'PIDSI_EDITTI...
{ "repo_name": "z3r0zh0u/pyole", "path": "pyole.py", "copies": "1", "size": "60571", "license": "mit", "hash": -3830707903068870700, "line_mean": 51.1265060241, "line_max": 166, "alpha_frac": 0.592247115, "autogenerated": false, "ratio": 3.4854989066635977, "config_test": false, "has_no_keywor...
# An O(long(n)) algorithm that finds an element in a increasingly # sorted array of n integers that has been rotated an unknown number # of times. def _search_rotated(array, left, right, val): if left > right: return None mid = left + ((right - left) // 2) if array[mid] == val: retu...
{ "repo_name": "sookoor/PythonInterviewPrep", "path": "search_rotated.py", "copies": "1", "size": "1479", "license": "mit", "hash": 424233974785261000, "line_mean": 28, "line_max": 68, "alpha_frac": 0.5767410412, "autogenerated": false, "ratio": 3.279379157427938, "config_test": false, "has_no...
"""a non-blocking, non-threaded non-multiprocessing circuits web server""" import time #timestamping images import datetime #showing human readable time on render page import os import rexviewer as r import naali try: import circuits except ImportError: #not running within the viewer, but testing outside it ...
{ "repo_name": "antont/tundra", "path": "src/Application/PythonScriptModule/pymodules_old/webserver/webcontroller.py", "copies": "1", "size": "5782", "license": "apache-2.0", "hash": 2955411507951660000, "line_mean": 29.9197860963, "line_max": 126, "alpha_frac": 0.5921826358, "autogenerated": false,...
_A=None from ._compat import filename_to_ui,get_text_stderr from .utils import echo def _join_param_hints(param_hint): A=param_hint if isinstance(A,(tuple,list)):return ' / '.join((repr(B)for B in A)) return A class ClickException(Exception): exit_code=1 def __init__(B,message):A=message;super().__init__(A);B.mess...
{ "repo_name": "rochacbruno/dynaconf", "path": "dynaconf/vendor/click/exceptions.py", "copies": "1", "size": "3297", "license": "mit", "hash": -259015208080167700, "line_mean": 42.3947368421, "line_max": 149, "alpha_frac": 0.6803154383, "autogenerated": false, "ratio": 2.50531914893617, "config_...
anon = lambda a, c={'key': 555}, e=fff: None anon : source.python : source.python = : keyword.operator.assignment.python, source.python : source.python lambda : meta.lambda-function.python, source.python, storage.type.function....
{ "repo_name": "MagicStack/MagicPython", "path": "test/functions/lambda7.py", "copies": "1", "size": "3115", "license": "mit", "hash": 7420631232700205000, "line_mean": 90.6176470588, "line_max": 171, "alpha_frac": 0.713964687, "autogenerated": false, "ratio": 4.14780292942743, "config_test": fa...
#An online JavaScript program with all function dependencies: http://jsfiddle.net/JPnAF/9/ #print([1,1,1,2,3][0:5]) #This thing is implemented! def getArrayFromFunctionComment(theComment): theComment = theComment[len("requires functions: "):len(theComment)] return theComment.split(", ") #print getArrayFromFunct...
{ "repo_name": "jarble/EngScript", "path": "libraries/functionChecker.py", "copies": "2", "size": "4234", "license": "mit", "hash": 8099253121670752000, "line_mean": 30.362962963, "line_max": 103, "alpha_frac": 0.7522437411, "autogenerated": false, "ratio": 3.4962840627580514, "config_test": fal...
# An online retailer sells two products: widgets and gizmos. Each widget weighs 75 # grams. Each gizmo weighs 112 grams. Write a program that reads the number of # widgets and the number of gizmos in an order from the user. Then your program # should compute and display the total weight of the order. import collection...
{ "repo_name": "devak23/python", "path": "python_workbook/ch01/p08_widgets_and_gizmos.py", "copies": "1", "size": "1421", "license": "mit", "hash": -7046759879465662000, "line_mean": 31.2954545455, "line_max": 85, "alpha_frac": 0.6256157635, "autogenerated": false, "ratio": 3.779255319148936, "c...
# An O(n log n) comparison-based sorting algorithm. # Most implementations produce a stable sort, which means that the # implementation preserves the input order of equal elements # in the sorted output. # Mergesort is a divide and conquer algorithm # Conceptually, a merge sort works as follows: # 1) Divide the unsort...
{ "repo_name": "pepincho/Python101-and-Algo1-Courses", "path": "Algo-1/week1/5-Sorting-Python/merge_sort.py", "copies": "2", "size": "2188", "license": "mit", "hash": 132190013410671970, "line_mean": 30.2285714286, "line_max": 106, "alpha_frac": 0.6043000915, "autogenerated": false, "ratio": 3.743...
# a non-reconfigurable simulation that always goes to overflow from binreconfiguration.simulator.nonreconfigurable import Overflow from binreconfiguration.simulator.repeater import Repeater # the strategy we are going to use (FirstFit consider the bins always in the same # order and select the first with enough room t...
{ "repo_name": "vialette/binreconfiguration", "path": "essai.py", "copies": "2", "size": "6079", "license": "mit", "hash": 2491312953769495600, "line_mean": 39.7986577181, "line_max": 94, "alpha_frac": 0.7226517519, "autogenerated": false, "ratio": 3.657641395908544, "config_test": true, "has_...
''' anonymise the data module. functions: master: selects the type of anonymisation to be performed on the data ''' # import csv import timeit from . import k_anonymity def master(start_dataframe, nums, kmin, save_to_file, anonym_file, logger): ''' perform simple K-anonymity for now. Random generation of...
{ "repo_name": "GeorgeManakanatas/PPDM", "path": "data_anonym_methods/anonymise_the_data.py", "copies": "1", "size": "1793", "license": "mit", "hash": -7723579837792312000, "line_mean": 35.5918367347, "line_max": 82, "alpha_frac": 0.648633575, "autogenerated": false, "ratio": 3.906318082788671, ...
"""Anonymize ip addresses Revision ID: 414d69d7ee76 Revises: 58abc4899824 Create Date: 2020-01-27 20:54:54.304630 """ # revision identifiers, used by Alembic. revision = '414d69d7ee76' down_revision = '58abc4899824' import ipaddress from alembic import op import sqlalchemy as sa import sqlalchemy.sql as sql metad...
{ "repo_name": "go-lab/labmanager", "path": "alembic/versions/414d69d7ee76_anonymize_ip_addresses.py", "copies": "4", "size": "2049", "license": "bsd-2-clause", "hash": -220701855457583200, "line_mean": 30.0454545455, "line_max": 120, "alpha_frac": 0.6583699366, "autogenerated": false, "ratio": 3....
"""Anonymize MBDS messages in HL7 2.5 format NB - MBDS (Minimum Biosurveillance Data Set) messages are mostly scrubbed, this is almost certainly NOT adequate to protect a generic HL7 2.5 message. """ import argparse import hl7 import sys from pheme.anonymize.alter import anon_term from pheme.anonymize.field_map impo...
{ "repo_name": "pbugni/pheme.anonymize", "path": "pheme/anonymize/mbds_hl7.py", "copies": "1", "size": "3312", "license": "bsd-3-clause", "hash": -5713788442162762000, "line_mean": 32.7959183673, "line_max": 78, "alpha_frac": 0.5818236715, "autogenerated": false, "ratio": 3.942857142857143, "con...
# anonymize.py """Read a dicom file (or directory of files), partially "anonymize" it (them), by replacing Person names, patient id, optionally remove curves and private tags, and write result to a new file (directory) This is an example only; use only as a starting point. """ # Carlo Mancini script made starting from:...
{ "repo_name": "carlomt/dicom_tools", "path": "dicom_tools/anonymize.py", "copies": "1", "size": "5068", "license": "mit", "hash": 3369397908102993400, "line_mean": 37.1052631579, "line_max": 94, "alpha_frac": 0.6387134964, "autogenerated": false, "ratio": 3.7596439169139466, "config_test": fals...
"""Anonymize static database data from YAML formatted file """ import argparse import sys import yaml from pheme.anonymize.alter import anon_term from pheme.anonymize.field_map import anon_map from pheme.longitudinal.static_data import SUPPORTED_DAOS from pheme.longitudinal.static_data import obj_repr, obj_loader imp...
{ "repo_name": "pbugni/pheme.anonymize", "path": "pheme/anonymize/db_static_data.py", "copies": "1", "size": "2468", "license": "bsd-3-clause", "hash": -4979112238857900000, "line_mean": 32.3513513514, "line_max": 74, "alpha_frac": 0.6507293355, "autogenerated": false, "ratio": 3.5924308588064044,...
# An OOP approach to representing and manipulating matrices class Matrix: """ Matrix object generated from a 2D array where each element is an array representing a row. Rows can contain type int or float. Common operations and information available. >>> rows = [ ... [1, 2, 3]...
{ "repo_name": "TheAlgorithms/Python", "path": "matrix/matrix_class.py", "copies": "1", "size": "10980", "license": "mit", "hash": 2074273543741627000, "line_mean": 28.6703910615, "line_max": 87, "alpha_frac": 0.4786885246, "autogenerated": false, "ratio": 3.946800862688713, "config_test": false...
##An OO python client for the frame_protocol_firmware.ino firmware. ##Supports four operations: ## setColor-- Sets all LEDS to a single color. ## setColors-- Pass an array of color values to set all LEDs individually. ## setBrightness-- Set the strip's brightness. (Blinkytape supports 0 through 93) ## reset...
{ "repo_name": "Nentuaby/blinkytape-advanced-protocol", "path": "frame_protocol_client/BlinkyTape_3.py", "copies": "1", "size": "4123", "license": "mit", "hash": -1197683900212557800, "line_mean": 37.5327102804, "line_max": 110, "alpha_frac": 0.6228474412, "autogenerated": false, "ratio": 3.532990...