text
stringlengths
0
1.05M
meta
dict
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/Rambatino/Kruskals """ import re from os import path from setuptools import setup, find_packages def get_version(): """ Read version from __init__.py """ version_regex = re.compile( ...
{ "repo_name": "Rambatino/Kruskals", "path": "setup.py", "copies": "1", "size": "1864", "license": "mit", "hash": -7372612379810100000, "line_mean": 30.593220339, "line_max": 98, "alpha_frac": 0.6201716738, "autogenerated": false, "ratio": 3.7354709418837677, "config_test": false, "has_no_keyw...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open import os import re ROOT = os.path.dirname(__file__) VERSION_RE = re.compile...
{ "repo_name": "akkefa/facefinder", "path": "setup.py", "copies": "1", "size": "2784", "license": "apache-2.0", "hash": -3479578462949787600, "line_mean": 26.2941176471, "line_max": 93, "alpha_frac": 0.6447557471, "autogenerated": false, "ratio": 3.988538681948424, "config_test": false, "has_n...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html """ from setuptools import setup, find_packages from codecs import open from os import path from apt_select import __version__ here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encodin...
{ "repo_name": "jblakeman/apt-select", "path": "setup.py", "copies": "1", "size": "1832", "license": "mit", "hash": 1431426399645122800, "line_mean": 34.2307692308, "line_max": 85, "alpha_frac": 0.6239082969, "autogenerated": false, "ratio": 4.211494252873563, "config_test": false, "has_no_key...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the ...
{ "repo_name": "zhexiao/ezhost", "path": "setup.py", "copies": "1", "size": "3909", "license": "mit", "hash": -5762647620827655000, "line_mean": 33.9017857143, "line_max": 94, "alpha_frac": 0.6566896905, "autogenerated": false, "ratio": 4.071875, "config_test": false, "has_no_keywords": false,...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html """ # To use a consistent encoding from codecs import open from os import path # Always prefer setuptools over distutils from setuptools import setup, find_packages here = path.abspath(path.dirname(__file__)) # Get the...
{ "repo_name": "silasary/StackIt", "path": "setup.py", "copies": "1", "size": "1948", "license": "mit", "hash": -862048998801612400, "line_mean": 26.0555555556, "line_max": 66, "alpha_frac": 0.59137577, "autogenerated": false, "ratio": 3.842209072978304, "config_test": false, "has_no_keywords"...
"""A setuptools based setup module. See: https://packaging.python.org/guides/distributing-packages-using-setuptools/ https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages from os import path here = path.abspath(path.dirname(__file__)) # Get th...
{ "repo_name": "mozafari/verdict", "path": "setup.py", "copies": "1", "size": "7619", "license": "apache-2.0", "hash": -868457036131767300, "line_mean": 42.5371428571, "line_max": 105, "alpha_frac": 0.6905105657, "autogenerated": false, "ratio": 4.005783385909569, "config_test": false, "has_no...
"""A setuptools based setup module. See: """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.joi...
{ "repo_name": "AyoubBelhadji/random_matrix_factorization", "path": "setup.py", "copies": "1", "size": "4025", "license": "mit", "hash": 4173264214940590600, "line_mean": 35.2612612613, "line_max": 97, "alpha_frac": 0.6571428571, "autogenerated": false, "ratio": 4.045226130653266, "config_test":...
"""A setuptools based setup module. Template taken from: https://raw.githubusercontent.com/pypa/sampleproject/master/setup.py See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # T...
{ "repo_name": "rchaks/retrieve-and-rank-tuning", "path": "setup.py", "copies": "1", "size": "1840", "license": "apache-2.0", "hash": -6946175415349479000, "line_mean": 33.0740740741, "line_max": 122, "alpha_frac": 0.6777173913, "autogenerated": false, "ratio": 3.923240938166311, "config_test": ...
"""A setuptools based setup module""" from setuptools import setup, find_packages from codecs import open # To use a consistent encoding from os import path current_path = path.abspath(path.dirname(__file__)) # Can read description from README.rst with open(path.join(current_path, 'README.rst'), encoding='utf...
{ "repo_name": "rishimishra/flask_tornado", "path": "setup.py", "copies": "1", "size": "1228", "license": "mit", "hash": 7499243996641499, "line_mean": 27.2857142857, "line_max": 73, "alpha_frac": 0.6840390879, "autogenerated": false, "ratio": 3.449438202247191, "config_test": false, "has_no_k...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup # To use a consistent encoding from codecs import open from os import path here = path.abspat...
{ "repo_name": "google/rfmt", "path": "inst/python/setup.py", "copies": "1", "size": "2578", "license": "apache-2.0", "hash": 2708655374710695400, "line_mean": 30.25, "line_max": 79, "alpha_frac": 0.6505042669, "autogenerated": false, "ratio": 4.191869918699187, "config_test": false, "has_no_k...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils import glob import sys from setuptools import setup, find_packages # To use a consistent encoding if 'py2exe' in sys.arg...
{ "repo_name": "mdovgialo/steam-vr-wheel", "path": "setup.py", "copies": "1", "size": "1714", "license": "mit", "hash": 6484324630380514000, "line_mean": 29.1636363636, "line_max": 113, "alpha_frac": 0.6341890315, "autogenerated": false, "ratio": 3.5267489711934155, "config_test": false, "has_...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path from co...
{ "repo_name": "johnrbnsn/Composite-Plate", "path": "setup.py", "copies": "1", "size": "1795", "license": "mit", "hash": -4926776480214546000, "line_mean": 31.8679245283, "line_max": 81, "alpha_frac": 0.6874651811, "autogenerated": false, "ratio": 4.033707865168539, "config_test": false, "has_...
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distripip install buting.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import p...
{ "repo_name": "OpenIxia/ixnetwork_client_python", "path": "setup.py", "copies": "1", "size": "3141", "license": "mit", "hash": 2014105984992166000, "line_mean": 32.5164835165, "line_max": 85, "alpha_frac": 0.6453358803, "autogenerated": false, "ratio": 4.127463863337714, "config_test": false, ...
"""A setuptools module for the Saliency library. See: https://packaging.python.org/en/latest/distributing.html """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__...
{ "repo_name": "PAIR-code/saliency", "path": "setup.py", "copies": "1", "size": "2996", "license": "apache-2.0", "hash": 3943907822039059500, "line_mean": 32.2888888889, "line_max": 79, "alpha_frac": 0.6578771696, "autogenerated": false, "ratio": 3.9525065963060686, "config_test": false, "has_...
# as example only from sys import exit def gold_room(): print "This room is full of gold. How much do you take?" try: next = int(raw_input("> ")) how_much = int(next) except: dead("Man, learn to type a number.") if how_much < 50: print "Nice you're not greedy,...
{ "repo_name": "reschaap/ex38", "path": "ex35.py", "copies": "1", "size": "1967", "license": "mit", "hash": 2835826968724338700, "line_mean": 23.9113924051, "line_max": 80, "alpha_frac": 0.5561769192, "autogenerated": false, "ratio": 3.5441441441441444, "config_test": false, "has_no_keywords":...
"""ASF Parser Plugin.""" # # Copyright (c) 2007 Michael van Tellingen <michaelvantellingen@gmail.com> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code m...
{ "repo_name": "kevdes/videoparser", "path": "plugins/asf.py", "copies": "1", "size": "27701", "license": "cc0-1.0", "hash": -43504554830759816, "line_mean": 41.5514592934, "line_max": 79, "alpha_frac": 0.51803184, "autogenerated": false, "ratio": 3.9989894615273567, "config_test": false, "has...
# as_GPS.py Asynchronous device driver for GPS devices using a UART. # Sentence parsing based on MicropyGPS by Michael Calvin McCoy # https://github.com/inmcm/micropyGPS # http://www.gpsinformation.org/dale/nmea.htm # Docstrings removed because of question marks over their use in resource # constrained systems e.g. htt...
{ "repo_name": "peterhinch/micropython-async", "path": "v3/as_drivers/as_GPS/as_GPS.py", "copies": "1", "size": "23446", "license": "mit", "hash": -5766145383878785000, "line_mean": 37.1073170732, "line_max": 119, "alpha_frac": 0.5601638505, "autogenerated": false, "ratio": 3.720590569931735, "c...
# Copyright (c) 2018 Peter Hinch # Released under the MIT License (MIT) - see LICENSE file from as_GPS import MDY, DMY, LONG _DIRECTIONS = ('N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW') def compass_direction(gps): # Return cardinal point as string...
{ "repo_name": "peterhinch/micropython-async", "path": "v2/gps/as_GPS_utils.py", "copies": "1", "size": "1724", "license": "mit", "hash": 3116404175285445600, "line_mean": 34.8958333333, "line_max": 77, "alpha_frac": 0.5803830528, "autogenerated": false, "ratio": 3.257088846880907, "config_test"...
# Copyright (c) 2018 Peter Hinch # Released under the MIT License (MIT) - see LICENSE file from .as_GPS import MDY, DMY, LONG _DIRECTIONS = ('N', 'NNE', 'NE', 'ENE', 'E', 'ESE', 'SE', 'SSE', 'S', 'SSW', 'SW', 'WSW', 'W', 'WNW', 'NW', 'NNW') def compass_direction(gps): # Return cardinal point as strin...
{ "repo_name": "peterhinch/micropython-async", "path": "v3/as_drivers/as_GPS/as_GPS_utils.py", "copies": "1", "size": "1725", "license": "mit", "hash": -4883992240282068000, "line_mean": 34.9166666667, "line_max": 77, "alpha_frac": 0.5800464037, "autogenerated": false, "ratio": 3.2528301886792454,...
"""A shallow water model of the ENSO The model comprises of two coupled shallow water systems representing the atmosphere and Pacific ocean. - The ocean component is the mixed-layer: down to the thermocline. - The atmosphere is the lower part of the troposphere. The two layers interact: The ocean heats the atmosphe...
{ "repo_name": "jamesp/shallowwater", "path": "beta_plane/elnino.py", "copies": "1", "size": "8641", "license": "mit", "hash": -6678961622696163000, "line_mean": 34.8589211618, "line_max": 173, "alpha_frac": 0.5998148362, "autogenerated": false, "ratio": 2.6408924205378974, "config_test": false,...
"""A shared variable container for true scalars - for internal use. Why does this file exist? ------------------------- Scalars are used to index subtensors. Subtensor indexing is the heart of what looks like the new scan mechanism. This little file made it possible to catch up to the Python interpreter in benchmar...
{ "repo_name": "nke001/attention-lvcsr", "path": "libs/Theano/theano/scalar/sharedvar.py", "copies": "1", "size": "2022", "license": "mit", "hash": 8739740340580658000, "line_mean": 32.1475409836, "line_max": 80, "alpha_frac": 0.7131552918, "autogenerated": false, "ratio": 3.9724950884086443, "c...
"""A shim module for deprecated imports """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys import types from importlib import import_module from .importstring import import_item class ShimWarning(Warning): """A warning to show when a module has mo...
{ "repo_name": "unnikrishnankgs/va", "path": "venv/lib/python3.5/site-packages/IPython/utils/shimmodule.py", "copies": "5", "size": "2855", "license": "bsd-2-clause", "hash": 4905733094069747000, "line_mean": 29.3723404255, "line_max": 80, "alpha_frac": 0.5698774081, "autogenerated": false, "ratio...
"""A shim module for deprecated imports """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys import types from .importstring import import_item class ShimWarning(Warning): """A warning to show when a module has moved, and a shim is in its place.""" ...
{ "repo_name": "Vvucinic/Wander", "path": "venv_2_7/lib/python2.7/site-packages/IPython/utils/shimmodule.py", "copies": "17", "size": "2809", "license": "artistic-2.0", "hash": -1814751438685607000, "line_mean": 29.5326086957, "line_max": 80, "alpha_frac": 0.5617657529, "autogenerated": false, "ra...
"""ashinamo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/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-ba...
{ "repo_name": "baoyiluo/ashinamo", "path": "ashinamo/ashinamo/urls.py", "copies": "1", "size": "1457", "license": "apache-2.0", "hash": -6267151755006871000, "line_mean": 39.4722222222, "line_max": 135, "alpha_frac": 0.6472203157, "autogenerated": false, "ratio": 3.1400862068965516, "config_tes...
"""ashoka 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-bas...
{ "repo_name": "jarifibrahim/ashoka-dashboard", "path": "ashoka/urls.py", "copies": "1", "size": "1214", "license": "apache-2.0", "hash": -5511663390110626000, "line_mean": 36.9375, "line_max": 79, "alpha_frac": 0.6861614498, "autogenerated": false, "ratio": 3.5497076023391814, "config_test": fa...
"""A shortcut to deploy a fresh modoboa instance.""" import getpass import os from os.path import isfile import shutil import subprocess import sys import dj_database_url import django from django.core import management from django.template import Context, Template from django.utils.encoding import smart_str from m...
{ "repo_name": "modoboa/modoboa", "path": "modoboa/core/commands/deploy.py", "copies": "1", "size": "10466", "license": "isc", "hash": -628932178777296600, "line_mean": 36.1134751773, "line_max": 79, "alpha_frac": 0.5411809669, "autogenerated": false, "ratio": 4.249289484368656, "config_test": f...
# A* Shortest Path Algorithm # http://en.wikipedia.org/wiki/A* # FB - 201012256 from heapq import heappush, heappop # for priority queue import math import time import random class node: xPos = 0 # x position yPos = 0 # y position distance = 0 # total distance already travelled to reach the node priori...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/577519_Astar_Shortest_Path_Algorithm/recipe-577519.py", "copies": "1", "size": "7033", "license": "mit", "hash": -3640535679045650400, "line_mean": 34.5202020202, "line_max": 82, "alpha_frac": 0.5113038533, "autogenerated": false, "ratio":...
# A* Shortest Path Algorithm # http://en.wikipedia.org/wiki/A* # FB - 201012256 from heapq import heappush, heappop # for priority queue import math import time import random class Node: xPos = 0 # x position yPos = 0 # y position distance = 0 # total distance already travelled to reach the node p...
{ "repo_name": "COHRINT/cops_and_robots", "path": "src/cops_and_robots/robo_tools/a_star.py", "copies": "1", "size": "7335", "license": "apache-2.0", "hash": -4221987956669642000, "line_mean": 34.7804878049, "line_max": 82, "alpha_frac": 0.4909338787, "autogenerated": false, "ratio": 3.27163247100...
# A* Shortest Path Algorithm # http://en.wikipedia.org/wiki/A* # FB - 201012256 from heapq import heappush, heappop # for priority queue import math class node: # current position xPos = 0 yPos = 0 # total distance already travelled to reach the node distance = 0 # priority = distance + remaini...
{ "repo_name": "Juanpam/Pakman", "path": "astar.py", "copies": "1", "size": "7938", "license": "mit", "hash": -5091242518222696000, "line_mean": 33.2155172414, "line_max": 82, "alpha_frac": 0.5011337868, "autogenerated": false, "ratio": 3.2176732873935956, "config_test": false, "has_no_keyword...
""" A short package to interogate TAP services """ import requests import time import math try: # python 3 from io import BytesIO from http.client import HTTPConnection from urllib.parse import urlencode except ImportError: # python 2 from StringIO import StringIO as BytesIO from httplib import HT...
{ "repo_name": "mfouesneau/tap", "path": "tap/tap.py", "copies": "1", "size": "18315", "license": "mit", "hash": 6288282972564483000, "line_mean": 30.5232358003, "line_max": 140, "alpha_frac": 0.5163527164, "autogenerated": false, "ratio": 4.226863604892684, "config_test": false, "has_no_keywo...
# A short program to read the IANA registry of DNSSEC algorithm numbers found at # http://www.iana.org/assignments/dns-sec-alg-numbers/dns-sec-alg-numbers-1.csv # and print it out as a JSON object. # # Note that the JSON file has two primary differences from the IANA registry: # 1. Only 3 of the 6 fields are included: ...
{ "repo_name": "danyork/dnssec-algs-json", "path": "dnssec-algs-json.py", "copies": "1", "size": "1164", "license": "mit", "hash": -4174026810075199000, "line_mean": 33.2647058824, "line_max": 104, "alpha_frac": 0.691580756, "autogenerated": false, "ratio": 3.137466307277628, "config_test": fals...
"""A short script for futher filtering the imagenet bounding boxes. The original imagenet bounding boxes csv contains bounding boxes for images that failed during download. This script will filter out those bounding boxes so that the bounding boxes csv is as lightweight as possible. """ import sys import os import ...
{ "repo_name": "dansbecker/motion-tracking", "path": "motion_tracker/data_setup/filter_imagenet_bb.py", "copies": "1", "size": "1730", "license": "mit", "hash": -5096026082900020000, "line_mean": 39.2325581395, "line_max": 81, "alpha_frac": 0.612716763, "autogenerated": false, "ratio": 3.494949494...
# A short script that finds Fastq files and pairs them up if they are paired-end reads. # The script creates a table of the pairs for reference and saves a list of input files in a txt file. # File type (extension) can be easily modified. from __future__ import division, print_function import os import glob import tab...
{ "repo_name": "Joannacodes/RNA-Seq-pipeline-SGE-cluster", "path": "matchmaker.py", "copies": "2", "size": "2817", "license": "apache-2.0", "hash": 1730982253219348200, "line_mean": 32.9518072289, "line_max": 108, "alpha_frac": 0.607028754, "autogenerated": false, "ratio": 3.534504391468005, "co...
""" a short script with data structures from pandas""" from numpy import loadtxt from matplotlib.pyplot import show from pandas import * ysec=loadtxt('../csp_sn/sec_max_files/y_sec_max_csp.dat', dtype='string') jsec=loadtxt('../csp_sn/sec_max_files/j_sec_max_csp.dat', dtype='string') #loads files with two...
{ "repo_name": "ESO-python/ESOPythonTutorials", "path": "notebooks/ptut.py", "copies": "1", "size": "1323", "license": "bsd-3-clause", "hash": -1647644324597226000, "line_mean": 50.92, "line_max": 146, "alpha_frac": 0.6984126984, "autogenerated": false, "ratio": 3.0554272517321017, "config_test"...
# a short sphinx extension to take care of hyperlinking in docstrings # where a syntax of <Class> is employed. import openlego import pkgutil import inspect import re from openlego.docs.config_params import IGNORE_LIST # first, we will need a dict that contains full pathnames to every class. # we construct that here, ...
{ "repo_name": "daniel-de-vries/OpenLEGO", "path": "openlego/docs/_exts/link_class_from_docstring.py", "copies": "1", "size": "3793", "license": "apache-2.0", "hash": -6623402278860964000, "line_mean": 45.256097561, "line_max": 94, "alpha_frac": 0.5138412866, "autogenerated": false, "ratio": 4.625...
"""A shot in MPF.""" from mpf.core.device_monitor import DeviceMonitor from mpf.core.enable_disable_mixin import EnableDisableMixin import mpf.core.delays from mpf.core.events import event_handler from mpf.core.mode import Mode from mpf.core.mode_device import ModeDevice from mpf.core.player import Player @DeviceMo...
{ "repo_name": "missionpinball/mpf", "path": "mpf/devices/shot.py", "copies": "1", "size": "18161", "license": "mit", "hash": 1048277021424748700, "line_mean": 36.8354166667, "line_max": 115, "alpha_frac": 0.590385992, "autogenerated": false, "ratio": 4.308659549228945, "config_test": true, "h...
# ashworth # this is a script for reading the source file (in pwd) for a pdb that is already loaded, and displaying the hbonds and buried unsatisfieds contained in their respective tables (if found). Similar functionality was recently introduced into the Rosetta Pymol Plugin by Ron Jacak, and this script borrows a co...
{ "repo_name": "weitzner/Dotfiles", "path": "pymol_scripts/pdb_hb_uns.py", "copies": "1", "size": "4347", "license": "mit", "hash": 1838870494529420500, "line_mean": 34.0564516129, "line_max": 447, "alpha_frac": 0.6227283184, "autogenerated": false, "ratio": 2.660342717258262, "config_test": fal...
# ashworth # useful selection groups for protein-DNA interfaces from pymol import cmd,util # shortcut command for pymol's "color by chains (e. c)" def color_by_chains(): for obj in cmd.get_names('objects'): util.color_chains('%s and e. c' %obj) cmd.extend('cbce',color_by_chains) #class DNA_selections: # def __ini...
{ "repo_name": "weitzner/Dotfiles", "path": "pymol_scripts/DNAselections.py", "copies": "1", "size": "1773", "license": "mit", "hash": -9001088743482275000, "line_mean": 38.4, "line_max": 183, "alpha_frac": 0.6520022561, "autogenerated": false, "ratio": 2.1915945611866503, "config_test": false, ...
# The MIT License (MIT) # # Copyright (c) 2018-2020 Peter Hinch # # 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 limitation the rights # to use, copy,...
{ "repo_name": "peterhinch/micropython-async", "path": "v3/as_drivers/i2c/asi2c_i.py", "copies": "1", "size": "5556", "license": "mit", "hash": 3788877957544356000, "line_mean": 38.9712230216, "line_max": 79, "alpha_frac": 0.601511879, "autogenerated": false, "ratio": 3.716387959866221, "config_...
# The MIT License (MIT) # # Copyright (c) 2018 Peter Hinch # # 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 limitation the rights # to use, copy, modi...
{ "repo_name": "peterhinch/micropython-async", "path": "v2/i2c/asi2c_i.py", "copies": "1", "size": "5636", "license": "mit", "hash": 3349796380270936000, "line_mean": 38.6901408451, "line_max": 79, "alpha_frac": 0.5963449255, "autogenerated": false, "ratio": 3.7275132275132274, "config_test": fa...
# The MIT License (MIT) # # Copyright (c) 2018-2020 Peter Hinch # # 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 limitation the rights # to use, copy,...
{ "repo_name": "peterhinch/micropython-async", "path": "v3/as_drivers/i2c/asi2c.py", "copies": "1", "size": "7094", "license": "mit", "hash": 254055653663777920, "line_mean": 33.9359605911, "line_max": 81, "alpha_frac": 0.6061759729, "autogenerated": false, "ratio": 3.5230998509687033, "config_t...
# The MIT License (MIT) # # Copyright (c) 2018 Peter Hinch # # 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 limitation the rights # to use, copy, modi...
{ "repo_name": "peterhinch/micropython-async", "path": "v2/i2c/asi2c.py", "copies": "1", "size": "7180", "license": "mit", "hash": 5932878666760429000, "line_mean": 33.8446601942, "line_max": 81, "alpha_frac": 0.5977988298, "autogenerated": false, "ratio": 3.535960591133005, "config_test": false...
# Asia Bayes Net # Contact: Jacob Schreiber # jmschr@cs.washington.edu ''' The Asia Bayesian Network. See a description here: http://www.norsys.com/tutorials/netica/secA/tut_A1.htm ''' from pomegranate import * # Create the distributions asia = DiscreteDistribution({ 'True' : 0.5, 'False' : 0.5 }) tubercu...
{ "repo_name": "Geoion/pomegranate", "path": "examples/bayesnet_asia.py", "copies": "1", "size": "3156", "license": "mit", "hash": 7049957044282259000, "line_mean": 38.4625, "line_max": 110, "alpha_frac": 0.6422686946, "autogenerated": false, "ratio": 2.5805396565821748, "config_test": false, ...
""" ASI Data Timeseries """ import datetime from io import BytesIO import psycopg2.extras import pytz import numpy as np import matplotlib.dates as mdates from paste.request import parse_formvars from pyiem.plot.use_agg import plt from pyiem.network import Table as NetworkTable from pyiem.util import get_dbconn def ...
{ "repo_name": "akrherz/iem", "path": "htdocs/other/asi_plot.py", "copies": "1", "size": "4051", "license": "mit", "hash": -6515078913749957000, "line_mean": 27.5281690141, "line_max": 78, "alpha_frac": 0.5339422365, "autogenerated": false, "ratio": 3.1922773837667453, "config_test": false, "h...
# A signal group. class SignalGroup(object): """A CAN signal group. Signal groups are used to define a group of signals within a message, e.g. to define that the signals of a group have to be updated in common. """ def __init__(self, name, repetitions=1, ...
{ "repo_name": "eerimoq/cantools", "path": "cantools/database/can/signal_group.py", "copies": "1", "size": "1336", "license": "mit", "hash": 6916304265494551000, "line_mean": 22.0344827586, "line_max": 70, "alpha_frac": 0.5254491018, "autogenerated": false, "ratio": 4.655052264808362, "config_te...
""" A signal/slot implementation File: signal.py Author: Thiago Marcos P. Santos Author: Christopher S. Case Author: David H. Bronke Created: August 28, 2008 Updated: December 12, 2011 License: MIT """ from __future__ import print_function import inspect from weakref import WeakSet, WeakKeyDictionary class Si...
{ "repo_name": "ActiveState/code", "path": "recipes/Python/577980_Improved_SignalsSlots/recipe-577980.py", "copies": "1", "size": "2532", "license": "mit", "hash": 4002879538707116000, "line_mean": 24.32, "line_max": 66, "alpha_frac": 0.5683254344, "autogenerated": false, "ratio": 3.98113207547169...
"""A silly command line XBMC client. Usage: shucks [--host=HOST] [--port=PORT] Options: -H --host=HOST Address of the XBMC server to connect with. -P --port=PORT Web server port on server [default: 8080]. --version Show version. -h --help Show this screen. """ VERSION...
{ "repo_name": "mikewadsten/shucks", "path": "shucks/__init__.py", "copies": "1", "size": "10502", "license": "mit", "hash": 7107800028148468000, "line_mean": 29.0057142857, "line_max": 78, "alpha_frac": 0.538564083, "autogenerated": false, "ratio": 3.7480371163454675, "config_test": false, "h...
"""A simple actor component. """ # 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, Enum from tvtk.api import tvtk from traits.api import DelegatesTo from tvtk.common import is_old_pipeli...
{ "repo_name": "liulion/mayavi", "path": "mayavi/components/actor.py", "copies": "3", "size": "9254", "license": "bsd-3-clause", "hash": 5900930106391347000, "line_mean": 34.8682170543, "line_max": 78, "alpha_frac": 0.5420358764, "autogenerated": false, "ratio": 4.394112060778728, "config_test":...
# A simple adjacency matrix graph data structure from difflib import SequenceMatcher as stringMatcher class simpleTagGraph: nodes = {} weights = [] tagList = [] # Initialize the weights array and automatically generate and store the sequenceMatcher similarity as weights def __init__(self, tagList):...
{ "repo_name": "izconcept/trelloTagSync", "path": "src/graph.py", "copies": "1", "size": "1220", "license": "mit", "hash": 289261703443435140, "line_mean": 37.15625, "line_max": 113, "alpha_frac": 0.6032786885, "autogenerated": false, "ratio": 3.91025641025641, "config_test": false, "has_no_ke...
# A "simple" adventure game. class Player(object): def __init__(self, name, place): """Create a player object.""" self.name = name self.place = place self.backpack = [] def look(self): self.place.look() def go_to(self, location): """Go to a location if it's...
{ "repo_name": "tavaresdong/courses-notes", "path": "ucb_cs61A/lab/lab06/classes.py", "copies": "3", "size": "10101", "license": "mit", "hash": 4445780013963992000, "line_mean": 33.2406779661, "line_max": 106, "alpha_frac": 0.5295515296, "autogenerated": false, "ratio": 3.730059084194978, "confi...
# A simple (and dirty) script to generate # a java class from a shared program. # This helps is statically resolving shader programs # using LWJGL3. import os.path import sys def jstringify(content): '''Return a java string from a "normal" string ''' jstr = "\"" for ch in content: if ch == '"':...
{ "repo_name": "fredokun/yaw", "path": "src/java/yaw/engine/shader/shader_classify.py", "copies": "1", "size": "1619", "license": "mit", "hash": -2605028189028590600, "line_mean": 22.4637681159, "line_max": 71, "alpha_frac": 0.6034589253, "autogenerated": false, "ratio": 3.5195652173913046, "con...
""" A simple API wrapper for FTPing files you should be able to this: from ftpretty import ftpretty f = ftpretty(host, user, pass, secure=False, timeout=10) f.get(remote, local) f.put(local, remote) f.list(remote) f.cd(remote) f.delete(remote) f.rename(remote_from, remote_to) f...
{ "repo_name": "codebynumbers/ftpretty", "path": "ftpretty.py", "copies": "1", "size": "11530", "license": "mit", "hash": -1356827543225454000, "line_mean": 31.0277777778, "line_max": 98, "alpha_frac": 0.5065915004, "autogenerated": false, "ratio": 4.057002111189303, "config_test": false, "has...
"""A simple async RPC client that shows how to do load balancing.""" #----------------------------------------------------------------------------- # Copyright (C) 2012. Brian Granger, Min Ragan-Kelley # # Distributed under the terms of the BSD License. The full license is in # the file COPYING.BSD, distributed ...
{ "repo_name": "ellisonbg/zpyrpc", "path": "examples/async_client.py", "copies": "1", "size": "1460", "license": "bsd-3-clause", "hash": -6583861509778993000, "line_mean": 35.5, "line_max": 78, "alpha_frac": 0.6082191781, "autogenerated": false, "ratio": 3.7244897959183674, "config_test": false,...
# a simple attempt at a color matching, stack choosing card game # joadavis Oct 20, 2016 # Another attempt at a game in one .py file # No AI for this version, just two players taking turns # objects - cards, buttons [draw, place, take, help], game session (to track turns) # need to display scores and player labels # d...
{ "repo_name": "joadavis/rpi-coding", "path": "ftcollorins/game.py", "copies": "1", "size": "5259", "license": "mit", "hash": 7452202255969483000, "line_mean": 29.224137931, "line_max": 131, "alpha_frac": 0.5896558281, "autogenerated": false, "ratio": 3.531900604432505, "config_test": false, "...
# a simple attempt at a color matching, stack choosing card game # this version has no graphics, just text output # joadavis Oct 20, 2016 # Another attempt at a game in one .py file # No AI for this version, just two players taking turns # objects - cards, buttons [draw, place, take, help], game session (to track turn...
{ "repo_name": "joadavis/rpi-coding", "path": "ftcollorins/game-textversion.py", "copies": "1", "size": "12256", "license": "mit", "hash": -3938201163024798700, "line_mean": 36.7107692308, "line_max": 158, "alpha_frac": 0.529944517, "autogenerated": false, "ratio": 3.606827545615068, "config_tes...
"""A simple base for creating common types of work-db filters. """ import argparse import logging import sys from exit_codes import ExitCode from cosmic_ray.work_db import use_db class FilterApp: """Base class for simple WorkDB filters. This provides command-line handling for common filter options like ...
{ "repo_name": "sixty-north/cosmic-ray", "path": "src/cosmic_ray/tools/filters/filter_app.py", "copies": "1", "size": "1980", "license": "mit", "hash": 2772021144137747500, "line_mean": 27.2857142857, "line_max": 81, "alpha_frac": 0.6237373737, "autogenerated": false, "ratio": 4.551724137931035, ...
""" A simple benchmark comparing the ALS model here to QMF from Quora. Compares the running time of this package vs the QMF library from Quora. On my desktop (Intel Core i7 7820x) running with 50 factors for 15 iterations on the last.fm 360k dataset, this is the output: QMF finished in 279.32511353492737 Imp...
{ "repo_name": "benfred/implicit", "path": "benchmarks/benchmark_qmf.py", "copies": "1", "size": "3314", "license": "mit", "hash": 5050523821809884000, "line_mean": 30.8653846154, "line_max": 100, "alpha_frac": 0.662039831, "autogenerated": false, "ratio": 3.7152466367713006, "config_test": fals...
""" A simple benchmark of exfoliate vs aiohttp. Compares the performance of aiohttp to exfoliate for making 1000 requests to an aiohttp server that is spawned automatically by the script. The server returns random content with random size between 0 bytes and 1 MB. Of course, as with any benchmark, your mileage may...
{ "repo_name": "brianjpetersen/exfoliate", "path": "benchmark.py", "copies": "1", "size": "3104", "license": "mit", "hash": 8295516679138504000, "line_mean": 25.5299145299, "line_max": 100, "alpha_frac": 0.6639819588, "autogenerated": false, "ratio": 3.5474285714285716, "config_test": false, "...
# A simple bot framework import requests import json class CPBot(object): def __init__(self, endpoint): self.endpoint = endpoint self.module_capabilities = None self.static_capabilities = None self.background_capabilities = None def doCommands(self, cmd_list): json_dat...
{ "repo_name": "zbanks/landfill", "path": "landfill/scraper/cpbot.py", "copies": "1", "size": "1273", "license": "mit", "hash": -3608889245527982000, "line_mean": 30.825, "line_max": 93, "alpha_frac": 0.5773762765, "autogenerated": false, "ratio": 4.3447098976109215, "config_test": false, "has...
"""A simple bot script, built on Pyramid using Cornice This sample script leverages the Pyramid web framework (https://trypyramid.com/) with Cornice (https://cornice.readthedocs.io). By default the web server will be reachable at port 6543 you can change this default if desired (see `pyramidSparkBot.ini`). ngrok (ht...
{ "repo_name": "jbogarin/ciscosparkapi", "path": "examples/pyramidSparkBot/pyramidSparkBot/views.py", "copies": "1", "size": "3913", "license": "mit", "hash": 6365849613040943000, "line_mean": 37.362745098, "line_max": 132, "alpha_frac": 0.6718630207, "autogenerated": false, "ratio": 3.81756097560...
""" A simple box-model of an estuary-ocean-river system which tracks the evolution of oxygen, nutrients, and salinity given simple, idealized scenarios. Authors: Daniel Rothenberg <darothen@mit.edu> Evan Howard <ehoward@whoi.edu> Version: January 18, 2016 """ from numpy import array, ceil, mean, sin, pi, vs...
{ "repo_name": "darothen/blb_estuary", "path": "app/estuary.py", "copies": "1", "size": "9614", "license": "mit", "hash": -773362799212233700, "line_mean": 30.8344370861, "line_max": 85, "alpha_frac": 0.5637611816, "autogenerated": false, "ratio": 3.4998179832544594, "config_test": false, "has...
"""A simple but flexible modal dialog box.""" from Tkinter import * class SimpleDialog: def __init__(self, master, text='', buttons=[], default=None, cancel=None, title=None, class_=None): if class_: self.root = Toplevel(master, class_=class_) else:...
{ "repo_name": "kkdd/arangodb", "path": "3rdParty/V8-4.3.61/third_party/python_26/Lib/lib-tk/SimpleDialog.py", "copies": "204", "size": "3728", "license": "apache-2.0", "hash": 2980666221380429300, "line_mean": 32.2857142857, "line_max": 77, "alpha_frac": 0.5099248927, "autogenerated": false, "rat...
# A simple chat server using websockets # Uses a slight modification to the protocol I'm using to write a different # application # Modifications: # No rooms # Uses Facebook to authenticate from flask import Flask, session, escape, request, redirect from flask_socketio import SocketIO, emit from blog.util import rend...
{ "repo_name": "CodeGuild-co/wtc", "path": "blog/chat.py", "copies": "1", "size": "2629", "license": "mit", "hash": -962476915297159700, "line_mean": 29.5697674419, "line_max": 201, "alpha_frac": 0.6694560669, "autogenerated": false, "ratio": 2.963923337091319, "config_test": false, "has_no_ke...
"""A simple class for distiguising between events coming from various sources. """ from functools import wraps class Event(object): """A basic event class that has a kind (name, type, identifier, whatevs) and some associated data. """ def __init__(self, name, data=None): """Parameters ...
{ "repo_name": "polyphemus-ci/polyphemus", "path": "polyphemus/event.py", "copies": "1", "size": "1351", "license": "bsd-2-clause", "hash": 3156204382372060700, "line_mean": 29.0222222222, "line_max": 84, "alpha_frac": 0.5455218357, "autogenerated": false, "ratio": 4.261829652996846, "config_tes...
# A simple CLI runner for slurm that can be used when running Galaxy from a # non-submit host and using a Slurm cluster. from logging import getLogger try: from galaxy.model import Job job_states = Job.states except ImportError: # Not in Galaxy, map Galaxy job states to Pulsar ones. from pulsar.util im...
{ "repo_name": "galaxyproject/pulsar", "path": "pulsar/managers/util/cli/job/lsf.py", "copies": "2", "size": "4842", "license": "apache-2.0", "hash": -5907865479388304000, "line_mean": 36.5348837209, "line_max": 98, "alpha_frac": 0.5646427096, "autogenerated": false, "ratio": 3.738996138996139, ...
# A simple CLI runner for slurm that can be used when running Galaxy from a # non-submit host and using a Slurm cluster. from ..job import BaseJobExec from logging import getLogger try: from galaxy.model import Job job_states = Job.states except ImportError: # Not in Galaxy, map Galaxy job states to Puls...
{ "repo_name": "jmchilton/pulsar", "path": "pulsar/managers/util/cli/job/slurm.py", "copies": "2", "size": "2928", "license": "apache-2.0", "hash": -6464207677713035000, "line_mean": 28.8775510204, "line_max": 92, "alpha_frac": 0.537226776, "autogenerated": false, "ratio": 3.7204574332909783, "c...
# A simple CLI runner for slurm that can be used when running Galaxy from a # non-submit host and using a Slurm cluster. try: from galaxy.model import Job job_states = Job.states except ImportError: # Not in Galaxy, map Galaxy job states to LWR ones. from galaxy.util import enum job_states = enum(R...
{ "repo_name": "jmchilton/lwr", "path": "lwr/managers/util/cli/job/slurm.py", "copies": "1", "size": "2840", "license": "apache-2.0", "hash": 2239649825209126000, "line_mean": 28.8947368421, "line_max": 92, "alpha_frac": 0.5309859155, "autogenerated": false, "ratio": 3.7027379400260756, "config_...
"""A simple CLI to create Kubernetes contexts.""" import logging import fire import subprocess import re class ContextCreator: @staticmethod def create(project, location, cluster, name, namespace): """Create a context for the given GCP cluster. Args: project: Project that owns the cluster loca...
{ "repo_name": "kubeflow/testing", "path": "py/kubeflow/testing/create_context.py", "copies": "1", "size": "1574", "license": "apache-2.0", "hash": -7699177333422422000, "line_mean": 34.7727272727, "line_max": 75, "alpha_frac": 0.5552731893, "autogenerated": false, "ratio": 4.433802816901409, "c...
""" A simple CLI tool for quickly copying common emoticon/emoji to your clipboard. """ import pyperclip import argparse import json import sys import os def read_emote_mappings(json_obj_files=[]): """ Reads the contents of a list of files of json objects and combines them into one large json object. """ su...
{ "repo_name": "d6e/emotion", "path": "emote/emote.py", "copies": "1", "size": "2135", "license": "mit", "hash": 8500093779927371000, "line_mean": 32.359375, "line_max": 79, "alpha_frac": 0.5906323185, "autogenerated": false, "ratio": 3.5822147651006713, "config_test": false, "has_no_keywords"...
"""A simple clock program for Pimoroni's Micro Dot pHAT""" #!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import time import argparse from microdotphat import write_string, clear, show, set_rotate180, \ set_brightness, set_col, set_pixel # Allow the user to specify settings fro...
{ "repo_name": "ncguk/Micro-Dot-pHAT-Clock", "path": "microdotphat_clock.py", "copies": "1", "size": "2618", "license": "mit", "hash": -3849740308237600000, "line_mean": 26.8510638298, "line_max": 78, "alpha_frac": 0.5351413293, "autogenerated": false, "ratio": 3.821897810218978, "config_test": ...
"""A simple CL program that takes the path to a mrimap.py file and an experiment name (see Notes) and generates all the needed subject-level .params files. Usage ----- python ./sparams boldmap.py fh saveas Notes ----- Valid experiment names are: - fh - the 2011 face/house data """ import sys def _write_params(s...
{ "repo_name": "parenthetical-e/wheelerdata", "path": "mniconvert/archive/sparams.py", "copies": "1", "size": "3366", "license": "bsd-2-clause", "hash": 3082119564259762700, "line_mean": 29.0625, "line_max": 77, "alpha_frac": 0.5603089721, "autogenerated": false, "ratio": 3.3592814371257487, "co...
"""A simple command line interface. It attempts to connect to a server, by default on the current machine and then allows the user to enter commands""" import cmd import logging import requests # TODO: Remove this module completely # Create Logger LOGGER = logging.getLogger(__name__) class CommandLineInterface(cmd....
{ "repo_name": "Sirs0ri/PersonalAssistant_Interfaces", "path": "interface/simple_cli/__init__.py", "copies": "1", "size": "6234", "license": "mit", "hash": -2969702089134548000, "line_mean": 40.0131578947, "line_max": 79, "alpha_frac": 0.4767404556, "autogenerated": false, "ratio": 3.8720496894409...
"""A simple command line SRT convertor tool. Apply shift and factor to SRT timings.""" __author__ = "Gerard van Helden <drm@melp.n>" import re import sys import argparse class TimeParseError: 'Thrown whenever a parse error occurs in Time.parse' def __init__(self, msg, time): self._msg = msg se...
{ "repo_name": "drm/srtfix.py", "path": "srtfix.py", "copies": "1", "size": "7649", "license": "mit", "hash": -9129723328593208000, "line_mean": 26.8145454545, "line_max": 241, "alpha_frac": 0.4957510786, "autogenerated": false, "ratio": 3.7077072224915173, "config_test": false, "has_no_keywor...
"""A simple completer for the qtconsole""" #----------------------------------------------------------------------------- # Copyright (c) 2012, IPython Development Team.$ # # Distributed under the terms of the Modified BSD License.$ # # The full license is in the file COPYING.txt, distributed with this software. #-----...
{ "repo_name": "initNirvana/Easyphotos", "path": "env/lib/python3.4/site-packages/IPython/qt/console/completion_plain.py", "copies": "12", "size": "2362", "license": "mit", "hash": -5489927382213950000, "line_mean": 37.0967741935, "line_max": 91, "alpha_frac": 0.5207451312, "autogenerated": false, ...
"""A simple completer for the qtconsole""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from qtpy import QtCore, QtGui, QtWidgets import ipython_genutils.text as text class CompletionPlain(QtWidgets.QWidget): """ A widget for tab completion, navigable by ...
{ "repo_name": "sserrot/champion_relationships", "path": "venv/Lib/site-packages/qtconsole/completion_plain.py", "copies": "1", "size": "2289", "license": "mit", "hash": -4263386089636586000, "line_mean": 37.15, "line_max": 99, "alpha_frac": 0.5578855395, "autogenerated": false, "ratio": 4.9014989...
"""A simple counter with App Engine pull queue.""" import logging import os import time import jinja2 import webapp2 from google.appengine.api import taskqueue from google.appengine.ext import ndb from google.appengine.runtime import apiproxy_errors JINJA_ENV = jinja2.Environment( loader=jinja2.FileSystemLoade...
{ "repo_name": "GoogleCloudPlatform/appengine-pullqueue-counter", "path": "main.py", "copies": "1", "size": "2012", "license": "apache-2.0", "hash": 3008660511240462300, "line_mean": 28.1594202899, "line_max": 73, "alpha_frac": 0.5730616302, "autogenerated": false, "ratio": 4.218029350104822, "c...
#A simple counting sort - probablythe cleanest solution I ever wrote! #Does not take into account stability and order. #No array checking yet for integer type. #Assuming incoming array is strictly an integer array/list #NOTE: LAST CHECKED - This implementation beats python's out of place sorted() # for integer sorting...
{ "repo_name": "codecakes/random_games", "path": "counting_sort.py", "copies": "1", "size": "1830", "license": "mit", "hash": -7673593203770854000, "line_mean": 29.5166666667, "line_max": 82, "alpha_frac": 0.6453551913, "autogenerated": false, "ratio": 3.5812133072407044, "config_test": false, ...
"""A simple crawler.""" import os import sys import urllib2 import urlparse import socket # to catch any socket.timeout exceptions read() might throw import sys # to get the sys.stdout handle import pickle # modules I've written: from html_parser import SimpleHTMLParser PAGE_SIZE = 40000 class OutOfUrl...
{ "repo_name": "nitsas/simple-web-search-engine", "path": "crawler.py", "copies": "1", "size": "10379", "license": "mit", "hash": 8569786264207396000, "line_mean": 34.0641891892, "line_max": 85, "alpha_frac": 0.5095866654, "autogenerated": false, "ratio": 4.207134171057965, "config_test": false,...
"""A simple CSS progress bar to be rendered in the IPython Notebook. """ #----------------------------------------------------------------------------- # Authors: Ruaridh Thomson <echelous@me.com> # License: MIT License #----------------------------------------------------------------------------- #-------------------...
{ "repo_name": "ruaridht/visualprogressbar", "path": "visualprogressbar/simple_color_progressbar.py", "copies": "1", "size": "6028", "license": "mit", "hash": -22467947726803204, "line_mean": 31.2352941176, "line_max": 104, "alpha_frac": 0.5359986729, "autogenerated": false, "ratio": 3.70270270270...
"""A simple ctypes Wrapper of FlyCapture2_C API. Currently this only works with graysale cameras in MONO8 or MONO16 pixel format modes. Use it as follows: >>> c = Camera() First you must initialize.. To capture in MONO8 mode and in full resolution run >>> c.init() #default to MONO8 Init also turns...
{ "repo_name": "andrej5elin/camera", "path": "camera/bfly.py", "copies": "1", "size": "32554", "license": "mit", "hash": -1682668629913730000, "line_mean": 38.8994974874, "line_max": 143, "alpha_frac": 0.5788843153, "autogenerated": false, "ratio": 3.5955378838082614, "config_test": false, "ha...
# a simple cubic spline example. # # generate some random data in 10 intervals -- note the data changes # each time this is run. # # Our form of the spline polynomial comes from Pang, Ch. 2 # # in this version, we use an iterative method to solve the tridiagonal system # # plot the splines # # M. Zingale (2013-03-03) ...
{ "repo_name": "bt3gl/Numerical-Methods-for-Physics", "path": "others/lin_algebra/cubic-spline-iterate.py", "copies": "1", "size": "3908", "license": "apache-2.0", "hash": 7753582859668590000, "line_mean": 21.9882352941, "line_max": 77, "alpha_frac": 0.6348515865, "autogenerated": false, "ratio": ...
# a simple cubic spline example. # # generate some random data in 10 intervals -- note the data changes # each time this is run. # # Our form of the spline polynomial comes from Pang, Ch. 2 # # solve the matrix system for the splines # # plot the splines # # M. Zingale (2013-02-10) import numpy import pylab import mat...
{ "repo_name": "bt3gl/Numerical-Methods-for-Physics", "path": "others/interpolation_root-finding/cubic-spline.py", "copies": "1", "size": "3443", "license": "apache-2.0", "hash": -1330329724600383500, "line_mean": 22.2635135135, "line_max": 114, "alpha_frac": 0.6520476329, "autogenerated": false, ...
"""A simple database connection API with some helpful decorators. """ import atexit import sqlite3 import os from functools import wraps from .logger import logger from . import settings class db: """Singleton pattern type database connection helper. """ __instance = None def __new__(cls, path_to_db...
{ "repo_name": "SeedyROM/kalci", "path": "kalci/database.py", "copies": "1", "size": "1178", "license": "mit", "hash": 5113851417890490000, "line_mean": 27.0476190476, "line_max": 98, "alpha_frac": 0.6137521222, "autogenerated": false, "ratio": 4.4961832061068705, "config_test": false, "has_no...
# A simple data generator file with 3 params - (temp, wind, humidity) import bisect import random # Temperature phrases & upper bounds temp_phrases = ["It is going to be " + s + "." for s in ["a cold day today", "a cool day today", "a warm day today", "a hot day today"]]; temp_upper_bounds = [0.25, 0....
{ "repo_name": "bitesandbytes/upgraded-system", "path": "data_gen/simple_3_gen.py", "copies": "1", "size": "1857", "license": "mit", "hash": -3047857848538141000, "line_mean": 36.14, "line_max": 108, "alpha_frac": 0.5885837372, "autogenerated": false, "ratio": 2.9759615384615383, "config_test": ...
"""A simple declarative layer for SQLAlchemy ORM. SQLAlchemy object-relational configuration involves the usage of Table, mapper(), and class objects to define the three areas of configuration. declarative moves these three types of configuration underneath the individual mapped class. Regular SQLAlchemy schema and O...
{ "repo_name": "santisiri/popego", "path": "envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.5-py2.5.egg/sqlalchemy/ext/declarative.py", "copies": "1", "size": "12263", "license": "bsd-3-clause", "hash": -4247977103249374700, "line_mean": 36.9659442724, "line_max": 264, "alpha_frac": 0.632...
# A simple demo for working with SparkSQL and Tweets from pyspark import SparkContext, SparkConf from pyspark.sql import HiveContext, Row, IntegerType import json import sys if __name__ == "__main__": inputFile = sys.argv[1] conf = SparkConf().setAppName("SparkSQLTwitter") sc = SparkContext() hiveCtx =...
{ "repo_name": "obulpathi/spark", "path": "python/SparkSQLTwitter.py", "copies": "1", "size": "1181", "license": "apache-2.0", "hash": 4833822594423833000, "line_mean": 42.7407407407, "line_max": 99, "alpha_frac": 0.7298899238, "autogenerated": false, "ratio": 3.5253731343283583, "config_test": ...
# A simple demo for working with SparkSQL and Tweets from pyspark import SparkContext, SparkConf from pyspark.sql import HiveContext, Row from pyspark.sql.types import IntegerType import json import sys if __name__ == "__main__": inputFile = sys.argv[1] conf = SparkConf().setAppName("SparkSQLTwitter") sc =...
{ "repo_name": "ellis429/learning-spark", "path": "src/python/SparkSQLTwitter.py", "copies": "41", "size": "1210", "license": "mit", "hash": 6566359725863214000, "line_mean": 42.2142857143, "line_max": 99, "alpha_frac": 0.7330578512, "autogenerated": false, "ratio": 3.538011695906433, "config_te...
"""A simple demonstration of LKD to activate PEBS and BTS feature from intel CPU""" import ctypes import sys import os if os.getcwd().endswith("example"): sys.path.append(os.path.realpath("..")) else: sys.path.append(os.path.realpath(".")) from windows.generated_def.winstructs import * from dbginterface impor...
{ "repo_name": "sogeti-esec-lab/LKD", "path": "example/PEBS_BTS_demo.py", "copies": "1", "size": "15967", "license": "bsd-3-clause", "hash": -8204539970150006000, "line_mean": 41.4654255319, "line_max": 145, "alpha_frac": 0.6478987913, "autogenerated": false, "ratio": 3.217207334273625, "config_...
"""A simple demonstration of LKD to display IDT and KINTERRUPT associated""" import sys import ctypes import os if os.getcwd().endswith("example"): sys.path.append(os.path.realpath("..")) else: sys.path.append(os.path.realpath(".")) import windows from windows.generated_def.winstructs import * from dbginterfa...
{ "repo_name": "sogeti-esec-lab/LKD", "path": "example/idt.py", "copies": "1", "size": "7877", "license": "bsd-3-clause", "hash": 718459165089433200, "line_mean": 38.1890547264, "line_max": 138, "alpha_frac": 0.6252380348, "autogenerated": false, "ratio": 2.951292618958411, "config_test": false,...
"""A simple demonstration of the output possibilities of the LDK""" import sys import os if os.getcwd().endswith("example"): sys.path.append(os.path.realpath("..")) else: sys.path.append(os.path.realpath(".")) from dbginterface import LocalKernelDebugger # A default LKD can be quiet or not # A quiet LKD will ...
{ "repo_name": "sogeti-esec-lab/LKD", "path": "example/output_demo.py", "copies": "1", "size": "1542", "license": "bsd-3-clause", "hash": -1595088525799796000, "line_mean": 34.0454545455, "line_max": 118, "alpha_frac": 0.7328145266, "autogenerated": false, "ratio": 3.146938775510204, "config_tes...
"""A simple demo of new RNN cell with PTB language model.""" import os import argparse import numpy as np import mxnet as mx from bucket_io import MyBucketSentenceIter, BucketSentenceIter, default_build_vocab #os.environ["MXNET_CUDNN_AUTOTUNE_DEFAULT"] = "1" #data_dir = os.path.abspath(os.path.join(os.path.dirname...
{ "repo_name": "linmajia/dlbench", "path": "synthetic/experiments/mxnet/rnn/train_rnn.py", "copies": "2", "size": "7465", "license": "mit", "hash": 1671669399580043000, "line_mean": 44.7975460123, "line_max": 135, "alpha_frac": 0.5845947756, "autogenerated": false, "ratio": 3.7493721747865396, "...
"""A simple demo of new RNN cell with PTB language model.""" import os import numpy as np import mxnet as mx from bucket_io import BucketSentenceIter, default_build_vocab data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), 'data')) def Perplexity(label, pred): # TODO(tofix): we make a transpos...
{ "repo_name": "pluskid/mxnet", "path": "example/rnn/old/rnn_cell_demo.py", "copies": "15", "size": "5755", "license": "apache-2.0", "hash": -7743223845540183000, "line_mean": 41.6296296296, "line_max": 95, "alpha_frac": 0.5899218071, "autogenerated": false, "ratio": 3.737012987012987, "config_t...
"""A simple demo of new RNN cell with PTB language model.""" ################################################################################ # Speed test (time major is 1.5~2 times faster than batch major). # # -- This script (time major) ----- # 2016-10-10 18:43:21,890 Epoch[0] Batch [50] Speed: 1717.76 samples/...
{ "repo_name": "hotpxl/mxnet", "path": "example/rnn-time-major/rnn_cell_demo.py", "copies": "15", "size": "7381", "license": "apache-2.0", "hash": -6287642168328642000, "line_mean": 47.880794702, "line_max": 110, "alpha_frac": 0.6024928871, "autogenerated": false, "ratio": 3.2688219663418954, "c...
# A simple demo of the mesh manager. # Generates and renders a single tile with some ferns and trees # # INSTRUCTIONS: # # Launch from outside terrain, meaning launch with: # python terrain/meshManager/main.py import sys sys.path.append(".") from panda3d.core import * from panda3d.core import Light,AmbientLight,Dire...
{ "repo_name": "Craig-Macomber/Panda3D-Terrain-System", "path": "meshManager/main.py", "copies": "1", "size": "2269", "license": "bsd-2-clause", "hash": -7914525908556483000, "line_mean": 21.7, "line_max": 72, "alpha_frac": 0.7130894667, "autogenerated": false, "ratio": 2.6170703575547867, "conf...
"""A simple demo that allows the user to drive the 'Robot Arm H25' located here: http://robotsquare.com/2013/10/01/education-ev3-45544-instruction/ The program waits for key presses and responds to the following keys: 'w' - Raises the claw 's' - Lowers the claw 'a' - Swivels the claw left 'd' - Swivels...
{ "repo_name": "inductivekickback/ev3", "path": "Robot_Arm_H25_demo.py", "copies": "1", "size": "4442", "license": "mit", "hash": 6446883914242306000, "line_mean": 34.8225806452, "line_max": 75, "alpha_frac": 0.5159837911, "autogenerated": false, "ratio": 3.7047539616346956, "config_test": false...
"""A simple densely connected baseline model.""" import keras.layers from matchzoo.engine.base_model import BaseModel from matchzoo.engine.param_table import ParamTable from matchzoo.engine import hyper_spaces class DenseBaseline(BaseModel): """ A simple densely connected baseline model. Examples: ...
{ "repo_name": "faneshion/MatchZoo", "path": "matchzoo/models/dense_baseline.py", "copies": "1", "size": "1420", "license": "apache-2.0", "hash": 2840813650883551700, "line_mean": 32.023255814, "line_max": 77, "alpha_frac": 0.611971831, "autogenerated": false, "ratio": 3.5588972431077694, "confi...
"""A simple dense neural network search space. Copyright 2018 The AdaNet 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 https://www.apache.org/licenses/LICENSE-2...
{ "repo_name": "tensorflow/adanet", "path": "adanet/examples/simple_dnn.py", "copies": "1", "size": "8005", "license": "apache-2.0", "hash": -4427142556880277000, "line_mean": 36.5821596244, "line_max": 80, "alpha_frac": 0.6615865084, "autogenerated": false, "ratio": 4.02463549522373, "config_te...
""" A simple directory watcher Credit: ronedg @ http://stackoverflow.com/questions/182197/how-do-i-watch-a-file-for-changes-using-python """ import os, time import gevent class DirWatcher(object): """ A simple directory watcher """ def __init__(self, path): """ Initialize the Directory Watche...
{ "repo_name": "SuperCowPowers/workbench", "path": "workbench/server/dir_watcher.py", "copies": "2", "size": "2244", "license": "mit", "hash": 4096915579050780000, "line_mean": 33, "line_max": 109, "alpha_frac": 0.573083779, "autogenerated": false, "ratio": 4.233962264150944, "config_test": fals...
"""A simple distributed shuffle implementation in Ray. This utility provides a `simple_shuffle` function that can be used to redistribute M input partitions into N output partitions. It does this with a single wave of shuffle map tasks followed by a single wave of shuffle reduce tasks. Each shuffle map task generates ...
{ "repo_name": "ray-project/ray", "path": "python/ray/experimental/shuffle.py", "copies": "1", "size": "11151", "license": "apache-2.0", "hash": 6537105435780935000, "line_mean": 34.0660377358, "line_max": 79, "alpha_frac": 0.6335754641, "autogenerated": false, "ratio": 3.973984319315752, "confi...
# A simple DOC file parser based on pyole import os import struct import logging import datetime from pyole import * class FIBBase(OLEBase): wIdent = 0 nFib = 0 unused = 0 lid = 0 pnNext = 0 Flags1 = 0 fDot = 0 fGlsy = 0 fComplex = 0 fHasPic = 0 cQuickSaves = 0 fEncry...
{ "repo_name": "z3r0zh0u/pyole", "path": "pydoc.py", "copies": "1", "size": "14460", "license": "mit", "hash": 3531995812502524400, "line_mean": 39.2813370474, "line_max": 137, "alpha_frac": 0.5933609959, "autogenerated": false, "ratio": 2.856014220817697, "config_test": false, "has_no_keyword...