text
stringlengths
0
1.05M
meta
dict
from astropy import wcs as pywcs try: import astropy.io.fits as pyfits except: # If this fail there is no way out import pyfits pass import numpy from Box import Box class XMMWCS(object): def __init__(self, eventFile, X=None, Y=None): header = pyfits.getheader(eventFile, 'EVENTS') ...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/XMMWCS.py", "copies": "1", "size": "5632", "license": "bsd-3-clause", "hash": -8389968405261125000, "line_mean": 31.9356725146, "line_max": 109, "alpha_frac": 0.5024857955, "autogenerated": false, "ratio": 3.4009661835748792, "conf...
from scipy import interpolate from sklearn.neighbors import KernelDensity from astroML.density_estimation import KNeighborsDensity import numpy import matplotlib.pyplot as plt import sys class DensityEstimation(object): def __init__(self): raise NotImplemented("This class must be subclassed.") ...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/KDE.py", "copies": "1", "size": "4211", "license": "bsd-3-clause", "hash": -7026314435575562000, "line_mean": 37.6330275229, "line_max": 115, "alpha_frac": 0.5153170268, "autogenerated": false, "ratio": 3.8775322283609577, "config_...
import logging import sys import numexpr import numpy as np from threeML.io.progress_bar import progress_bar logging.basicConfig(level=logging.INFO) logger = logging.getLogger("bayesian_blocks") __all__ = ['bayesian_blocks', 'bayesian_blocks_not_unique'] def bayesian_blocks_not_unique(tt, ttstart, ttstop, p0): ...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/utils/bayesian_blocks.py", "copies": "1", "size": "9636", "license": "bsd-3-clause", "hash": 1913284622676937200, "line_mean": 28.8328173375, "line_max": 115, "alpha_frac": 0.5955790785, "autogenerated": false, "ratio": 3.644478063540091, "confi...
import numpy class GridGen(object): ''' Generate a grid in detector coordinates ''' def __init__(self, hardwareUnit): # Store hardware unit self.hardwareUnit = hardwareUnit def makeGrid(self, approxSizeArcsec=80.35, unit='sky', multiplicity=2.0, get_psf_size=None): # Co...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/GridGen.py", "copies": "1", "size": "4932", "license": "bsd-3-clause", "hash": 5782541373440872000, "line_mean": 29.4444444444, "line_max": 115, "alpha_frac": 0.5486618005, "autogenerated": false, "ratio": 3.7880184331797233, "conf...
import os import sys import numpy import numexpr try: import scipy.stats except: pass try: import astropy.io.fits as pyfits except: # If this fail there is no way out import pyfits pass from XtDac.BayesianBlocks import bayesian_blocks, bayesian_blocks_not_unique class Box(object): def __...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/Box.py", "copies": "1", "size": "14659", "license": "bsd-3-clause", "hash": -5910328272033641000, "line_mean": 29.6033402923, "line_max": 116, "alpha_frac": 0.5492189099, "autogenerated": false, "ratio": 3.675777331995988, "config_...
import urllib, base64 import StringIO import matplotlib.pyplot as plt import time import numpy htmlCode1 = ''' <html> <head> <style> .CSSTableGenerator { margin:0px;padding:0px; width:100%; box-shadow: 10px 10px 5px #888888; border:1px solid #000000; -moz-border-radius-bottomleft:10px; -webkit-border-bottom-l...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/Results.py", "copies": "1", "size": "9012", "license": "bsd-3-clause", "hash": -8548603745443973000, "line_mean": 33.0075471698, "line_max": 179, "alpha_frac": 0.6119618287, "autogenerated": false, "ratio": 3.0601018675721563, "con...
try: import astropy.io.fits as pyfits except: import pyfits import logging import subprocess from XtDac.DivideAndConquer import XMMWCS log = logging.getLogger("HardwareUnit") def hardwareUnitFactory(eventfile): '''Return an instance of the appropriate HarwareUnit class, based on the content of the...
{ "repo_name": "giacomov/XtDac", "path": "XtDac/DivideAndConquer/HardwareUnit.py", "copies": "1", "size": "9963", "license": "bsd-3-clause", "hash": -5566243292380627000, "line_mean": 28.9189189189, "line_max": 116, "alpha_frac": 0.5275519422, "autogenerated": false, "ratio": 3.5493409333808335, ...
__author__ = 'giacomov' __doc__ = """""" import collections import copy import exceptions import astropy.units as u import numpy as np import scipy.stats import warnings from tree import Node from thread_safe_unit_format import ThreadSafe def _behaves_like_a_number(obj): """ :param obj: :return: True...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/core/parameter.py", "copies": "2", "size": "40824", "license": "bsd-3-clause", "hash": -2024352138190884900, "line_mean": 31.2719367589, "line_max": 123, "alpha_frac": 0.5846805801, "autogenerated": false, "ratio": 4.728831229004981, "...
__author__ = 'giacomov' from astromodels.core.polarization import Polarization from astromodels.core.tree import Node class SpectralComponent(Node): # This is needed to avoid problems when constructing the class, due to the fact that we are overriding # the __setattr__ and __getattr__ attributes _spect...
{ "repo_name": "giacomov/astromodels", "path": "astromodels/core/spectral_component.py", "copies": "2", "size": "1949", "license": "bsd-3-clause", "hash": 3520483722206859300, "line_mean": 27.2463768116, "line_max": 108, "alpha_frac": 0.6054386865, "autogenerated": false, "ratio": 4.36995515695067...
__author__ = 'giacomov' from astromodels.core.tree import Node from astromodels.core.parameter import Parameter class Polarization(Node): def __init__(self, polarization_type='linear'): assert polarization_type in ['linear', 'stokes'], 'polarization must be linear or stokes' self._polarization...
{ "repo_name": "giacomov/astromodels", "path": "astromodels/core/polarization.py", "copies": "2", "size": "3539", "license": "bsd-3-clause", "hash": 300189806847107800, "line_mean": 30.0438596491, "line_max": 122, "alpha_frac": 0.5637185646, "autogenerated": false, "ratio": 3.8719912472647704, "...
__author__ = 'giacomov' import astropy.table def dict_to_table(dictionary, list_of_keys=None): """ Return a table representing the dictionary. :param dictionary: the dictionary to represent :param list_of_keys: optionally, only the keys in this list will be inserted in the table :return: a Table...
{ "repo_name": "giacomov/astromodels", "path": "astromodels/utils/table.py", "copies": "2", "size": "2338", "license": "bsd-3-clause", "hash": -2495635642203869700, "line_mean": 27.1686746988, "line_max": 119, "alpha_frac": 0.6103507271, "autogenerated": false, "ratio": 4.116197183098592, "confi...
__author__ = 'giacomov' import collections import exceptions import astropy.units as u from astromodels.core.tree import Node from astromodels.utils.pretty_list import dict_to_list # This module keeps the configuration of the units used in astromodels # Pre-defined values _ENERGY = u.keV _TIME = u.s _ANGLE = u.de...
{ "repo_name": "giacomov/astromodels", "path": "astromodels/core/units.py", "copies": "2", "size": "4694", "license": "bsd-3-clause", "hash": -6952312483001837000, "line_mean": 25.8285714286, "line_max": 116, "alpha_frac": 0.6222837665, "autogenerated": false, "ratio": 3.914929107589658, "config...
__author__ = 'giacomov' import collections import exceptions PARTICLE_SOURCE = 'particle source' POINT_SOURCE = 'point source' EXTENDED_SOURCE = 'extended source' class UnknownSourceType(exceptions.Exception): pass class Source(object): def __init__(self, list_of_components, src_type, spatial_shape=None)...
{ "repo_name": "giacomov/astromodels", "path": "astromodels/sources/source.py", "copies": "2", "size": "1488", "license": "bsd-3-clause", "hash": -1542241827952093400, "line_mean": 21.2089552239, "line_max": 78, "alpha_frac": 0.624327957, "autogenerated": false, "ratio": 4.522796352583587, "conf...
__author__ = 'giacomov' import collections from astropy import coordinates from astromodels.core.parameter import Parameter from astromodels.core.tree import Node class WrongCoordinatePair(ValueError): pass class IllegalCoordinateValue(ValueError): pass class WrongCoordinateSystem(ValueError): pass...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/core/sky_direction.py", "copies": "2", "size": "8464", "license": "bsd-3-clause", "hash": 2048361597143435500, "line_mean": 26.2186495177, "line_max": 119, "alpha_frac": 0.5268194707, "autogenerated": false, "ratio": 4.367389060887513, ...
__author__ = 'giacomov' import collections import numpy from astromodels.core.spectral_component import SpectralComponent from astromodels.core.tree import Node from astromodels.core.units import get_units from astromodels.sources.source import Source, PARTICLE_SOURCE from astromodels.utils.pretty_list import dict_t...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/sources/particle_source.py", "copies": "2", "size": "2935", "license": "bsd-3-clause", "hash": 6082229023503455000, "line_mean": 31.2637362637, "line_max": 113, "alpha_frac": 0.661669506, "autogenerated": false, "ratio": 4.30351906158357...
__author__ = 'giacomov' import collections import os import pandas as pd import numpy as np import scipy.integrate import warnings from astromodels.core.my_yaml import my_yaml from astromodels.core.parameter import Parameter, IndependentVariable from astromodels.core.tree import Node, DuplicatedNode from astromodels...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/core/model.py", "copies": "2", "size": "31324", "license": "bsd-3-clause", "hash": 7312820516738535000, "line_mean": 27.9500924214, "line_max": 122, "alpha_frac": 0.5889094624, "autogenerated": false, "ratio": 4.65507504829841, "config...
__author__ = 'giacomov' import collections import ROOT import numpy as np import scipy.integrate import astromodels from threeML.io.cern_root_utils.io_utils import get_list_of_keys, open_ROOT_file from threeML.io.cern_root_utils.tobject_to_numpy import tgraph_to_arrays, th2_to_arrays, tree_to_ndarray from threeML.p...
{ "repo_name": "volodymyrss/3ML", "path": "threeML/plugins/VERITASLike.py", "copies": "1", "size": "17461", "license": "bsd-3-clause", "hash": -5048622252776983000, "line_mean": 35.1511387164, "line_max": 120, "alpha_frac": 0.5610217055, "autogenerated": false, "ratio": 3.8316875137151634, "conf...
__author__ = 'giacomov' import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np def plot_fit_results(time_resolved_results, redshift, triggername, decay_function=None, flux_type='photonFlux'): fig, (ax1, ax2) = plt.subplots(2,1, sharex=True, gridspec_kw={'height_ratios': [3, 1...
{ "repo_name": "giacomov/lclike", "path": "lclike/plot_fit_results.py", "copies": "1", "size": "3034", "license": "bsd-3-clause", "hash": 9141262575546358000, "line_mean": 28.7450980392, "line_max": 120, "alpha_frac": 0.5533948583, "autogenerated": false, "ratio": 3.1375387797311274, "config_tes...
__author__ = 'giacomov' import numpy as np import emcee import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import corner class BayesianAnalysis(object): def __init__(self, parameter_names, best_fit_values, loglike, boundaries): self.parameter_names = parameter_names self.l...
{ "repo_name": "giacomov/lclike", "path": "lclike/bayes_analysis.py", "copies": "1", "size": "4217", "license": "bsd-3-clause", "hash": 4804786521144464000, "line_mean": 25.1925465839, "line_max": 119, "alpha_frac": 0.5435143467, "autogenerated": false, "ratio": 3.670147954743255, "config_test":...
__author__ = 'giacomov' import re import warnings from astromodels.core import parameter, sky_direction, model, polarization, spectral_component from astromodels.core.my_yaml import my_yaml from astromodels.functions import function from astromodels.sources import extended_source from astromodels.sources import parti...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/core/model_parser.py", "copies": "2", "size": "25793", "license": "bsd-3-clause", "hash": -6608241827094843000, "line_mean": 31.0012406948, "line_max": 153, "alpha_frac": 0.5915558485, "autogenerated": false, "ratio": 4.580536316817617, ...
__author__ = 'giacomov' import yaml import re def _process_html(dictionary): list_start = '<ul>\n' list_stop = '</ul>\n' entry_start = '<li>' entry_stop = '</li>\n' output=[list_start] for key,value in dictionary.iteritems(): if isinstance(value, dict): # Check whethe...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/utils/pretty_list.py", "copies": "2", "size": "1618", "license": "bsd-3-clause", "hash": 8465131562287364000, "line_mean": 20.8648648649, "line_max": 98, "alpha_frac": 0.5815822002, "autogenerated": false, "ratio": 3.8250591016548463, ...
__author__ = 'Giampaolo Rodola <g.rodola [AT] gmail [DOT] com>' """ Return disk usage statistics about the given path as a (total, used, free) namedtuple. Values are expressed in bytes. """ # Author: Giampaolo Rodola' <g.rodola [AT] gmail [DOT] com> # License: MIT import os import collections _ntuple_diskusage = co...
{ "repo_name": "grburgess/astromodels", "path": "astromodels/utils/disk_usage.py", "copies": "2", "size": "1375", "license": "bsd-3-clause", "hash": -4035615399084603000, "line_mean": 31.7380952381, "line_max": 89, "alpha_frac": 0.6363636364, "autogenerated": false, "ratio": 3.3132530120481927, ...
__author__ = 'Gianluca Barbon' from asip_client import AsipClient from asip_writer import AsipWriter import threading from threading import Thread import socket import time import sys class TCPBoard: # ************ BEGIN CONSTANTS DEFINITION **************** DEBUG = True # Activates debug messages _...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/tcp_board.py", "copies": "1", "size": "8678", "license": "mit", "hash": -1309785244601318400, "line_mean": 42.8333333333, "line_max": 117, "alpha_frac": 0.5324959668, "autogenerated": false, "ratio": 4...
__author__ = 'Gianluca Barbon' from services.asip_service import AsipService from asip_client import AsipClient import sys class SparkfunWSService(AsipService): class Pressure(AsipService): _serviceID = 'P' DEBUG = False _pressureID = 0 # The service should be attached to a clie...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/services/sparkfunws_service.py", "copies": "1", "size": "4208", "license": "mit", "hash": 1856170882134348000, "line_mean": 37.6146788991, "line_max": 116, "alpha_frac": 0.5841254753, "autogenerated": fa...
__author__ = 'Gianluca Barbon' import sys import struct import binascii class PortManager: # ************ BEGIN CONSTANTS DEFINITION **************** __DEBUG = False # Do you want me to print verbose debug information? __MAX_NUM_DIGITAL_PINS = 72 # 9 ports of 8 pins at most? __MAX_NUM_ANALOG_PINS...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/port_manager.py", "copies": "1", "size": "7076", "license": "mit", "hash": 8754733950514612000, "line_mean": 38.9774011299, "line_max": 105, "alpha_frac": 0.5761729791, "autogenerated": false, "ratio":...
__author__ = 'Gianluca Barbon' import time import sys from asip_client import AsipClient from threading import Thread from asip_writer import AsipWriter import paho.mqtt.client as mqtt import threading class MQTTBoard: # ************ BEGIN CONSTANTS DEFINITION **************** DEBUG = True # Activates d...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/mqtt_board.py", "copies": "1", "size": "9413", "license": "mit", "hash": 2854436224560571000, "line_mean": 41.7909090909, "line_max": 117, "alpha_frac": 0.5664506534, "autogenerated": false, "ratio": 4...
__author__ = 'Gianluca Barbon' import time import sys from asip_client import AsipClient from threading import Thread import threading from asip_writer import AsipWriter import socket try: from Queue import Queue except ImportError: from queue import Queue class SimpleTCPBoard: # ************ BEGIN CON...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/old_tcp_board.py", "copies": "1", "size": "13490", "license": "mit", "hash": 6122693886523746000, "line_mean": 39.3892215569, "line_max": 124, "alpha_frac": 0.5064492216, "autogenerated": false, "ratio...
__author__ = 'Gianluca Barbon' import time import sys from asip_client import AsipClient from threading import Thread try: from Queue import Queue except ImportError: from queue import Queue from asip_writer import AsipWriter import paho.mqtt.client as mqtt class SimpleMQTTBoard: # ************ BEGIN ...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/old_mqtt_board.py", "copies": "1", "size": "9264", "license": "mit", "hash": 8838079284081684000, "line_mean": 34.9108527132, "line_max": 127, "alpha_frac": 0.5765328152, "autogenerated": false, "ratio...
__author__ = 'Gianluca Barbon' import time import sys import glob import serial from asip_client import AsipClient from threading import Thread from asip_writer import AsipWriter from serial import Serial import threading class SerialBoard: # ************ BEGIN CONSTANTS DEFINITION **************** DEBUG...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/serial_board.py", "copies": "1", "size": "10864", "license": "mit", "hash": 8142738248764015000, "line_mean": 41.1085271318, "line_max": 119, "alpha_frac": 0.546667894, "autogenerated": false, "ratio":...
__author__ = 'Gianluca Barbon' import time import sys import glob import serial import select from asip_client import AsipClient from threading import Thread #from Queue import Queue from asip_writer import AsipWriter from serial import Serial try: from Queue import Queue except ImportError: from queue import ...
{ "repo_name": "DiNozzo97/smartHome", "path": "Source Code/assets/pythonFiles/python_asip_client/old_serial_board.py", "copies": "1", "size": "14924", "license": "mit", "hash": 9015048375666953000, "line_mean": 37.8671875, "line_max": 124, "alpha_frac": 0.5177566336, "autogenerated": false, "ratio...
__author__ = "Gideon Juve" __author__ = "Rafael Ferreira da Silva" DB_VERSION = 3 import logging from sqlalchemy.exc import * from Pegasus.db.admin.admin_loader import * from Pegasus.db.admin.versions.base_version import * log = logging.getLogger(__name__) class Version(BaseVersion): def __init__(self, conne...
{ "repo_name": "pegasus-isi/pegasus", "path": "packages/pegasus-python/src/Pegasus/db/admin/versions/v3.py", "copies": "1", "size": "1096", "license": "apache-2.0", "hash": -173534930603941900, "line_mean": 29.4444444444, "line_max": 107, "alpha_frac": 0.6386861314, "autogenerated": false, "ratio"...
__author__ = 'gigi' RANGE_SIZE = 100 primes = [2, 3, 5, 7] last_range_start = None def get_next_range(): global last_range_start if last_range_start is None: last_range_start = 10 else: last_range_start += RANGE_SIZE return last_range_start, last_range_start + RANGE_SIZE def chec...
{ "repo_name": "the-gigi/prime_hunter", "path": "simple_prime_hunter.py", "copies": "1", "size": "1382", "license": "bsd-3-clause", "hash": 3792189010379183000, "line_mean": 22.4237288136, "line_max": 77, "alpha_frac": 0.6078147612, "autogenerated": false, "ratio": 3.455, "config_test": false, ...
__author__ = 'gilbert' """ Based off of q controller from here: http://pages.cs.wisc.edu/~finton/qcontroller.html """ import gym import random import numpy as np class QAgent: def __init__(self): #Constants self.W_INIT = 0.0 self.NUM_BOXES = 162 self.ALPHA = 0.5 #Learning Rate...
{ "repo_name": "nerdgilbert/CartQLearner", "path": "main.py", "copies": "1", "size": "3900", "license": "mit", "hash": 4394674882935223000, "line_mean": 25.3513513514, "line_max": 161, "alpha_frac": 0.5387179487, "autogenerated": false, "ratio": 3.439153439153439, "config_test": false, "has_no...
""" A command line tool that allows a user to convert a directory of raw images into "batches" for use in the SMIA-CUKIE application. Parsing used here is specific to the Cukierman lab use cases, but could be used as an example of the proper format to feed into the SMIA-CUKIE application (and how to automate this p...
{ "repo_name": "cukie/SMIA", "path": "batch_maker/make_batches.py", "copies": "2", "size": "2813", "license": "mit", "hash": -2483268559641314300, "line_mean": 25.5377358491, "line_max": 101, "alpha_frac": 0.698186989, "autogenerated": false, "ratio": 3.060935799782372, "config_test": false, "...
__author__ = 'Gino' import os import time from selenium.common.exceptions import TimeoutException from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from common import domain # Parametrizing the sleep allow me to set run "more defensive" tests wh...
{ "repo_name": "GinoGalotti/python-selenium-utils", "path": "SeleniumPythonFramework/src/main/Utils/driver_utils.py", "copies": "1", "size": "4838", "license": "apache-2.0", "hash": -1724035317175957200, "line_mean": 26.6457142857, "line_max": 103, "alpha_frac": 0.6593633733, "autogenerated": false,...
__author__ = 'Gino' import sys from sauceclient import SauceClient class SauceUtils(object): SAUCE_URL = "http://%s:%s@ondemand.saucelabs.com:80/wd/hub" def __init__(self, user, password, tool): self.is_sauce = (tool and tool.lower() == 'sauce') if self.is_sauce: self.user = use...
{ "repo_name": "GinoGalotti/python-selenium-utils", "path": "SeleniumPythonFramework/src/main/Utils/sauce_utils.py", "copies": "1", "size": "1540", "license": "apache-2.0", "hash": 2735905147825356000, "line_mean": 33.2222222222, "line_max": 80, "alpha_frac": 0.6266233766, "autogenerated": false, ...
__author__ = 'Gino' import sys from testingbotclient import TestingBotClient class TestingbotUtils(object): TESTINGBOT_URL = "http://%s:%s@hub.testingbot.com:4444/wd/hub" def __init__(self, user, password, tool): self.is_testingbot = (tool and tool.lower() == 'testingbot') if self.is_testin...
{ "repo_name": "GinoGalotti/python-selenium-utils", "path": "SeleniumPythonFramework/src/main/Utils/testingbot_utils.py", "copies": "1", "size": "1637", "license": "apache-2.0", "hash": -6979860740281304000, "line_mean": 33.829787234, "line_max": 110, "alpha_frac": 0.6365302382, "autogenerated": fal...
__author__ = 'Giorgio Salluzzo <giorgio.salluzzo@gmail.com>' __version__ = '1.99.1' __classifiers__ = [ 'Development Status :: 5 - Production/Stable', 'Intended Audience :: Developers', 'License :: OSI Approved :: MIT License', 'Operating System :: OS Independent', 'Programming Language :: Python ::...
{ "repo_name": "BuongiornoMIP/Reding", "path": "reding/__init__.py", "copies": "1", "size": "2440", "license": "mit", "hash": 2980704070485400600, "line_mean": 44.1851851852, "line_max": 479, "alpha_frac": 0.6897540984, "autogenerated": false, "ratio": 4, "config_test": false, "has_no_keywords...
# This program sets up a stash repository from a configuration file import requests import json import yaml import sys import re import time import os # The following class handles REST requests(and thus the name) class rester: def __init__(self, config): self.config = config self.http_host = s...
{ "repo_name": "Verigreen/stash", "path": "stash_setup.py", "copies": "1", "size": "10985", "license": "apache-2.0", "hash": -1853351953107042000, "line_mean": 34.5533980583, "line_max": 105, "alpha_frac": 0.5259899863, "autogenerated": false, "ratio": 4.181575942139323, "config_test": true, "...
__author__ = 'Giovanni Sirio Carmantini' """In this file, a R-ANN is constructed from a sample Turing Machine. Specifically, the TM decides if an input unary string is composed by an even number of 1's. A Generalized Shift is first created from the TM description. Subsequently, an NDA simulating the GS dynamics is c...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "examples/even_vs_odd_tm.py", "copies": "1", "size": "4069", "license": "mit", "hash": -7844980483572467000, "line_mean": 32.6280991736, "line_max": 74, "alpha_frac": 0.5959695257, "autogenerated": false, "ratio": 2.957122093023256,...
__author__ = 'Giovanni Sirio Carmantini' """In this file, a R-ANN is constructed from a Turing Machine which dynamics reproduce two gait pattern sequences, depending on the machine control state. A Generalized Shift is first created from the TM description. Subsequently, an NDA simulating the GS dynamics is created. ...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "examples/central_pattern_generator_tm.py", "copies": "1", "size": "6040", "license": "mit", "hash": 5721827639834132000, "line_mean": 32.7430167598, "line_max": 74, "alpha_frac": 0.6216887417, "autogenerated": false, "ratio": 2.698...
__author__ = 'Giovanni Sirio Carmantini' """In this file we reproduce the simple parser from beim Graben, P., & Potthast, R. (2014). Universal neural field computation. In Neural Fields (pp. 299-318). First, the Context Free Grammar is used to create a Generalized Shift, an NDA simulating the GS is then created, th...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "examples/context_free_grammar_simple_parser.py", "copies": "1", "size": "3060", "license": "mit", "hash": -4310432898095315500, "line_mean": 29.6, "line_max": 74, "alpha_frac": 0.6006535948, "autogenerated": false, "ratio": 2.95081...
__author__ = 'Giovanni Sirio Carmantini' __version__ = 0.1 import numpy as np from collections import defaultdict class AbstractNNLayer(object): """ The base class for all neuron layers. Each layer has to implement the possibility to add connections from other layers, to compute the input to each neu...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "simpleNNlib.py", "copies": "1", "size": "5683", "license": "mit", "hash": 5148833374582724000, "line_mean": 37.9246575342, "line_max": 123, "alpha_frac": 0.6714763329, "autogenerated": false, "ratio": 3.9880701754385965, "config_...
__author__ = 'Giovanni Sirio Carmantini' __version__ = 0.1 import simpleNNlib as snn import numpy as np class NeuralTM(): """Given an NDA, constructs the equivalent neural network described in our submitted paper. :param nda: a symdyn.NonlinearDynamicalAutomaton object """ def __init__(self, ...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "neuraltm.py", "copies": "1", "size": "12401", "license": "mit", "hash": 5235028427116534000, "line_mean": 35.1545189504, "line_max": 79, "alpha_frac": 0.5510039513, "autogenerated": false, "ratio": 3.5200113539596933, "config_tes...
__author__ = 'Giovanni Sirio Carmantini' __version__ = 0.1 """ """ import numpy as np import itertools as itt def as_list(arg): """Convenience function used to make sure that a sequence is always represented by a list of symbols. Sometimes a single-symbol sequence is passed in the form of a string repr...
{ "repo_name": "TuringMachinegun/Turing_Neural_Networks", "path": "symdyn.py", "copies": "1", "size": "17553", "license": "mit", "hash": 2560528922320449500, "line_mean": 33.4176470588, "line_max": 79, "alpha_frac": 0.5780208511, "autogenerated": false, "ratio": 3.61619283065513, "config_test": ...
__author__ = 'gipmon' import math import time from random import randint import json from instagram.client import InstagramAPI class Bot: def __init__(self, config_file, tags_file): # Loading the configuration file, it has the access_token, user_id and others configs self.config = json.load(confi...
{ "repo_name": "gipmon/instagram-bot", "path": "bot/bot.py", "copies": "2", "size": "5214", "license": "mit", "hash": 5131013326245036000, "line_mean": 39.1153846154, "line_max": 120, "alpha_frac": 0.4890678941, "autogenerated": false, "ratio": 3.8422991893883567, "config_test": true, "has_no_...
__author__ = 'girish' import argparse def parse_args(args): parser = argparse.ArgumentParser(description="reverse hashes of passwords") parser.add_argument('--hash',type=str,help="The hash you want to reverse",required=True) algorithm_group = parser.add_mutually_exclusive_group(required=True) help_s = ...
{ "repo_name": "girishramnani/hacking-tools", "path": "pyhashcat/pyhashcat/cli.py", "copies": "3", "size": "1279", "license": "mit", "hash": -5686245932541438000, "line_mean": 52.2916666667, "line_max": 118, "alpha_frac": 0.7068021892, "autogenerated": false, "ratio": 3.4474393530997305, "config...
__author__ = 'girish' import argparse import os import logging import time import hashlib import csv log = logging.getLogger('main._pfish') global gl_args global gl_hashType def ValidateDirectory(theDir): if not os.path.isdir(theDir): raise argparse.ArgumentTypeError("Directory does not exist") else:...
{ "repo_name": "girishramnani/hacking-tools", "path": "file_hasher/_pfish_tools.py", "copies": "3", "size": "5301", "license": "mit", "hash": -935599104485104600, "line_mean": 30.3668639053, "line_max": 150, "alpha_frac": 0.5589511413, "autogenerated": false, "ratio": 4.1674528301886795, "config...
__author__ = 'Girish' import re import json from textwrap import wrap try: import urllib2 as request from urllib import quote except: from urllib import request from urllib.parse import quote class Translator: def __init__(self, to_lang, from_lang='auto'): self.from_lang = from_lang ...
{ "repo_name": "JainamJhaveri/collegeProjects", "path": "googleTranslate/Translator.py", "copies": "3", "size": "1366", "license": "mit", "hash": -3707500647423959000, "line_mean": 34.0256410256, "line_max": 156, "alpha_frac": 0.6251830161, "autogenerated": false, "ratio": 3.475826972010178, "co...
__author__ = 'girish' import time import sys import cli import keyGenerator import Hasher def choose_key_generator(arguments): if arguments.chars : key_generator = keyGenerator.CharacterGenerator(arguments.chars) elif arguments.num : key_generator = keyGenerator.NumericGenerator(arguments.n...
{ "repo_name": "girishramnani/hacking-tools", "path": "pyhashcat/pyhashcat/main.py", "copies": "3", "size": "1702", "license": "mit", "hash": -8856500707292794000, "line_mean": 23.3142857143, "line_max": 121, "alpha_frac": 0.6398354877, "autogenerated": false, "ratio": 3.8419864559819414, "confi...
__author__ = 'Girish Ramnani' """ This program takes in a sudoku and solves it ,here 0 means not set so add numbers write them down """ '''trying the empty board ''' def moves(board, row, column): """ used set to i :param board: :param row: :param column: :return:list -> list of legal moves t...
{ "repo_name": "WiredProgrammers/collegeProjects", "path": "sudoku_solver/Sudoku_test.py", "copies": "3", "size": "2251", "license": "mit", "hash": 9142518736691988000, "line_mean": 22.4583333333, "line_max": 97, "alpha_frac": 0.5415370946, "autogenerated": false, "ratio": 3.3298816568047336, "c...
__author__ = 'github.com/kosior' __license__ = 'MIT' __version__ = '0.3.0' import logging try: import readline # user input history except ImportError: pass import signal import sys from . import settings from .args import process_args from .db import DB from .render import HtmlFile from .save import Multi,...
{ "repo_name": "kosior/taktyk", "path": "taktyk/__init__.py", "copies": "1", "size": "1836", "license": "mit", "hash": -6035537428411863000, "line_mean": 29.4333333333, "line_max": 100, "alpha_frac": 0.6380065717, "autogenerated": false, "ratio": 3.484732824427481, "config_test": false, "has_n...
__author__ = 'github.com/phowat' import tornado.web from tornado.websocket import WebSocketHandler from tornado.ioloop import IOLoop import Queue import json from itertools import cycle import base64 from passlib.apps import custom_app_context as sins_context sessions = {} queues = {} pairs = {} class SSession(objec...
{ "repo_name": "phowat/sins", "path": "sins.py", "copies": "1", "size": "10483", "license": "mit", "hash": -1520758002368209400, "line_mean": 33.2581699346, "line_max": 141, "alpha_frac": 0.5276161404, "autogenerated": false, "ratio": 4.189848121502798, "config_test": false, "has_no_keywords":...
__author__ = 'github.com/samshadwell' # Token constants T_End = -1 T_Plus = 0 T_Minus = 1 T_Times = 2 T_Over = 3 T_Less = 4 T_Greater = 5 T_LParen = 10 T_RParen = 11 T_LBrace = 12 T_RBrace = 13 T_Is = 20 T_If = 21 T_Else = 22 T_True = 30 T_False = 31 T_And = 32 T_Or = 33 T_Not = 34 T_Word = 40 T_Num = 41 T_Quote ...
{ "repo_name": "samshadwell/TrumpScript", "path": "src/trumpscript/constants.py", "copies": "1", "size": "2322", "license": "mit", "hash": -3315287347609310700, "line_mean": 32.5942028986, "line_max": 118, "alpha_frac": 0.6363244176, "autogenerated": false, "ratio": 3.232914923291492, "config_te...
__author__ = 'github.com/samshadwell' # Token constants T_Plus = 0 T_Minus = 1 T_Times = 2 T_Over = 3 T_Less = 4 T_Greater = 5 T_LParen = 10 T_RParen = 11 T_LBrace = 12 T_RBrace = 13 T_Is = 20 T_If = 21 T_Else = 22 T_True = 30 T_False = 31 T_And = 32 T_Or = 33 T_Not = 34 T_Word = 40 T_Num = 41 T_Quote = 42 T_Make...
{ "repo_name": "cshaley/TrumpScript", "path": "src/trumpscript/constants.py", "copies": "1", "size": "1360", "license": "mit", "hash": -4029283265133610500, "line_mean": 27.25, "line_max": 118, "alpha_frac": 0.6268436578, "autogenerated": false, "ratio": 2.9671772428884027, "config_test": false,...
__author__ = 'gjlawran' # an automated site survey of CKAN installations # script visits each CKAN deployment and tries to determine the status, version, extensions and webserver # script logs what it finds at each site and makes a summary of some observations import requests import json import time import logging im...
{ "repo_name": "gjlawran/CKAN_Ecosystem", "path": "harvest.py", "copies": "1", "size": "4090", "license": "mit", "hash": 7886121974230412000, "line_mean": 34.8771929825, "line_max": 113, "alpha_frac": 0.6535452323, "autogenerated": false, "ratio": 3.8657844990548202, "config_test": false, "has...
__author__ = 'gjones' import numpy as np from matplotlib import pyplot as plt from kid_readout.equipment.hittite_controller import hittiteController import rtlsdr class RtlKidReadout(object): def __init__(self,hittite_addr='192.168.1.70'): self.hittite = hittiteController(addr=hittite_addr) self.r...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "kid_readout/equipment/rtlkid.py", "copies": "1", "size": "2563", "license": "bsd-2-clause", "hash": 4568762549387746000, "line_mean": 39.6825396825, "line_max": 113, "alpha_frac": 0.6383144752, "autogenerated": false, "ratio": 2.847777777777778, ...
__author__ = 'gjones' import numpy as np from matplotlib import pyplot as plt import joblib import itertools import os import glob from kid_readout.interactive import * def validate_resonator(res): if res.Q / np.abs(res.Q_e) < 0.01: print "failed shallow" return False if res.Q_e_real < 1000: ...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "apps/data_analysis_scripts/heterodyne_resonator_search.py", "copies": "1", "size": "3556", "license": "bsd-2-clause", "hash": -711139026983391200, "line_mean": 33.8725490196, "line_max": 111, "alpha_frac": 0.5992688414, "autogenerated": false, "ra...
__author__ = 'gjones' import time import sys import numpy as np from kid_readout.roach import heterodyne from kid_readout.utils import data_file, sweeps from kid_readout.equipment import hittite_controller, lockin_controller hittite = hittite_controller.hittiteController(addr='192.168.0.200') lockin = lockin_contro...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "apps/data_taking_scripts/2015-10-jpl-park/sweep_and_stream_at_min_s21_two_groups.py", "copies": "1", "size": "5481", "license": "bsd-2-clause", "hash": -701342082463831200, "line_mean": 32.8395061728, "line_max": 116, "alpha_frac": 0.6028097063, "au...
__author__ = 'gjones' import time import numpy as np from matplotlib import pyplot as plt import kid_readout.utils.acquire import kid_readout.roach.baseband import kid_readout.utils.data_file import kid_readout.analysis.resonator.legacy_resonator import kid_readout.analysis.iqnoise ri = kid_readout.roach.baseband.R...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "apps/data_taking_scripts/old_scripts/sweep_and_stream.py", "copies": "1", "size": "2016", "license": "bsd-2-clause", "hash": -875367396299045900, "line_mean": 28.6470588235, "line_max": 150, "alpha_frac": 0.7013888889, "autogenerated": false, "rat...
__author__ = 'gjones' import numpy as np from matplotlib import pyplot as plt from matplotlib import mlab from kid_readout.analysis.timeseries import filters class CrossSpectralAnalysis(object): def __init__(self,snm1=None,snm2=None): if snm1 is not None: self.get_data_from_snms(snm1,snm2) ...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "kid_readout/analysis/timeseries/cross_spectrum.py", "copies": "1", "size": "4530", "license": "bsd-2-clause", "hash": -7926873167301054000, "line_mean": 46.6842105263, "line_max": 128, "alpha_frac": 0.6631346578, "autogenerated": false, "ratio": 2...
__author__ = 'gjones' import numpy as np from matplotlib import pyplot as plt import logging from kid_readout.analysis import detect_peaks from kid_readout.analysis.resonator import lmfit_resonator logger = logging.getLogger(__name__) def find_resonators(frequency, s21, s21_error, frequency_span=1e6, detect_peaks_t...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "kid_readout/analysis/resonator/find_resonators.py", "copies": "1", "size": "4735", "license": "bsd-2-clause", "hash": -3027341216642132000, "line_mean": 38.7983193277, "line_max": 169, "alpha_frac": 0.6209081309, "autogenerated": false, "ratio": 2...
__author__ = 'gjones' import time import numpy as np from kid_readout.measurement.io.data_block import SweepData, DataBlock def do_sweep(ri,center_freqs,offsets,nsamp, nchan_per_step=8,reads_per_step=2,callback = None, sweep_data=None, demod=True, loopback=False): if nchan_per_step > cen...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "kid_readout/measurement/legacy/r2sweeps.py", "copies": "1", "size": "2673", "license": "bsd-2-clause", "hash": 6902617493196987000, "line_mean": 40.78125, "line_max": 131, "alpha_frac": 0.5432098765, "autogenerated": false, "ratio": 3.466926070038...
__author__ = 'gjones' class MockRoach(object): def __init__(self, host, port=7147, tb_limit=20, timeout=10.0, logger=None, _fpga_clk=256.0, sleep_for_fake_data=False): self._fpga_clk = _fpga_clk self._is_programmed = False self._boffile_list = [] self.sleep_for_fa...
{ "repo_name": "ColumbiaCMB/kid_readout", "path": "kid_readout/roach/tests/mock_roach.py", "copies": "1", "size": "1758", "license": "bsd-2-clause", "hash": 6951783735958159000, "line_mean": 26.0461538462, "line_max": 119, "alpha_frac": 0.5728100114, "autogenerated": false, "ratio": 3.447058823529...
__author__ = 'gkisel' import pprint as _pprint import os from robot.libraries.BuiltIn import BuiltIn from robot.api import logger _vars = None _builtin = BuiltIn() def pprint(data, level='INFO', html=False, console=False, repr=False): if not isinstance(data, basestring): data = _pprint.pformat(data) ...
{ "repo_name": "guykisel/robotframework-guyutils", "path": "src/GuyUtils/keywords.py", "copies": "1", "size": "4960", "license": "mit", "hash": -8735608318638739000, "line_mean": 30, "line_max": 90, "alpha_frac": 0.6163306452, "autogenerated": false, "ratio": 3.6904761904761907, "config_test": f...
__author__ = 'gk' # Implements look up Table for user to ID and ID to user, as the end Result class for storing user rank and score class ScreenNameIndex: nameToIdMap = dict() idToNameMap = dict() def __init__(self,screen_names): super().__init__() id = 0 for item in screen_names:...
{ "repo_name": "ganesh-karthick/TwitterUserRanker", "path": "PageRank/ScreenNameIndex.py", "copies": "1", "size": "1251", "license": "apache-2.0", "hash": 6825418838995320000, "line_mean": 24.5306122449, "line_max": 113, "alpha_frac": 0.5651478817, "autogenerated": false, "ratio": 3.50420168067226...
__author__ = 'gk' import optparse import os from ParserUtils.Parser import Parser from PageRank.TweetInfo import asTweetInfo,asPartialTweetInfo, TweetInfo from PageRank.ScreenNameIndex import ScreenNameIndex,UserRank from PageRank.TransitionProbablity import buildInitialStateMatrixInfo,buildLinkMatrixInfo,LinkMatrix,I...
{ "repo_name": "ganesh-karthick/TwitterUserRanker", "path": "PageRank/main.py", "copies": "1", "size": "2579", "license": "apache-2.0", "hash": 3462898317297066500, "line_mean": 30.0722891566, "line_max": 153, "alpha_frac": 0.7716169058, "autogenerated": false, "ratio": 3.485135135135135, "confi...
__author__ = 'gk' # Parses JSON file contain Tweets in the following format per line # # { # "text": "Over ongeveer een uur landt @MarsCuriosity op de rode planeet!", # "created_at": "Mon Aug 06 04:29:10 +0000 2012", # "entities": { # "user_mentions": [ # { # "indices": ...
{ "repo_name": "ganesh-karthick/TwitterUserRanker", "path": "ParserUtils/Parser.py", "copies": "1", "size": "2318", "license": "apache-2.0", "hash": 6268023207333694000, "line_mean": 28.3417721519, "line_max": 149, "alpha_frac": 0.5064710958, "autogenerated": false, "ratio": 3.184065934065934, "...
__author__ = 'gladson' import json import csv import pandas as pd def extract_stopwords(source): with open(source, 'r') as json_file: ugly_json = json_file.readlines() formatted_json = [] stopwords = [] [formatted_json.append(json.loads(x)) for x in ugly_json] [stopwords.append(formatted_j...
{ "repo_name": "gladsonvm/pycsvqna", "path": "csvqna.py", "copies": "1", "size": "1172", "license": "mit", "hash": -6455281453344252000, "line_mean": 34.5151515152, "line_max": 100, "alpha_frac": 0.6424914676, "autogenerated": false, "ratio": 3.617283950617284, "config_test": false, "has_no_ke...
__author__ = 'Glenn and Lyman Hurd' # Note two blank lines before each top-level (i.e., not part of a class) def. WINNER_TUPLE = ((0, 1, 2), (0, 3, 6), (0, 4, 8), (1, 4, 7), (3, 4, 5), (2, 5, 8), (6, 7, 8), (2, 4, 6)) def blank_list(board_string): """ Given a board string return a list of the...
{ "repo_name": "glennqhurd/TicTacToe", "path": "boardutils.py", "copies": "1", "size": "3246", "license": "mit", "hash": 1569587717232760000, "line_mean": 22.5217391304, "line_max": 113, "alpha_frac": 0.5628465804, "autogenerated": false, "ratio": 3.475374732334047, "config_test": false, "has_...
__author__ = 'glevine@penguinrandomhouse.com' from bs4 import BeautifulSoup import urllib2 import csv import pandas as pd import time import lxml import datetime import pickle import requests import re import sys import os import pymongo from retry import retry as _retry from endpoints import Search_all #from endpoin...
{ "repo_name": "gabelev/MISMI", "path": "debug/AMZ_tracker_intake_debug.py", "copies": "2", "size": "10692", "license": "mit", "hash": 8129727054071956000, "line_mean": 38.1684981685, "line_max": 139, "alpha_frac": 0.6408529742, "autogenerated": false, "ratio": 3.2687251605013756, "config_test":...
__author__ = 'glevine@penguinrandomhouse.com' __version__ = 'MISMI 0.3' from bs4 import BeautifulSoup import urllib2 import time import lxml import csv import requests import re import sys import os from retry import retry as _retry from tracker_functions import Tracker from reformat_functions import Reformat from...
{ "repo_name": "gabelev/MISMI", "path": "main.py", "copies": "1", "size": "2118", "license": "mit", "hash": 1486340179961946400, "line_mean": 25.4875, "line_max": 107, "alpha_frac": 0.6293673277, "autogenerated": false, "ratio": 3.223744292237443, "config_test": false, "has_no_keywords": false...
__author__ = 'gmazlami' from django.contrib.auth.models import User from rest_framework import authentication from rest_framework import exceptions from models import Device class ApikeyAuthentication(authentication.BaseAuthentication): def authenticate(self, request): api_key = request.META.get('HTTP_A...
{ "repo_name": "probr/probr-core", "path": "devices/authentication.py", "copies": "1", "size": "1061", "license": "mit", "hash": -156687738702545570, "line_mean": 33.2580645161, "line_max": 126, "alpha_frac": 0.671065033, "autogenerated": false, "ratio": 4.348360655737705, "config_test": false, ...
__author__ = 'gmgilmore' from tower_status_tracker import tower_status, barracks_status def process_response(arr): processed_response = map(get_match_info, arr) return processed_response def get_team_name(is_radiant, dota_side_obj): if (is_radiant): result = dota_side_obj.get(u"radiant_team",{})...
{ "repo_name": "ggilmore/DotaBlaze", "path": "helpers.py", "copies": "1", "size": "1733", "license": "mit", "hash": -6561395707951362000, "line_mean": 39.3023255814, "line_max": 120, "alpha_frac": 0.5966532025, "autogenerated": false, "ratio": 2.9725557461406518, "config_test": false, "has_no_...
__author__ = 'gmgilmore' import time import event_types class Game(object): def __init__(self, match_id, *listeners): self.id = match_id self.game_events = [] # event = (time_stamp, event_type, event_description) self.event_listeners = [] self.event_listeners.extend(*listeners) ...
{ "repo_name": "ggilmore/DotaBlaze", "path": "game.py", "copies": "1", "size": "10871", "license": "mit", "hash": 767222837422434400, "line_mean": 53.904040404, "line_max": 137, "alpha_frac": 0.4733695152, "autogenerated": false, "ratio": 4.091456529920963, "config_test": false, "has_no_keywor...
__author__ = 'gmgilmore' ANCIENT_TOWER_INDEX = 2 BOTTOM_TOWER_INDEX = 5 MIDDLE_TOWER_INDEX = 8 TOP_TOWER_INDEX = 11 BOTTOM_BARRACKS_INDEX = 2 MIDDLE_BARRACKS_INDEX = 4 TOP_BARRACKS_INDEX = 6 def get_side_string(is_radiant): if is_radiant: return "radiant" else: return "dire" def tower_stat...
{ "repo_name": "ggilmore/DotaBlaze", "path": "tower_status_tracker.py", "copies": "1", "size": "2971", "license": "mit", "hash": -283251294046664600, "line_mean": 36.1375, "line_max": 84, "alpha_frac": 0.6704813194, "autogenerated": false, "ratio": 3.007085020242915, "config_test": false, "has...
__author__ = 'gmgilmore' from enum import Enum class EventType(Enum): MATCH_STARTED = 1 MATCH_ENDED = 2 DESTROYED_TOWER = 3 DESTROYED_BARRACKS = 4 ROSHAN_KILLED = 5 GAME_OVER = 6 TEAM_NOT_FOUND = 7 LOST_TOWER = 8 LOST_BARRACKS = 9 def generate_description(event_type, event_informat...
{ "repo_name": "ggilmore/DotaBlaze", "path": "event_types.py", "copies": "1", "size": "2110", "license": "mit", "hash": 2090571432114740200, "line_mean": 42.0612244898, "line_max": 120, "alpha_frac": 0.6369668246, "autogenerated": false, "ratio": 3.430894308943089, "config_test": false, "has_n...
__author__ = 'Gobin' import argparse import logging import json from cliff import show from cliff import command from cliff import lister from redditcli.api import account class Me(lister.Lister): log = logging.getLogger(__name__) def get_parser(self, program_name): parser = super(Me, self).get_par...
{ "repo_name": "gobins/python-reddit-api", "path": "redditcli/commands/account.py", "copies": "2", "size": "2502", "license": "apache-2.0", "hash": 3513708022336116000, "line_mean": 25.9139784946, "line_max": 89, "alpha_frac": 0.5451638689, "autogenerated": false, "ratio": 4.0420032310177705, "c...
__author__ = 'Godfrey Takavarasha' import calendar import datetime #from datetime import date #from datetime import timedelta __Thirty_Day_Months = [4, 6, 9, 11] __Digits = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'] class PeriodTypes: """ Provides a named list of the period types used in the module ...
{ "repo_name": "luiscape/hdx-monitor-funnel-stats", "path": "scripts/ga_collect/datecalc.py", "copies": "1", "size": "14750", "license": "mit", "hash": -2656007189129905000, "line_mean": 33.064665127, "line_max": 130, "alpha_frac": 0.5748474576, "autogenerated": false, "ratio": 3.304951826125924, ...
__author__ = 'Godfrey Takavarasha' import os import time import json import datecalc from httplib2 import Http from datetime import date from datetime import timedelta from apiclient.discovery import build from apiclient.errors import HttpError from oauth2client.client import SignedJwtAssertionCredentials dir = os....
{ "repo_name": "luiscape/hdx-monitor-funnel-stats", "path": "scripts/ga_collect/ga_collect.py", "copies": "1", "size": "7809", "license": "mit", "hash": -5325648652621733000, "line_mean": 31.4024896266, "line_max": 110, "alpha_frac": 0.6084005635, "autogenerated": false, "ratio": 3.922149673530889...
from django.shortcuts import render import feedparser #need the lib to be installed system-wide [ToDo: Make it also work with in-app installation of lib] from .models import Website # Create your views here. def index(request): feed_websites = Website.objects.all() #template = loader.get_template('rssfeed...
{ "repo_name": "GokulEvuri/iFeed", "path": "rssfeed/views.py", "copies": "1", "size": "1277", "license": "bsd-2-clause", "hash": 2146655233827015400, "line_mean": 31.7435897436, "line_max": 117, "alpha_frac": 0.6632732968, "autogenerated": false, "ratio": 3.489071038251366, "config_test": false,...
__author__ = 'goldhand' from django import forms from django.utils.translation import ugettext_lazy as _ from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Div, Field, Submit, Button, Fieldset, HTML from crispy_forms.bootstrap import Inlin...
{ "repo_name": "goldhand/art-portfolio", "path": "art-portfolio/pages/forms.py", "copies": "1", "size": "1180", "license": "bsd-3-clause", "hash": 9064439593534044000, "line_mean": 34.7878787879, "line_max": 100, "alpha_frac": 0.6677966102, "autogenerated": false, "ratio": 3.653250773993808, "co...
# GCM derived from Go's implementation in crypto/cipher. # # https://golang.org/src/crypto/cipher/gcm.go # GCM works over elements of the field GF(2^128), each of which is a 128-bit # polynomial. Throughout this implementation, polynomials are represented as # Python integers with the low-order terms at the most sign...
{ "repo_name": "axinging/chromium-crosswalk", "path": "third_party/tlslite/tlslite/utils/aesgcm.py", "copies": "56", "size": "6772", "license": "bsd-3-clause", "hash": -922787420542072300, "line_mean": 34.0880829016, "line_max": 80, "alpha_frac": 0.5863851152, "autogenerated": false, "ratio": 3.56...
import os p = ( 115792089210356248762697446949407573530086143415290314195533631308867097853951) order = ( 115792089210356248762697446949407573529996955224135760342422259061068512044369) p256B = 0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b baseX = 0x6b17d1f2e12c4247f8bce6e563a440f277037d...
{ "repo_name": "guorendong/iridium-browser-ubuntu", "path": "third_party/tlslite/tlslite/utils/p256.py", "copies": "54", "size": "4364", "license": "bsd-3-clause", "hash": -8534859588914929000, "line_mean": 25.9382716049, "line_max": 89, "alpha_frac": 0.5657653529, "autogenerated": false, "ratio":...
__author__ = "Gopi Raghavan" __copyright__ = "Copyright (C) 2015 Gopi Raghavan" __license__ = "GPL" __version__ = "1.0" from timeit import default_timer as timer import json import random import decimal import string import datetime from datetime import date import multiprocessing as mp # Define an output queue outpu...
{ "repo_name": "mohigo/tdm", "path": "data_generator.py", "copies": "1", "size": "7109", "license": "apache-2.0", "hash": 5447963271277156000, "line_mean": 29.3803418803, "line_max": 106, "alpha_frac": 0.6588831059, "autogenerated": false, "ratio": 2.8538739462063427, "config_test": true, "has...
__author__ = 'gordonnstevenson' __project__ = 'ColorMapToITKSNAP' import xml.etree.ElementTree as xml import numpy as np import io class ColorMapWriter(object): ctrl_pt_number = None lookuptable = None filename = None def __init__(self, lookuptable, filename, ctrl_pt_num = 10): if not i...
{ "repo_name": "gordon-n-stevenson/colormap_to_ITKSNAP", "path": "ColorMapWriter.py", "copies": "1", "size": "4942", "license": "mit", "hash": -1301389911198642700, "line_mean": 37.0153846154, "line_max": 308, "alpha_frac": 0.5855928774, "autogenerated": false, "ratio": 3.2153545868575146, "conf...
from flask import Flask, Response, request, render_template from flask.ext.login import LoginManager, UserMixin, login_required from itsdangerous import JSONWebSignatureSerializer app = Flask(__name__) login_manager = LoginManager() login_manager.init_app(app) class ProtectedUser(UserMixin): # proxy for a data...
{ "repo_name": "acogdev/olaf", "path": "flask-login-example.py", "copies": "1", "size": "2211", "license": "mit", "hash": -7683922956027329000, "line_mean": 28.48, "line_max": 72, "alpha_frac": 0.6413387607, "autogenerated": false, "ratio": 3.6666666666666665, "config_test": false, "has_no_key...
__author__ = 'Gouthaman Balaraman' __version__ = '0.1.0' import sys import os import win32event import win32service import win32serviceutil import win32api import win32con import logging import servicemanager from ZEO.runzeo import ZEOOptions, ZEOServer from ZEO.runzeo import logger as zeo_logger from ZEO.runzeo im...
{ "repo_name": "gouthambs/ZEO-WinService", "path": "zeo_winservice.py", "copies": "1", "size": "5537", "license": "mit", "hash": 2633392397848781000, "line_mean": 33.3913043478, "line_max": 114, "alpha_frac": 0.6201914394, "autogenerated": false, "ratio": 3.746278755074425, "config_test": false,...
__author__ = 'gouthaman' import os import unittest import threading from flask import Flask, Blueprint, request from flask_deploy import get_server import requests import time def _start_server(server): print "Starting server" try: server.start() finally: server.stop() class BaseTestCase...
{ "repo_name": "gouthambs/flask-deploy", "path": "test_flask_deploy.py", "copies": "1", "size": "3706", "license": "mit", "hash": 3076882165729899000, "line_mean": 25.4714285714, "line_max": 83, "alpha_frac": 0.5588235294, "autogenerated": false, "ratio": 4.187570621468926, "config_test": true, ...
__author__ = 'gpratt' __author__ = 'gpratt' __author__ = 'gpratt' import argparse import subprocess import os def wrap_wait_error(wait_result): if wait_result != 0: raise NameError("Failed to execute command correctly {}".format(wait_result)) def pre_process_fastq(fq, fq01, fq02, fq03, fq04, fq05, fq06,...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/downsample_fastq.py", "copies": "1", "size": "2792", "license": "mit", "hash": 2038905931419555000, "line_mean": 35.2597402597, "line_max": 129, "alpha_frac": 0.5705587393, "autogenerated": false, "ratio": 3.3842424242424243, "config_te...
__author__ = 'gpratt' #collection of scripts to perform clipseq barcode metrics code from collections import defaultdict, Counter import numpy as np import pandas as pd from matplotlib import cm try: barcodes_df = pd.read_csv("/nas3/gpratt/projects/encode/scripts/barcodes/fixed_barcodes.txt", ...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/clipseq_barcode_metrics.py", "copies": "1", "size": "6939", "license": "mit", "hash": -753990361343963500, "line_mean": 33.0196078431, "line_max": 112, "alpha_frac": 0.6120478455, "autogenerated": false, "ratio": 4.135280095351609, "con...
__author__ = 'gpratt' import argparse import subprocess import os import pysam def pre_process_bam(bam, bam01, bam02): #split bam file into two, return file handle for the two bam files p = subprocess.Popen("samtools view {} | wc -l".format(bam), shell=True, stdout=subprocess.PIPE) # Number of reads in the tag...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/split_bam.py", "copies": "1", "size": "1708", "license": "mit", "hash": 1841744623737061600, "line_mean": 39.6666666667, "line_max": 178, "alpha_frac": 0.6487119438, "autogenerated": false, "ratio": 3.139705882352941, "config_test": fal...
__author__ = 'gpratt' import argparse import subprocess import tempfile def sort_fastq_inplace(fastq, out_fastq): handle, tmp_file = tempfile.mkstemp() call = "cat {0} | sed 's/\t/ /' | paste - - - - | sort -k1,1 -S 3G | tr '\t' '\n' > {2} && mv {2} {1}".format(fastq, out_fastq, tmp_file) subprocess.cal...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/sort_fastq.py", "copies": "1", "size": "1195", "license": "mit", "hash": 3732811498443917300, "line_mean": 41.6785714286, "line_max": 143, "alpha_frac": 0.6769874477, "autogenerated": false, "ratio": 3.1613756613756614, "config_test": f...
__author__ = 'gpratt' import glob import os import argparse from itertools import izip import shutil def warn_possibly_made(files): """ Checks if all files are the same length, if they are don't do anything othewise warn and kill pasting, if ignore is set just warn, but don't kill """ if len(set...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/cat_biogem.py", "copies": "1", "size": "2217", "license": "mit", "hash": -2762026775502407000, "line_mean": 30.2253521127, "line_max": 110, "alpha_frac": 0.6156968877, "autogenerated": false, "ratio": 3.6166394779771616, "config_test": ...
__author__ = 'gpratt' import pandas as pd import pyBigWig import pybedtools import scipy def counts_to_rpkm(featureCountsTable): """ Given a dataframe or a text file from featureCounts and converts that thing into a dataframe of RPKMs """ if isinstance(featureCountsTable, str): featureCountsTabl...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/rnaseq/helpers.py", "copies": "1", "size": "4503", "license": "mit", "hash": 7686571426444394000, "line_mean": 40.3211009174, "line_max": 181, "alpha_frac": 0.6597823673, "autogenerated": false, "ratio": 3.3730337078651687, "config_test": false...
__author__ = 'gpratt' __author__ = 'gpratt' import argparse import subprocess import os def wrap_wait_error(wait_result): if wait_result != 0: raise NameError("Failed to execute command correctly {}".format(wait_result)) def pre_process_bam(bam, bam01, bam02, bam03, bam04, bam05, bam06, bam07, bam08, ba...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/downsample_bam.py", "copies": "1", "size": "4356", "license": "mit", "hash": 3460759044747988500, "line_mean": 40.8846153846, "line_max": 170, "alpha_frac": 0.5975665748, "autogenerated": false, "ratio": 3.3741285824941905, "config_test...
__author__ = 'gpratt' from collections import Counter import gzip import os from optparse import OptionParser def parse_barcode_file(barcodes_file, out_file1, out_file2): barcodes = {} with open(barcodes_file) as barcodes_file: for line in barcodes_file: line = line.strip("\n").split("\...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/pe_barcode_splitter.py", "copies": "1", "size": "3761", "license": "mit", "hash": -2842498232793791500, "line_mean": 36.62, "line_max": 143, "alpha_frac": 0.6184525392, "autogenerated": false, "ratio": 3.694499017681729, "config_test": ...
__author__ = 'gpratt' from subprocess import call import subprocess import os import pysam def genome_coverage_bed(in_bam=None, out_bed_graph=None, genome=None, strand=None, scale=1, five_prime=False): with open(out_bed_graph, 'w') as out_bed_graph: call = "genomeCoverageBed -ibam {} -bg -strand {} -scale...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/make_bigwig_files_pe.py", "copies": "1", "size": "3548", "license": "mit", "hash": 1122934740866638500, "line_mean": 35.9583333333, "line_max": 112, "alpha_frac": 0.5772266065, "autogenerated": false, "ratio": 3.7905982905982905, "confi...
__author__ = 'gpratt' from subprocess import call import subprocess import os def genome_coverage_bed(in_bam=None, in_bed=None, out_bed_graph=None, genome=None, strand=None, split=True, dont_flip=False): with open(out_bed_graph, 'w') as out_bed_graph: if in_bam is not None and in_bed is not None: ...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/general/make_bigwig_files.py", "copies": "1", "size": "4514", "license": "mit", "hash": 3933380670954565600, "line_mean": 39.6666666667, "line_max": 235, "alpha_frac": 0.6552946389, "autogenerated": false, "ratio": 3.2082444918265813, "config_t...
__author__ = 'gpratt' import gzip from optparse import OptionParser import sys def add_back_randomers(in_file_name, out_file_name): #reads through initial file parses everything out with gzip.open(in_file_name) as fastq_file, gzip.open(out_file_name, 'w') as out_file: while True: try: ...
{ "repo_name": "YeoLab/gscripts", "path": "gscripts/clipseq/add_randomer.py", "copies": "1", "size": "1335", "license": "mit", "hash": 7410285708743052000, "line_mean": 32.375, "line_max": 90, "alpha_frac": 0.5378277154, "autogenerated": false, "ratio": 3.494764397905759, "config_test": false, ...