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,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
apoorvemohan/haas
haas/drivers/switches/nexus.py
1
2520
# Copyright 2013-2014 Massachusetts Open Cloud Contributors # # 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 la...
apache-2.0
-8,500,708,156,257,501,000
32.6
107
0.63254
false
ProjectQ-Framework/FermiLib-Plugin-Psi4
fermilibpluginpsi4/_run_psi4.py
1
8415
# FermiLib plugin to interface with Psi4 # # Copyright (C) 2017 ProjectQ-Framework (www.projectq.ch) # # This program 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, or ...
lgpl-3.0
7,315,284,371,011,495,000
37.424658
79
0.579085
false
kubevirt/vAdvisor
vadvisor/virt/parser.py
1
1627
from xml.etree.ElementTree import XMLParser class GuestXmlParser: int_tags = ["currentMemory", "memory"] int_attribs = ["index", "port", "startport", "vram"] def __init__(self): self.json = {} self.stack = [self.json] self.catogory = None def start(self, tag, attrib): ...
gpl-3.0
795,762,384,408,859,900
27.54386
56
0.533497
false
gri-is/lodjob
crom_scripts/deprecated/acquisition_manual.py
1
1582
import pprint from cromulent.model import * # imports models from cromulent.vocab import * # imports model subcomponents from utils.aat_labels import aat_labels from utils.aat_label_fetcher import get_or_fetch from utils.data_parsing import find_values from utils.crom_helpers import props, toJSON, toString, printStr...
agpl-3.0
-9,017,786,665,425,611,000
31.285714
80
0.733881
false
moggers87/django-bitfield
bitfield/tests/tests.py
1
17505
from __future__ import absolute_import import pickle from django.db import connection, models from django.db.models import F from django.test import TestCase from bitfield import BitHandler, Bit, BitField from bitfield.tests import BitFieldTestModel, CompositeBitFieldTestModel, BitFieldTestModelForm from bitfield.co...
apache-2.0
-1,557,695,423,243,655,400
42.87218
578
0.649357
false
adewynter/Tools
MLandDS/SpeechRecognition/dataPreprocessor.py
1
5683
# Data preprocessor for speech recognition # Arguably the most important part of our infrastructure # WARNING -- Disgustingly long class # (c) Adrian deWynter, 2017, where applicable from __future__ import print_function from six.moves import urllib,xrange from random import shuffle from enum import Enum import os,re...
mit
-1,158,133,404,492,838,400
22.105691
98
0.672356
false
MerlijnWajer/lewd
src/net.py
1
1721
""" This file is part of the LEd Wall Daemon (lewd) project Copyright (c) 2009-2012 by ``brainsmoke'' and Merlijn Wajer (``Wizzup'') lewd 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 ver...
gpl-3.0
3,525,649,452,878,843,400
29.732143
74
0.669959
false
landscapeio/pylint-common
setup.py
1
1633
# -*- coding: UTF-8 -*- import sys from setuptools import find_packages, setup _version = '0.2.5' _packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"]) _short_description = ("pylint-common is a Pylint plugin to improve Pylint " "error analysis of the standard Python li...
gpl-2.0
-4,498,307,940,988,987,400
28.690909
99
0.620943
false
barberscore/barberscore-api
project/apps/salesforce/models.py
1
21997
import json # Third-Party from model_utils import Choices from distutils.util import strtobool # Local from apps.bhs.models import Convention, Award, Chart, Group, Person from apps.registration.models import Contest, Session, Assignment, Entry class SfConvention: def parse_sf_notification(n): d = {} ...
bsd-2-clause
-6,375,111,616,845,028,000
28.927891
116
0.519525
false
aaronn/django-rest-framework-passwordless
drfpasswordless/urls.py
1
1129
from drfpasswordless.settings import api_settings from django.urls import path from drfpasswordless.views import ( ObtainEmailCallbackToken, ObtainMobileCallbackToken, ObtainAuthTokenFromCallbackToken, VerifyAliasFromCallbackToken, ObtainEmailVerificationCallbackToken, ObtainMobileVerifica...
mit
6,030,230,326,098,474,000
52.761905
134
0.772365
false
yuanchima/Activation-Visualization-Histogram
datasets/svhn.py
1
2526
from __future__ import absolute_import from __future__ import division from __future__ import print_function import os.path import numpy as np import scipy.io import scipy.ndimage as sn import h5py from util import log # __PATH__ = os.path.abspath(os.path.dirname(__file__)) __PATH__ = './datasets/svhn' rs = np.rand...
mit
8,197,584,550,295,132,000
25.041237
96
0.563737
false
simplelist/python_test01
mechine/KNY.py
1
3559
#-*- coding: utf-8 -*- from numpy import * import operator # 读取数据到矩阵 def file2matrix(filename): # 打开数据文件,读取每行内容 fr = open(filename) arrayOLines = fr.readlines() # 初始化矩阵 numberOfLines = len(arrayOLines) returnMat = zeros((numberOfLines,3)) # 初始化类标签向量 classLabelVector = [] # 循环读取...
lgpl-3.0
314,112,716,281,400,060
21
111
0.641604
false
darrencheng0817/AlgorithmLearning
Python/leetcode/uglyNumber.py
1
2890
''' Created on 2015年12月11日 https://leetcode.com/problems/ugly-number/ https://leetcode.com/problems/ugly-number-ii/ https://leetcode.com/problems/super-ugly-number/ @author: Darren ''' ''' Write a program to check whether a given number is an ugly number. Ugly numbers are positive numbers whose prime factors only incl...
mit
3,427,185,567,020,352,500
32.5
390
0.651042
false
proggy/fns
frogs.py
1
1401
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright notice # ---------------- # # Copyright (C) 2014 Daniel Jung # Contact: djungbremen@gmail.com # # 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 Fo...
gpl-2.0
796,572,170,233,028,400
34.025
77
0.683797
false
kapadia/toplotly
toplotly/__init__.py
1
2486
import os import json from dateutil.parser import parse import plotly from plotly.graph_objs import Histogram, Scatter, Scatter3d, Data, Layout, XAxis, YAxis, ZAxis, Figure __version__ = '0.0.1' def is_numeric(x): try: float(x) return True except ValueError: return False def...
mit
-6,038,778,973,686,361,000
18.429688
102
0.530571
false
Liorst4/pysteamcli
pysteamcli/app_manifest.py
1
1745
#!/usr/bin/env python3 """ Parse Steam's application manifest files. """ import itertools def next_data(it): """ Advances an iterator until new data is found. :param it: Character iterator. :returns: Data found. """ quotation_mark = lambda c: c != '"' data_begin = itertools.dropwhile...
mit
4,851,794,010,905,452,000
18.388889
62
0.525501
false
xaime/sneaks
modules/report.py
1
31061
# - *- coding: utf- 8 - *- . # SNEAKS - Snooping Early Alert Knowledge Service from datetime import timedelta from boomslang import * import math import pygeoip import socket from ConfigParser import RawConfigParser import html2text from email.mime.image import MIMEImage from email.mime.multipart import MIMEMultipart ...
gpl-2.0
-1,516,157,296,209,164,800
39.462842
120
0.619816
false
rcbuild-info/scrape
rcbi/rcbi/spiders/MultirotorSuperstore.py
1
3983
import scrapy from scrapy import log from scrapy.spiders import CrawlSpider, Rule from scrapy.linkextractors import LinkExtractor from rcbi.items import Part import copy import os import urlparse import urllib MANUFACTURERS = ["Cobra", "Dinogy", "SkyRC", "DYS", "HQProp", "iPower", "Tattu", "GemFan", "SunnySky", "Emax...
apache-2.0
1,018,846,798,764,537,900
38.435644
359
0.614361
false
daviur/py-cracking-the-coding-interview
arrays-and-strings/as18.py
1
1607
# The MIT License (MIT) # # Copyright (c) 2016 David I Urbina # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
mit
774,038,168,573,921,400
40.205128
80
0.728065
false
edit4ever/script.module.tvh2kodi
default.py
1
183136
#!/usr/bin/env python ################################################################################ # This file is part of LibreELEC - https://libreelec.tv # Copyright (C) 2016-2017 Team LibreELEC # Copyright (C) 2017 Tnds82 (tndsrepo@gmail.com) # # LibreELEC is free software: you can redistribute it...
gpl-3.0
-8,064,920,706,645,967,000
58.770235
741
0.587203
false
netkicorp/wns-api-server
netki/common/test_config.py
1
3834
__author__ = 'mdavid' # Setup our test environment import os os.environ['NETKI_ENV'] = 'test' from unittest import TestCase from mock import patch from StringIO import StringIO from netki.common.config import ConfigManager class ConfigManagerTestCase(TestCase): def tearDown(self): super(ConfigManagerTe...
bsd-3-clause
-2,711,859,175,844,189,000
28.5
83
0.655451
false
mchung94/solitaire-player
pysolvers/solvers/deck.py
1
2238
"""Card and Deck definitions. Cards are strings containing a rank character followed by a suit character, because it's simpler than defining a class or named tuple while still being immutable, hashable, easy to create, and human-readable. I also want to define a deck as just a tuple of cards that contain exactly all ...
mit
-3,498,415,241,772,121,600
32.402985
78
0.714924
false
vlegoff/tsunami
src/secondaires/navigation/chantier_naval.py
1
4209
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # ...
bsd-3-clause
7,937,201,013,783,846,000
38.54717
79
0.673903
false
bhaveshAn/crisscross
crisscross/facades/email.py
1
1397
''' Email ===== The :class:`Email` provides access to public methods to use email of your device. .. note:: On Android `INTERNET` permission is needed. Simple Examples --------------- To send an e-mail:: >>> from crisscross import email >>> recipient = 'abc@gmail.com' >>> subject = 'Hi' >>> tex...
mit
5,783,431,339,681,985,000
24.87037
73
0.601288
false
sunu/oppia-test
models/parameter_test.py
1
1279
# Copyright 2013 Google Inc. 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 applicable law or ...
apache-2.0
-8,525,175,909,755,323,000
31.794872
74
0.687256
false
jvivian/rnaseq-lib
src/rnaseq_lib/utils/expando.py
1
2336
# Taken from: https://github.com/BD2KGenomics/bd2k-python-lib class Expando(dict): """ Pass inital attributes to the constructor: >>> o = Expando(foo=42) >>> o.foo 42 Dynamically create new attributes: >>> o.bar = 'hi' >>> o.bar 'hi' Expando is a dictionary: >>> isinst...
mit
-5,991,703,706,041,165,000
18.305785
88
0.51113
false
QualiSystems/OpenStack-Shell
package/tests/test_cp/test_openstack/test_command/test_operations/test_connectivity_operation.py
1
1574
from unittest import TestCase from mock import Mock from cloudshell.cp.openstack.command.operations.connectivity_operation import ConnectivityOperation class TestConnectivityOperation(TestCase): def setUp(self): self.connectivity_service = Mock() self.conn_operation = ConnectivityOperation(connect...
isc
-8,626,905,349,689,318,000
49.774194
109
0.551461
false
gtalarico/pyrevitplus
pyRevitPlus.tab/VP Tools.panel/Levels.pulldown/Save Levels.pushbutton/script.py
1
4676
""" Save Levels Save the view dependant properties - endpoint locations, level heads and leaders of the selected building levels for re-use Non-level elements will be skipped with dialog, so it's advisable to apply filtering beforehead TESTED REVIT API: 2020 @ejs-ejs This script is part of PyRevitPlus: Extensions...
gpl-3.0
-4,241,314,254,409,846,300
36.408
182
0.565013
false
biocore/qiime2
qiime2/sdk/tests/test_artifact.py
1
21617
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2019, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
bsd-3-clause
2,226,754,745,554,385,400
38.810313
79
0.593237
false
ec429/sexpy
sml.py
1
4208
#!/usr/bin/python from sexpy import SExp, tok_STRING class HtmlNodeType(object): def __init__(self, name, allowed_children): self.name = name self.ac = allowed_children def __call__(self, context, *args): if self.ac is None: # not specified return for arg in args: ...
mit
5,023,051,822,639,744,000
38.327103
95
0.533745
false
derolf/Plex.ArgusTV.bundle
Contents/Libraries/Shared/mysql/connector/charsets.py
1
12320
# -*- coding: utf-8 -*- # MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There a...
gpl-2.0
-6,391,614,368,225,597,000
42.076923
75
0.563799
false
thepizzaking/whaawmp
src/common/lists.py
1
5662
# -*- coding: utf-8 -*- # A few useful lists. # Copyright © 2007-2011, Jeff Bailes <thepizzaking@gmail.com>. # This file is part of Whaaw! Media Player (whaawmp) # # whaawmp is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published b...
gpl-3.0
9,084,138,836,555,284,000
51.906542
106
0.583819
false
babbageclunk/gatesym
gatesym/core_ffi.py
1
1467
from cffi import FFI import os SO_PATH = os.path.expanduser('~/Dropbox/code/rust/gatesymcore/target/release/libgatesymcore.so') ffi = FFI() ffi.cdef(""" void *network_new(); void network_free(void *ptr); size_t network_add_gate(void *ptr, uint8_t kind, uint32_t cookie); void network_add_link...
mit
7,358,668,042,376,080,000
28.938776
96
0.629857
false
blckshrk/Weboob
weboob/applications/traveloob/traveloob.py
1
4156
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon, Julien Hébert # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License...
agpl-3.0
-5,384,248,984,045,821,000
32.24
112
0.633694
false
clones/django-evolution
django_evolution/tests/multi_db.py
1
29302
from django_evolution.tests.utils import test_sql_mapping tests = r""" >>> from django.db import models >>> from django_evolution.mutations import ChangeField >>> from django_evolution.tests.utils import test_proj_sig_multi, execute_test_sql, register_models_multi, deregister_models >>> from django_evolution.diff imp...
bsd-3-clause
8,471,837,691,026,984,000
41.652111
225
0.687769
false
StephenKinger/privaan
setup.py
1
5110
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup, find_packages from setuptools.command.develop import develop from setuptools.command.install import install import os # notez qu'on import la lib # donc assurez-vous que l'importe n'a pas d'effet de bord import privaan class PostDevelopComm...
mit
-9,133,602,008,088,023,000
35.731884
96
0.65654
false
plinecom/JobManager
gui/submit/fileinfo/fileinfo.py
1
1576
from PyQt4 import QtGui, QtCore import gui.submit.fileinfo.common import gui.submit.fileinfo.maya1 import gui.submit.fileinfo.maya2 import gui.submit.fileinfo.maya_mentalray import gui.submit.fileinfo.nuke class FileInfoPanel(QtGui.QTabWidget): def __init__(self, job_list, dispatcher_list, config_info, parent=No...
mit
884,643,911,518,618,900
40.473684
112
0.654188
false
aziele/alfpy
tests/test_word_distance.py
1
10504
import unittest from alfpy import word_pattern from alfpy import word_vector from alfpy import word_distance from alfpy.utils import distmatrix from . import utils class DistanceTest(unittest.TestCase, utils.ModulesCommonTest): def __init__(self, *args, **kwargs): super(DistanceTest, self).__init__(*ar...
mit
4,758,581,940,622,395,000
43.134454
77
0.564261
false
mitsuhiko/celery
celery/contrib/batches.py
1
1489
from itertools import count from collections import deque, defaultdict from celery.task.base import Task class Batches(Task): abstract = True flush_every = 10 def __init__(self): self._buffer = deque() self._count = count().next def execute(self, wrapper, pool, loglevel, logfile): ...
bsd-3-clause
-4,240,570,643,636,673,000
25.589286
68
0.599731
false
dgfree/Minesweeper-Clone
screen.py
1
6335
# -*- coding: utf-8 -*- """ This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. date: Mon Jan 19 14:52:04 2015 @author: daniel """ import pygame from block import Block from con...
mpl-2.0
1,783,015,336,399,862,800
35.408046
78
0.576006
false
googlegenomics/gcp-variant-transforms
gcp_variant_transforms/libs/partitioning.py
1
15496
# Copyright 2020 Google Inc. 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 applicable law or...
apache-2.0
1,038,884,103,644,525,200
40.212766
80
0.657137
false
datadreamer/research-chronology-revisited
cgi-bin/pydeliciouslibs/feedparser/feedparser.py
2
121876
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.1 or later Recommended: Python 2.3 or later Recommended: CJKCodecs...
mit
-7,598,199,181,045,882,000
42.02012
214
0.587925
false
MrSenko/Nitrate
tcms/settings/test.py
1
1204
from tcms.settings.devel import * DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '', 'USER': '', 'PASSWORD': '', 'HOST': '', 'PORT': '', } } LISTENING_MODEL_SIGNAL = False LOGGING = { 'version': 1, 'disable_existing_loggers':...
gpl-2.0
-5,055,384,822,150,060,000
22.607843
95
0.442691
false
jlesquembre/jlle
jlle/scaffold/templates/setup.py
1
1102
from setuptools import setup import os version = '0.0.1.dev0' here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), 'rt') as f: README = f.read() setup(name='{{project}}', version=version, author='José Luis Lafuente', author_email='jlesquembre@gmail.com'...
gpl-3.0
8,452,121,628,583,304,000
27.230769
55
0.559491
false
jhmatthews/cobra
source/plotspec.py
1
2652
#! /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python ''' Generic plotting script for PYTHONRT ''' import read_output as rd import os, sys import matplotlib.pyplot as plt import numpy as np import cobra_sub as sub rd.setpars() def strip(character, string): ''' strip a c...
gpl-2.0
-2,380,292,950,757,573,600
16
95
0.647436
false
newcastlemakerspace/mkrspc_web
data_migration.py
1
2090
import redis import datetime from site_config import REDIS_DB import site_utils import uuid def _was_migration_applied(redis_conn, seq): value = redis_conn.get('migration_%d' % seq) if value is not None: print "migration_%d - exists" % seq return True print "migration_%d - executing" % s...
gpl-3.0
2,701,100,883,988,187,000
23.022989
72
0.606699
false
RyanBalfanz/reservoir-sampling-cli
sampler/command_line.py
1
1294
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import operator import random import sys def get_parser(): parser = argparse.ArgumentParser("Randomly sample k items from an input S containing n items.") parser.add_argument("infile", nargs='?', type=argparse.FileType('r'), default=sys.stdin) parser.ad...
mit
1,964,912,365,201,834,000
28.409091
110
0.693972
false
aldryn/aldryn-redirects
aldryn_redirects/admin.py
1
8613
from __future__ import unicode_literals from tablib import Dataset from django.conf import settings from django.contrib import admin, messages from django.core.urlresolvers import reverse from django.http import HttpResponse from django.shortcuts import redirect, render from django.utils import timezone from django.u...
bsd-3-clause
7,284,398,277,118,702,000
37.797297
119
0.615929
false
ai-se/XTREE
src/Planners/XTREE/smote.py
1
3196
#! /Users/rkrsn/anaconda/bin/python from pdb import set_trace from os import environ, getcwd from os import walk from os.path import expanduser from pdb import set_trace import sys # Update PYTHONPATH HOME = expanduser('~') axe = HOME + '/git/axe/axe/' # AXE pystat = HOME + '/git/pystats/' # PySTAT cwd = getcwd() #...
mit
-2,068,732,287,555,262,000
27.792793
78
0.572904
false
MatthewWilkes/mw4068-packaging
src/melange/src/soc/models/timeline.py
1
1544
#!/usr/bin/env python2.5 # # Copyright 2008 the Melange authors. # # 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 applic...
apache-2.0
4,690,625,934,440,829,000
28.692308
74
0.738342
false
Nydareld/IaGameServer
Server/PlayerThread.py
1
4282
from Server.Game import * from threading import Thread from CodIa.tuto.models import User from CodIa.tuto.app import db import threading import time import random class PlayerThread(Thread): def __init__(self, GameThread, username, ia): Thread.__init__(self) self.GameThread = GameThread se...
gpl-3.0
7,055,425,905,077,996,000
35.57265
131
0.535172
false
open-o/nfvo
drivers/vnfm/gvnfm/gvnfmadapter/driver/urls.py
1
1060
# Copyright 2017 ZTE Corporation. # # 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 ...
apache-2.0
7,444,818,097,996,803,000
39.769231
100
0.734906
false
atmega/ipkg-utils
ipkg.py
1
11947
#!/usr/bin/env python # Copyright (C) 2001 Alexander S. Guy <a7r@andern.org> # Andern Research Labs # # 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 ...
mit
-7,228,900,134,880,194,000
29.633333
131
0.572612
false
epsy/napper
napper/tests/test_restspec.py
1
15960
# napper -- A REST Client for Python # Copyright (C) 2016 by Yann Kaiser and contributors. # See AUTHORS and COPYING for details. import io import json import re from .. import restspec from ..errors import UnknownParameters from .util import Tests class ConfigTests(Tests): def make_spec(self, **obj): o...
mit
8,510,429,901,137,347,000
35.774194
88
0.527444
false
Nanguage/BioInfoCollections
others/bedgraph2bed.py
1
1815
import pandas as pd import click def skip_lines(path): n = 0 with open(path) as f: for line in f: if line.startswith("track"): n += 1 else: break return n def read_bed(path): n_skip = skip_lines(path) df = pd.read_table(path, sep="\t...
gpl-3.0
-4,500,874,446,086,020,600
24.928571
75
0.539394
false
zhy0216/random-read
utils/image_crawler.py
1
2041
import os.path import shutil from urlparse import urlparse, urljoin import base64 import requests from bs4 import BeautifulSoup from blue.settings import DOWNLOAD_IMAGE_FOLDER, IMAGE_PREFIX ''' download the image from the article ''' IMAGE_DOWNLOAD_FOLDER = DOWNLOAD_IMAGE_FOLDER def get_absolute_url(article_url, im...
mit
6,987,141,486,954,231,000
24.835443
70
0.627634
false
carthach/essentia
test/src/unittests/sfx/test_tctototal.py
1
2182
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation (FSF), e...
agpl-3.0
-6,654,946,886,523,032,000
29.732394
79
0.666361
false
dreadatour/Cactus
cactus/tests/deployment/test_bucket_name.py
1
1110
# coding:utf-8 from cactus.tests.deployment import DummyUI, DummySite, DummyDeploymentEngine, BaseDeploymentTestCase class BucketNameTestCase(BaseDeploymentTestCase): def setUp(self): super(BucketNameTestCase, self).setUp() self.ui = DummyUI(create_bucket=False) self.site = DummySite(self....
bsd-3-clause
-5,000,288,575,577,189,000
31.647059
101
0.659459
false
DrDos0016/z2
museum_site/migrations/0011_auto_20170112_0208.py
1
2385
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-01-12 02:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0010_auto_20160826_2152'), ] operations = [ migrations.Alter...
mit
-992,943,723,689,504,300
30.381579
93
0.534172
false
ericawright/bedrock
bedrock/firefox/views.py
1
32602
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import hashlib import hmac import re from collections import OrderedDict from urllib.parse impor...
mpl-2.0
-329,211,271,012,326,140
35.921857
114
0.623765
false
jaeilepp/eggie
mne/coreg.py
1
40760
"""Coregistration between different coordinate frames""" # Authors: Christian Brodbeck <christianbrodbeck@nyu.edu> # # License: BSD (3-clause) from .externals.six.moves import configparser import fnmatch from glob import glob, iglob import os import re import shutil from warnings import warn import numpy as np from ...
bsd-2-clause
-7,231,553,313,191,468,000
34.259516
79
0.5934
false
kustomzone/Fuzium
core/src/Ui/UiRequest.py
1
25682
import time import re import os import mimetypes import json import cgi from Config import config from Site import SiteManager from User import UserManager from Plugin import PluginManager from Ui.UiWebsocket import UiWebsocket from Crypt import CryptHash status_texts = { 200: "200 OK", 206: "206 Partial Cont...
mit
-3,974,623,801,601,027,000
43.203098
249
0.566545
false
nthien/flaskup
flaskup/console.py
2
1462
# -*- coding: utf-8 -*- import os import argparse from datetime import date from flaskup.models import SharedFile from flaskup.filters import filesizeformat def action_clean(quiet): today = date.today() count = 0 deleted_files = [] for f in SharedFile.find_all(): if f.expire_date < today: ...
bsd-3-clause
-4,315,482,644,957,705,700
25.581818
82
0.596443
false
jimmy201602/webterminal
permission/commons.py
1
3118
from django.contrib.auth.models import Permission from django.utils.translation import ugettext_lazy as _ def parse_permission_tree(): permission_tree = {} permission_tree_list = [] queryset = Permission.objects.filter(content_type__app_label__in=[ 'common', 'permission'], codename__contains='can_...
gpl-3.0
-1,413,970,611,561,117,400
46.242424
114
0.395125
false
revesansparole/oacontainer
src/openalea/container/property_graph.py
1
9223
# -*- python -*- # # OpenAlea.Core # # Copyright 2006-2009 INRIA - CIRAD - INRA # # File author(s): Fred Boudon <fred.boudon@cirad.fr> # # Distributed under the Cecill-C License. # See accompanying file LICENSE.txt or copy at # http://www.cecill.info/licences/Licence_CeCILL-C_V1-...
mit
-70,432,156,574,563,224
31.475352
80
0.545809
false
jds2001/sos
sos/plugins/mongodb.py
1
1619
# Copyright (C) 2014 Red Hat, Inc., Bryn M. Reeves <bmr@redhat.com> # 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 2 of the License, or # (at your option) any later version. # ...
gpl-2.0
880,026,662,020,041,000
30.745098
73
0.662137
false
wasade/american-gut-web
amgut/handlers/auth_handlers.py
1
4373
#!/usr/bin/env python from tornado.web import authenticated from tornado.escape import json_encode from amgut.util import AG_DATA_ACCESS from amgut.lib.mail import send_email from amgut.handlers.base_handlers import BaseHandler from amgut import media_locale, text_locale # login code modified from https://gist.githu...
bsd-3-clause
-3,059,562,258,704,055,000
36.059322
85
0.584038
false
Kynarth/pyqtcli
tests/test_addqres.py
1
6428
import os import shutil from click.testing import CliRunner from pyqtcli.cli import pyqtcli from pyqtcli.qrc import read_qrc from pyqtcli.test.qrc import QRCTestFile from pyqtcli.test.verbose import format_msg from pyqtcli import verbose as v def test_simple_addqres(config, test_resources): runner = CliRunner()...
mit
-3,913,761,367,511,627,000
29.609524
77
0.660703
false
felipenaselva/repo.felipe
plugin.video.uwc/favorites.py
1
2571
''' Ultimate Whitecream Copyright (C) 2015 mortael 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 the License, or (at your option) any later version. ...
gpl-2.0
-3,299,589,569,647,617,000
28.215909
85
0.668222
false
getefesto/efesto
tests/unit/handlers/BaseHandler.py
1
1059
# -*- coding: utf-8 -*- from efesto.handlers import BaseHandler from pytest import fixture @fixture def handler(magic): handler = BaseHandler(magic()) handler.q = magic() return handler def test_basehandler_init(magic): model = magic() handler = BaseHandler(model) assert handler.model == mo...
gpl-3.0
1,938,557,776,759,132,400
24.214286
74
0.663834
false
qinjunjerry/PyKeyBox
keybox.py
1
15148
#!/usr/bin/env python """A mini key/password manager written in python using the AES encryption algorithm.""" import os import sys import time import os.path import random import sqlite3 import hashlib import getpass import argparse import Crypto.Cipher.AES class KeyBox(object): TABLE_NAME = "keybox" MASTE...
apache-2.0
3,663,396,818,684,847,600
38.75853
118
0.57057
false
hpcugent/vsc-processcontrol
test/processcontrol.py
1
4021
# # # Copyright 2013-2013 Ghent University # # This file is part of vsc-processcontrol, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules found...
lgpl-2.1
-997,042,249,967,279,200
33.367521
107
0.648844
false
edgarli/proj8
main.py
1
14406
import flask from flask import render_template from flask import request from flask import url_for import uuid import json import logging # Date handling import arrow # Replacement for datetime, based on moment.js import datetime # But we still need time from dateutil import tz # For interpreting local times # OA...
artistic-2.0
5,545,990,509,238,872,000
32.737705
100
0.64376
false
DigitalSlideArchive/large_image
large_image/constants.py
1
1924
############################################################################# # Copyright Kitware 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/licen...
apache-2.0
-6,192,587,494,464,616,000
28.6
77
0.591476
false
pelotoncycle/shared_memory_bloomfilter
tests/test_bloomfilter_error_rate.py
1
1471
from tempfile import NamedTemporaryFile from unittest import TestCase from peloton_bloomfilters import BloomFilter, ThreadSafeBloomFilter, SharedMemoryBloomFilter class Case(object): def test(self): self.assert_p_error(0.2, 1340) self.assert_p_error(0.15, 870) self.assert_p_error(0.1, 6...
gpl-3.0
-8,275,922,267,959,018,000
30.978261
92
0.602311
false
facebookresearch/ParlAI
parlai/tasks/taskntalk/agents.py
1
3737
#!/usr/bin/env python3 # 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. from parlai.core.teachers import Teacher from parlai.utils.io import PathManager from .build import build import json i...
mit
5,102,321,009,451,953,000
27.968992
87
0.587905
false
Brazelton-Lab/bio_utils
bio_utils/iterators/fasta.py
1
5590
#! /usr/bin/env python3 """Faster, simpler, Screed-esque iterator for FASTA files Copyright: fasta.py iterate over and return entries of a FASTA file Copyright (C) 2015 William Brazelton, Alex Hyer This program is free software: you can redistribute it and/or modify it under the terms of the GNU Ge...
gpl-3.0
-4,799,499,336,410,846,000
33.294479
82
0.584258
false
berrak/cookiecutter-py3starter
{{cookiecutter.github_repo_name}}/{{cookiecutter.package_name}}/cli.py
1
1728
#!/usr/bin/env python3 # # Copyright {{ cookiecutter.author_name }}, {{ cookiecutter.initial_year_to_release }} # # 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/licen...
apache-2.0
-237,356,212,394,522,000
29.315789
123
0.681713
false
roiser/WLCG
ssbCvmfsStatus/wlcg-cvmfs4ssb.py
1
10226
#/bin/env python import urllib, json, datetime from xml.parsers import expat class c4s : def __init__(self): self.cvmfsBaseVersionFile = 'cvmfsVersion.txt' self.requestedVersion = '' self.myVO = 'LHCb' self.cvmfsColumnNo = 202 self.wlcgTopoColumnNo = 144 self.topoDict = {'WLCG':{}, self.myV...
mit
7,568,485,905,248,002,000
39.741036
194
0.622531
false
arkabytes/abc
ABC/migrations/0005_auto_20171023_0929.py
1
7572
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-10-23 09:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ABC', '0004_auto_20171023_0924'), ] operations = [ migrations.AddField( ...
gpl-3.0
5,220,348,303,067,717,000
29.288
66
0.509377
false
Brickstertwo/git-commands
tests/unit/test_abandon.py
1
7149
import mock import unittest import testutils from bin.commands import abandon class TestAbandon(unittest.TestCase): @mock.patch('bin.commands.utils.execute.check_output') @mock.patch('bin.commands.utils.execute.call') @mock.patch('bin.commands.utils.messages.info') def test_abandon(self, mock_info, ...
mit
7,174,117,415,107,765,000
36.041451
97
0.575465
false
tomhur/domoticz-scripts
python/script_time_verisure.py
1
3621
#!/usr/bin/python # -*- coding: utf-8 -*- import domoticz as d import sys import time sys.path.insert(0, '/opt/python-verisure/') import verisure import pickle import pytz import urllib3 import certifi from datetime import datetime from tzlocal import get_localzone debug = False try: execfile("/etc/domoticz/scrip...
mit
8,858,491,424,379,706,000
28.680328
196
0.638498
false
AFMD/smallProjects
nanowire-network-simulations/manningp3plotedit6.py
1
20377
""" Created on Mon Jun 15 15:42:23 2020 @author: sturdzal """ #@title Imports from shapely.geometry import LineString, MultiLineString, MultiPoint, Point from shapely.ops import cascaded_union from scipy.special import comb from itertools import product import scipy.stats as stats import matplotlib.pyplot ...
gpl-2.0
-3,190,882,586,409,944,000
40.416667
327
0.551112
false
rbuffat/pyidf
tests/test_zonemixing.py
1
5372
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.zone_airflow import ZoneMixing log = logging.getLogger(__name__) class TestZoneMixing(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp() ...
apache-2.0
8,416,077,038,472,639,000
51.676471
142
0.706627
false
applied-mixnetworks/txmix
txmix/udp_transport.py
1
1452
from __future__ import print_function import attr from zope.interface import implementer from twisted.internet.interfaces import IReactorUDP from twisted.internet.protocol import DatagramProtocol from twisted.internet import defer from txmix import IMixTransport @implementer(IMixTransport) @attr.s() class UDPTrans...
gpl-3.0
8,444,479,411,809,278,000
29.25
83
0.683196
false
oscarfonts/sensor-widgets
doc/en/conf.py
1
9203
# -*- coding: utf-8 -*- # # Sensor Widgets documentation build configuration file, created by # sphinx-quickstart on Fri Sep 4 12:48:01 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file...
mit
-4,561,226,566,972,050,400
31.40493
79
0.708356
false
catapult-project/catapult
telemetry/telemetry/internal/platform/network_controller_backend.py
3
7521
# 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. from __future__ import absolute_import import os from telemetry.internal.util import webpagereplay_go_server from telemetry.internal.util import ts_proxy_se...
bsd-3-clause
-3,696,970,511,087,998,500
33.819444
80
0.68568
false
felipenaselva/felipe.repository
script.module.placenta/lib/resources/lib/sources/fr/filmenstreaminghd.py
1
6831
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
gpl-2.0
2,041,355,159,829,254,000
36.740331
224
0.495389
false
jasonbaldridge/try-tf
softmax-python3.py
1
5020
import tensorflow.python.platform import numpy as np import tensorflow as tf import plot_boundary_on_data # Global variables. NUM_LABELS = 2 # The number of labels. BATCH_SIZE = 100 # The number of training examples to use per training step. # Define the flags useable from the command line. tf.app.flags.DEFIN...
apache-2.0
6,272,947,537,748,210,000
34.857143
90
0.6251
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
ewindisch/nova
nova/compute/manager.py
1
251375
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance wi...
apache-2.0
-2,143,329,436,891,058,400
44.235739
79
0.561126
false
agx/git-buildpackage
setup.py
1
3370
#!/usr/bin/python3 # vim: set fileencoding=utf-8 : # Copyright (C) 2006-2011 Guido Günther <agx@sigxcpu.org> # # 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 2 of the Li...
gpl-2.0
564,592,606,133,849,100
31.07619
75
0.635986
false
rhazdon/django-sonic-screwdriver
django_sonic_screwdriver/apps/ban/migrations/0001_initial.py
1
2978
# Generated by Django 3.0.2 on 2020-01-23 13:24 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
mit
-282,668,870,110,881,380
62.361702
258
0.629953
false
cuckoobox/cuckoo
stuff/distributed/cluster-test.py
1
3084
# Copyright (C) 2017-2018 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import click import requests import time class Script(object): def __init__(self): self.name = self.__class__.__name__.lower() sel...
mit
-8,013,044,425,276,418,000
29.534653
76
0.519455
false
Illumina/HapMix
scripts/haplobams/split_by_haplotype_lib.py
1
11911
import sys sys.path.append('/opt/rh/python27/root/usr/lib64/python2.7/site-packages/pysam') sys.path.append('/home/ptedder/local/lib/python2.7/site-packages') sys.path.append('/home/ptedder/local/lib64/python2.7/site-packages') print sys.path import random,pysam,re,subprocess,HTSeq,pdb,argparse from collections import ...
gpl-3.0
-1,688,665,998,435,795,000
43.114815
363
0.608513
false
Runscope/pysaml2
src/saml2/pack.py
1
8806
#!/usr/bin/env python # -*- coding: utf-8 -*- # """Contains classes and functions that are necessary to implement different bindings. Bindings normally consists of three parts: - rules about what to send - how to package the information - which protocol to use """ import urlparse import saml2 import base64 import u...
bsd-2-clause
-1,560,756,759,072,883,200
33.533333
92
0.607086
false
mosra/magnum-examples
src/python/magnum-primitives-scenegraph.py
1
4843
#!/usr/bin/env python3 # # This file is part of Magnum. # # Original authors — credit is appreciated but not required: # # 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 # — Vladimír Vondruš <mosra@centrum.cz> # # This is free and unencumbered software released into the p...
unlicense
7,908,722,276,422,597,000
42.576577
81
0.674178
false
jeremiahyan/odoo
addons/account/models/chart_template.py
1
74310
# -*- coding: utf-8 -*- from odoo.exceptions import AccessError from odoo import api, fields, models, _ from odoo import SUPERUSER_ID from odoo.exceptions import UserError, ValidationError from odoo.http import request from odoo.addons.account.models.account_tax import TYPE_TAX_USE import logging _logger = logging.g...
gpl-3.0
-6,534,800,096,511,794,000
55.595583
274
0.642282
false
vpol/gitinspector
gitinspector/version.py
1
1300
# coding: utf-8 # # Copyright © 2012-2014 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector 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 the Lic...
gpl-3.0
7,889,733,652,444,446,000
33.157895
78
0.74114
false
Brocade-OpenSource/OpenStack-DNRM-Neutron
neutron/db/migration/alembic_migrations/versions/128e042a2b68_ext_gw_mode.py
1
2121
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 OpenStack Foundation # # 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...
apache-2.0
-8,302,952,998,911,602,000
32.140625
78
0.728901
false