repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,222,525,072B | line_mean float64 6.51 99.8 | line_max int64 15 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
yuanyelele/solfege | solfege/tracebackwindow.py | 1 | 4872 | # GNU Solfege - free ear training software
# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2007, 2008, 2011 Tom Cato Amundsen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of... | gpl-3.0 | -2,274,994,143,251,863,300 | 42.891892 | 185 | 0.609401 | false |
DBrianKimmel/PyHouse | Project/src/Modules/House/Family/Reolink/reolink_device.py | 1 | 1201 | """
@name: /home/briank/workspace/PyHouse/Project/src/Modules/House/Family/Reolink/reolink_device.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2019 by D. Brian Kimmel
@license: MIT License
@note: Created on Jan 26, 2020
@summary:
"""
__updated__ = '2020-01-26'
__... | mit | -2,093,959,987,469,830,700 | 21.240741 | 101 | 0.606994 | false |
stuycs-softdev-fall-2013/proj3-7-cartwheels | website/urls.py | 1 | 1252 | from website import app, views
# Home and search
app.add_url_rule('/', view_func=views.index)
app.add_url_rule('/search', view_func=views.search_results)
# Carts
app.add_url_rule('/carts/<cid>', view_func=views.cart_page, methods=['GET', 'POST'])
app.add_url_rule('/carts/<cid>/menu', view_func=views.menu_page, method... | bsd-3-clause | 1,223,634,340,213,656,000 | 43.714286 | 96 | 0.688498 | false |
Makki1/old-svn | avr/sketchbook/GiraRM_Debug/freebus/freebus_ets/software/freebus-ets/src/GUI/FB_ProgramFrame.py | 1 | 10920 | #!/usr/bin/
#-*- coding: iso-8859-1 -*-
#===============================================================================
# __________ ________________ __ _______
# / ____/ __ \/ ____/ ____/ __ )/ / / / ___/
# / /_ / /_/ / __/ / __/ / __ / / / /\__ \
# / __/ / _, _/ /___/ /___/ /_/ / /_/ /___/ /... | gpl-3.0 | 865,511,498,934,486,400 | 39.83908 | 111 | 0.554487 | false |
kmike/tornado-slacker | test_project/settings.py | 1 | 1318 | # Django settings for test project.
import os, sys
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
join = lambda p: os.path.abspath(os.path.join(PROJECT_ROOT, p))
sys.path.insert(0, join('..'))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3'... | mit | 4,513,988,263,674,335,000 | 26.458333 | 77 | 0.68437 | false |
kevin-intel/scikit-learn | sklearn/datasets/_kddcup99.py | 3 | 12676 | """KDDCUP 99 dataset.
A classic dataset for anomaly detection.
The dataset page is available from UCI Machine Learning Repository
https://archive.ics.uci.edu/ml/machine-learning-databases/kddcup99-mld/kddcup.data.gz
"""
import errno
from gzip import GzipFile
import logging
import os
from os.path import dirname, ex... | bsd-3-clause | 3,550,723,356,904,437,000 | 32.983914 | 98 | 0.574787 | false |
abdulfaizp/adventofcode | xmas6.py | 1 | 1127 | # light_grid=[[0 for x in range(1000)] for x in range(1000)]
def call_summation(light_grid):
light=sum(map(sum, light_grid))
print "part one=" ,light
def grid_operation(array, switch_state, light_grid):
for i in range(array[0], array[2]+1):
for j in range(array[1], array[3]+1):
if switch_state==1... | cc0-1.0 | 3,651,151,422,980,804,600 | 24.636364 | 63 | 0.613132 | false |
LTD-Beget/sprutio-rpc | lib/FileManager/workers/sftp/newFile.py | 1 | 1671 | import traceback
from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer
class NewFile(BaseWorkerCustomer):
def __init__(self, path, session, *args, **kwargs):
super(NewFile, self).__init__(*args, **kwargs)
self.path = path
self.session = session
def run(self):
... | gpl-3.0 | -242,218,982,691,148,300 | 27.810345 | 82 | 0.453022 | false |
defm03/toraeru | test/loli_gelbooru.py | 1 | 3832 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
*booru general file.
For now, there's working Gelbooru downloader for loli content,
but soon I'll add danbooru, etc.
"""
import loli_spam
import os
import datetime
import urllib.request
import http.cookiejar
import xml.etree.ElementTree as eltree
import json
#lol... | gpl-3.0 | -7,906,757,162,575,998,000 | 29.420635 | 108 | 0.679541 | false |
rdoyle1978/Ice | src/ice/gridproviders/combined_provider.py | 1 | 1225 | #!/usr/bin/env python
# encoding: utf-8
import grid_image_provider
from functools import reduce
class CombinedProvider(grid_image_provider.GridImageProvider):
def __init__(self, *args):
"""
Creates a CombinedProvider out of the providers that were passed in `args`
ORDER MATTERS. `image_for_rom` will ... | mit | -3,607,491,241,710,703,000 | 28.878049 | 85 | 0.705306 | false |
line72/subte | libsubte/interface/StopMarker.py | 1 | 9828 | #
# Copyright (C) 2012 - Marcus Dillavou
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# This program is distributed in the hope ... | gpl-3.0 | -5,898,807,832,328,061,000 | 32.889655 | 129 | 0.577941 | false |
RuudBurger/CouchPotatoServer | couchpotato/core/downloaders/deluge.py | 1 | 16194 | from base64 import b64encode, b16encode, b32decode
from datetime import timedelta
from hashlib import sha1
import os.path
import re
import traceback
from bencode import bencode as benc, bdecode
from couchpotato.core._base.downloader.main import DownloaderBase, ReleaseDownloadList
from couchpotato.core.helpers.encoding... | gpl-3.0 | 8,216,095,494,107,268,000 | 37.374408 | 512 | 0.545943 | false |
pollitosabroson/idneo | src/catalogs/migrations/0001_initial.py | 1 | 1867 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(ver... | apache-2.0 | 388,971,664,067,969,900 | 42.418605 | 133 | 0.559186 | false |
GabrielNicolasAvellaneda/dd-agent | checks.d/wmi_check.py | 1 | 5343 | '''
Windows Only.
Generic WMI check. This check allows you to specify particular metrics that you
want from WMI in your configuration. Check wmi_check.yaml.example in your conf.d
directory for more details on configuration.
'''
# 3rd party
import wmi
# project
from checks import AgentCheck
UP_METRIC = 'Up'
SEARCH_WI... | bsd-3-clause | 658,768,032,123,503,700 | 41.404762 | 98 | 0.518061 | false |
blancha/abcngspipelines | bischipseq/convert1StartTo0Start_batch.py | 1 | 2156 | #!/usr/bin/env python3
# Version 1.0
# Author Alexis Blanchet-Cohen
# Date: 15/06/2014
import argparse
import glob
import os
import subprocess
import util
# Read the command line arguments.
parser = argparse.ArgumentParser(description='Generate scripts to convert bedgraph files from one-based start to zero-based sta... | gpl-3.0 | -3,264,305,320,030,537,000 | 40.461538 | 157 | 0.728664 | false |
bigfatnoob/DISCAW | Models/nasa93.py | 1 | 7953 | """
# The NASA93 Data Set
Standard header:
"""
from __future__ import division,print_function
import sys
sys.dont_write_bytecode = True
from lib import *
"""
Data:
Possible Splits= ["variance", "centroid", "median"]
"""
def nasa93(weighFeature = False, split = "variance"):
vl=1;l=2;n=3;h=4;vh=5;xh=6;_=0
return ... | mit | -304,085,712,307,642,560 | 56.215827 | 79 | 0.50044 | false |
eshijia/magnum | magnum/db/sqlalchemy/api.py | 1 | 39042 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 5,895,803,285,767,630,000 | 36.978599 | 79 | 0.596102 | false |
jandom/rdkit | rdkit/Chem/Draw/qtCanvas.py | 1 | 3513 | # $Id$
#
# Copyright (C) 2014 Seiji Matsuoka
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
from rdkit.Chem.Draw.canvasbase import CanvasBase
f... | bsd-3-clause | 2,263,329,650,974,698,000 | 35.59375 | 98 | 0.63877 | false |
mrocklin/streams | streamz/tests/test_sources.py | 1 | 2787 | from flaky import flaky
import pytest
from streamz import Source
from streamz.utils_test import wait_for, await_for, gen_test
import socket
@flaky(max_runs=3, min_passes=1)
def test_tcp():
port = 9876
s = Source.from_tcp(port)
out = s.sink_to_list()
s.start()
wait_for(lambda: s.server is not None,... | bsd-3-clause | 1,888,732,176,384,832,300 | 27.731959 | 79 | 0.587729 | false |
ebmdatalab/openprescribing | openprescribing/dmd/build_search_query.py | 1 | 3506 | from django.db.models import fields, ForeignKey, ManyToOneRel, OneToOneRel, Q
from .obj_types import clss
from functools import reduce
def build_query_obj(cls, search):
"""Return Q object to filter dm+d objects based on search.
Parameters:
cls: class of dm+d object to search
search: a tree desc... | mit | 832,798,126,835,511,300 | 28.965812 | 82 | 0.587849 | false |
jsheffie/django-auth-experiments | djauth/quickstart/views.py | 1 | 2083 | from django.shortcuts import render
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from rest_framework.permissions import IsAuthenticated
from django.contrib.auth.decorators import login_required
from quickstart.serializers import UserSerializer, GroupSerializer
from django.htt... | mit | -253,710,595,698,105,470 | 33.716667 | 74 | 0.723476 | false |
CINPLA/exana | exana/tracking/fields.py | 1 | 32391 | import numpy as np
def spatial_rate_map(x, y, t, spike_train, binsize=0.01, box_xlen=1,
box_ylen=1, mask_unvisited=True, convolve=True,
return_bins=False, smoothing=0.02):
"""Divide a 2D space in bins of size binsize**2, count the number of spikes
in each bin and divi... | gpl-3.0 | 8,174,192,474,725,353,000 | 34.9102 | 101 | 0.591244 | false |
tensorflow/cloud | src/python/tensorflow_cloud/tuner/vizier_client.py | 1 | 19569 | # Lint as: python3
# Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -2,417,612,249,861,651,000 | 36.632692 | 80 | 0.568297 | false |
DavidCain/film_server | cgi-bin/playlist.py | 1 | 7485 | #!/usr/bin/env python
# David Cain
# RE357
# 2012-12-16
"""
A script to make a m3u bookmark playlist (playable in VLC), or an
archive of .m4v video clip files.
"""
from collections import OrderedDict
from datetime import datetime
import cgi
import csv
import os
import re
import shutil
import subprocess
import sys
im... | gpl-3.0 | -7,705,770,874,046,983,000 | 26.929104 | 94 | 0.604275 | false |
phatblat/AbletonLiveMIDIRemoteScripts | Push2/item_lister_component.py | 1 | 9031 | # Source Generated with Decompyle++
# File: item_lister_component.pyc (Python 2.5)
from __future__ import absolute_import
from ableton.v2.base import forward_property, index_if, listens, SlotManager, Subject
from ableton.v2.control_surface import Component, CompoundComponent
from ableton.v2.control_surface.control imp... | mit | 8,494,214,371,004,027,000 | 30.034364 | 197 | 0.618758 | false |
atodorov/pykickstart | tests/commands/timezone.py | 1 | 6651 | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2009 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be usef... | gpl-2.0 | -2,127,721,929,382,395,400 | 43.046358 | 121 | 0.658097 | false |
jenmud/behave-graph | behave_graph/__init__.py | 1 | 2422 | """
Setup the environment by parsing the command line options and staring
a ruruki http server.
"""
import argparse
import logging
import os
from behave.configuration import Configuration
from behave.runner import Runner, parse_features
from ruruki_eye.server import run
from behave_graph.scrape import GRAPH
from behave... | mit | 1,787,216,094,776,277,800 | 23.22 | 74 | 0.603633 | false |
tsuru/rpaas | rpaas/sslutils.py | 1 | 4989 | # Copyright 2016 rpaas authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import json
import os
import datetime
import ipaddress
import base64
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from cr... | bsd-3-clause | -3,365,001,182,327,682,600 | 36.511278 | 107 | 0.67709 | false |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/OptRomInfStatement.py | 1 | 5392 | ## @file
# process OptionROM generation from INF statement
#
# Copyright (c) 2007, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of ... | gpl-2.0 | -6,444,457,340,399,212,000 | 33.793548 | 115 | 0.635386 | false |
akiokio/centralfitestoque | src/.pycharm_helpers/python_stubs/-1807332816/future_builtins.py | 1 | 1819 | # encoding: utf-8
# module future_builtins
# from /usr/lib/python2.7/lib-dynload/future_builtins.so
# by generator 1.130
"""
This module provides functions that will be builtins in Python 3.0,
but that conflict with builtins that already exist in Python 2.x.
Functions:
ascii(arg) -- Returns the canonical string repre... | bsd-2-clause | -6,210,883,257,963,879,000 | 29.316667 | 72 | 0.703683 | false |
mikehulluk/morphforge | src/morphforgecontrib/traces/taggers.py | 1 | 2064 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | bsd-2-clause | 7,058,320,315,138,345,000 | 36.527273 | 72 | 0.660368 | false |
miurahr/pinax-teams | pinax/teams/views.py | 1 | 10627 | import json
from django.http import Http404, HttpResponse, HttpResponseRedirect, HttpResponseForbidden
from django.shortcuts import render, redirect, get_object_or_404
from django.template import RequestContext
from django.template.loader import render_to_string
from django.views.decorators.http import require_POST
fr... | mit | -2,445,942,896,833,156,000 | 30.722388 | 95 | 0.633951 | false |
Wolkabout/WolkConnect-Python- | wolk/__init__.py | 1 | 3048 | # coding=utf-8
"""
.. module:: wolk
This module provides connection to WolkAbout IoT Platform.
To start publishing data to the platform
create an instance of Device class with credentials obtained from the platform
and pass it to an instance of WolkConnect class.
For more information about module features visit:
htt... | apache-2.0 | -7,907,046,333,640,627,000 | 36.62963 | 85 | 0.82185 | false |
deanet/gheimdall | gheimdall/responsecreator/__init__.py | 1 | 5051 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# GHeimdall - A small web application for Google Apps SSO service.
# Copyright (C) 2007 SIOS Technology, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | gpl-2.0 | -5,745,384,431,272,258,000 | 35.868613 | 102 | 0.67848 | false |
dm03514/func-y-task-engine | funcytaskengine/engine.py | 1 | 2928 | """
Drives a TestMachine to completion.
Engine needs to be completely generic and agnostic from any
specific request types, response types, protocols, etc,
adding a new initiator or
"""
import gevent
import logging
from gevent import Timeout
from gevent.queue import Queue
from funcytaskengine import settings
from f... | gpl-3.0 | 2,719,383,374,463,292,400 | 28.877551 | 86 | 0.510587 | false |
tmenjo/cinder-2015.1.1 | cinder/tests/test_rbd.py | 1 | 50268 |
# Copyright 2012 Josh Durgin
# Copyright 2013 Canonical Ltd.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | apache-2.0 | -407,074,156,635,504,500 | 40.270936 | 79 | 0.555721 | false |
coronary/RandomEpisode | depends/Lib/site-packages/tmdbsimple/people.py | 1 | 7235 | # -*- coding: utf-8 -*-
"""
tmdbsimple.people
~~~~~~~~~~~~~~~~~
This module implements the People, Credits, and Jobs functionality
of tmdbsimple.
Created by Celia Oakley on 2013-10-31.
:copyright: (c) 2013-2017 by Celia Oakley
:license: GPLv3, see LICENSE for more details
"""
from .base import TMDB
class People(T... | mit | 481,468,421,621,754,600 | 27.710317 | 80 | 0.581617 | false |
chrisjrn/registrasion | registrasion/tests/controller_helpers.py | 1 | 2034 | from registrasion.controllers.cart import CartController
from registrasion.controllers.credit_note import CreditNoteController
from registrasion.controllers.invoice import InvoiceController
from registrasion.models import commerce
from django.core.exceptions import ObjectDoesNotExist
class TestingCartController(Cart... | apache-2.0 | -5,205,401,486,481,097,000 | 31.285714 | 79 | 0.652901 | false |
xuru/pyvisdk | pyvisdk/do/host_internet_scsi_hba_target_set.py | 1 | 1107 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def HostInternetScsiHbaTargetSet(vim, *args, **kwargs):
'''A collection of one or more st... | mit | 2,289,050,678,539,192,600 | 31.588235 | 124 | 0.610659 | false |
ehooo/django_mqtt | test_web/settings.py | 1 | 4373 | """
Django settings for web project.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... | gpl-2.0 | 6,900,691,633,989,705,000 | 25.664634 | 95 | 0.641207 | false |
rlugojr/rekall | version.py | 1 | 6722 | #!/usr/bin/python
"""Global version file.
This program is used to manage versions. Prior to each release, please run it
with update.
"""
import argparse
import json
import os
import yaml
_VERSION_CODE = '''
import json
import os
import subprocess
try:
# We are looking for the git repo which contains this file.... | gpl-2.0 | -6,194,861,238,376,707,000 | 29.834862 | 79 | 0.626302 | false |
pleoni/game-of-life | plot/old/test_perf_mpi/life_perf_compilers.py | 1 | 1863 | import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from numpy import *
import sys
import datetime
datafile1="life_host_icc.out"
datafile2="life_host_gnu.out"
datafile3="life_host_pgi.out"
if len(sys.argv) > 1:
datafile=sys.argv[1]
plotfile="compilers_perf_eurora.png"
data1 = loadtxt(datafile... | gpl-2.0 | 7,832,986,248,728,866,000 | 27.661538 | 118 | 0.609769 | false |
astr93/c_sghmc | c_sghmc/projectcode.py | 1 | 21329 | import numpy as np
import numpy.random
import sympy as sp
import seaborn as sns
import matplotlib.pyplot as plt
def hmc(U, gradU, M, epsilon, m, theta, mhtest=1):
"""Hamiltonian Monte-Carlo algorithm with an optional Metropolis-Hastings test
U is potential energy as a callable function
gradU is its gradien... | mit | -5,523,963,265,161,026,000 | 30.977511 | 312 | 0.638755 | false |
erudit/eruditorg | eruditorg/apps/public/site_messages/migrations/0002_auto_20190425_1305.py | 1 | 1845 | # Generated by Django 2.0.13 on 2019-04-25 17:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("site_message", "0001_initial"),
]
operations = [
migrations.CreateModel(
name="TargetSite",
fields=[
... | gpl-3.0 | -5,972,333,534,437,446,000 | 31.839286 | 173 | 0.449157 | false |
naterh/chipsec | source/tool/chipsec/utilcmd/pci_cmd.py | 1 | 4384 | #!/usr/local/bin/python
#CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2015, Intel Corporation
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; Version 2.
#
#This pr... | gpl-2.0 | 8,458,805,531,248,735,000 | 30.488889 | 125 | 0.551323 | false |
jocassid/PyDataGenerator | testDataGenerator.py | 1 | 2454 | #!/usr/bin/python3
import unittest
from DataGenerator import \
InMemoryDataSource, \
Person, \
Household
import locale
# View all available locales
# locale -a
#
# View current locale settings
# locale
#
# Add locale to system
# sudo locale-gen de_DE.utf8
# class TestDataSource(unittest.TestCase):
... | mit | 8,514,053,047,799,457,000 | 23.54 | 70 | 0.55705 | false |
ciaran2/pyterrain | pyterrain.py | 1 | 4479 | #!/usr/bin/python
from __future__ import print_function, division, unicode_literals
import argparse
import itertools
import sys
import noise
import PIL.Image
def main(width=800, height=600, scale=3, xoffset=0, yoffset=0, num_octaves=6, outfile='out.png',
min_height=-10000, max_height=10000, **kwargs):
wo... | mit | 5,992,443,874,268,217,000 | 40.472222 | 116 | 0.649475 | false |
liw/daos | src/tests/ftest/harness/advanced.py | 1 | 2765 | #!/usr/bin/python
"""
(C) Copyright 2021 Intel Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
from random import choice
from re import findall
from apricot import TestWithServers
from general_utils import run_pcmd
class HarnessAdvancedTest(TestWithServers):
"""Advanced harness test cases.
... | apache-2.0 | 8,386,738,577,204,103,000 | 34.909091 | 79 | 0.614105 | false |
bugbound/webnuke | libs/angular/angularCustomJavascript.py | 1 | 1178 | class AngularCustomJavascript:
def __init__(self, jsinjector):
self.version = 0.1
self.jsinjector = jsinjector
self.jsinjector.add_help_topic('wn_showAngularAppName()', 'Show AngularJS Main Application Name')
self.jsinjector.add_js_file('libs/angular/js/app-name.js')
self.jsinjector.add_help_topic('wn_sho... | mit | 6,817,451,471,202,081,000 | 57.9 | 107 | 0.757216 | false |
tietokilta-saato/tikplay | tikplay/server.py | 1 | 5529 | import json
import os
from hashlib import sha1
from flask import request, jsonify, current_app
from flask.ext.restful import Resource
import time
from werkzeug.utils import secure_filename
import traceback
from audio import play_file
from provider.provider import Provider
from provider.task import TaskState
from util... | mit | 5,394,548,310,711,186,000 | 33.773585 | 119 | 0.584012 | false |
bitdagger/mtg-scanner | scanner.py | 1 | 8352 | from __future__ import print_function
import numpy as np
import cv2
import math
import json
import sys
import phash
import operator
import signal
import base64
from debugger import MTG_Debugger
from mtgexception import MTGException
from transformer import MTG_Transformer
"""Scanner module
This module is responsible... | mit | -6,063,127,265,762,515,000 | 36.452915 | 77 | 0.530771 | false |
white-lab/pyproteome | brainrnaseq/__init__.py | 1 | 2373 |
from . import cache, mapping, enrichments
CELL_TYPE_COLS = {
'Homo sapiens': {
'Astrocyte': [
'8yo',
'13yo', '16yo', '21yo.1', '22yo.1', '35yo', '47yo', '51yo', '53yo',
'60yo', '63yo - 1', '63yo - 2',
],
'Neuron': [
'25yo',
],
... | bsd-2-clause | 7,507,329,908,707,769,000 | 21.6 | 79 | 0.435735 | false |
racker/scrivener | scrivener/tests/test_server.py | 1 | 1777 | # Copyright 2012 Rackspace Hosting, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | -3,906,171,968,325,228,500 | 30.732143 | 74 | 0.736072 | false |
vamdt/spider | douban/pics.py | 1 | 1638 | # coding=utf-8
import re
import urllib
import json
import os, random
BASE_DOWN_DIR = './download'
BASE_DOWN_POSTS_DIR = BASE_DOWN_DIR + '/posts'
BASE_URL = 'http://www.douban.com/photos/photo/2230938262/'
class AppURLopener(urllib.FancyURLopener):
version = "Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/5... | mit | 6,337,651,235,404,347,000 | 25.015873 | 162 | 0.616606 | false |
Auzzy/pyinq | pyinq/tests/test_results.py | 1 | 9565 | """
Copyright (c) 2012-2013, Austin Noto-Moniz (metalnut4@netscape.net)
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND... | isc | 8,524,622,938,886,892,000 | 30.883333 | 124 | 0.716675 | false |
matmodlab/matmodlab2 | matmodlab2/ext_helpers/build_ext.py | 1 | 9765 | #!/usr/bin/env python
import os
import re
import sys
import glob
import shutil
import logging
import tempfile
from argparse import ArgumentParser
from subprocess import Popen, STDOUT
from contextlib import contextmanager
from matmodlab2.core.logio import get_logger
from matmodlab2.core.environ import environ
from matm... | bsd-3-clause | -2,366,992,133,191,876,600 | 33.02439 | 123 | 0.619662 | false |
snorfalorpagus/pywr | tests/test_parameters.py | 1 | 43931 | """
Test for individual Parameter classes
"""
from __future__ import division
from pywr.core import Model, Timestep, Scenario, ScenarioIndex, Storage, Link, Input, Output
from pywr.parameters import (Parameter, ArrayIndexedParameter, ConstantScenarioParameter,
ArrayIndexedScenarioMonthlyFactorsParameter, MonthlyPro... | gpl-3.0 | -1,460,923,139,671,873,500 | 33.107919 | 130 | 0.604152 | false |
mushorg/tanner | tanner/config.py | 1 | 1119 | import logging
import os
import sys
import yaml
LOGGER = logging.getLogger(__name__)
class TannerConfig:
config = None
@staticmethod
def read_config(path):
config_values = {}
try:
with open(path, "r") as f:
config_values = yaml.load(f, Loader=yaml.FullLoader)... | gpl-3.0 | -722,510,278,253,578,000 | 25.642857 | 107 | 0.624665 | false |
ortoloco/jordbruksmark | jordbruksmark/admin.py | 1 | 1460 | # -*- coding: utf-8 -*-
from django.contrib import admin, messages
from jordbruksmark.models import *
class ParzellenAdmin(admin.ModelAdmin):
list_display = ["__unicode__", "name"]
search_fields = ["id", "code", "name"]
class DuengungsstufenAdmin(admin.ModelAdmin):
list_display = ["__unicode__"]
... | gpl-3.0 | 5,250,728,470,260,427,000 | 32.953488 | 61 | 0.677397 | false |
Ilphrin/TuxleTriad | Menu.py | 1 | 16142 | # coding: utf-8
import pygame
import os
import sys
import gettext
from functions import *
from color import *
from pygame.locals import *
from game import Application
from Sound import Sound
from Text import Text
from Buttons import Button
from listOfCards import *
from Card import Card
pygame.init()
class Menu(pyga... | mit | 1,228,710,710,715,892,200 | 36.714953 | 78 | 0.477016 | false |
AButenko/selenium_tests | test_gui/test_login.py | 1 | 1921 | # -*- coding: utf-8 -*-
# from django.conf import settings
import pytest
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
f... | bsd-3-clause | -5,620,181,287,252,949,000 | 38.22449 | 138 | 0.72202 | false |
mcalmer/spacewalk | client/rhel/rhnlib/rhn/rpclib.py | 1 | 24163 | #
# This module contains all the RPC-related functions the RHN code uses
#
# Copyright (c) 2005--2018 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTAB... | gpl-2.0 | 4,209,307,803,917,549,600 | 32.794406 | 169 | 0.573687 | false |
yunli2004/OpenClos | jnpr/openclos/util.py | 2 | 8115 | '''
Created on Aug 21, 2014
@author: moloyc
'''
import re
import os
import yaml
import platform
import datetime
import shutil
from netaddr import IPNetwork
import netifaces
from propLoader import propertyFileLocation
TWO_STAGE_CONFIGURATOR_DEFAULT_ATTEMPT=5
TWO_STAGE_CONFIGURATOR_DEFAULT_INTERVAL=30 # in seconds
TWO... | apache-2.0 | 3,603,975,910,876,883,000 | 29.855513 | 107 | 0.616266 | false |
geotrellis/geotrellis-osm-elevation | ingest/src/main/python/geotrellis/osme/ingest/translate.py | 1 | 9548 | # 1. function create_object_links() gets a bucket path and returns a list of the link of each .img file
# 2. s3://azavea-datahub/emr/bootstrap.sh: install python2.7: sudo yum install -y python27;
# install gdal;
# install gdal_retile... | apache-2.0 | 8,990,720,175,938,981,000 | 33.348921 | 159 | 0.542417 | false |
LazerTrace/LazerTrace | vendor/openctm/bindings/python/openctm.py | 1 | 6310 | #------------------------------------------------------------------------------
# Product: OpenCTM
# File: openctm.py
# Description: Python API bindings (tested with Python 2.5.2 and Python 3.0)
#------------------------------------------------------------------------------
# Copyright (c) 2009-2010 Marcus G... | mit | 5,132,959,107,381,138,000 | 29.931373 | 111 | 0.750238 | false |
chromium/chromium | tools/metrics/histograms/update_histogram_enum.py | 3 | 13658 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Updates enums in histograms.xml file with values read from provided C++ enum.
If the file was pretty-printed, the updated version is pretty-printed too.
... | bsd-3-clause | 8,792,709,390,575,130,000 | 36.938889 | 80 | 0.666496 | false |
intfrr/SoCo | soco/data_structures.py | 1 | 38123 | # -*- coding: utf-8 -*-
# pylint: disable=star-args, too-many-arguments, fixme
""" This module contains classes for handling DIDL-Lite metadata.
This is the XML schema used by Sonos for carrying metadata representing many
items such as tracks, playlists, composers, albums etc.
"""
# It tries to follow the class h... | mit | 8,021,834,686,697,248,000 | 35.48134 | 81 | 0.572069 | false |
orbitinstasis/pifun | continuous_recordings_tester.py | 1 | 2870 | #!/usr/bin/env python3
# call with python3
# test [1] times; stream from [2]; play on [3]
import os
import time
import sys
import threading
import saleae
# from gtts import gTTS
# TEST_SECONDS = 10
TEST_LOOPS = int(sys.argv[1])
TTY_SOURCE = "/dev/" + str(sys.argv[2])
TTY_DESTINATION = "/dev/" + str(sys.argv[3])
TT... | gpl-3.0 | 3,837,845,235,144,074,000 | 25.574074 | 100 | 0.669686 | false |
Tinitto/ShoppingListAPI | api/test/test_shoppingitem_model.py | 1 | 2881 | """
This includes the tests for the ShoppingItem model
"""
import unittest
from app.models.shopping import ShoppingItem
try:
from .common_functions import BaseModelTestClass
except (ImportError, SystemError):
from common_functions import BaseModelTestClass
class ShoppingItemModelTest(BaseModelTestClass):
... | mit | -5,915,463,197,604,314,000 | 31.738636 | 71 | 0.605345 | false |
bitcraft/PyTMX | pytmx/__init__.py | 1 | 1082 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2012-2017, Leif Theden <leif.theden@gmail.com>
This file is part of pytmx.
pytmx is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, ... | lgpl-3.0 | -2,368,980,745,109,895,000 | 30.823529 | 70 | 0.738447 | false |
mozman/ezdxf | examples/render/render_ellipse.py | 1 | 1255 | # Copyright (c) 2018-2019, Manfred Moitzi
# License: MIT License
from math import radians
import ezdxf
from ezdxf.render.forms import ellipse
from ezdxf.math import Matrix44
NAME = 'ellipse.dxf'
doc = ezdxf.new('R12', setup=True)
msp = doc.modelspace()
def render(points):
msp.add_polyline2d(list(points))
def t... | mit | -3,324,645,544,781,303,000 | 24.612245 | 107 | 0.641434 | false |
noiselabs/box-linux-sync | src/noiselabs/box/pms/apt.py | 1 | 1248 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of box-linux-sync.
#
# Copyright (C) 2013 Vítor Brandão <noisebleed@noiselabs.org>
#
# box-linux-sync is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by the
# Free Software... | lgpl-3.0 | 4,470,295,722,904,715,000 | 31.789474 | 80 | 0.701445 | false |
DirectXMan12/nova-hacking | nova/tests/api/openstack/compute/contrib/test_server_start_stop.py | 1 | 3702 | # Copyright (c) 2012 Midokura Japan K.K.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -2,595,194,122,138,429,400 | 38.806452 | 78 | 0.667747 | false |
mosdef-hub/foyer | foyer/tests/test_forcefield_parameters.py | 1 | 10029 | import numpy as np
import pytest
from foyer import Forcefield, forcefields
from foyer.exceptions import MissingForceError, MissingParametersError
from foyer.forcefield import get_available_forcefield_loaders
from foyer.tests.base_test import BaseTest
from foyer.tests.utils import get_fn
@pytest.mark.skipif(
cond... | mit | 3,671,707,264,193,672,000 | 33.582759 | 79 | 0.5172 | false |
heromod/migrid | mig/webserver/webserver.py | 1 | 1966 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# webserver - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of... | gpl-2.0 | -8,052,238,269,252,702,000 | 23.886076 | 81 | 0.722787 | false |
mirestrepo/voxels-at-lems | boxm/fill_internal_nodes.py | 1 | 1379 | import boxm_batch;
import os;
import optparse;
boxm_batch.register_processes();
boxm_batch.register_datatypes();
class dbvalue:
def __init__(self, index, type):
self.id = index # unsigned integer
self.type = type # string
print("Filling internal nodes");
#Parse inputs
parser = optparse.OptionParser... | bsd-2-clause | -807,465,746,511,493,400 | 24.537037 | 95 | 0.677302 | false |
jeonghoonkang/BerePi | apps/lcd_berepi/lib/lcd.py | 1 | 5635 | #!/usr/bin/python
# Author : ipmstyle, https://github.com/ipmstyle
# : jeonghoonkang, https://github.com/jeonghoonkang
# for the detail of HW connection, see lcd_connect.py
import RPi.GPIO as GPIO
import time, os
from subprocess import *
from lcd_connect import *
# Define some device constants
LCD_WIDTH = 16... | bsd-2-clause | 8,807,742,185,404,786,000 | 23.823789 | 75 | 0.657498 | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/generate/rule_400.py | 1 | 1308 |
from vsg.rules import align_tokens_in_region_between_tokens_when_between_tokens_unless_between_tokens
from vsg import token
lAlign = []
lAlign.append(token.full_type_declaration.identifier)
lAlign.append(token.incomplete_type_declaration.identifier)
lAlign.append(token.file_declaration.identifier)
lAlign.append(toke... | gpl-3.0 | -5,148,443,936,430,004,000 | 39.875 | 178 | 0.791284 | false |
susahe/sis | sis/schedule/models.py | 1 | 1278 | from __future__ import unicode_literals
from django.template.defaultfilters import slugify
from django.contrib.auth.models import User
from django.db import models
from course.models import Activity,Course,CourseGroup
from datetime import datetime
# Theory Session table create
# have relationship between course gro... | gpl-2.0 | 7,980,110,490,229,708,000 | 35.514286 | 68 | 0.79734 | false |
cheeseywhiz/cheeseywhiz | http/data/csv-vis.py | 1 | 3063 | #!/usr/bin/env python3
import csv
import sys
import matplotlib.pyplot as plt
from config import data_sets, fontdict
try:
sys.argv[1]
if sys.argv[1] not in data_sets:
raise IndexError
except IndexError as error:
keys = '\n'.join(key for key in data_sets)
print(f'Data sets:\n{keys}\nPut in arg #1... | mit | -5,690,825,025,149,385,000 | 23.309524 | 74 | 0.63859 | false |
kylewray/nova | python/nova/nova_pomdp.py | 1 | 6240 | """ The MIT License (MIT)
Copyright (c) 2015 Kyle Hollins Wray, University of Massachusetts
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without ... | mit | 2,637,093,861,809,474,000 | 47.372093 | 98 | 0.565705 | false |
facebook/chisel | commands/FBXCTestCommands.py | 1 | 48565 | #!/usr/bin/python
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import re
import fbchisellldbbase as fb
import lldb
NOT_FOUND = 0xFFFFFFFF # UINT32_MAX
def lldbc... | mit | -1,635,572,801,278,517,000 | 28.776211 | 99 | 0.564789 | false |
malt1/lutris | tests/test_installer.py | 1 | 1700 | from unittest import TestCase
from lutris.installer import ScriptInterpreter, ScriptingError
class MockInterpreter(ScriptInterpreter):
""" a script interpreter mock """
script = {'runner': 'linux'}
def is_valid(self):
return True
class TestScriptInterpreter(TestCase):
def test_script_with_c... | gpl-3.0 | -5,782,265,075,609,909,000 | 33 | 72 | 0.594118 | false |
NicoVarg99/daf-recipes | ckan/ckan/ckanext-dcatapit/ckanext/dcatapit/dcat/profiles.py | 1 | 31302 |
import ast
import logging
import datetime
from pylons import config
from rdflib.namespace import Namespace, RDF, SKOS
from rdflib import URIRef, BNode, Literal
import ckan.logic as logic
from ckanext.dcat.profiles import RDFProfile, DCAT, LOCN, VCARD, DCT, FOAF, ADMS
from ckanext.dcat.utils import catalog_uri, dat... | gpl-3.0 | 9,136,739,147,792,279,000 | 38.225564 | 139 | 0.566449 | false |
alphagov/notifications-api | migrations/versions/0149_add_crown_to_services.py | 1 | 1349 | """
Revision ID: 0149_add_crown_to_services
Revises: 0148_add_letters_as_pdf_svc_perm
Create Date: 2017-12-04 12:13:35.268712
"""
from alembic import op
import sqlalchemy as sa
revision = '0149_add_crown_to_services'
down_revision = '0148_add_letters_as_pdf_svc_perm'
def upgrade():
op.add_column('services', s... | mit | 2,876,341,452,399,597,600 | 25.98 | 86 | 0.633062 | false |
surdy/dcos | packages/adminrouter/extra/src/test-harness/tests/open/test_master.py | 1 | 3453 | # Copyright (C) Mesosphere, Inc. See LICENSE file for details.
import logging
import pytest
import requests
from generic_test_code.common import overridden_file_content
from mocker.endpoints.mesos import AGENT1_ID
log = logging.getLogger(__name__)
authed_endpoints = [
'/acs/api/v1/reflect/me',
'/capabiliti... | apache-2.0 | -5,454,270,317,365,590,000 | 33.41 | 84 | 0.587039 | false |
glennhickey/hal | assemblyHub/wigTrack.py | 1 | 7699 | #!/usr/bin/env python3
#Copyright (C) 2013 by Ngan Nguyen
# Copyright (C) 2012-2019 by UCSC Computational Genomics Lab
#
#Released under the MIT license, see LICENSE.txt
"""Creating wiggle (annotation) tracks and lifted-over wiggle tracks for the hubs
"""
import os, re, time
from sonLib.bioio import system
from toi... | mit | -1,007,999,811,680,412,400 | 47.727848 | 477 | 0.636446 | false |
rvasilev/django-markitup-widget | markitup/widgets.py | 1 | 3052 | """
widgets for django-markitup
Time-stamp: <2010-01-06 12:31:06 carljm widgets.py>
"""
from django import forms
from django.utils.safestring import mark_safe
from django.contrib.admin.widgets import AdminTextareaWidget
from markitup import settings
from markitup.util import absolute_url, absolute_jquery_url
import ... | bsd-3-clause | -5,562,470,755,295,741,000 | 32.911111 | 77 | 0.595675 | false |
asterisk/testsuite | lib/python/asterisk/pluggable_modules.py | 1 | 38856 | """Generic pluggable modules
Copyright (C) 2012, Digium, Inc.
Kinsey Moore <kmoore@digium.com>
This program is free software, distributed under the terms of
the GNU General Public License Version 2.
"""
import os
import sys
import logging
import shutil
import re
sys.path.append("lib/python")
from .ami import AMIEven... | gpl-2.0 | 3,161,859,109,901,518,000 | 39.016478 | 103 | 0.587528 | false |
facebookresearch/faiss | tests/torch_test_contrib.py | 1 | 11969 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import faiss
import torch
import unittest
import numpy as np
import faiss.contrib.torch_utils
class TestTorchUtilsCPU(unittest.TestCase):
... | mit | 1,375,475,298,643,582,500 | 33.793605 | 81 | 0.609408 | false |
foosel/OctoPrint | src/octoprint/vendor/sockjs/tornado/transports/xhr.py | 1 | 2840 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
"""
sockjs.tornado.transports.xhr
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Xhr-Polling transport implementation
"""
import logging
from tornado.web import asynchronous
from octoprint.vendor.sockjs.tornado imp... | agpl-3.0 | -8,759,048,714,395,411,000 | 28.278351 | 84 | 0.610563 | false |
apache/bloodhound | bloodhound_search/bhsearch/tests/__init__.py | 2 | 1578 | # -*- coding: UTF-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | apache-2.0 | -4,713,938,990,775,815,000 | 33.304348 | 63 | 0.723701 | false |
ragibson/Steganography | stego_lsb/LSBSteg.py | 1 | 6997 | # -*- coding: utf-8 -*-
"""
stego_lsb.LSBSteg
~~~~~~~~~~~~~~~~~
This module contains functions for hiding and recovering
data from bitmap (.bmp and .png) files.
:copyright: (c) 2015 by Ryan Gibson, see AUTHORS.md for more details.
:license: MIT License, see LICENSE.md for more details.
"""
imp... | mit | 5,358,033,740,761,818,000 | 33.810945 | 88 | 0.645991 | false |
tdyas/pants | src/python/pants/backend/python/lint/docformatter/rules.py | 1 | 5663 | # Copyright 2020 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from dataclasses import dataclass
from typing import Tuple
from pants.backend.python.lint.docformatter.subsystem import Docformatter
from pants.backend.python.lint.python_fmt import Pytho... | apache-2.0 | -8,875,962,643,641,155,000 | 33.530488 | 96 | 0.719054 | false |
bswartz/manila | manila/db/migrations/alembic/versions/e9f79621d83f_add_cast_rules_to_readonly_to_share_instances.py | 1 | 3557 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 8,912,947,635,243,359,000 | 34.929293 | 77 | 0.640708 | false |
alan-wu/neon | src/opencmiss/neon/core/neonregion.py | 1 | 15062 | '''
Copyright 2015 University of Auckland
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agre... | apache-2.0 | 5,086,091,587,092,493,000 | 37.819588 | 116 | 0.615921 | false |
afrendeiro/pipelines | lib/fix_bedfile_genome_boundaries.py | 1 | 1086 | #!/usr/bin/env python
import csv
import sys
def getChrSizes(chrmFile):
"""
Reads tab-delimiter file with two rows describing the chromossomes and its lengths.
Returns dictionary of chr:sizes.
"""
with open(chrmFile, 'r') as f:
chrmSizes = {}
for line in enumerate(f):
ro... | gpl-2.0 | 7,434,051,444,998,922,000 | 29.166667 | 87 | 0.632597 | false |
manhg/tokit | tokit/postgres.py | 1 | 4462 | import logging
import shortuuid
import uuid
import momoko
import momoko.exceptions
import psycopg2
from psycopg2.extras import DictCursor, DictRow, register_uuid
import psycopg2.extensions
from tornado.gen import coroutine, sleep
from tornado.web import HTTPError
import tokit
logger = tokit.logger
class DictLogCur... | mit | 4,795,081,817,502,400,000 | 27.240506 | 94 | 0.586732 | false |
alimanfoo/numcodecs | numcodecs/tests/test_checksum32.py | 1 | 1611 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division
import itertools
import numpy as np
import pytest
from numcodecs.checksum32 import CRC32, Adler32
from numcodecs.tests.common import (check_encode_decode, check_config, check_repr,
check_back... | mit | -160,882,542,628,057,300 | 26.305085 | 82 | 0.646182 | false |
igurrutxaga/tvalacarta | python/main-classic/servers/aragontv.py | 1 | 4990 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Conector para aragontv
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from core impo... | gpl-3.0 | -3,190,599,483,489,724,000 | 39.504065 | 122 | 0.614613 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.