text
stringlengths
0
1.05M
meta
dict
"""Affine transformation class """ import os import numpy as np from six import string_types class Transform(object): ''' A standard affine transform. Typically holds a transform from anatomical magnet space to epi file space. ''' def __init__(self, xfm, reference): self.xfm = xfm s...
{ "repo_name": "gallantlab/pycortex", "path": "cortex/xfm.py", "copies": "1", "size": "16398", "license": "bsd-2-clause", "hash": -2960051944227231000, "line_mean": 39.7910447761, "line_max": 109, "alpha_frac": 0.601780705, "autogenerated": false, "ratio": 3.7914450867052025, "config_test": fals...
"""Affine transformation matrices The 3x3 augmented affine transformation matrix for transformations in two dimensions is illustrated below. | x' | | a b c | | x | | y' | = | d e f | | y | | 1 | | 0 0 1 | | 1 | The Affine package is derived from Casey Duncan's Planar package. See the copyright state...
{ "repo_name": "ToddSmall/affine", "path": "affine/__init__.py", "copies": "1", "size": "15872", "license": "bsd-3-clause", "hash": -8132406815322374000, "line_mean": 32.2050209205, "line_max": 79, "alpha_frac": 0.5735257056, "autogenerated": false, "ratio": 3.891149791615592, "config_test": fal...
"""Affine transforms, both in general and specific, named transforms.""" from math import sin, cos, tan, pi __all__ = ['affine_transform', 'rotate', 'scale', 'skew', 'translate'] def affine_transform(geom, matrix): """Returns a transformed geometry using an affine transformation matrix. The coefficient mat...
{ "repo_name": "johanvdw/python-shapely", "path": "shapely/affinity.py", "copies": "6", "size": "8488", "license": "bsd-3-clause", "hash": 5706803894596433000, "line_mean": 32.2862745098, "line_max": 78, "alpha_frac": 0.5444156456, "autogenerated": false, "ratio": 3.370929308975377, "config_test...
"""Affinity Propagation clustering algorithm.""" # Author: Alexandre Gramfort alexandre.gramfort@inria.fr # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause import numpy as np import warnings from ..exceptions import ConvergenceWarning from ..base import BaseEstimator, ClusterMixin from ....
{ "repo_name": "bnaul/scikit-learn", "path": "sklearn/cluster/_affinity_propagation.py", "copies": "2", "size": "17232", "license": "bsd-3-clause", "hash": 8205221239703559000, "line_mean": 35.3544303797, "line_max": 79, "alpha_frac": 0.6034702878, "autogenerated": false, "ratio": 4.16131369234484...
"""Affinity Propagation clustering algorithm. This module is an extension of sklearn's Affinity Propagation to take into account sparse matrices, which are not currently supported. Author: Federico Tomasi Copyright (c) 2016, Federico Tomasi. Licensed under the FreeBSD license (see LICENSE.txt). Original authors for ...
{ "repo_name": "slipguru/ignet", "path": "icing/externals/sparse_affinity_propagation.py", "copies": "2", "size": "11131", "license": "bsd-2-clause", "hash": 4927493427139840000, "line_mean": 33.784375, "line_max": 80, "alpha_frac": 0.6321983649, "autogenerated": false, "ratio": 3.9953338119167263...
# affirm.py / Eli Finer / 2016 # # This script causes assert statements to output much better default error messages # that include the tested condition and the values for any variables referenced in it. # # Here are some examples: # # >>> assert 1 > 2 # AssertionError: assertion (1 > 2) failed # # >>> a = 1; b = 2; c ...
{ "repo_name": "gooli/affirm", "path": "affirm.py", "copies": "1", "size": "2746", "license": "mit", "hash": 8639708602584335000, "line_mean": 31.6904761905, "line_max": 106, "alpha_frac": 0.6052439913, "autogenerated": false, "ratio": 3.7360544217687073, "config_test": false, "has_no_keywords...
a = "fiebre" b = "muerto" c = "normal" d = "enfermo" x = True temp = float while x: while x: try: archivo = open('temperatura.txt', 'a+') temp = float(input("ingrese una temperatura ")) x = False except Exception: print("intenta de nue...
{ "repo_name": "erick84/uip-iiiq2016-prog3", "path": "laboratorio5/Main.py", "copies": "1", "size": "1144", "license": "mit", "hash": 5465192341371452000, "line_mean": 24.6046511628, "line_max": 59, "alpha_frac": 0.4082167832, "autogenerated": false, "ratio": 3.4149253731343285, "config_test": f...
"""A file-backed declarative layer on optparse. This module allows the user to register command line options, and to load them in bulk from a configuration file. >>> class Config(Configuration): ... debug = BoolOption('Enable debugging.', default=False) ... debug_level = IntOption('Debug level 0 <= n <= 9.', de...
{ "repo_name": "tectronics/flimflam", "path": "random/config.py", "copies": "3", "size": "6244", "license": "bsd-3-clause", "hash": -788368774768525200, "line_mean": 28.0418604651, "line_max": 84, "alpha_frac": 0.5807174888, "autogenerated": false, "ratio": 4.151595744680851, "config_test": true...
"""A file containing all of our interfaces. Currently contains only Stats interface """ from redis import Redis from redis.exceptions import ConnectionError import time __all__ = ['Stats'] class Stats(object): """Stats interface""" r = Redis() # XXX: Trying out the connection. A better way must be impleme...
{ "repo_name": "thunderstruck47/exercise02", "path": "interface.py", "copies": "1", "size": "2871", "license": "mit", "hash": -1212293584882003500, "line_mean": 34.8875, "line_max": 87, "alpha_frac": 0.6269592476, "autogenerated": false, "ratio": 4.179039301310044, "config_test": false, "has_n...
""" A file designed to have lines of similarity when compared to similar_lines_b We use lorm-ipsum to generate 'random' code. """ # Copyright (c) 2020 Frank Harrison <frank@doublethefish.com> def adipiscing(elit): etiam = "id" dictum = "purus," vitae = "pretium" neque = "Vivamus" nec = "ornare" ...
{ "repo_name": "ruchee/vimrc", "path": "vimfiles/bundle/vim-python/submodules/pylint/tests/input/similar_lines_a.py", "copies": "2", "size": "1742", "license": "mit", "hash": -7298065376492918000, "line_mean": 26.6507936508, "line_max": 80, "alpha_frac": 0.5350172216, "autogenerated": false, "rati...
# A file downloader. import contextlib, os, tempfile, timer, urllib2, urlparse class Downloader: def __init__(self, dir=None): self.dir = dir # Downloads a file and removes it when exiting a block. # Usage: # d = Downloader() # with d.download(url) as f: # use_file(f) def download(self, url, c...
{ "repo_name": "thelink2012/gta3sc", "path": "deps/cppformat/cppformat/support/download.py", "copies": "9", "size": "1363", "license": "mit", "hash": -677804499743698000, "line_mean": 28.6304347826, "line_max": 64, "alpha_frac": 0.5869405723, "autogenerated": false, "ratio": 3.796657381615599, "...
"""A file interface for handling local and remote data files. The goal of datasource is to abstract some of the file system operations when dealing with data files so the researcher doesn't have to know all the low-level details. Through datasource, a researcher can obtain and use a file with one function call, regar...
{ "repo_name": "ryfeus/lambda-packs", "path": "Opencv_pil/source36/numpy/lib/_datasource.py", "copies": "1", "size": "25512", "license": "mit", "hash": -6332042566699343000, "line_mean": 31.1309823678, "line_max": 80, "alpha_frac": 0.5833725306, "autogenerated": false, "ratio": 4.378990731204944, ...
# A file that defines the custom data structs used in our assignment from helper import * from collections import deque variables = [] facts_raw = [] rules = [] _and = '&' _or = '|' _not = '!' _inclusive_not = '@' class Variable(object): """ Class that represents the basic state of a variable """ d...
{ "repo_name": "A-Beck/Theorem_Prover", "path": "src/datastructures.py", "copies": "1", "size": "26415", "license": "mit", "hash": -193252287472937150, "line_mean": 37.5635036496, "line_max": 128, "alpha_frac": 0.5491955328, "autogenerated": false, "ratio": 4.083951762523191, "config_test": fals...
"""A file to calculate the pose transformation between a camera and robot and a tool offset from correspondences. """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Softwar...
{ "repo_name": "mjsobrep/robot2camera-calibration", "path": "robot2cam_calibration/compute_transformations.py", "copies": "1", "size": "16661", "license": "mit", "hash": -6132702665430488000, "line_mean": 43.0767195767, "line_max": 121, "alpha_frac": 0.5629313967, "autogenerated": false, "ratio": ...
# A file to crop blocks from a boxm2 scene # Takes boxm2_dir as input and assumes scene.xml file is present at that location # Writes the cropped parameters to scene-cropped.xml import optparse; from xml.etree.ElementTree import ElementTree #Parse inputs parser = optparse.OptionParser(description='Update BOXM2 Scene ...
{ "repo_name": "mirestrepo/voxels-at-lems", "path": "boxm2/boxm2_crop_scene.py", "copies": "1", "size": "1815", "license": "bsd-2-clause", "hash": 5194626558475257000, "line_mean": 30.8596491228, "line_max": 113, "alpha_frac": 0.6655647383, "autogenerated": false, "ratio": 2.9416531604538085, "c...
# A file to crop blocks from a boxm2 scene # Takes boxm2_dir as input and assumes scene.xml file is present at that location # Writes the cropped parameters to scene-cropped.xml import optparse; from xml.etree.ElementTree import ElementTree #Parse inputs parser = optparse.OptionParser(description='Update BOXM...
{ "repo_name": "mirestrepo/voxels-at-lems", "path": "super3d/boxm2_crop_scene.py", "copies": "1", "size": "1949", "license": "bsd-2-clause", "hash": -9193615640268062000, "line_mean": 28.9682539683, "line_max": 113, "alpha_frac": 0.6475115444, "autogenerated": false, "ratio": 2.8874074074074074, ...
""" A file to hold all test utilities. Note the project specific overrrides are not being used in the GDC currently. """ from collections import defaultdict import copy import os import yaml import unittest from jsonschema import validate from gdcdictionary import ROOT_DIR, GDCDictionary def load_yaml(path): ...
{ "repo_name": "NCI-GDC/gdcdictionary", "path": "tests/utils.py", "copies": "1", "size": "4889", "license": "apache-2.0", "hash": -4748747267612478000, "line_mean": 33.1888111888, "line_max": 92, "alpha_frac": 0.6109633872, "autogenerated": false, "ratio": 3.961912479740681, "config_test": false...
# A file to keep all sorts of unrelated utilities # Mostly used in tests. import pytest eng_freqs = {'E': 12.70, 'T': 9.06, 'A': 8.17, 'O': 7.51, 'I': 6.97, 'N': 6.75, 'S': 6.33, 'H': 6.09, 'R': 5.99, 'D': 4.25, 'L': 4.03, 'C': 2.78, 'U': 2.76, 'M': 2.41, 'W': 2.36, 'F': 2.23, ...
{ "repo_name": "avyfain/Cryptopals-Hypothesis", "path": "cryptopals/util.py", "copies": "1", "size": "1126", "license": "mit", "hash": -5039092332873155000, "line_mean": 32.1176470588, "line_max": 108, "alpha_frac": 0.4351687389, "autogenerated": false, "ratio": 2.6186046511627907, "config_test"...
"""A file to make sure we are setting the mean and variance for PyMC Lognormal variables correctly--since we are used to describing them with the mean and variance in log base 10.""" from pymc import deterministic, stochastic, MvNormal, Normal, Lognormal, Uniform from pymc import MCMC, Model import numpy as np from pyl...
{ "repo_name": "jmuhlich/bayessb", "path": "examples/pymc/lognormal_test.py", "copies": "1", "size": "1107", "license": "bsd-2-clause", "hash": -2713394771060931000, "line_mean": 27.3846153846, "line_max": 84, "alpha_frac": 0.6702800361, "autogenerated": false, "ratio": 2.816793893129771, "confi...
"""A file to move a UR robot with a grid and save correspondences between camera and robot pose for future processing. todo: generalize this to other robot types """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software...
{ "repo_name": "mjsobrep/robot2camera-calibration", "path": "robot2cam_calibration/get_correspondences.py", "copies": "1", "size": "8369", "license": "mit", "hash": -8641338658890129000, "line_mean": 41.6989795918, "line_max": 79, "alpha_frac": 0.565539491, "autogenerated": false, "ratio": 4.58826...
"""A file to move a UR robot with a grid and save images and robot pose for future processing. todo: generalize this to any robot type """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentati...
{ "repo_name": "mjsobrep/robot2camera-calibration", "path": "robot2cam_calibration/get_images.py", "copies": "1", "size": "6115", "license": "mit", "hash": 2641645598453308000, "line_mean": 37.7025316456, "line_max": 79, "alpha_frac": 0.5839738348, "autogenerated": false, "ratio": 4.24063800277392...
# A file to open Hearthstone cards from the command line, then export them in a file format readable to the neural network # Andrew Thomas 3/31/2017 import json def main(filename : str, ratingsFilename: str) -> None: with open(filename) as fp: cards = json.load(fp) with open(ratingsFilename) as fp:...
{ "repo_name": "chattahippie/Hearthstone-Card-Generator-AI-", "path": "hearthstoneJSONParser.py", "copies": "1", "size": "2379", "license": "apache-2.0", "hash": 3585379094609238000, "line_mean": 31.1621621622, "line_max": 159, "alpha_frac": 0.4153005464, "autogenerated": false, "ratio": 4.2710951...
# a file to simply implement some key algorithms in a procedural fashion from collections import namedtuple import logging import math class SolutionContext: def __init__(self , board=None , alpha=None , beta=None , depth=None ...
{ "repo_name": "aabs/edx-ai-week4-project", "path": "algorithms.py", "copies": "1", "size": "6391", "license": "apache-2.0", "hash": -8384928497102931000, "line_mean": 34.5111111111, "line_max": 103, "alpha_frac": 0.5251134408, "autogenerated": false, "ratio": 3.8592995169082127, "config_test": ...
"""A file to visually check the result of camera coordinate to robot base transformation """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the So...
{ "repo_name": "mjsobrep/robot2camera-calibration", "path": "robot2cam_calibration/check_transformation.py", "copies": "1", "size": "9237", "license": "mit", "hash": 886587872964038000, "line_mean": 41.9674418605, "line_max": 131, "alpha_frac": 0.5653350655, "autogenerated": false, "ratio": 4.2704...
"""A file to wrap up various cameras into a common class. Currently this houses: - Flycapture2 TODO: Add some more: - webcam - folder of images """ # The MIT License (MIT) # # Copyright (c) 2016 GTRC. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and ...
{ "repo_name": "mjsobrep/robot2camera-calibration", "path": "robot2cam_calibration/camera.py", "copies": "1", "size": "7218", "license": "mit", "hash": 8368559120765263000, "line_mean": 35.4545454545, "line_max": 83, "alpha_frac": 0.6041839845, "autogenerated": false, "ratio": 4.374545454545455, ...
"""A filled polygon component""" # Major package imports. from numpy import array # Enthought library imports. from kiva.constants import EOF_FILL_STROKE, FILL, FILL_STROKE from kiva.agg import points_in_polygon from traits.api import Any, Event, Float, HasTraits, Instance, List, \ Prope...
{ "repo_name": "tommy-u/enable", "path": "enable/primitives/polygon.py", "copies": "1", "size": "6625", "license": "bsd-3-clause", "hash": -7750892051255394000, "line_mean": 32.4595959596, "line_max": 85, "alpha_frac": 0.4892075472, "autogenerated": false, "ratio": 4.452284946236559, "config_tes...
"""A filter for turning json into viewable HTML.""" import json import cgi import rowan.http as http import base class JSONViewer(base.Wrapper): """ This wrapper is designed to wrap any controller that is likely to generate JSON results. If the controller returns JSON in a 200 HTTP response code, the...
{ "repo_name": "cargocult/rowan-python", "path": "rowan/controllers/debug.py", "copies": "1", "size": "3968", "license": "mit", "hash": 7612079870172178000, "line_mean": 32.9145299145, "line_max": 78, "alpha_frac": 0.5912298387, "autogenerated": false, "ratio": 3.863680623174294, "config_test": ...
"""A filter that can parse sphinx docs """ __author__ = 'jay' __version__ = (0, 0, 1, 'alpha', 0) catalog = ['read'] form = { "lang" : { "verbose": "Language", "require": False, "type": "select", "choices": [["python2", "Python 2"], ["python3", "Python 3"]], "value": "pytho...
{ "repo_name": "BusyJay/sokoban", "path": "docs/examples/filters/f_sphinx/__init__.py", "copies": "1", "size": "1368", "license": "mit", "hash": -2291964355237257200, "line_mean": 22.186440678, "line_max": 77, "alpha_frac": 0.5197368421, "autogenerated": false, "ratio": 3.82122905027933, "config...
"""A filter that parse documentation from confluence and enhance documentation to confluence. """ import contextlib __author__ = 'jay' __version__ = (0, 0, 1, 'alpha', 0) catalog = ['write'] from main import Filter __all__ = ['Filter'] form = None def on_install(db): """will be execute when installed. ...
{ "repo_name": "BusyJay/sokoban", "path": "docs/examples/filters/f_confluence/__init__.py", "copies": "1", "size": "3046", "license": "mit", "hash": 5197373344734815000, "line_mean": 33.6136363636, "line_max": 95, "alpha_frac": 0.573867367, "autogenerated": false, "ratio": 4.339031339031339, "co...
"""A filter that uses "# pragma: no mutate" to determine when specific mutations should be skipped. """ import logging import re import sys from functools import lru_cache from cosmic_ray.tools.filters.filter_app import FilterApp from cosmic_ray.work_item import WorkerOutcome, WorkResult log = logging.getLogger() c...
{ "repo_name": "sixty-north/cosmic-ray", "path": "src/cosmic_ray/tools/filters/pragma_no_mutate.py", "copies": "1", "size": "2346", "license": "mit", "hash": 1794989627714020900, "line_mean": 34.5454545455, "line_max": 120, "alpha_frac": 0.5507246377, "autogenerated": false, "ratio": 4.13756613756...
"""A first attempt to decode conditions from motion detrending coefs""" import numpy as np from more_datasets import fetch_abide_movements bunch = fetch_abide_movements() # Get diagnosis group 1: autist, 2: control # Transform to 1: autist, -1: control aut_target = 2 * (1.5 - bunch.pheno["DX_GROUP"]) # There seems t...
{ "repo_name": "AlexandreAbraham/movements", "path": "nilearn_private/baseline.py", "copies": "1", "size": "2515", "license": "mit", "hash": -7900626741903657000, "line_mean": 39.564516129, "line_max": 77, "alpha_frac": 0.6771371769, "autogenerated": false, "ratio": 3.3758389261744965, "config_t...
# A first cut at a class that embodies many simulations sharing the same # physical domain. import os, shutil, sys, getopt, glob, datetime from shapely import wkb, geometry import logging from .depender import rule,make,clear,DependencyGraph from ...grid import (paver,orthomaker,trigrid) from ...spatial import linestr...
{ "repo_name": "rustychris/stompy", "path": "stompy/model/suntans/domain.py", "copies": "1", "size": "101238", "license": "mit", "hash": -1771916440854708200, "line_mean": 40.8338842975, "line_max": 134, "alpha_frac": 0.5682747585, "autogenerated": false, "ratio": 3.859773533112204, "config_test...
"""AfkMover Module for the Teamspeak3 Bot.""" from threading import Thread import sys import traceback from Moduleloader import * import ts3.Events as Events import threading import ts3 import Bot from ts3.utilities import TS3Exception afkMover = None afkStopper = threading.Event() bot = None autoStart = T...
{ "repo_name": "Murgeye/teamspeak3-python-bot", "path": "modules/afkmover.py", "copies": "1", "size": "8167", "license": "apache-2.0", "hash": -8310645126664280000, "line_mean": 33.5086956522, "line_max": 131, "alpha_frac": 0.5655687523, "autogenerated": false, "ratio": 3.703854875283447, "confi...
"""A flask API for generating (and retrieving) player details! Usage: api.py run [--no-debug] [--port=<p>] [--host=<h>] api.py (-h | --help) Options: -h --help Show this screen --no-debug Don't add debug=True when running --port=<p> The port to use [default: 5000] --ho...
{ "repo_name": "sujaymansingh/random_cricket_profiles", "path": "random_cricket_profiles/api.py", "copies": "1", "size": "2049", "license": "mit", "hash": -4866144102629947000, "line_mean": 25.6103896104, "line_max": 88, "alpha_frac": 0.6505612494, "autogenerated": false, "ratio": 3.54498269896193...
"""A flask app for auto deploying Kubeflow. TODO(jlewi): Rather than use the multiprocessing package it might make sense just to run the server and reconciler in separate containers. They are already communicating through the filesystem so using multi-processing might just be complicating things. One problem we have r...
{ "repo_name": "kubeflow/testing", "path": "py/kubeflow/testing/auto_deploy/server.py", "copies": "1", "size": "7644", "license": "apache-2.0", "hash": -7030352931666305000, "line_mean": 32.5263157895, "line_max": 84, "alpha_frac": 0.6225798012, "autogenerated": false, "ratio": 3.7785467128027683,...
"""A Flask app for redirecting documentation from the root / URL.""" import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/') def redirect_front(): version = 'latest' language = 'en' single_version = False SU...
{ "repo_name": "pombredanne/readthedocs.org", "path": "deploy/flask-redirects.py", "copies": "1", "size": "1811", "license": "mit", "hash": -1069365871930910500, "line_mean": 31.9272727273, "line_max": 133, "alpha_frac": 0.6289342904, "autogenerated": false, "ratio": 3.788702928870293, "config_t...
"""A Flask script to manage all the routines of the application""" from flask_script import Manager from servmon import app from migrations import machine_data_seed import subprocess # Enable debugging mode for development purposes app.config['DEBUG'] = True app.config['DB'] = 'test_database' manager = Manager(app) ...
{ "repo_name": "hpsuenaa/servmon", "path": "manage.py", "copies": "1", "size": "1146", "license": "mit", "hash": -7183311366772029000, "line_mean": 23.9130434783, "line_max": 98, "alpha_frac": 0.6928446771, "autogenerated": false, "ratio": 3.720779220779221, "config_test": false, "has_no_keywo...
# A flat-bottom harmonic potential on the center of mass # that keeps the system within a cylinder # with principal axis along the direction (0,0,1). from MMTK.ForceFields.ForceField import ForceField from MMTK_cylinder import CylinderTerm import numpy as N # Exactly the same as the pure Python version class Cylinde...
{ "repo_name": "CCBatIIT/AlGDock", "path": "AlGDock/ForceFields/Cylinder/Cylinder.py", "copies": "1", "size": "3711", "license": "mit", "hash": 5017642157557358000, "line_mean": 38.9032258065, "line_max": 82, "alpha_frac": 0.6257073565, "autogenerated": false, "ratio": 3.947872340425532, "config...
# A flat-bottom harmonic potential on the center of mass # that keeps the system within a cylinder # with principal axis along the direction (1,0,0). from MMTK.ForceFields.ForceField import ForceField from MMTK_cylinder import CylinderTerm import numpy as N # Exactly the same as the pure Python version class Cylinde...
{ "repo_name": "luizcieslak/AlGDock", "path": "AlGDock/ForceFields/Cylinder/Cylinder.py", "copies": "2", "size": "3673", "license": "mit", "hash": 1299190452565979600, "line_mean": 38.4946236559, "line_max": 82, "alpha_frac": 0.6261911244, "autogenerated": false, "ratio": 3.966522678185745, "con...
# A flat-bottom harmonic potential on the center of mass # that keeps the system within a sphere from MMTK.ForceFields.ForceField import ForceField from MMTK_sphere import SphereTerm import numpy as N # Exactly the same as the pure Python version class SphereForceField(ForceField): """ Flat-bottom harmonic ...
{ "repo_name": "luizcieslak/AlGDock", "path": "AlGDock/ForceFields/Sphere/Sphere.py", "copies": "2", "size": "2929", "license": "mit", "hash": 2064659207347125500, "line_mean": 36.0759493671, "line_max": 75, "alpha_frac": 0.6374189143, "autogenerated": false, "ratio": 3.958108108108108, "config_...
# A flat-bottom harmonic potential on the center of mass # that keeps the system within a sphere import AlGDock from MMTK.ForceFields.ForceField import ForceField from MMTK_sphere import SphereTerm import numpy as N # Exactly the same as the pure Python version class SphereForceField(ForceField): """ Flat-b...
{ "repo_name": "CCBatIIT/AlGDock", "path": "AlGDock/ForceFields/Sphere/Sphere.py", "copies": "1", "size": "2944", "license": "mit", "hash": 7196840162492728000, "line_mean": 35.8, "line_max": 75, "alpha_frac": 0.6385869565, "autogenerated": false, "ratio": 3.9516778523489933, "config_test": fals...
"""A Flavor reflects a specialization of a base install, the default being BioLinux. If you want to create a new specialization (say for your own server), the recommended procedure is to choose an existing base install (Edition) and write a Flavor. When your Flavor is of interest to other users, it may be a good idea ...
{ "repo_name": "heuermh/cloudbiolinux", "path": "cloudbio/flavor/__init__.py", "copies": "10", "size": "2712", "license": "mit", "hash": -7899600297668512000, "line_mean": 30.1724137931, "line_max": 84, "alpha_frac": 0.6353244838, "autogenerated": false, "ratio": 4.424143556280587, "config_test"...
# A flock of n birds is flying across the continent. Each bird has a type, and # the different types are designated by the ID numbers 1, 2, 3, 4, and 5. # # Given an array of n integers where each integer describes the type of a bird # in the flock, find and print the type number of the most common bird. If two # or mo...
{ "repo_name": "chinhtle/python_fun", "path": "hacker_rank/algorithms/implementation/migratorybirds.py", "copies": "1", "size": "1617", "license": "mit", "hash": -4131011550918595600, "line_mean": 27.875, "line_max": 79, "alpha_frac": 0.6641929499, "autogenerated": false, "ratio": 3.03947368421052...
"""A flow graph representation for Python bytecode""" from __future__ import absolute_import, print_function from pony.py23compat import imap, items_list import dis import types import sys from . import misc from .consts import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__...
{ "repo_name": "ponyorm/pony", "path": "pony/thirdparty/compiler/pyassem.py", "copies": "2", "size": "24342", "license": "apache-2.0", "hash": 5971832004702266000, "line_mean": 30.8612565445, "line_max": 80, "alpha_frac": 0.5396434147, "autogenerated": false, "ratio": 3.918544752092724, "config_...
"""A flow graph representation for Python bytecode""" import dis import new import string import sys import types from compiler import misc from compiler.consts import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, \ CO_VARKEYWORDS def xxx_sort(l): l = l[:] def sorter(a, b): return cmp(a.bid, b.bid) ...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.2/Lib/compiler/pyassem.py", "copies": "1", "size": "26214", "license": "mit", "hash": -5889136586565532000, "line_mean": 30.8131067961, "line_max": 74, "alpha_frac": 0.5295262074, "autogenerated": false, ...
"""A flow graph representation for Python bytecode""" import dis import new import sys import types from compiler import misc from compiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.exi...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.4/Lib/compiler/pyassem.py", "copies": "14", "size": "26195", "license": "mit", "hash": -8285213154111827000, "line_mean": 31.0232273839, "line_max": 74, "alpha_frac": 0.5291467837, "autogenerated": false, ...
"""A flow graph representation for Python bytecode""" import dis import new import sys from compiler import misc from compiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.exit = Block("ex...
{ "repo_name": "fitermay/intellij-community", "path": "python/lib/Lib/compiler/pyassem.py", "copies": "93", "size": "26163", "license": "apache-2.0", "hash": 7222800565738363000, "line_mean": 30.9841075795, "line_max": 74, "alpha_frac": 0.5290295455, "autogenerated": false, "ratio": 3.943180105501...
"""A flow graph representation for Python bytecode""" import dis import types import sys from compiler import misc from compiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.exit = Block("...
{ "repo_name": "pyjs/pyjs", "path": "pgen/lib2to3/compiler/pyassem.py", "copies": "6", "size": "26766", "license": "apache-2.0", "hash": -7717533171647056000, "line_mean": 30.9784946237, "line_max": 76, "alpha_frac": 0.5285436748, "autogenerated": false, "ratio": 3.925208974923009, "config_test"...
"""A flow graph representation for Python bytecode""" import dis import types import sys from pycompiler import misc from pycompiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.exit = Blo...
{ "repo_name": "pombredanne/pyjs", "path": "pyjs/lib_trans/pycompiler/pyassem.py", "copies": "6", "size": "26783", "license": "apache-2.0", "hash": -4466380800798878000, "line_mean": 30.9988052569, "line_max": 76, "alpha_frac": 0.5283575402, "autogenerated": false, "ratio": 3.919654617298405, "c...
"""A flow graph representation for Python bytecode""" from __future__ import absolute_import, print_function from pony.py23compat import imap, items_list import dis import types import sys from . import misc from .consts import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: ...
{ "repo_name": "compiteing/flask-ponypermission", "path": "venv/lib/python2.7/site-packages/pony/thirdparty/compiler/pyassem.py", "copies": "2", "size": "25106", "license": "mit", "hash": -5587362155962567000, "line_mean": 30.8612565445, "line_max": 80, "alpha_frac": 0.5232215407, "autogenerated": f...
"""A flow graph representation for Python bytecode""" import dis import new import sys from compiler import misc from compiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.exi...
{ "repo_name": "ericlink/adms-server", "path": "playframework-dist/1.1-src/python/Lib/compiler/pyassem.py", "copies": "2", "size": "26981", "license": "mit", "hash": 1035117605734464000, "line_mean": 30.9841075795, "line_max": 74, "alpha_frac": 0.512990623, "autogenerated": false, "ratio": 4.05973...
"""A flow graph representation for Python bytecode""" import dis import types import sys from compiler import misc from compiler.consts \ import CO_OPTIMIZED, CO_NEWLOCALS, CO_VARARGS, CO_VARKEYWORDS class FlowGraph: def __init__(self): self.current = self.entry = Block() self.e...
{ "repo_name": "nmercier/linux-cross-gcc", "path": "win32/bin/Lib/compiler/pyassem.py", "copies": "3", "size": "25023", "license": "bsd-3-clause", "hash": 8832250615295317000, "line_mean": 30.7955439056, "line_max": 80, "alpha_frac": 0.5216400911, "autogenerated": false, "ratio": 4.052307692307692...
''' AFLR3 wrapper ''' import os # --- OpenMDAO imports from openmdao.api import Problem, Group, ExternalCode, IndepVarComp class AFLR3(ExternalCode): ''' OpenMDAO component for executing AFLR3 ''' aflr3_exec = 'aflr3.script' # --------------------------------------- # --- File Wrapper/Template for ...
{ "repo_name": "andipeng/MagnePlane", "path": "src/hyperloop/Python/OldMagnePlaneCode/aflr3.py", "copies": "4", "size": "1457", "license": "apache-2.0", "hash": 1991653149782509800, "line_mean": 29.3541666667, "line_max": 76, "alpha_frac": 0.4296499657, "autogenerated": false, "ratio": 3.824146981...
''' a-flux-one-direction.py ========================= AIM: Perform basic statistics on the data and gets the maximal stray light flux for one orbit INPUT: files: - <height>_flux/flux_*.dat : data files variables: see section PARAMETERS (below) OUTPUT: <height>_figures/ : evolution of stray light CMD: python a-flux...
{ "repo_name": "kuntzer/SALSA-public", "path": "a_flux-one-direction.py", "copies": "1", "size": "2279", "license": "bsd-3-clause", "hash": 6666022488726133000, "line_mean": 28.5974025974, "line_max": 111, "alpha_frac": 0.6682755595, "autogenerated": false, "ratio": 2.810110974106042, "config_te...
# a foomodule for simple polls # Rene Kuettner <rene@bitkanal.net> # # licensed under GPL version 2 from datetime import datetime, timedelta import math import foomodules.Base as Base # FIXME: global variables are evil active_polls = {} class Poll(object): def __init__(self, pollctl, ...
{ "repo_name": "horazont/xmpp-crowd", "path": "foomodules/Poll.py", "copies": "1", "size": "13459", "license": "mit", "hash": -3341357589599865000, "line_mean": 36.4776536313, "line_max": 100, "alpha_frac": 0.5326078855, "autogenerated": false, "ratio": 3.615467528967933, "config_test": false, ...
"""A fork of flask_restplus.reqparse for finer error handling""" from __future__ import unicode_literals import decimal import six import flask_restplus from collections import Hashable from copy import deepcopy from flask import current_app, request from werkzeug.datastructures import MultiDict, FileStorage from we...
{ "repo_name": "royragsdale/picoCTF", "path": "picoCTF-web/api/reqparse.py", "copies": "2", "size": "16557", "license": "mit", "hash": 909731619432618100, "line_mean": 34.9934782609, "line_max": 106, "alpha_frac": 0.5792716072, "autogenerated": false, "ratio": 4.496740901683867, "config_test": f...
# A fork of https://github.com/cms-sw/cmssw/blob/CMSSW_7_6_X/HLTrigger/Configuration/python/Tools/dasFileQuery.py, # which can query DAS and return a list of files. import sys import json import das_client_fork as das_client def dasFileQuery(dataset, instance='prod/global'): query = 'dataset dataset=%s instance=%s...
{ "repo_name": "TC01/Treemaker", "path": "Treemaker/python/dbsapi/dasFileQuery.py", "copies": "1", "size": "1632", "license": "mit", "hash": 6489032561331591000, "line_mean": 43.1081081081, "line_max": 114, "alpha_frac": 0.5980392157, "autogenerated": false, "ratio": 3.270541082164329, "config_t...
""" A formater module that keeps trac of indentation """ class Formater(object): """ A very simple code formater that handles efficient concatenation and indentation of lines. """ def __init__(self, indent_string=" "): self.__buffer = [] self.__indentation = 0 self.__indent_str...
{ "repo_name": "naitoh/py2rb", "path": "py2rb/formater.py", "copies": "1", "size": "2531", "license": "mit", "hash": 5602359176081805000, "line_mean": 29.8658536585, "line_max": 103, "alpha_frac": 0.5033583564, "autogenerated": false, "ratio": 4.722014925373134, "config_test": false, "has_no_k...
"""A formatter and StreamHandler for colorizing logging output.""" import logging import sys from certbot import le_util class StreamHandler(logging.StreamHandler): """Sends colored logging output to a stream. If the specified stream is not a tty, the class works like the standard logging.StreamHandler....
{ "repo_name": "DavidGarciaCat/letsencrypt", "path": "certbot/colored_logging.py", "copies": "4", "size": "1508", "license": "apache-2.0", "hash": -8738075824027138000, "line_mean": 32.5111111111, "line_max": 79, "alpha_frac": 0.6266578249, "autogenerated": false, "ratio": 4.320916905444126, "co...
"""A formatter and StreamHandler for colorizing logging output.""" import logging import sys from certbot import util class StreamHandler(logging.StreamHandler): """Sends colored logging output to a stream. If the specified stream is not a tty, the class works like the standard logging.StreamHandler. De...
{ "repo_name": "jtl999/certbot", "path": "certbot/colored_logging.py", "copies": "7", "size": "1499", "license": "apache-2.0", "hash": 1418232429767131600, "line_mean": 32.3111111111, "line_max": 73, "alpha_frac": 0.6264176117, "autogenerated": false, "ratio": 4.370262390670554, "config_test": f...
"""A formatter and StreamHandler for colorizing logging output.""" import logging import sys from letsencrypt import le_util class StreamHandler(logging.StreamHandler): """Sends colored logging output to a stream. If the specified stream is not a tty, the class works like the standard logging.StreamHand...
{ "repo_name": "TheBoegl/letsencrypt", "path": "letsencrypt/colored_logging.py", "copies": "20", "size": "1512", "license": "apache-2.0", "hash": 2871731704706345500, "line_mean": 32.6, "line_max": 79, "alpha_frac": 0.6276455026, "autogenerated": false, "ratio": 4.332378223495702, "config_test":...
"""A formatter which formats phone numbers as they are entered. An AsYouTypeFormatter can be created by invoking AsYouTypeFormatter(region_code). After that digits can be added by invoking input_digit() on the formatter instance, and the partially formatted phone number will be returned each time a digit is added. cle...
{ "repo_name": "daviddrysdale/python-phonenumbers", "path": "python/phonenumbers/asyoutypeformatter.py", "copies": "1", "size": "32841", "license": "apache-2.0", "hash": 2719993812631465500, "line_mean": 53.1930693069, "line_max": 162, "alpha_frac": 0.6474224293, "autogenerated": false, "ratio": 4...
"""A Fortran 90 namelist parser and generator. :copyright: Copyright 2014 Marshall Ward, see AUTHORS for details. :license: Apache License, Version 2.0, see LICENSE for details. """ from f90nml.namelist import Namelist from f90nml.parser import Parser __version__ = '1.3.1' def read(nml_path): """Parse a Fortran...
{ "repo_name": "marshallward/f90nml", "path": "f90nml/__init__.py", "copies": "1", "size": "2753", "license": "apache-2.0", "hash": 7832349143007193000, "line_mean": 25.9901960784, "line_max": 79, "alpha_frac": 0.6418452597, "autogenerated": false, "ratio": 3.3329297820823243, "config_test": fal...
""" A Fortran code analyzer and linter. """ from argparse import ArgumentParser from collections import defaultdict, namedtuple from . import alphanumeric, letter, digit, one_of, whitespace, none_of from . import Failure, succeed, matches, spaces, wildcard from . import join, exact, liberal, satisfies, singleton, EOF,...
{ "repo_name": "uchchwhash/fortran-linter", "path": "linter/fortran.py", "copies": "1", "size": "34439", "license": "mit", "hash": -8257785461827161000, "line_mean": 32.4359223301, "line_max": 79, "alpha_frac": 0.5311710561, "autogenerated": false, "ratio": 4.222017898737281, "config_test": fals...
"""AFOS Database Workflow.""" # 3rd Party from twisted.internet import reactor from txyam.client import YamClient from pyiem.util import LOG from pyiem.nws import product # Local from pywwa import common from pywwa.ldm import bridge from pywwa.database import get_database DBPOOL = get_database("afos", cp_max=5) MEMCA...
{ "repo_name": "akrherz/pyWWA", "path": "parsers/pywwa/workflows/afos_dump.py", "copies": "1", "size": "2394", "license": "mit", "hash": 8739327433401430000, "line_mean": 25.0217391304, "line_max": 77, "alpha_frac": 0.6282372598, "autogenerated": false, "ratio": 3.1835106382978724, "config_test"...
"""A framework for developing enterprise level python applications See: https://github.com/velexio/pyLegos """ # Always prefer setuptools over distutils import setuptools from pylegos.core import ConfigManager from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os im...
{ "repo_name": "velexio/pyLegos", "path": "setup.py", "copies": "1", "size": "3827", "license": "mit", "hash": -5275636858090849000, "line_mean": 35.1132075472, "line_max": 94, "alpha_frac": 0.6757251111, "autogenerated": false, "ratio": 4.0031380753138075, "config_test": false, "has_no_keywor...
"""A framework for restful APIs.""" # ----------------------------------------------------------------------------- # Module: dpa.restful # Author: Josh Tomlinson (jtomlin) # ----------------------------------------------------------------------------- # ---------------------------------------------------------------...
{ "repo_name": "Clemson-DPA/dpa-pipe", "path": "dpa/restful/__init__.py", "copies": "1", "size": "3672", "license": "mit", "hash": 8085209448410311000, "line_mean": 34.3076923077, "line_max": 79, "alpha_frac": 0.2938453159, "autogenerated": false, "ratio": 7.0344827586206895, "config_test": fals...
"""A framework to analyse MS/MS clustering results in the .clustering file format. See: https://github.com/spectra-cluster/spectra-cluster-py """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path import re ...
{ "repo_name": "spectra-cluster/spectra-cluster-py", "path": "setup.py", "copies": "1", "size": "5390", "license": "apache-2.0", "hash": -5920254116919606000, "line_mean": 39.8333333333, "line_max": 107, "alpha_frac": 0.6717996289, "autogenerated": false, "ratio": 3.8749101365923795, "config_tes...
# Africa 2010 # Problem A: Store Credit # Jon Hanson # # Declare Variables # ifile = 'input.txt' # simple input ofile = 'output.txt' # simple output #ifile = 'A-large-practice.in' # official input #ofile = 'A-large-practice.out' # official output caselist = [] # list containing cases # # Problem S...
{ "repo_name": "jonjon33/sandbox", "path": "python/codejam/2010-africa/a-StoreCredit/storeCredit.py", "copies": "1", "size": "2120", "license": "mit", "hash": 2951676645574412000, "line_mean": 28.4444444444, "line_max": 78, "alpha_frac": 0.5561320755, "autogenerated": false, "ratio": 3.29704510108...
# Africa 2010 # Problem C - T9 Spelling # Jon Hanson # Declare Variables ifile = 'input.txt' ofile = 'output.txt' caselist = [] outlist = [] leadletter = ['a','d','g','j','m','p','t','w'] # Read Input File with open(ifile,"r") as f: # Open ifile as f cases = int(f.readline()) # Get num of ...
{ "repo_name": "jonjon33/sandbox", "path": "python/codejam/2010-africa/c-T9/t9.py", "copies": "1", "size": "2088", "license": "mit", "hash": 3236282141314642400, "line_mean": 39.9411764706, "line_max": 79, "alpha_frac": 0.4530651341, "autogenerated": false, "ratio": 3.80327868852459, "config_tes...
"""A friendly Python SFTP interface.""" from __future__ import print_function import os from contextlib import contextmanager import ntpath import posixpath import socket from stat import S_IMODE, S_ISDIR, S_ISREG import tempfile import warnings import paramiko from paramiko import SSHException # make av...
{ "repo_name": "Clean-Cole/pysftp", "path": "pysftp.py", "copies": "1", "size": "40211", "license": "bsd-3-clause", "hash": -6920847075844406000, "line_mean": 32.2872516556, "line_max": 80, "alpha_frac": 0.5942155132, "autogenerated": false, "ratio": 4.383148027032919, "config_test": false, "h...
"""A friendly Python SFTP interface.""" from __future__ import print_function import os from contextlib import contextmanager import socket from stat import S_IMODE, S_ISDIR, S_ISREG import tempfile import paramiko from paramiko import SSHException # make available from paramiko import AuthenticationExce...
{ "repo_name": "midma101/m0du1ar", "path": ".venv/lib/python2.7/site-packages/pysftp.py", "copies": "2", "size": "36938", "license": "mit", "hash": 506225220826612030, "line_mean": 32.7333333333, "line_max": 137, "alpha_frac": 0.5974064649, "autogenerated": false, "ratio": 4.38433234421365, "con...
# A frontend for yay0 decoder import os, tempfile, logging import yay0, N64img paletteFormats = [ "ci4", "ci8"] paletteSizes = {"ci8":512, "ci4":32} #TODO: Extend with other support formats with palette. log = logging.getLogger("frontend") def parseFilename(fileName): # Ignore any leading directory paths fil...
{ "repo_name": "madhuri2k/fantastic-spoon", "path": "yay0/frontend.py", "copies": "1", "size": "2884", "license": "mit", "hash": -1766181601700820700, "line_mean": 29.6808510638, "line_max": 76, "alpha_frac": 0.6386962552, "autogenerated": false, "ratio": 3.3730994152046785, "config_test": false...
"""A FrontendWidget that emulates a repl for a Jupyter kernel. This supports the additional functionality provided by Jupyter kernel. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from collections import namedtuple import os.path import re from subprocess im...
{ "repo_name": "unnikrishnankgs/va", "path": "venv/lib/python3.5/site-packages/qtconsole/jupyter_widget.py", "copies": "3", "size": "22844", "license": "bsd-2-clause", "hash": 7202389712455812000, "line_mean": 39.3604240283, "line_max": 93, "alpha_frac": 0.5551129399, "autogenerated": false, "rati...
""" A FrontendWidget that emulates the interface of the console IPython and supports the additional functionality provided by the IPython kernel. """ #----------------------------------------------------------------------------- # Imports #---------------------------------------------------------------------------...
{ "repo_name": "sodafree/backend", "path": "build/ipython/build/lib.linux-i686-2.7/IPython/frontend/qt/console/ipython_widget.py", "copies": "3", "size": "24582", "license": "bsd-3-clause", "hash": -8196675060815445000, "line_mean": 41.6031195841, "line_max": 89, "alpha_frac": 0.5474330811, "autogen...
"""A FrontendWidget that emulates the interface of the console IPython. This supports the additional functionality provided by the IPython kernel. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. from collections import namedtuple import os.path import re from ...
{ "repo_name": "mattvonrocketstein/smash", "path": "smashlib/ipy3x/qt/console/ipython_widget.py", "copies": "1", "size": "25124", "license": "mit", "hash": 5788763887735892000, "line_mean": 40.6650082919, "line_max": 94, "alpha_frac": 0.5451759274, "autogenerated": false, "ratio": 4.60568285976168...
"""A FrontendWidget that emulates the interface of the console IPython. This supports the additional functionality provided by the IPython kernel. """ #----------------------------------------------------------------------------- # Imports #-----------------------------------------------------------------------------...
{ "repo_name": "poojavade/Genomics_Docker", "path": "Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/ipython-2.2.0-py2.7.egg/IPython/qt/console/ipython_widget.py", "copies": "5", "size": "25459", "license": "apache-2.0", "hash": 981220151527484800, "line_mean": 41.2205638474, "line_...
#!/afs/andrew.cmu.edu/usr6/ericgan/11411-proj/env11411/bin/python # # ask.py # # Runs the utility for generating questions from article text. # # Usage: ./ask.py article_file.htm N # where article_file.htm is the HTML file containing the article HTML content # and N is an integer specifying the number of questions to...
{ "repo_name": "ercgn/11411-proj", "path": "src/ask.py", "copies": "1", "size": "4372", "license": "mit", "hash": -2388185602545212000, "line_mean": 33.4251968504, "line_max": 91, "alpha_frac": 0.6468435499, "autogenerated": false, "ratio": 4.093632958801498, "config_test": false, "has_no_keyw...
#!/afs/crc.nd.edu/x86_64_linux/python/3.4.0/gcc-4.8.0/bin/python3 ''' reactive_flux.py - Calculates the normalized reactive flux, k(t), from a set of GROMACS simulations started at the maximum of the free energy barrier. Currently supports bimolecular reactions. ''' import os import numpy as np import math import sys...
{ "repo_name": "hsidky/MolSimScripts", "path": "reactive_flux.py", "copies": "1", "size": "15340", "license": "mit", "hash": -8684718712658205000, "line_mean": 33.4719101124, "line_max": 143, "alpha_frac": 0.6468709257, "autogenerated": false, "ratio": 2.506126449926483, "config_test": false, ...
#!/afs/cs.wisc.edu/u/r/c/rchat/honeyencryption/honeyvenv/bin/python import os, sys import string from Crypto.Random import random A = string.ascii_uppercase fact_map = [1, 2, 6, 24, 120, 720, # 1, 2, 3, 4, 5, 6, 5040, 40320, 362880, 3628800, 39916800, # 7, 8, 9, 10, ...
{ "repo_name": "rchatterjee/nocrack", "path": "test_r/permute_map.py", "copies": "1", "size": "2112", "license": "mit", "hash": -1603963206845356800, "line_mean": 30.0588235294, "line_max": 85, "alpha_frac": 0.5667613636, "autogenerated": false, "ratio": 3.0922401171303076, "config_test": false,...
# After a few requests, comments_data.content is the generic New York Times error page, but # comments_data does not have a 404 response or anything. It's a valid request, but NY Times # can't process it for whatever reason. The rate limit is 30 calls/second and 5000/day, so # that's not the issue. See if you can get i...
{ "repo_name": "CS109-comment/NYTimes-Comment-Popularity-Prediction", "path": "scrape.py", "copies": "1", "size": "2796", "license": "mit", "hash": -8105923910805024000, "line_mean": 40.7462686567, "line_max": 93, "alpha_frac": 0.5733190272, "autogenerated": false, "ratio": 4.081751824817518, "c...
"""After analysis with WiFeS, this suite of routines can extract a star optimally and calculate its radial velocity. WARNING - this code is still not properly documented or complete. Any contributions welcome! example lines of code... Executing from the code directory, e.g. with Margaret's output directory: rv_proce...
{ "repo_name": "PyWiFeS/tools", "path": "process_stellar.py", "copies": "1", "size": "40891", "license": "mit", "hash": 3939160163785085400, "line_mean": 41.5062370062, "line_max": 233, "alpha_frac": 0.6053165733, "autogenerated": false, "ratio": 3.008682216172467, "config_test": false, "has_n...
# After closing time, the store manager would like to know how much business was # transacted during the day. Modify the CashRegister class to enable this functionality. # Supply methods getSalesTotal and getSalesCount to get the total amount of all sales # and the number of sales. Supply a method resetSales that reset...
{ "repo_name": "futurepr0n/Books-solutions", "path": "Python-For-Everyone-Horstmann/Chapter9-Objects-and-Classes/P9_21.py", "copies": "1", "size": "1395", "license": "mit", "hash": -7918992486969193000, "line_mean": 28.6382978723, "line_max": 92, "alpha_frac": 0.6008614501, "autogenerated": false, ...
## After considerable work, Alyssa P. Hacker delivers her finished system. ## Several years later, after she has forgotten all about it, she gets a ## frenzied call from an irate user, Lem E. Tweakit. It seems that Lem has ## noticed that the formula for parallel resistors can be written in two ## algebraically equival...
{ "repo_name": "perryleo/sicp", "path": "chapter_02/python/sicpc2e14.py", "copies": "1", "size": "13925", "license": "mit", "hash": -7639819949231243000, "line_mean": 36.9427792916, "line_max": 75, "alpha_frac": 0.5537522442, "autogenerated": false, "ratio": 4.2727830622890455, "config_test": fa...
## After debugging her program, Alyssa shows it to a potential user, who ## complains that her program solves the wrong problem. He wants a program ## that can deal with numbers represented as a center value and an ## additive tolerance; for example, he wants to work with intervals such ## as `3.5 +- 0.15` rather than ...
{ "repo_name": "perryleo/sicp", "path": "chapter_02/python/sicpc2e12.py", "copies": "1", "size": "13571", "license": "mit", "hash": 5214915938270938000, "line_mean": 37.4447592068, "line_max": 74, "alpha_frac": 0.5638493847, "autogenerated": false, "ratio": 4.351074062199423, "config_test": fals...
"""After downloaded, spider parse the response from which items are extracted and then items are processed by the ItemProcessor. """ from threaded_spider.basic.util import load_object from threaded_spider.http import Request from threaded_spider.core.item import BaseItem from threaded_spider import logger ...
{ "repo_name": "aware-why/multithreaded_crawler", "path": "threaded_spider/core/extracter.py", "copies": "1", "size": "1923", "license": "bsd-2-clause", "hash": 7413406374297488000, "line_mean": 35.7450980392, "line_max": 87, "alpha_frac": 0.5865834633, "autogenerated": false, "ratio": 4.567695961...
# After getting soundtest2.py and soundtest4.py working, I decided to # test my knowledge by writing a soundtest using the audio callback # method from scratch. It worked almost without a hitch! from sdl2 import * from ctypes import * from math import sin, pi SAMPLES_PER_SECOND = 44100 FREQUENCY = 440 SQUARE_WAVE_PE...
{ "repo_name": "MageJohn/CHIP8", "path": "soundtests/soundtest5.py", "copies": "1", "size": "1351", "license": "mit", "hash": 3667050183018947600, "line_mean": 29.7045454545, "line_max": 73, "alpha_frac": 0.621761658, "autogenerated": false, "ratio": 3.3606965174129355, "config_test": false, "...
"""after http://groups.google.com/group/pyglet-users/web/twistedpyglet.tgz, info about that and a proposal to add something like this to pyglet upstream in http://markmail.org/message/tm6r3cyhrp3dns4r that work added carbon support for mac, here am doing the same for win32. """ # System imports import sys, pyglet im...
{ "repo_name": "antont/tundra", "path": "src/Application/PythonScriptModule/proto/pollable_pyglet_app.py", "copies": "1", "size": "1920", "license": "apache-2.0", "hash": -5840771771676902000, "line_mean": 37.4, "line_max": 78, "alpha_frac": 0.5927083333, "autogenerated": false, "ratio": 3.8554216...
AFTER_INSTALL_PREFIX = """ def after_install(options, home_dir): import platform import subprocess import sys import os.path abs_home_dir = os.path.abspath(home_dir) if sys.platform == "win32": pip_path = os.path.join(abs_home_dir, "Scripts", "pip") pth_path = os.path.join( ...
{ "repo_name": "tonyczeh/vootstrap", "path": "vootstrap/snippits.py", "copies": "1", "size": "1214", "license": "mit", "hash": 7194768501673692000, "line_mean": 22.8039215686, "line_max": 74, "alpha_frac": 0.5280065898, "autogenerated": false, "ratio": 3.3535911602209945, "config_test": false, ...
"""After obtaining all the desired embeddings, stacks them and applies supervised learning to nominate nodes whose nomination_attr_type value is unknown. Optionally uses leave-one-out cross-validation to nominate the known nodes as well. Usage: python3 nominate.py [path] The directory [path] must include a fi...
{ "repo_name": "jeremander/AttrVN", "path": "nominate.py", "copies": "1", "size": "9874", "license": "apache-2.0", "hash": 154005688270632450, "line_mean": 46.932038835, "line_max": 237, "alpha_frac": 0.6217338465, "autogenerated": false, "ratio": 3.2803986710963455, "config_test": true, "has_...
# After query_data.py has been run, run this script on the output of query_data.py. # This changes the userids with integers, so that the file can be processed by MATLAB. # Easier to just write another script and pipe the output. # Input: first arg is the output of query_data.py, second is the mappings file. import s...
{ "repo_name": "leifos/treconomics", "path": "snippet_log_parser/query_data_mappings.py", "copies": "1", "size": "1694", "license": "mit", "hash": -8253837747273069000, "line_mean": 32.2156862745, "line_max": 468, "alpha_frac": 0.6729634002, "autogenerated": false, "ratio": 3.1025641025641026, "...
# after raw klt # filtering import os import math import pdb,glob import numpy as np from scipy.io import loadmat,savemat from scipy.sparse import csr_matrix import matplotlib.pyplot as plt from DataPathclass import * DataPathobj = DataPath(VideoIndex) from parameterClass import * Parameterobj = parameter(dataSource,V...
{ "repo_name": "ChengeLi/VehicleTracking", "path": "trj_filter.py", "copies": "1", "size": "6398", "license": "mit", "hash": -5748176884417944000, "line_mean": 36.4093567251, "line_max": 144, "alpha_frac": 0.52290136, "autogenerated": false, "ratio": 3.0447405997144217, "config_test": false, "...
'''After setting up the system. i.e. stating the listener for master and all slaves User runs this program to compute the result. The input is passed to master which then handles everything aterwards.''' import socket from src.graph.graph import Graph from config.servers import servers from config.networkParams import...
{ "repo_name": "abhilak/DGA", "path": "user/run.py", "copies": "2", "size": "1205", "license": "mit", "hash": 1965003393662603800, "line_mean": 30.7105263158, "line_max": 102, "alpha_frac": 0.6564315353, "autogenerated": false, "ratio": 3.6404833836858006, "config_test": false, "has_no_keyword...
#after taking mean, get out multiindex #Trying to understand how to access the content of a multiindex dataframe #Summary, after its grouped you can only access by first dimension, or by entire group, and only with loc? Thats if you Multiindex it but #at end of file I show how to avoid those problems by keeping things ...
{ "repo_name": "alexholcombe/spatiotopic-motion", "path": "testAggregate.py", "copies": "1", "size": "1513", "license": "mit", "hash": -2478961247799362000, "line_mean": 36.825, "line_max": 137, "alpha_frac": 0.6226040978, "autogenerated": false, "ratio": 2.9096153846153845, "config_test": false...
# After this module is loaded, perl object can be pickled # The perl objects can even contain python objects that contain # perl objects that contain python objects that... # # You are not supposed to use any functions from this module. # Just use Pickle as usual. # # Copyright 2000-2001 ActiveState import perl perl.r...
{ "repo_name": "UfSoft/python-perl", "path": "extra-packages/pyperl-1.0.1d/perlpickle.py", "copies": "2", "size": "1310", "license": "bsd-3-clause", "hash": -8122245395960017000, "line_mean": 23.2592592593, "line_max": 67, "alpha_frac": 0.6839694656, "autogenerated": false, "ratio": 3.053613053613...
"""A FTP_TLS client subclass with additional functionality to handle misconfigured FTP servers. """ from ftplib import FTP_TLS as stdFTP_TLS class FTP_TLS(stdFTP_TLS): """ A FTP_TLS subclass which adds support to force the use of the host address for passive (PASV) connections. This solves the proble...
{ "repo_name": "w0uld/ftp_tls", "path": "ftp_tls.py", "copies": "1", "size": "1438", "license": "bsd-3-clause", "hash": 1629430730424927200, "line_mean": 32.4651162791, "line_max": 77, "alpha_frac": 0.6481223922, "autogenerated": false, "ratio": 3.687179487179487, "config_test": false, "has_no...
"""A full binary tree example""" from dbcbet.dbcbet import pre, post, inv, bet, finitize, finitize_method from dbcbet.helpers import state, argument_types def full_tree_invariant(self): return self._leaf() or self._full() def is_full(self): return self._full() def is_leaf(self): return self._leaf() @in...
{ "repo_name": "ccoakley/dbcbet", "path": "examples/full_binary_tree.py", "copies": "1", "size": "3148", "license": "mit", "hash": -7506400033710649000, "line_mean": 31.1224489796, "line_max": 92, "alpha_frac": 0.6076874206, "autogenerated": false, "ratio": 3.66046511627907, "config_test": false...
"""A full cache system written on top of Django's rudimentary one. Frequently used functions are: cache_set(*keys, **kwargs) cache_get(*keys, **kwargs) cache_delete(*keys, **kwargs) keys.. parameters of general type which are convertable to string or hashable unambiguously. The keys can be of any general t...
{ "repo_name": "aronysidoro/django-keyedcache", "path": "keyed/keyedcache/__init__.py", "copies": "1", "size": "13665", "license": "bsd-3-clause", "hash": -7082524250300255000, "line_mean": 32.0072463768, "line_max": 106, "alpha_frac": 0.6110501281, "autogenerated": false, "ratio": 4.0827606812070...
"""A full cache system written on top of Django's rudimentary one.""" from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str from django.utils.hashcompat import md5_constructor from keyedcache.utils import is_string_like, is_list_or_tuple import cPickle as pick...
{ "repo_name": "grengojbo/django-keyedcache", "path": "keyedcache/__init__.py", "copies": "2", "size": "9622", "license": "bsd-3-clause", "hash": -4328778653628159500, "line_mean": 28.2462006079, "line_max": 169, "alpha_frac": 0.5819995843, "autogenerated": false, "ratio": 3.936988543371522, "co...
"""A full cache system written on top of Django's rudimentary one.""" from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str import cPickle as pickle import md5 import types import logging from satchmo.utils import is_string_like, is_list_or_tuple log = loggin...
{ "repo_name": "sankroh/satchmo", "path": "satchmo/caching/__init__.py", "copies": "2", "size": "8134", "license": "bsd-3-clause", "hash": -4469772896283698700, "line_mean": 28.1541218638, "line_max": 116, "alpha_frac": 0.5703221047, "autogenerated": false, "ratio": 3.9872549019607844, "config_t...