repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
cloudify-examples/cloudify-proxy-plugin
cloudify_custom_workflow/tasks.py
1
1609
from cloudify import ctx from cloudify.workflows import ctx as workflow_ctx from cloudify.decorators import workflow import json def log(**kwargs): ctx.logger.info("Log interface: {}".format(repr(kwargs))) @workflow def customwf(nodes_to_runon, operations_to_execute, **kwargs): ctx = workflow_ctx ctx.l...
apache-2.0
6,314,600,428,227,779,000
32.520833
77
0.566812
false
4.732353
false
false
false
ddico/odoo
addons/website_crm_partner_assign/controllers/main.py
1
15372
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import datetime import werkzeug.urls from collections import OrderedDict from werkzeug.exceptions import NotFound from odoo import fields from odoo import http from odoo.http import request from odoo.addons.http_routin...
agpl-3.0
4,974,853,189,363,785,000
44.345133
137
0.570908
false
3.87204
false
false
false
Molecular-Image-Recognition/Molecular-Image-Recognition
code/rmgpy/thermo/wilhoitTest.py
2
14941
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2002-2017 Prof. William H. Green (whgreen@mit.edu), # Prof. Richard H. West (r.west@neu.edu) and the RMG Team (rmg_dev@mit.edu) # # ...
mit
8,284,205,252,251,705,000
40.273481
150
0.619838
false
3.094656
true
false
false
grzegorzshub/health_monitor
tools/osc_record_replay.py
1
4882
#!/usr/bin/python from __future__ import print_function import sys, os, time try: import liblo USE_LIBLO=True except: import socket import struct USE_LIBLO=False # use socket for replay since mac's have issues installing liblo if len(sys.argv) < 3: print("usage: ", sys.argv[0], " <file> <o...
mit
-8,458,518,287,868,452,000
26.273743
86
0.508603
false
3.82902
false
false
false
adviti/melange
app/soc/modules/gsoc/views/project_details.py
1
9363
#!/usr/bin/env python2.5 # # Copyright 2011 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
-2,887,737,720,172,908,000
27.633028
78
0.669871
false
3.734743
false
false
false
robertovillarejo/Inflector-REST
docs/source/conf.py
1
5400
# -*- coding: utf-8 -*- # # Inflector REST documentation build configuration file, created by # sphinx-quickstart on Mon Sep 18 10:48:43 2017. # # 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
-2,411,924,823,562,759,700
29.84
79
0.677228
false
3.868817
true
false
false
bleepbloop/Pivy
examples/Mentor/13.5.Boolean.py
1
5641
#!/usr/bin/env python ### # Copyright (c) 2002-2007 Systems in Motion # # Permission to use, copy, modify, and 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 I...
isc
-7,688,071,145,266,199,000
31.988304
76
0.691721
false
3.604473
false
false
false
jblupus/PyLoyaltyProject
old/entropia/market_basket.py
1
3970
# coding=utf-8 import os import threading from os.path import expanduser, join, exists import numpy as np import pandas as pd class BasketsHandler(threading.Thread): def __init__(self, threadID, name, interactions): threading.Thread.__init__(self) self.threadID = threadID self.name = name...
bsd-2-clause
722,922,414,630,130,600
29.775194
98
0.546851
false
3.843175
false
false
false
nttcom/eclcli
eclcli/network/v2/common_function.py
1
2328
from eclcli.common import command from eclcli.common import utils from ..networkclient.common import utils as to_obj class ListCommonFunction(command.Lister): def get_parser(self, prog_name): parser = super(ListCommonFunction, self).get_parser(prog_name) parser.add_argument( '--descrip...
apache-2.0
-8,206,461,774,757,889,000
30.04
92
0.561426
false
4.240437
false
false
false
ds-hwang/chromium-crosswalk
tools/perf/PRESUBMIT.py
2
4940
# Copyright 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. """Presubmit script for changes affecting tools/perf/. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about th...
bsd-3-clause
-2,480,566,812,308,374,000
34.035461
80
0.697976
false
3.506033
false
false
false
bcmd/BCMD
bparser/doc_latex.py
1
17327
# write documentation in LaTeX format import sys import os import os.path import re import datetime, time import decimal # template details THIS_DIR = os.path.dirname(os.path.abspath(__file__)) TEMPLATE_DIR = os.path.abspath(THIS_DIR + '/templates') HEADER = os.path.join(TEMPLATE_DIR, 'header.tex') FOOTER = os.path.jo...
gpl-2.0
8,540,872,152,748,041,000
35.944563
144
0.493507
false
3.822413
true
false
false
our-city-app/oca-backend
src/admin/explorer/scripts.py
1
7024
# -*- coding: utf-8 -*- # Copyright 2019 Green Valley Belgium NV # # 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 appl...
apache-2.0
-7,605,804,072,736,126,000
36.967568
116
0.626139
false
3.993178
false
false
false
henrykironde/weaverhenry
setup.py
1
5131
""" A setuptools based setup module. """ import platform import warnings from __init__ import VERSION # Always prefer setuptools over distutils from codecs import open from os import path from setuptools import setup # To use a consistent encoding here = path.abspath(path.dirname(__file__)) # Get the long descript...
mit
-6,037,498,510,324,988,000
28.153409
117
0.53206
false
4.212644
false
false
false
pnwairfire/bluesky
bluesky/modules/ecoregion.py
1
2502
"""bluesky.modules.consumption""" __author__ = "Joel Dubowy" import itertools import logging from bluesky.config import Config from bluesky import exceptions from bluesky.locationutils import LatLng __all__ = [ 'run' ] __version__ = "0.1.0" def run(fires_manager): """Looks up ecoregion for each location ...
gpl-3.0
3,558,392,636,840,695,000
32.36
83
0.569544
false
3.952607
false
false
false
endlessm/chromium-browser
third_party/depot_tools/subprocess2.py
1
7998
# coding=utf-8 # 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. """Collection of subprocess wrapper functions. In theory you shouldn't need anything else in subprocess, or this module failed. """ impor...
bsd-3-clause
4,249,313,719,391,573,500
30.242188
80
0.668917
false
3.832295
false
false
false
AdamIsrael/PerfKitBenchmarker
perfkitbenchmarker/regex_util.py
1
3477
# Copyright 2014 PerfKitBenchmarker Authors. 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 appli...
apache-2.0
2,808,015,577,827,065,300
30.044643
78
0.696002
false
3.850498
false
false
false
google/trax
trax/rl/normalization.py
1
3796
# coding=utf-8 # Copyright 2021 The Trax 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 a...
apache-2.0
8,431,102,066,830,463,000
29.368
84
0.683087
false
3.401434
false
false
false
mozman/ezdxf
src/ezdxf/layouts/blocklayout.py
1
3982
# Copyright (c) 2019-2020, Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING, Iterable, Optional, Union from ezdxf.lldxf import const from .base import BaseLayout if TYPE_CHECKING: from ezdxf.eztypes import DXFGraphic, AttDef class BlockLayout(BaseLayout): """ BlockLayout has the same fa...
mit
661,096,748,868,732,300
30.864
77
0.608237
false
3.738967
false
false
false
martin-king/mycfqc
my_qc_step1.py
1
13117
#Created by martin.king@uni.no, 9 Nov 2013. #Foreign file or missing meta data (meta data field too) would cause the script to crash #because I have not coded in checking (non)existence of variables. #Currently the set-ups below are to check CORDEX files. #This script also needs the cordex_variables_metadata.csv file. ...
gpl-3.0
-7,982,699,943,971,258,000
38.509036
123
0.655714
false
2.911008
false
false
false
borisroman/vdsm
lib/yajsonrpc/betterAsyncore.py
1
6960
# Copyright (C) 2014 Saggi Mizrahi, Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY...
gpl-2.0
8,560,670,544,529,978,000
29.526316
78
0.594253
false
4.35272
false
false
false
ShaneHarvey/mongo-python-driver
pymongo/mongo_client.py
1
93431
# Copyright 2009-present MongoDB, 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 in wr...
apache-2.0
6,198,509,741,979,633,000
44.157564
390
0.607839
false
4.711836
false
false
false
emuus/hammr
hammr/utils/bundle_utils.py
1
6330
# Copyright (c) 2007-2019 UShareSoft, 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 requi...
apache-2.0
8,685,418,278,610,358,000
51.322314
294
0.658768
false
3.895385
false
false
false
krathjen/studiolibrary
src/studiolibrary/widgets/searchwidget.py
1
9148
# Copyright 2020 by Kurt Rathjen. All Rights Reserved. # # This library 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 # (at your option) any later version. This ...
lgpl-3.0
2,675,835,821,129,211,000
25.137143
78
0.586904
false
4.389635
false
false
false
CroissanceCommune/autonomie
autonomie/models/populate.py
1
12066
# -*- coding: utf-8 -*- # * Authors: # * TJEBBES Gaston <g.t@majerti.fr> # * Arezki Feth <f.a@majerti.fr>; # * Miotte Julien <j.m@majerti.fr>; import logging from transaction import commit import sqlalchemy from autonomie_base.models.base import DBSESSION logger = logging.getLogger(__name__) GROUP...
gpl-3.0
-2,111,363,916,448,851,000
32.198347
112
0.582773
false
3.763585
true
false
false
ivanvladimir/sonidero
examples/birds/extractmelmat.py
1
5030
#!/usr/bin/env python # -*- coding: utf-8 # ---------------------------------------------------------------------- # Splits wavs into splits # ---------------------------------------------------------------------- # Ivan Vladimir Meza-Ruiz/ ivanvladimir at turing.iimas.unam.mx # 2013/IIMAS/UNAM # ----------------------...
gpl-2.0
6,281,563,422,391,184,000
34.914286
88
0.573787
false
3.946625
false
false
false
DaynaLacoursiere/cmput404-project
squirespace/api/serializers.py
1
3665
from django.contrib.auth.models import User from blog.models import Post, Comment from rest_framework import serializers class UserSerializer(serializers.ModelSerializer): displayName = serializers.SerializerMethodField('getDisplayName') host = serializers.SerializerMethodField('getHostName') url = seriali...
apache-2.0
2,717,027,959,608,438,300
31.149123
178
0.702319
false
4.39976
false
false
false
vileopratama/vitech
docs/tutorials/ebook/Odoo Development Cookbook/OdooDevelopmentCookbook_Code/Chapter13_code/ch13_r01_make_a_path_accessible_from_the_network/controllers/main.py
1
1432
# -*- coding: utf-8 -*- # © 2015 Therp BV <http://therp.nl> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). # import email # import datetime # from openerp import fields from openerp import http from openerp.http import request class Main(http.Controller): @http.route('/my_module/books', type...
mit
-2,163,429,105,016,320,000
37.675676
71
0.522013
false
3.765789
false
false
false
donour/racepi
python/racepi/can/data.py
1
3393
# Copyright 2016-7 Donour Sizemore # # This file is part of RacePi # # RacePi 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 # # RacePi is distributed in the hope that it will be useful, # but WITHO...
gpl-2.0
-3,569,893,554,738,758,000
30.416667
87
0.619805
false
4.142857
false
false
false
lmazuel/azure-sdk-for-python
azure-batch/azure/batch/models/compute_node_get_remote_login_settings_options.py
1
1803
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
4,875,605,803,734,499,000
45.230769
106
0.668885
false
4.202797
false
false
false
openstax/openstax-cms
news/migrations/0032_auto_20180705_1947.py
1
2617
# Generated by Django 2.0.2 on 2018-07-06 00:47 from django.db import migrations, models import news.models import wagtail.core.blocks import wagtail.core.fields import wagtail.documents.blocks import wagtail.embeds.blocks import wagtail.images.blocks class Migration(migrations.Migration): dependencies = [ ...
agpl-3.0
-5,186,354,172,813,964,000
66.102564
808
0.688957
false
4.03858
false
false
false
ArthurLu/Udacity859
hello.py
1
1934
import endpoints from protorpc import messages from protorpc import message_types from protorpc import remote package = 'Hello' class Greeting(messages.Message): """Greeting that stores a message.""" message = messages.StringField(1) @endpoints.api(name='helloworldendpoints', version='v1') class HelloWorldEn...
apache-2.0
-5,654,258,628,165,963,000
36.941176
83
0.611686
false
4.497674
false
false
false
ma3lstrom/manga-cork
scripts/check_len_chapter.py
1
1656
import logging import os from mangacork import db from mangacork.models import LastPage logger = logging.getLogger(__name__) def make_chapter_files(): os.chdir('../mangacork/static/images') for _, dirs, files in os.walk(os.getcwd()): dirs = [d for d in dirs if not d[0] == '.'] files = [f fo...
mit
8,454,695,304,452,764,000
23.716418
75
0.606884
false
3.247059
false
false
false
gutow/sagenb_slickgrid
sagenb/notebook/template.py
1
4735
# -*- coding: utf-8 -*- """ HTML Templating for the Notebook AUTHORS: - Bobby Moretti (2007-07-18): initial version - Timothy Clemans and Mike Hansen (2008-10-27): major update """ ############################################################################# # Copyright (C) 2007 William Stein <wstein@gmail.com...
gpl-3.0
65,698,303,706,224,300
29.74026
100
0.598859
false
3.580938
false
false
false
gizela/gizela
gizela/data/ObsClusterVector.py
1
3090
# gizela # # Copyright (C) 2010 Michal Seidl, Tomas Kubin # Author: Tomas Kubin <tomas.kubin@fsv.cvut.cz> # URL: <http://slon.fsv.cvut.cz/gizela> # # $Id: ObsClusterVector.py 107 2010-12-06 23:18:55Z tomaskubin $ from gizela.util.Error import Error from gizela.data.ObsHeightDiff import ObsHeightDiff from gizela...
gpl-3.0
-2,229,662,025,519,756,300
27.348624
102
0.614563
false
2.832264
false
false
false
soarlab/gelpia
src/frontend/function_transforms/output_flatten.py
1
7524
import sys from expression_walker import walk from pass_utils import INFIX, BINOPS, UNOPS, SYMBOLIC_CONSTS try: import gelpia_logging as logging import color_printing as color except ModuleNotFoundError: sys.path.append("../") import gelpia_logging as logging import color_printing as color logger...
mit
8,623,740,186,671,182,000
33.513761
81
0.536417
false
3.435616
false
false
false
atareao/upodcatcher
src/upodcatcher/player.py
1
11055
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # player.py # # This file is part of upodcatcher # # Copyright (C) 2017 # Lorenzo Carbonell Cerezo <lorenzo.carbonell.cerezo@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 publ...
gpl-3.0
2,681,128,152,577,340,400
33.984177
78
0.572049
false
3.612745
false
false
false
capitalone/cloud-custodian
tests/test_shield.py
1
2332
# Copyright 2016-2017 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 import mock from .common import BaseTest class ShieldTest(BaseTest): # most of the shield tests are embedded in other resources def test_shield_sync(self): # shield resour...
apache-2.0
-9,222,591,237,412,605,000
34.876923
96
0.48542
false
4.091228
false
false
false
edx/edx-ora2
openassessment/fileupload/api.py
1
23508
""" The File Upload application is designed to allow the management of files associated with submissions. This can be used to upload new files, manage URLs of existing files, and delete files. """ from collections import namedtuple import json import logging from django.db import IntegrityError from django.utils.func...
agpl-3.0
5,459,391,287,757,516,000
36.855072
119
0.610388
false
4.180686
false
false
false
carolinux/QFieldSync
qfieldsync/dialogs/synchronize_dialog.py
1
2812
# -*- coding: utf-8 -*- """ /*************************************************************************** QFieldSyncDialog A QGIS plugin Sync your projects to QField on android ------------------- begin : 2015-05-20 git sha ...
lgpl-3.0
-453,891,291,777,095,500
45.098361
105
0.532717
false
4.492013
false
false
false
albertfdp/dtu-data-mining
meneame/src/topic.py
1
1593
#!/usr/bin/env python # -*- coding: utf-8 -*- """Meneame topic Usage: topic.py [--window Number] [--topic Number] [--dbname DB] Options: -h, --help show this screen. --version show version. --window Number size of the time slice --topic Number number of topics for the analysis ...
apache-2.0
-7,626,275,578,528,225,000
28.5
72
0.659134
false
3.713287
false
false
false
7digital/troposphere
troposphere/serverless.py
1
3974
# Copyright (c) 2017, Fernando Freire <fernando.freire@nike.com> # All rights reserved. # # See LICENSE file for full license. import types from . import AWSObject, AWSProperty from .awslambda import Environment, VPCConfig, validate_memory_size from .dynamodb import ProvisionedThroughput from .validators import posit...
bsd-2-clause
6,340,838,969,590,430,000
22.654762
79
0.603171
false
3.791985
false
false
false
warner/magic-wormhole
src/wormhole/_version.py
1
18457
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
mit
-4,727,730,566,027,275,000
34.494231
79
0.575229
false
3.953095
true
false
false
nicolasderam/itools
itools/handlers/file.py
1
8507
# -*- coding: UTF-8 -*- # Copyright (C) 2003-2010 J. David Ibáñez <jdavid.ibp@gmail.com> # Copyright (C) 2007-2008 Henry Obein <henry.obein@gmail.com> # Copyright (C) 2009-2010 David Versmisse <versmisse@lil.univ-littoral.fr> # Copyright (C) 2009-2010 Hervé Cauwelier <herve@oursours.net> # # This program is free softwa...
gpl-3.0
-2,707,746,688,888,518,700
27.632997
77
0.548801
false
4.275515
false
false
false
apmichaud/vitess-apm
py/vtdb/keyspace.py
1
6227
# Copyright 2013, Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can # be found in the LICENSE file. import struct from vtdb import dbexceptions from vtdb import keyrange_constants ZK_KEYSPACE_PATH = '/zk/local/vt/ns' pack_keyspace_id = struct.Struct('!Q').pack ...
bsd-3-clause
-8,234,154,244,977,799,000
36.739394
89
0.634013
false
3.47295
false
false
false
studio1247/gertrude
facture.py
1
66516
# -*- coding: utf-8 -*- # This file is part of Gertrude. # # Gertrude 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-3.0
2,077,953,944,275,287,600
63.785575
324
0.585768
false
3.586188
false
false
false
omwdunkley/crazyflieROS
src/crazyflieROS/cflib/crtp/debugdriver.py
1
32187
#!/usr/bin/env python # -*- coding: utf-8 -*- # # || ____ _ __ # +------+ / __ )(_) /_______________ _____ ___ # | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \ # +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/ # || || /_____/_/\__/\___/_/ \__,_/ /___/\___/ # # Copyright (C) 20...
gpl-2.0
7,469,569,608,895,171,000
44.397743
118
0.466803
false
4.025891
false
false
false
opencloudinfra/orchestrator
venv/Lib/site-packages/stripe/test/resources/test_application_fees.py
1
2589
import stripe from stripe.test.helper import StripeResourceTest class ApplicationFeeTest(StripeResourceTest): def test_list_application_fees(self): stripe.ApplicationFee.all() self.requestor_mock.request.assert_called_with( 'get', '/v1/application_fees', {} ...
gpl-3.0
-8,349,194,374,659,199,000
25.418367
70
0.499034
false
3.989214
true
false
false
room77/py77
pylib/config/r77_init.py
1
1466
"""Common init to get the source root for files.""" __author__ = 'pramodg@room77.com (Pramod Gupta)' __copyright__ = 'Copyright 2012 Room77, Inc.' import inspect import os import sys import traceback # This is needed to build binaries due to a bug in pyinstaller. # May be removed in future if the bug is fixed. impor...
mit
8,933,270,287,643,007,000
26.148148
73
0.663711
false
3.186957
false
false
false
DevicePilot/synth
synth/devices/mobile.py
1
16097
""" mobile ======= Devices which (are supposed to) move in a predictable way Configurable parameters:: { "area_centre" : e.g. "London, UK" } optional, but both must be specified if either are. Points-to-visit will be within this set. "area_radius" : e.g. "Manchester, UK" } "num_lo...
mit
-5,494,896,321,619,184,000
53.198653
224
0.613779
false
3.588275
false
false
false
rgatkinson/oxdna
EXAMPLES/FFS/FLUX2/ffs_flux.py
1
12779
#!/usr/bin/env python ''' Forward Flux sampling: Flux generator a-la-Tom Flavio ''' #################################### # edit here #################################### # number of successes, can be changed via command line desired_success_count = 100 # executable set-up #precommand = 'mosrun -J 12' executable = '...
gpl-3.0
-2,175,871,744,352,017,200
34.107143
196
0.641834
false
2.856281
false
false
false
dmccloskey/SBaaS_models
SBaaS_models/models_COBRA_dependencies.py
1
43356
# Dependencies from cobra from cobra.io.sbml import create_cobra_model_from_sbml_file, write_cobra_model_to_sbml_file from cobra.manipulation.modify import convert_to_irreversible from cobra import Model, Metabolite, Reaction from cobra.io.json import load_json_model, save_json_model # Resources from molmass.molmass i...
mit
-4,245,046,023,224,397,000
47.65881
195
0.527056
false
3.705153
true
false
false
fga-gpp-mds/2017.2-Receituario-Medico
medical_prescription/medicine/test/test_view_list_active_principle.py
1
2120
# Django from django.test import TestCase from django.test.client import RequestFactory from django.contrib.auth.models import AnonymousUser from django.core.exceptions import PermissionDenied from medicine.models import ActivePrinciple from user.models import User, Patient, HealthProfessional from medicine.views impo...
mit
687,307,724,926,406,100
41.38
120
0.609722
false
4.154902
true
false
false
rigetticomputing/grove
grove/tests/simon/test_simon.py
1
9697
"""Test class for helper methods found simon""" from os.path import abspath, dirname import numpy as np from unittest.mock import patch from pyquil import Program from grove.simon.simon import Simon, create_1to1_bitmap, create_valid_2to1_bitmap package_path = abspath(dirname(dirname(__file__))) EXPECTED_SIMON_ORAC...
apache-2.0
3,527,566,281,921,705,500
28.032934
94
0.44983
false
2.77851
true
false
false
gjcarneiro/pybindgen
tests/foomodulegen_common.py
1
5822
#! /usr/bin/env python from __future__ import unicode_literals, print_function import sys import re import pybindgen import pybindgen.settings pybindgen.settings.deprecated_virtuals = False from pybindgen.typehandlers import base as typehandlers from pybindgen import ReturnValue, Parameter, Module, Function, FileCod...
lgpl-2.1
7,147,838,552,843,921,000
37.813333
129
0.618859
false
3.850529
false
false
false
xasopheno/audio_visual
audio/Composer/clear_osc.py
1
1483
from __future__ import division from math import pi import numpy as np import random # import matplotlib.pyplot as plt class SineOsc: def __init__(self): self.sample_rate = 44100 def wave(self, frequency, length, rate): """produces sine across np array""" length = int(length * rate) ...
mit
2,162,122,843,164,980,000
26.981132
78
0.595415
false
3.50591
false
false
false
salabim/salabim
sample models/Demo wait.py
1
2098
# demo wait.py """ Here, princes, are generated. In the meantime, kings die. The youngest prince, will become king. If a new prince arrives, he checks, whether there's a king. If so, he will wait for a kingdied trigger. If not, he will become king. Note that in this demo, the priority (-now) in wait is used to make t...
mit
1,433,343,210,912,480,000
33.393443
117
0.617731
false
3.237654
false
false
false
python-astrodynamics/astrodynamics
tests/test_ephemerides.py
1
2830
# coding: utf-8 from __future__ import absolute_import, division, print_function import numpy as np import pytest import astrodynamics.lowlevel.ephemerides as ephemerides class MockSegment(object): def __init__(self, a, b): self.a = a self.b = b def compute_and_differentiate(self, tdb, tdb2...
mit
5,602,303,290,328,509,000
24.727273
64
0.50742
false
2.437554
false
false
false
tianyang-li/de-novo-metatranscriptome-analysis--the-uniform-model
analysis/short_contig_analysis_single_0.py
1
13483
#!/usr/bin/env python # Copyright (C) 2012 Tianyang Li # tmy1018@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) any lat...
gpl-3.0
-8,303,312,023,520,614,000
31.567633
95
0.510124
false
3.418611
false
false
false
deeponion/deeponion
test/functional/test_framework/test_framework.py
1
23907
#!/usr/bin/env python3 # Copyright (c) 2014-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Base class for RPC testing.""" import configparser from enum import Enum import logging import argpars...
mit
-2,460,982,013,386,144,300
40.722513
312
0.604844
false
4.160633
true
false
false
mtrpires/pytoto
_functions.py
1
7086
# -*- coding: utf-8 # Pytoto Manga Downloader # A simple Python scraper for the Batoto Online Manga Reader. # # Bato.to - http://bato.to/ # # This scraper uses Selenium (Chrome), please refer to: # http://selenium.googlecode.com/svn/trunk/docs/api/py/index.html # # This code is 75 columns wide for clarity. # Names of f...
gpl-3.0
-2,923,356,523,234,067,000
28.280992
75
0.669489
false
3.745243
false
false
false
TheClams/SystemVerilog
debug/util.py
1
1638
import shutil import os import json import zipfile def in_installed_packages(src, dst, action="install", ignore_dirs=""): if os.path.exists(dst): os.remove(dst) if action == "install": zipf = zipfile.ZipFile(dst, 'w', compression=zipfile.ZIP_DEFLATED) abs_path = os.path.absp...
apache-2.0
8,964,399,757,137,276,000
37.95122
121
0.580586
false
3.448421
false
false
false
louisdijkstra/gonl-sv
back-up/version2/vcf.py
1
5423
#!/usr/bin/env python """ Copyright (C) 2015 Louis Dijkstra This file is part of gonl-sv 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 lat...
gpl-3.0
-1,330,910,631,305,142,800
30.9
93
0.668449
false
3.019488
false
false
false
caspervdw/circletracking
circletracking/artificial.py
1
11449
from __future__ import (division, unicode_literals) import warnings import numpy as np from .utils import validate_tuple from numpy.testing import assert_almost_equal from scipy.ndimage.interpolation import zoom, shift from scipy.ndimage.measurements import center_of_mass from scipy.spatial import cKDTree def crop_p...
bsd-3-clause
871,346,073,489,315,600
35.813505
83
0.598218
false
3.586779
false
false
false
postlund/home-assistant
tests/components/mqtt/test_discovery.py
1
14078
"""The tests for the MQTT discovery.""" from pathlib import Path import re from unittest.mock import patch from homeassistant.components import mqtt from homeassistant.components.mqtt.abbreviations import ( ABBREVIATIONS, DEVICE_ABBREVIATIONS, ) from homeassistant.components.mqtt.discovery import ALREADY_DISCO...
apache-2.0
-6,552,993,060,892,354,000
31.437788
88
0.644197
false
3.585838
true
false
false
centos-opstools/os-migrate
os_migrate/ds/identity.py
1
1526
from __future__ import print_function from __future__ import absolute_import import os_migrate.ds.base as base class Datasource (base.Datasource): description = '''Migration driver for the identity service (Keystone)''' def store(self): resources = {} self.export_projects(resources) ...
apache-2.0
-6,951,977,410,910,432,000
31.468085
76
0.589777
false
4.286517
false
false
false
googleapis/googleapis-gen
google/cloud/channel/v1/channel-v1-py/google/cloud/channel_v1/types/service.py
1
61206
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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,834,051,834,453,629,200
31.213684
135
0.625315
false
4.374669
false
false
false
commandline/flashbake
setup.py
1
1858
#!/usr/bin/env python # # setup.py for flashbake from setuptools import setup, find_packages setup(name='flashbake', version='0.27.1', author="Thomas Gideon", author_email="cmdln@thecommandline.net", maintainer="Thomas Gideon", maintainer_email="cmdln@thecommandline.net", ...
gpl-3.0
-6,358,529,057,805,305,000
38.531915
91
0.583961
false
4.290993
false
false
false
NoBodyCam/TftpPxeBootBareMetal
nova/scheduler/host_manager.py
1
10421
# Copyright (c) 2011 OpenStack, 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 requi...
apache-2.0
2,685,963,467,228,847,600
36.085409
78
0.586028
false
4.402619
false
false
false
WojciechMula/toys
pygtk/show_rgb.py
1
4264
# -*- coding: iso-8859-2 -*- # # PyGTK application with own CellRenderers: one drawing an arbitrary shape and rendering a text. # # Author: Wojciech Mu³a # e-mail: wojciech_mula@poczta.onet.pl # www: http://0x80.pl/ # # License: public domain import gtk import gobject class CellColorRenderer(gtk.GenericCellRende...
bsd-2-clause
-6,776,214,161,603,914,000
25.320988
96
0.674484
false
2.859826
false
false
false
abonaca/gary
gary/dynamics/naff.py
1
17745
# coding: utf-8 """ Port of NAFF to Python """ from __future__ import division, print_function __author__ = "adrn <adrn@astro.columbia.edu>" # Standard library import time # Third-party from astropy import log as logger import numpy as np from numpy.fft import fftfreq # try: # import pyfftw # HAS_PYFFTW = ...
mit
-1,905,278,932,874,287,600
33.107692
97
0.561739
false
3.60928
false
false
false
google/starthinker
starthinker/task/dynamic_costs/run.py
1
10877
########################################################################### # # Copyright 2020 Google LLC # # 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 # # https://www.apache.org/l...
apache-2.0
-3,689,607,296,941,026,000
33.862179
118
0.563942
false
4.004786
true
false
false
WhiteMagic/JoystickGremlin
gremlin/config.py
1
18275
# -*- coding: utf-8; -*- # Copyright (C) 2015 - 2019 Lionel Ott # # 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. # # T...
gpl-3.0
8,153,170,736,484,435,000
31.987365
96
0.605636
false
4.45623
true
false
false
Taffer/courses
crypto-1/workspace/w5/lrange.py
1
5624
"""Define `lrange.lrange` class `xrange`, py3k's `range` analog for large integers See help(lrange.lrange) >>> r = lrange(2**100, 2**101, 2**100) >>> len(r) == 1 True >>> for i in r: ... print i, 1267650600228229401496703205376 >>> for i in r: ... print i, 1267650600228229401496703205376 >>> 2...
cc0-1.0
-1,493,025,949,924,791,800
25.434146
92
0.496266
false
3.754339
false
false
false
mozman/ezdxf
examples_dxf/create_nested_block_references.py
1
6636
# Copyright (c) 2021, Manfred Moitzi # License: MIT License from typing import Dict, TYPE_CHECKING, cast import math import ezdxf from time import perf_counter from ezdxf.math import Vec3, Matrix44, X_AXIS, OCS from ezdxf import zoom, disassemble from ezdxf.entities import copy_attrib_as_text if TYPE_CHECKING: fr...
mit
-57,870,952,184,324,856
33.206186
89
0.586046
false
3.127238
false
false
false
lithint/odoo
hv_customer_credit_limit/custom_model.py
1
3548
# -*- coding: utf-8 -*- from odoo.exceptions import UserError, ValidationError from odoo import api, exceptions, fields, models, _ MAP_INVOICE_TYPE_PAYMENT_SIGN = { 'out_invoice': 1, 'in_refund': -1, 'in_invoice': -1, 'out_refund': 1, } class hv_credit_limit_product(models.Model): _inherit = 'res.p...
agpl-3.0
7,935,006,672,517,259,000
42.802469
240
0.600902
false
3.627812
false
false
false
bencesomogyi/pyCFD
pyCFD_test_functions/testFunctions.py
1
2645
""" module of functions for testing mesh data """ __author__ = "Bence Somogyi" __copyright__ = "Copyright 2014" __version__ = "0.1" __maintainer__ = "Bence Somogyi" __email__ = "bencesomogyi@ivt.tugraz.at" __status__ = "Prototype" import numpy import pyCFD_VTK_tools.vtkTools as vtkTools def write_element...
gpl-3.0
-1,801,727,248,752,073,500
34.736111
76
0.596219
false
3.245399
false
false
false
jmhal/elastichpc
beta/trials/evolving/System.py
1
1945
#!/usr/bin/python import ctypes import sys import logging from multiprocessing import Process, Pipe, Value, Manager, Lock from Platform import platform_unit as platform_unit from Computation import computation_unit as computation_unit # configure logging logging.basicConfig(filename='computational_system.log',level...
mit
1,248,337,335,636,481,300
28.029851
110
0.691517
false
3.897796
true
false
false
WalterCReel3/siege
server/siege/views/scoring.py
1
1965
from flask import request from flask import make_response from flask import render_template from siege.service import app, socketio, get_game_manager from siege.decorators import ensure_player from siege.views.view_utils import jsonate from siege.models import Game, Device, Player @app.route('/game') @ensure_player d...
bsd-2-clause
4,596,029,948,305,578,500
30.190476
61
0.674809
false
3.553345
false
false
false
MTgeophysics/mtpy
legacy/example_plot_pt_maps.py
1
2693
# coding: utf-8 """ * plotting phase tensor maps using mtpy.imaging.mtplot.plot_pt_maps JP 2016 FZ 2017-12-01 re-wrote """ # Import necessary modules #---------------------------------------- import os import sys import glob import mtpy.imaging.mtplot as mtplot #---------------------------------------- # python ./scr...
gpl-3.0
-4,438,294,727,783,876,000
36.929577
111
0.580022
false
3.400253
false
false
false
lcrees/stuf
stuf/base.py
1
5243
# -*- coding: utf-8 -*- '''base stuf''' from operator import methodcaller from itertools import chain, starmap from collections import Mapping, Sequence, MutableMapping from stuf.six import items, strings, keys, values from stuf.utils import clsname, lazy, recursive_repr, exhaust, imap __all__ = ['corestuf', 'direct...
bsd-3-clause
-8,139,200,382,576,037,000
26.450262
78
0.541484
false
4.092896
false
false
false
lcpt/xc
python_modules/postprocess/utils_display.py
1
12728
# -*- coding: utf-8 -*- __author__= "Luis C. Pérez Tato (LCPT) , Ana Ortega (AO_O) " __copyright__= "Copyright 2016, LCPT, AO_O" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@ciccp.es, ana.ortega@ciccp.es " import os from miscUtils import LogMessages as lmsg from miscUtils import string_utils as su f...
gpl-3.0
569,962,241,188,165,570
42.289116
163
0.716194
false
3.31605
false
false
false
piskvorky/smart_open
smart_open/ssh.py
1
4154
# -*- coding: utf-8 -*- # # Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). # """Implements I/O streams over SSH. Examples -------- >>> with open('/proc/version_signature', host='1.2.3.4') as conn: ... print(conn.rea...
mit
5,251,969,890,541,011,000
27.452055
110
0.648772
false
3.627948
false
false
false
pernici/sympy
sympy/solvers/tests/test_polysys.py
1
3145
"""Tests for solvers of systems of polynomial equations. """ from sympy import S, symbols, Integer, Rational, sqrt, I, Poly, QQ, \ all, flatten from sympy.abc import x, y, z from sympy.solvers.polysys import solve_poly_system, solve_triangulated from sympy.utilities.pytest import raises def test_s...
bsd-3-clause
-7,999,451,192,401,336,000
33.184783
82
0.464865
false
2.319322
false
false
false
peterheim1/robbie_ros
robbie_utils/nodes/point_head_gui.py
1
7769
#!/usr/bin/env python """ A simple Controller GUI to drive robots and pose heads. Copyright (c) 2008-2011 Michael E. Ferguson. All right reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistribu...
bsd-3-clause
-8,733,229,115,648,894,000
41.222826
134
0.655297
false
3.637172
false
false
false
hakril/PythonForWindows
samples/process/remote_process.py
1
3273
import sys import os.path sys.path.append(os.path.abspath(__file__ + "\..\..")) import windows import windows.native_exec.simple_x86 as x86 import windows.native_exec.simple_x64 as x64 print("Creating a notepad") ## Replaced calc.exe by notepad.exe cause of windows 10. notepad = windows.utils.create_process(r"C:\wind...
bsd-3-clause
-7,017,262,895,048,500,000
34.576087
123
0.712802
false
2.917112
false
false
false
maheshcn/memory-usage-from-ldfile
openpyxl/reader/excel.py
1
8635
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Read an xlsx file into Python""" # Python stdlib imports from zipfile import ZipFile, ZIP_DEFLATED, BadZipfile from sys import exc_info from io import BytesIO import os.path import warnings # compatibility imports from openpyxl.compat impor...
gpl-2.0
6,944,377,917,961,074,000
33.959514
147
0.632658
false
3.81068
false
false
false
jayhetee/coveragepy
coverage/config.py
1
12627
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Config file for coverage.py""" import collections import os import re import sys from coverage.backward import configparser, iitems, string_class from coverage...
apache-2.0
-2,639,344,714,865,349,000
33.785124
90
0.56989
false
4.13052
true
false
false
netzliteratur/parcex
parcex.py
1
3650
#!/usr/bin/env python """ parcer extracts content from warc files. USAGE: ./parcex.py WARC-FILE WARC-FILE must be a warc file that conforms to: http://bibnum.bnf.fr/WARC/WARC_ISO_28500_version1_latestdraft.pdf OUTPUT: Directory structure with the schema as root. The structure maps the structure of th...
mit
1,978,653,295,089,128,700
32.486239
97
0.490959
false
4.069119
false
false
false
ryfeus/lambda-packs
pytorch/source/torch/random.py
1
4045
import torch import contextlib import warnings from torch._C import default_generator def set_rng_state(new_state): r"""Sets the random number generator state. Args: new_state (torch.ByteTensor): The desired state """ default_generator.set_state(new_state) def get_rng_state(): r"""Retu...
mit
-8,354,250,648,295,952,000
35.441441
103
0.636341
false
4.040959
false
false
false
pferreir/indico-backup
indico/ext/importer/components.py
1
2944
# -*- coding: utf-8 -*- ## ## $id$ ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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 Foundati...
gpl-3.0
-6,225,949,539,540,543,000
34.902439
90
0.665761
false
4.291545
false
false
false
thesgc/chembiohub_ws
example_custom_deployment/resources.py
1
6874
import logging # Get an instance of a logger logger = logging.getLogger(__name__) import subprocess from pprint import pprint from cbh_chem_api.compounds import CBHCompoundUploadResource from cbh_chem_api.resources import BaseCBHCompoundBatchResource from django.http import HttpRequest from cbh_utils.parser import g...
gpl-3.0
3,614,235,388,621,801,500
33.542714
184
0.696101
false
3.151765
false
false
false
htimko/ArcPIC
pic2d/GLEanalysis/2Dpic_current.py
1
11336
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2015 CERN and Helsinki Institute of Physics. # This software is distributed under the terms of the # GNU General Public License version 3 (GPL Version 3), # copied verbatim in the file LICENCE.md. In applying this # license, CERN does not waive the privil...
gpl-3.0
4,469,657,976,177,968,000
30.576602
90
0.660727
false
2.667294
false
false
false
vially/googlemusic-xbmc
resources/Lib/playsong.py
1
4654
import api import utils import xbmc from storage import storage class PlaySong: def __init__(self): self.api = api.Api() def play(self, params): song_id = params.pop('song_id') if song_id[0] == 't': song_id = song_id.capitalize() params = self.__getSongStreamUrl(song_id, par...
gpl-3.0
8,881,957,881,918,984,000
39.12069
165
0.586162
false
4.061082
false
false
false
rmelchorv/TDD-Cuervos
deploy_tools/fabfile.py
1
2196
from fabric.contrib.files import append, exists, sed from fabric.api import env, local, run import random REPO_URL = 'https://github.com/rmelchorv/TDD-Cuervos.git' def deploy(): site_folder = '/home/%s/sites/%s' % (env.user, env.host) source_folder = site_folder + '/source' _create_directory_structure_if_necessar...
mit
2,445,855,322,044,424,000
35.616667
79
0.686703
false
2.951613
false
false
false
opencord/voltha
voltha/adapters/adtran_olt/xpon/gem_port.py
1
2084
# Copyright 2017-present Adtran, 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 in writ...
apache-2.0
-2,248,761,027,569,824,000
32.079365
116
0.566699
false
4.151394
false
false
false
almorel/lab
python/tkinter/main.py
1
1996
#!/usr/bin/python # -*- coding: iso-8859-1 -*- import Tkinter class simpleapp_tk(Tkinter.Tk): def __init__(self,parent): Tkinter.Tk.__init__(self,parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.entryVariable = Tkinter.StringVar() ...
gpl-3.0
2,380,092,798,811,044,000
34.642857
101
0.614729
false
3.545293
false
false
false
shlomif/PySolFC
pysollib/pysolgtk/menubar.py
1
28751
#!/usr/bin/env python # -*- mode: python; coding: utf-8; -*- # ---------------------------------------------------------------------------## # # Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer # Copyright (C) 2003 Mt. Hood Playing Card Co. # Copyright (C) 2005-2009 Skomoroh # # This program is free softwa...
gpl-3.0
-4,921,833,782,485,896,000
36.533943
79
0.506626
false
3.804552
false
false
false
dvillega/scripts
speedtest.py
1
13272
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2013 Matt Martz # 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://...
mit
-1,911,251,299,053,532,000
9.704032
79
0.514241
false
4.027921
true
false
false
criteo/biggraphite
biggraphite/drivers/_downsampling.py
1
16533
#!/usr/bin/env python # Copyright 2016 Criteo # # 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 agree...
apache-2.0
1,261,198,876,039,129,000
36.152809
91
0.600073
false
4.33937
false
false
false
fengsp/flasker
flask/testing.py
1
3425
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and ususlly not used in production environments. """ from contextlib import contextmanager from werkzeug.test import Client, EnvironBuilder from .ctx import _request_ctx_stack try...
bsd-3-clause
-8,350,606,216,991,716,000
34.677083
78
0.614891
false
4.228395
true
false
false