repo_name
stringlengths
6
90
path
stringlengths
4
230
copies
stringlengths
1
4
size
stringlengths
4
7
content
stringlengths
734
985k
license
stringclasses
15 values
hash
int64
-9,223,303,126,770,100,000
9,223,233,360B
line_mean
float64
3.79
99.6
line_max
int64
19
999
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
8.06
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
peterlharding/PDQ
examples/ppa_1998/chap3/simple_series.py
1
1999
#!/usr/bin/env python ############################################################################### # Copyright (C) 1994 - 2009, Performance Dynamics Company # # # # This software is licensed as described in the file COP...
mit
-5,654,378,376,471,323,000
39.958333
79
0.443222
false
4.063008
false
true
false
wisechengyi/pants
src/python/pants/backend/awslambda/python/awslambda_python_rules_test.py
1
2796
# Copyright 2019 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import textwrap from io import BytesIO from typing import Tuple from zipfile import ZipFile from pants.backend.awslambda.common.awslambda_common_rules import CreatedAWSLambda from pants.b...
apache-2.0
-6,121,346,832,915,262,000
35.311688
97
0.615522
false
4.262195
true
false
false
CMUSV-VisTrails/WorkflowRecommendation
vistrails/core/command_line.py
1
4225
############################################################################### ## ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## "Redistribution and use in source and binary forms, with or without ## modification, ...
bsd-3-clause
577,361,763,017,008,100
43.473684
83
0.668402
false
4.552802
false
false
false
melmorabity/streamlink
tests/plugins/test_mjunoon.py
4
1841
import unittest import requests_mock from streamlink import Streamlink from tests.mock import patch, Mock, ANY, call from streamlink.plugins.mjunoon import Mjunoon class TestPluginMixer(unittest.TestCase): def test_can_handle_url(self): # should match self.assertTrue(Mjunoon.can_handle_url('https...
bsd-2-clause
5,179,101,461,697,120,000
50.138889
190
0.664856
false
2.936204
true
false
false
quru/qis
src/imageserver/conf/base_settings.py
1
12484
# # Quru Image Server # # Base server settings (production settings) # # Do not edit this file - it will be overwritten when you upgrade the package. # # These settings can instead be overridden by creating the file # <base>/conf/local_settings.py and adding entries there instead. # # The server's public/external host...
agpl-3.0
4,629,091,649,830,258,000
43.585714
88
0.729734
false
3.460089
false
false
false
castelao/oceansdb
oceansdb/utils.py
1
3583
# -*- coding: utf-8 -*- """ """ import os import sys import pkg_resources import json from netCDF4 import Dataset from supportdata import download_file if sys.version_info >= (3, 0): from urllib.parse import urlparse else: from urlparse import urlparse """ http://data.nodc.noaa.gov/thredds/dods...
bsd-3-clause
-2,680,795,830,697,493,500
32.801887
123
0.648618
false
2.805795
false
false
false
playpauseandstop/rororo
src/rororo/timedelta.py
1
20422
""" ================ rororo.timedelta ================ Useful functions to work with timedelta instances. """ import datetime import re from typing import Optional from .annotations import DictStrInt from .utils import to_int __all__ = ( "str_to_timedelta", "timedelta_average", "timedelta_div", "t...
bsd-3-clause
-8,392,524,095,070,794,000
44.081678
79
0.362648
false
4.345106
false
false
false
Debian/openjfx
modules/web/src/main/native/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
4
3257
# Copyright (C) 2012 Google Inc. 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 list of conditions and the f...
gpl-2.0
-2,083,271,815,094,072,800
46.897059
142
0.731962
false
4.218912
true
false
false
lewisodriscoll/sasview
src/sas/sascalc/file_converter/nxcansas_writer.py
1
13487
""" NXcanSAS 1/2D data reader for writing HDF5 formatted NXcanSAS files. """ import h5py import numpy as np import re import os from sas.sascalc.dataloader.readers.cansas_reader_HDF5 import Reader as Cansas2Reader from sas.sascalc.dataloader.data_info import Data1D, Data2D class NXcanSASWriter(Cansas2Reader): ...
bsd-3-clause
5,279,194,481,400,906,000
43.365132
103
0.574183
false
3.633351
false
false
false
ekzhu/datasketch
benchmark/indexes/jaccard/plot_topk_benchmark.py
1
2564
import argparse import sys import json import sqlite3 import collections import matplotlib.pyplot as plt import numpy as np from utils import evaluate_runs if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument("benchmark_result") parser.add_argument("--plot-filename-prefix", ...
mit
1,114,854,674,682,466,300
35.628571
71
0.50039
false
3.944615
false
false
false
Eric89GXL/mnefun
mnefun/_atlas.py
5
7239
import os.path as op import numpy as np from mne import read_source_spaces, VolSourceEstimate, VolVectorSourceEstimate from mne.transforms import apply_trans from mne.utils import get_subjects_dir # Copied from KeyToElectrodesAtlasesOther.docx # Hammers, “IXI” atlas IXI = """\ 1 Hippocampus_right 2 Hippocampus_left ...
bsd-3-clause
8,019,596,186,205,704,000
30.051502
79
0.739185
false
2.547535
false
false
false
jeremyflores/cocosCairo
cocosCairo/Sprite.py
1
1397
""" A Node that renders an image such as a JPEG to the screen. """ from Node import * from Geometry import * import gtk class Sprite(Node): """ A L{Node} that renders an image (such as a JPEG, PNG, or SVG) to the screen. """ def __init__(self, imageName=None, position=None): """ Initialization method. @par...
mit
-5,840,929,719,904,607,000
26.94
86
0.692913
false
3.02381
false
false
false
vb64/django.templates.relative.path
src/template_relative_path/templatetags/relative_path.py
1
9401
""" Library for enable relative pathes in django template tags 'extends' and 'include' (C) 2016 by Vitaly Bogomolov mail@vitaly-bogomolov.ru Origin: https://github.com/vb64/django.templates.relative.path """ import posixpath from django import template from django.conf import settings from django.template....
mit
5,781,657,841,317,006,000
28.963816
79
0.568769
false
4.660882
false
false
false
ryanpetrello/draughtcraft
draughtcraft/tests/lib/test_email.py
1
2215
import os import fudge import unittest from pecan import conf from draughtcraft.tests import TestModel from draughtcraft.lib import email def _gen_template_path(): return os.path.join( os.path.dirname(__file__), '..', 'fixtures', 'emails' ) class TestEmailTemplate(unittest....
bsd-3-clause
-2,097,204,569,567,524,000
28.144737
79
0.577427
false
3.767007
true
false
false
HenriWahl/Nagstamon
Nagstamon/Servers/Zenoss.py
1
8192
#!/usr/bin/python # adapted from the zabbix.py code # Copyright (C) 2016 Jake Murphy <jake.murphy@faredge.com.au> Far Edge Technology # # 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; e...
gpl-2.0
-3,369,886,132,927,355,000
37.95122
130
0.54591
false
4.044444
false
false
false
Dikovinka/HRCS
API/models.py
1
6258
from django.db import models from pygments.lexers import get_lexer_by_name from pygments.formatters.html import HtmlFormatter from pygments import highlight from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver from HRMS.settings import API_BASE_...
apache-2.0
-4,816,846,810,864,111,000
33.960894
98
0.657239
false
3.642608
false
false
false
armando-migliaccio/neutron
neutron/tests/unit/db/vpn/test_db_vpnaas.py
1
69604
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
6,618,366,159,936,889,000
44.168073
79
0.443638
false
4.879355
true
false
false
KaranToor/MA450
google-cloud-sdk/.install/.backup/lib/third_party/pyu2f/hid/base.py
6
2716
# Copyright 2016 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 ag...
apache-2.0
-1,644,148,849,566,628,000
25.891089
79
0.692563
false
4.22395
false
false
false
jat001/B4M
b4m/bin/run.py
1
1290
#!/usr/bin/env python # -*- coding: utf-8 -*- # -*- author: chat@jat.email -*- import sys import os import json from flask_script import Manager from b4m import app from b4m.libs.utility import filter_cofig, set_log manager = Manager(app, description='just a blog app', with_default_commands=False)...
gpl-3.0
-8,499,678,432,202,827,000
24.8
94
0.639535
false
3.274112
true
false
false
ceralena/hark
src/hark/models/machine.py
2
1122
import hashlib from hark.models import SQLModel from hark.exceptions import InvalidMachineException MEMORY_MINIMUM = 128 class Machine(SQLModel): table = 'machine' key = 'machine_id' fields = ['machine_id', 'name', 'driver', 'guest', 'memory_mb'] required = ['machine_id', 'name', 'driver', 'guest',...
gpl-3.0
-7,533,765,534,427,996,000
27.769231
78
0.598039
false
3.950704
false
false
false
puchchi/stock_scraper_latest
scraper/items.py
1
5750
'''This module will help in saving data through item field to database ''' from scrapy import Item, Field from scrapy.loader.processors import MapCompose, Join from scraper import utility class StockOptionItem(Item): # This class will contains Option(Call/Put) values only Date = Field( i...
mit
4,930,689,673,046,849,000
39.780142
77
0.519826
false
4.095442
false
false
false
tommyogden/maxwellbloch
maxwellbloch/ob_atom.py
1
10469
# -*- coding: utf-8 -*- import json import numpy as np from numpy import pi import qutip as qu from maxwellbloch import ob_base, field, t_funcs, sigma class OBAtom(ob_base.OBBase): def __init__(self, label=None, num_states=1, energies=[], decays=[], initial_state=[], fields=[]): """ Initialis...
mit
-3,656,562,463,110,297,600
32.444089
79
0.538116
false
3.656305
false
false
false
cl9200/nbase-arc
integration_test/constant.py
1
1845
# # Copyright 2015 Naver Corp. # # 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...
apache-2.0
-3,636,380,509,207,576,000
30.271186
74
0.699729
false
2.643266
false
false
false
xpharry/Udacity-DLFoudation
tutorials/reinforcement/gym/gym/utils/closer.py
9
2019
import atexit import threading import weakref class Closer(object): """A registry that ensures your objects get closed, whether manually, upon garbage collection, or upon exit. To work properly, your objects need to cooperate and do something like the following: ``` closer = Closer() class Exa...
mit
816,029,814,971,257,600
29.134328
131
0.609212
false
4.304904
false
false
false
cortesi/mitmproxy
mitmproxy/stateobject.py
2
3126
import typing from typing import Any # noqa from typing import MutableMapping # noqa from mitmproxy.coretypes import serializable from mitmproxy.utils import typecheck class StateObject(serializable.Serializable): """ An object with serializable state. State attributes can either be serializable types...
mit
-7,017,060,772,115,322,000
32.255319
86
0.603007
false
4.012837
false
false
false
wellflat/cat-fancier
tools/clipper/bin/regist_images.py
1
1332
#!/usr/local/bin/python # -*- coding: utf-8 -*- import argparse import re import os import sqlite3 import sys def parsearguments(): parser = argparse.ArgumentParser(description='regist images to sqlite3 database') parser.add_argument('dbname') return parser.parse_args() def registimages(dbname, imagedir)...
mit
-1,966,229,489,163,214,300
26.183673
85
0.607357
false
3.7
false
false
false
Jacy-Wang/MyLeetCode
TextJustification68.py
1
1437
class Solution(object): def fullJustify(self, words, maxWidth): """ :type words: List[str] :type maxWidth: int :rtype: List[str] """ if maxWidth == 0: return [""] self.words = words self.maxWidth = maxWidth self.res = [] cur...
gpl-2.0
-3,874,024,190,129,266,700
34.04878
85
0.457203
false
3.862903
false
false
false
luis-rr/saga-python
tests/unittests/engine/mockadaptor_enabled.py
5
1360
__author__ = "Andre Merzky, Ole Weidner" __copyright__ = "Copyright 2012-2013, The SAGA Project" __license__ = "MIT" """ Unit test mock adaptor for saga.engine.engine.py """ from saga.utils.singleton import Singleton import saga.adaptors.cpi.base import saga.adaptors.cpi.job import radical.utils as ru _ADAP...
mit
2,654,670,123,847,920,600
19.923077
81
0.545588
false
2.845188
false
false
false
w0pke/oppgavegenerator
oppgavegen/generation_folder/multifill.py
2
1085
"""py file for multifill""" # todo: this should be reworked, how is described in the documentation. from random import shuffle from oppgavegen.utility.decorators import Debugger from oppgavegen.utility.utility import string_replace @Debugger def multifill(choices, variable_dict): """Returns choices with fill in...
bsd-3-clause
5,952,743,184,279,937,000
36.37931
96
0.643583
false
3.8
false
false
false
mauroalberti/beePen
geosurf/spatial.py
1
64925
# -*- coding: utf-8 -*- from __future__ import division from __future__ import absolute_import from builtins import str from builtins import zip from builtins import range from builtins import object from math import sqrt, floor, ceil, sin, cos, tan, radians, asin, acos, atan, atan2, degrees, isnan import numpy as np...
gpl-3.0
-768,743,786,951,367,200
28.363636
126
0.566425
false
3.405707
false
false
false
mrquim/mrquimrepo
script.module.trakt/lib/trakt/mapper/sync.py
4
7480
from __future__ import absolute_import, division, print_function from trakt.mapper.core.base import Mapper import logging log = logging.getLogger(__name__) class SyncMapper(Mapper): @classmethod def process(cls, client, store, items, media=None, flat=False, **kwargs): if flat: # Return ...
gpl-2.0
-7,677,052,418,993,537,000
24.52901
106
0.508957
false
4.21646
false
false
false
laurentb/weboob
modules/degiro/browser.py
1
6460
# -*- coding: utf-8 -*- # Copyright(C) 2012-2019 Budget Insight # # This file is part of a weboob module. # # This weboob module 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...
lgpl-3.0
7,849,844,824,560,093,000
43.551724
163
0.643344
false
3.831554
false
false
false
IntelLabs/hpat
examples/basic_workflow_parallel.py
1
2075
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation 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 sou...
bsd-2-clause
6,950,741,327,162,757,000
42.229167
79
0.698313
false
4.350105
false
false
false
rtfd/recommonmark
recommonmark/scripts.py
1
1856
#!/usr/bin/env python # -*- coding: utf-8 -*- """ CLI scripts for docutils CommonMark parser Author: Steve Genoud Date: 2013-08-25 Description: Scripts loaded by setuptools entry points """ try: import locale locale.setlocale(locale.LC_ALL, '') except ImportError: pass from docutils.core import publish...
mit
2,669,433,111,873,184,000
28.935484
96
0.654095
false
4.651629
false
false
false
calaldees/libs
python3/calaldees/pyramid_helpers/auto_format.py
1
10911
# DEPRECATED - Use auto_format2 #------------------------------------------------------------------------------- # Imports #------------------------------------------------------------------------------- from decorator import decorator import re import copy import pyramid.request import pyramid.response import log...
gpl-3.0
-3,927,139,208,071,009,300
35.249169
235
0.546513
false
4.501238
false
false
false
teagom/mr-robot
mr-robot.py
1
7067
#!/usr/bin/python # -*- coding: utf-8 -*- import argparse from external import cmd_run, sendmail, dateformat ''' Mr-Robot-Backup. Dedicated the serie Mr Robot. author: Tiago de Souza Moraes teagom@gmail.com required lib: argparse sshpass 1 - Dump and compact Data Bas...
gpl-3.0
-1,378,631,655,391,622,000
31.56682
147
0.49243
false
3.117336
true
false
false
crossbario/autobahn-python
examples/xbr/test_transfer_tokens.py
3
2018
import sys import web3 from autobahn import xbr import argparse from test_accounts import addr_owner, addr_alice_market, addr_alice_market_maker1, addr_bob_market, addr_bob_market_maker1, \ addr_charlie_provider, addr_charlie_provider_delegate1, addr_donald_provider, addr_donald_provider_delegate1, \ addr_edit...
mit
-1,746,237,468,431,509,200
33.793103
140
0.645689
false
3.675774
false
false
false
praekelt/panya-social
social/templatetags/social_template_tags.py
2
4471
import urllib2 from django import template from django.conf import settings from django.contrib.sites.models import Site from django.template import TemplateSyntaxError from django.utils.http import urlencode from social import utils register = template.Library() @register.tag def filter_permitted_fields(parser, to...
bsd-3-clause
-6,339,067,862,579,490,000
31.398551
132
0.600537
false
3.722731
false
false
false
wasmitnetzen/QuantifiedSelf
Devices/callDevices.py
1
13536
#!/usr/bin/env python3.7 # -*- coding: UTF-8 -*- import urllib.request import urllib.parse import re import os import pickle import datetime import time import subprocess import psutil from bs4 import BeautifulSoup import configparser import json import copy import http.client import http.cookiejar import asyncio impo...
gpl-2.0
-7,516,635,748,984,482,000
32.904762
213
0.68835
false
3.199622
true
false
false
ArtAPI/artFlask
tests/data/helpers.py
1
4549
from uuid import * from random import * from bson import json_util import base64, traceback import api.venueFunctions numStaff = 4 numArtists = 250 numVenueManagers = 2 numVenues = 200 numArt = 500 staff = {} artists = {} venues = {} art = {} artistVenueMap = {} basePictureURL = "http://aloft.gluu.org" def getPhon...
mit
-4,981,791,937,231,275,000
32.448529
150
0.55155
false
3.13292
false
false
false
stormtrader/gw_trade
process_cond_order.py
1
4361
# coding:utf-8 import time from db_util import * from stock_util import * from trade_util import * from futu import * ####### init log ################ logging.basicConfig(level=logging.DEBUG, format='[%(asctime)s][%(filename)s][line:%(lineno)d][%(levelname)s] %(message)s', datefmt='%...
gpl-3.0
-1,884,477,420,688,660,200
41.252525
170
0.559168
false
3.285939
false
false
false
GeospatialPython/srtm.py
srtm/main.py
1
4851
# -*- coding: utf-8 -*- # Copyright 2013 Tomo Krajina # # 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
6,449,988,976,548,925,000
34.669118
110
0.661101
false
3.397059
false
false
false
15Mpedia/15Mpedia-scripts
fosas/fosas-spain.py
1
5391
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2015 emijrp <emijrp@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 Foundation, either version 3 of the License, or # (at your option) a...
gpl-3.0
5,953,270,989,265,746,000
40.612403
794
0.60842
false
2.85836
false
false
false
moha24/pyexchange
tests/exchange2010/test_move_folder.py
5
1836
""" (c) 2013 LinkedIn Corp. 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 agreed to in writing...
apache-2.0
4,345,819,937,078,144,500
28.142857
212
0.715142
false
3.635644
true
false
false
riderframework/rider
setup.py
1
2849
# -*- coding: utf-8 -*- import imp import sys from os import path from setuptools import setup, find_packages, Extension info = imp.load_source('info', path.join('.', 'rider', 'info.py')) NAME = info.NAME DESCRIPTION = info.DESCRIPTION AUTHOR = info.AUTHOR AUTHOR_EMAIL = info.AUTHOR_EMAIL URL = info.URL VERSION = inf...
apache-2.0
7,313,644,108,453,576,000
32.916667
90
0.610039
false
3.808824
false
false
false
antonio-fr/AddressGen_BTChip
btchip/btchipComm.py
1
3903
""" ******************************************************************************* * BTChip Bitcoin Hardware Wallet Python API * (c) 2014 BTChip - 1BTChip7VfTnrPra5jqci7ejnMguuHogTn * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with th...
gpl-3.0
-7,848,346,933,935,293,000
27.489051
87
0.652831
false
2.963554
false
false
false
MisanthropicBit/progress
setup.py
1
1359
"""progress module setup script for distribution.""" from __future__ import with_statement import os import distutils.core def get_version(filename): with open(filename) as fh: for line in fh: if line.startswith('__version__'): return line.split('=')[-1].strip()[1:-1] distu...
mit
-1,331,360,655,842,241,500
32.146341
71
0.610743
false
4.093373
false
false
false
mfcloud/python-zvm-sdk
zvmsdk/utils.py
1
17911
# Copyright 2017,2018 IBM Corp. # Copyright 2013 NEC Corporation. # Copyright 2011 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...
apache-2.0
5,582,420,850,839,131,000
31.156194
79
0.56362
false
4.068832
false
false
false
Jumpscale/jumpscale6_core
lib/JumpScale/baselib/specparser/SpecParser.py
1
29932
from JumpScale import j # from SpecModelActorsGenerator import SpecModelActorsGenerator class Specbase(j.code.classGetBase()): def __init__(self,linenr): self.name="" self.description="" self.tags="" self.comment="" self.linenr=linenr def addDefaults(self): pass...
bsd-2-clause
-3,147,751,414,385,774,600
35.237288
176
0.537151
false
4.038861
false
false
false
UavLabsColombia/pibotballs
src/TestingFiles/SimpleCVReconocimientoUnCirculoNegro.py
2
1981
#Esta version del codigo, no es posible ejecutarla directamente en la Pi en este momento ya que #no se ha instalado el X sobre esta para ejecutar aplicaciones graficas. #Este proyecto se puede ejecutar sobre un pc directamente para probarlos from SimpleCV import * # Importamos liberias para el control de la Camara i...
gpl-3.0
-5,415,716,973,777,194,000
48.525
101
0.753155
false
2.85036
false
false
false
ugurcan377/solarchive
solarchive/apiv10/resources/gear.py
1
1185
from flask_restful import Resource from solarchive.apiv10.resources.common import parser from solarchive import data class ListGear(Resource): data_source = data.gear have_categories = True def get(self): items = self.data_source args = parser.parse_args() categorize = False ...
gpl-3.0
5,979,634,919,305,573,000
25.954545
72
0.537553
false
4.309091
false
false
false
openstack/barbican
barbican/objects/order_retry_task.py
1
2026
# Copyright 2018 Fujitsu. # # 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...
apache-2.0
621,677,975,572,943,000
41.208333
78
0.668806
false
3.988189
false
false
false
ryancoleman/traveldistance
src/pdbdisp.py
1
10269
#script to read .pdb and make pdb-pymol objects in pymol #ryan g. coleman ryangc@mail.med.upenn.edu from pymol.cgo import * from pymol import cmd import math import string class displayObj(object): '''contains all methods and local variables used to display things''' pdbDatas = [] # global arrays basically pdb...
gpl-2.0
7,188,602,813,444,302,000
35.414894
80
0.577564
false
2.957661
false
false
false
asarnow/pyem
project.py
1
7770
#!/usr/bin/env python # Copyright (C) 2016 Daniel Asarnow, Eugene Palovcak # University of California, San Francisco # # Program for projecting density maps in electron microscopy. # See help text and README file for more information. # # This program is free software: you can redistribute it and/or modify # it under t...
gpl-3.0
-5,922,086,140,172,929,000
46.090909
121
0.60399
false
3.385621
false
false
false
ashwingoldfish/eddy
eddy/core/loaders/graphml.py
1
37226
# -*- coding: utf-8 -*- ########################################################################## # # # Eddy: a graphical editor for the specification of Graphol ontologies # # Copyright (C) 2015 Daniele Pantaleone <danielepantaleone@me.com> ...
gpl-3.0
-5,678,843,747,155,646,000
43.317857
127
0.561865
false
4.658491
false
false
false
teuben/DigikamScripts
merge_list_digikam4.py
1
3072
#! /usr/bin/env python # -*- coding: utf-8 -*- # # import sqlite3 as lite import os, sys # picasa's and my own one-liner album summary fcheck = ['Picasa.ini', '.picasa.ini', 'photos.txt'] def line1(lines): """ convert a string with newlines to a single line with ; separating lines """ return lines.repl...
mit
-6,952,244,425,359,542,000
25.713043
101
0.523763
false
3.331887
false
false
false
vhazali/cs5331
assignment3/database/models.py
1
2036
import datetime from sqlalchemy import Column, Integer, String, DateTime, ForeignKeyConstraint from sqlalchemy.ext.declarative import declarative_base DeclarativeBase = declarative_base() class Links(DeclarativeBase): __tablename__ = "urls" url = Column('url', String, primary_key=True) protocol = Col...
mit
-5,169,880,415,326,972,000
35.375
80
0.661591
false
3.708561
false
false
false
keras-team/autokeras
autokeras/preprocessors/common.py
1
5360
# Copyright 2020 The AutoKeras 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 applicable law or agreed to i...
apache-2.0
-8,559,964,641,750,195,000
34.03268
85
0.647575
false
4.250595
true
false
false
ppizarror/Hero-of-Antair
lib/texture_analysis.py
1
245828
# coding=utf-8 """ TEXTURE ANALYSIS ID de las texturas. Autor: PABLO PIZARRO @ ppizarror Fecha: 2014-2015, 2017-2018 Licencia: GPLv2 """ def etextureMobAnalysis(itemTexture, light): """ Retorna la textura de cada mob al ingresar el id :param itemTexture: ID :param light: Luz :return: String "...
gpl-2.0
-8,387,519,947,250,962,000
38.256787
83
0.297584
false
5.127464
false
false
false
suutari-ai/shoop
shuup/front/templatetags/thumbnails.py
2
2445
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import six from django.co...
agpl-3.0
-7,602,040,256,931,972,000
27.764706
73
0.666667
false
3.671171
false
false
false
RobbieClarken/subaudible
subaudible/utils.py
1
3076
from hashlib import md5 from pathlib import Path import subprocess from scipy import signal import numpy as np import sounddevice def audio_search(source, sample, sample_rate): """ Locate an audio sample with a source audio track. Args: source (numpy array): Audio data that will be searched. ...
mit
8,642,771,561,665,586,000
28.018868
80
0.634915
false
3.93854
false
false
false
lizardsystem/lizard-auth-server
lizard_auth_server/testsettings.py
1
6471
# -*- coding: utf-8 -*- import os SETTINGS_DIR = os.path.dirname(os.path.realpath(__file__)) BUILDOUT_DIR = os.path.abspath(os.path.join(SETTINGS_DIR, "..")) LOGGING = { "version": 1, "disable_existing_loggers": True, "formatters": { "simple": {"format": "%(levelname)s %(message)s"}, "ve...
mit
-566,768,322,804,337,900
31.355
81
0.643177
false
3.530278
false
false
false
taoliu/taolib
Scripts/hmm_conception.py
1
3072
#!/usr/bin/env python # Time-stamp: <2011-01-31 16:56:46 Tao Liu> """Script description: HMM conception modeling the Histone Marks K4me3 and K36me3 in worm. Copyright (c) 2008 Tao Liu <taoliu@jimmy.harvard.edu> This code is free software; you can redistribute it and/or modify it under the terms of the BSD License (s...
bsd-3-clause
4,506,463,641,778,999,000
28.538462
107
0.542318
false
3.5189
false
false
false
BenWiederhake/House-Of-Tweets
backend/gen_sounds.py
2
1339
#!/usr/bin/env python3 from soundGenerator import gen_bird import json import mylog from time import sleep QUICK_FOR_PRESENTATION = False def determine_bird_ids(): with open('birds.json', 'r') as fp: bids = json.load(fp).keys() return sorted(list(bids)) def mk_lengths(): # Minimal length: 1000...
gpl-3.0
-8,802,512,769,128,296,000
29.431818
102
0.613144
false
2.87957
false
false
false
p2pu/mechanical-mooc
sequence/tests.py
1
4714
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase from sequence import models as sequence_model from mock import patch import datetime class SimpleTest(...
mit
7,549,176,472,228,384,000
32.432624
91
0.647009
false
3.964676
true
false
false
ruslo/configs
python/detail/os.py
3
1970
#!/usr/bin/env python3 # Copyright (c) 2013, Ruslan Baratov # All rights reserved. import os.path import re import detail.command import detail.os_detect def empty_dir(directory): """Check directory is empty""" if not os.path.isdir(directory): return False return len(os.listdir(directory)) == 0 def get_p...
bsd-2-clause
7,368,474,654,193,863,000
26.746479
76
0.634518
false
3.172303
false
false
false
amarandon/pinax
pinax/fixtures/generate/gen_microblogging.py
4
1074
import random from django.contrib.auth.models import User from django.contrib.webdesign.lorem_ipsum import words from django.template.defaultfilters import capfirst from microblogging.models import Tweet OEMBED_CONTENT = [ 'http://www.youtube.com/watch?v=_RyodnisVvU&feature=rec-fresh', 'http://revision3.com/...
mit
-4,318,685,643,486,619,600
33.677419
73
0.608007
false
3.409524
false
false
false
pbryzek/Freedom
property_downloader.py
1
1925
import consts.switches as switches import webbrowser import os import consts.paths as paths from os import walk from selenium import webdriver from selenium.webdriver.common.keys import Keys from common.globals import handle_err_msg #Class responsible for downloading the inputs class PropertyDownloader(object): ...
mit
1,187,193,214,922,474,000
30.557377
96
0.631169
false
3.78937
false
false
false
transistorfet/nerve
nerve/irc/devices/moobot.py
1
3471
#!/usr/bin/python3 # -*- coding: utf-8 -*- import nerve import traceback from ..msg import Colours, MsgType, Msg from .client import IRCClient class MooBot (IRCClient): def __init__(self, **config): super().__init__(**config) self.channel = '#ircmoo' def on_connect(self): self.send...
gpl-3.0
-8,526,766,348,947,334,000
33.71
130
0.529818
false
3.661392
false
false
false
hberntsen/usim
debug.py
1
8678
#! /usr/bin/env python import urwid import urwid.signals import socket import sys import getopt import math import itertools class Window(urwid.BoxAdapter): def __init__(self, body, title = "Unknown title", height = 34): #super(Window, self).__init__( self.frame = urwid.Frame( body, ...
mit
5,142,969,700,129,251,000
28.317568
118
0.540678
false
3.831347
false
false
false
Hungry-Gnu/The-Bird
bird.py
1
14688
import pygame from constants import * from colors import * from bomb import Bomb from sound import * ############################ ###GET IMAGE FUNCTIONS###### def get_images_fly(): image1 = pygame.Surface((BIRD_WIDTH, BIRD_HEIGHT)) image2 = pygame.Surface((BIRD_WIDTH, BIRD_HEIGHT)) images_list = [image1...
gpl-2.0
6,288,206,445,718,495,000
33.805687
120
0.532816
false
3.240953
false
false
false
congma/pypar
examples/mandelbrot_example/mandelplot.py
2
2658
"""Plotting routine for use with the mandelbrot set Ole Nielsen, SUT 2003 """ def plot(A, kmax=None): """Plot matrix A as an RGB image using the Python Imaging Library and Tkinter A is converted to an RGB image using PIL and saved to disk Then it is displayed using PhotoImage A m...
gpl-3.0
-1,436,950,122,502,527,200
28.533333
78
0.566968
false
3.525199
false
false
false
xushiwei/nova
nova/virt/hyperv.py
2
20774
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Cloud.com, 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....
apache-2.0
-8,672,924,719,348,142,000
39.893701
79
0.604169
false
3.915928
false
false
false
cheral/orange3
Orange/tests/test_manifold.py
4
5219
# Test methods with long descriptive names can omit docstrings # pylint: disable=missing-docstring import unittest import numpy as np from Orange.projection import (MDS, Isomap, LocallyLinearEmbedding, SpectralEmbedding, TSNE) from Orange.distance import Euclidean from Orange.data impor...
bsd-2-clause
5,605,595,179,145,310,000
37.375
81
0.591684
false
3.324204
true
false
false
iotile/coretools
iotilecore/iotile/core/hw/debug/sparse_memory.py
1
5592
"""A sparse memory map for debugging purposes""" from collections import namedtuple import binascii import string from iotile.core.exceptions import ArgumentError MemorySegment = namedtuple('MemorySegment', ['start_address', 'end_address', 'length', 'data']) DisjointSegment = namedtuple('DisjointSegment', []) Overla...
gpl-3.0
8,057,882,650,463,269,000
33.306748
109
0.592096
false
4.204511
false
false
false
KOPURA/GashoTorrent
src/core/file_tree.py
1
2104
""" A very simplified Tree-like structure, which represents the "inner" filesystem of a torrent file. According to the BitTorrent protocol, this filesystem is composed from either only one file or many files within a root directory. For example: - A torrent which contains the file FILE1 - A torrent which contai...
gpl-3.0
-7,490,263,006,136,820,000
29.492754
78
0.631654
false
3.925373
false
false
false
Comunitea/CMNT_004_15
project-addons/associated_products/models/sale.py
1
5894
############################################################################## # # Copyright (C) 2014 Pexego Sistemas Informáticos All Rights Reserved # $Jesús Ventosinos Mayor <jesus@pexego.es>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero ...
agpl-3.0
-1,635,329,094,113,711,600
50.217391
115
0.524448
false
4.362963
false
false
false
Sisqui/lungcheck_django
lungcheck/doctors/migrations/0006_auto_20171019_1329.py
1
1368
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-10-19 13:29 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('doctors', '0005_auto_20170528_1635'), ] operations = [ migrations.AddField( ...
gpl-3.0
-6,505,760,536,991,555,000
29.4
118
0.534357
false
4.329114
false
false
false
itarozzi/classerman
src/ui/mainwindow_ui.py
1
16000
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'src/ui/mainwindow.ui' # # Created: Fri Feb 15 16:08:54 2013 # by: PyQt4 UI code generator 4.9.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 exce...
gpl-3.0
-5,973,779,859,069,539,000
58.04059
153
0.719375
false
3.773585
false
false
false
andreymal/tabun_api
test/testmgr.py
1
7529
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function import os import re import sys import time import difflib import testutil def clean_dynamic_data(data, user): # Ключики новые при каждом перезапуске скрипта if user.session_id: data = data.replace(...
mit
-4,896,520,862,565,750,000
27.874477
101
0.534125
false
2.683126
false
false
false
leeypp/Test_pycharm
documents/2016_08_19ntp_offset.py
1
1864
#!/usr/bin/env python # -*- coding: utf-8 -*- from subprocess import Popen, PIPE import json import urllib2 import os import time import commands import sys import socket data = [] def main(): offset = 0 try: raw_data = Popen(['ntpq', '-pn'], stdout=PIPE,stderr=PIPE).communicate()[0] # 运行“ntpq -pn”...
gpl-3.0
-5,493,855,757,440,463,000
25.044776
102
0.613532
false
2.991424
false
false
false
AMOboxTV/AMOBox.LegoBuild
script.module.trakt/lib/trakt/core/context_collection.py
3
3631
from trakt.core.helpers import synchronized from threading import RLock from six.moves import _thread as thread from six.moves import xrange import logging log = logging.getLogger(__name__) class ListCollection(object): def __init__(self, *lists): self._lists = lists or [] self._lock = RLock() ...
gpl-2.0
4,076,849,049,501,209,000
21.552795
72
0.53539
false
4.070628
false
false
false
ivmech/iviny-scope
lib/xlsxwriter/test/worksheet/test_cond_format07.py
1
4407
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ...compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssemble...
gpl-3.0
-915,836,630,130,436,500
36.991379
171
0.387111
false
4.693291
true
false
false
zeeshaanahmad/fsnd-p4-conference-central
models.py
1
7368
#!/usr/bin/env python import httplib import endpoints from protorpc import messages from google.appengine.ext import ndb """models.py Udacity conference server-side Python App Engine data & ProtoRPC models $Id: models.py Author: Zeeshan Ahmad Email: ahmad.zeeshaan@gmail.com """ __author__ = 'ahmad.zeeshan@gmail.c...
apache-2.0
6,986,803,550,628,770,000
30.622318
80
0.733442
false
3.995662
false
false
false
nave91/modeller
pom3/pom3_requirements.py
2
4348
from pom3_requirements_tree import * import random """############################################################################## ### -@author: Joseph Krall ### -@note: POM3 Requirements Heap Module ### -@note: This work done in affiliation with the West Virginia University ### -@contact: kralljoe@gmail...
gpl-2.0
-5,459,669,843,539,946,000
46.78022
240
0.548758
false
4.125237
false
false
false
abhi11/tanglu-dak
dak/dakdb/update9.py
6
2525
#!/usr/bin/env python # coding=utf8 """ Pending contents disinguished by arch @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2008 Michael Casadevall <mcasadevall@debian.org> @copyright: 2009 Mike O'Connor <stew@debian.org> @license: GNU General Public License version 2 or later """ # This program i...
gpl-2.0
-3,599,455,433,956,608,000
39.725806
117
0.630495
false
4.461131
false
false
false
edx/edx-e2e-tests
regression/pages/whitelabel/profile_page.py
1
2084
""" User profile page """ from bok_choy.page_object import PageObject class ProfilePage(PageObject): """ Student profile """ url = None def is_browser_on_page(self): return self.q( css=".wrapper-profile-sections.account-settings-container" ).present @property ...
agpl-3.0
-3,956,656,464,720,719,000
24.414634
79
0.535509
false
4.078278
false
false
false
michaelgichia/WeideShop
weideshop/tests/products/test_models.py
1
1237
# Third party stuff from django.test import TestCase from django.utils import timezone # Our stuff from weideshop.products.models import Category, Subcategory, Product from weideshop.tests.factories.products.category import CategoryFactory class CategoryModelTest(TestCase): def setUp(self): self.first_category =...
bsd-2-clause
5,828,085,189,359,612,000
31.552632
92
0.779305
false
3.361413
true
false
false
kevinr/750book-web
750book-web-env/lib/python2.7/site-packages/celery/backends/__init__.py
14
1276
# -*- coding: utf-8 -*- from __future__ import absolute_import import sys from .. import current_app from ..local import Proxy from ..utils import get_cls_by_name from ..utils.functional import memoize UNKNOWN_BACKEND = """\ Unknown result backend: %r. Did you spell that correctly? (%r)\ """ BACKEND_ALIASES = { ...
mit
-3,617,345,848,671,061,000
30.121951
64
0.692006
false
3.58427
false
false
false
CollabQ/CollabQ
.google_appengine/lib/django/django/utils/cache.py
32
6745
""" This module contains helper functions for controlling caching. It does so by managing the "Vary" header of responses. It includes functions to patch the header of response objects directly and decorators that change functions to do that header-patching themselves. For information on the Vary header, see: http...
apache-2.0
3,551,422,332,282,285,000
39.63253
115
0.671164
false
3.845496
false
false
false
sergpolly/FluUtils
RNA_SNP_association/flu_module.py
1
47583
import sys # import re # import os # import string import random as rnd import numpy as np import pandas as pd import subprocess as sub import matplotlib.pyplot as plt from Bio import SeqIO from Bio import SeqRecord # import Bio import copy import re import scipy.sparse as sparse import matplotlib as mpl mpl.rcParam...
mit
7,298,915,092,636,631,000
47.853183
178
0.522813
false
3.530682
false
false
false
lefnire/tensorforce
tensorforce/core/preprocessors/grayscale.py
1
1921
# Copyright 2017 reinforce.io. 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
-376,083,531,328,071,400
39.87234
118
0.661635
false
4.104701
false
false
false
JAOSP/aosp_platform_external_chromium_org
chrome/test/webdriver/test/test_paths.py
42
3248
# Copyright (c) 2012 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. import os import platform import sys import util def GetTestDataPath(relative_path): """Returns the path to the given path under chromedriver's test...
bsd-3-clause
-3,974,303,036,840,938,500
32.484536
78
0.631773
false
3.300813
true
false
false
brentp/methylcode
scripts/summarize_gff50.py
1
1194
import sys import os.path as op sys.path.insert(0, "/home/brentp/src/methylcode/methylcoder/") from methyl import MethylGroup prefix = sys.argv[1] # something like: out1234n/thaliana_v9 acontext = sys.argv[2] # CHH or CHG or CG window = 50 script = op.basename(sys.argv[0]) mg = MethylGroup(prefix) fh = open(mg.dir...
bsd-3-clause
9,161,600,484,154,621,000
28.85
103
0.568677
false
2.641593
false
false
false
davidsminor/gaffer
startup/gui/menus.py
1
13288
########################################################################## # # Copyright (c) 2011-2012, John Haddon. All rights reserved. # Copyright (c) 2012-2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
bsd-3-clause
-6,536,568,374,379,597,000
47.32
150
0.744657
false
3.559604
false
false
false
noskill/virt-manager
virtinst/deviceaudio.py
2
1246
# # Copyright 2008-2009, 2013-2014 Red Hat, Inc. # Cole Robinson <crobinso@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) an...
gpl-2.0
3,668,519,564,540,619,000
35.647059
79
0.718299
false
3.845679
false
false
false
ideabulbs/muspractice
muspractice/models/Schedule.py
1
1747
import datetime import time from .Serializable import * class Schedule(Serializable): _phrase_id = None _next_repetition = None _speed = 0 _pitch = 0 _comment = "" _priority = 0 def set_priority(self, priority): self._priority = priority def get_priority(self): re...
gpl-3.0
1,512,288,798,823,124,700
27.177419
103
0.608472
false
3.670168
false
false
false
srilatha44/threepress
bookworm/search/index.py
7
2134
import logging, os, sys, uuid from django.core.management import setup_environ import bookworm.settings setup_environ(bookworm.settings) from django.contrib.auth.models import User import bookworm.search.constants as constants from bookworm.search import epubindexer from bookworm.library.models import HTMLFile, Epub...
bsd-3-clause
3,676,251,205,765,556,700
30.382353
97
0.606842
false
3.660377
false
false
false
timstoner/pagerank
convert_page_file.py
1
2008
# reads a enwiki-(date)-page.sql file and outputs # a file with page titles and wikipedia assigned page ids import sys import re import datetime pattern = re.compile("\(.*?,.*?,'.*?',.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?,.*?\)") out_file = open("pages-simple.txt", 'w') def main(path): print path starttime ...
apache-2.0
-7,474,403,988,539,161,000
26.888889
77
0.581175
false
3.746269
false
false
false
conzos-angels/iQ-scripts
camera-orientation.py
1
5222
''' Set camera rotation and flip for all iQ3 protocols. Summary: This is needed to fix the protcol importer not importing the camera orientation settings that are stored in iQ2 protocols. The script matches the camera serial number to the expected orientation, so the name of the camera in the "Camera Selection" tab ...
gpl-3.0
-2,209,228,735,555,042,800
36.568345
91
0.525278
false
4.532986
true
false
false