repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
arangodb/arangodb
3rdParty/V8/v7.9.317/test/wasm-spec-tests/testcfg.py
1
1810
# Copyright 2017 the V8 project 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 from testrunner.local import testsuite from testrunner.objects import testcase proposal_flags = [{ 'name': 'reference-types...
apache-2.0
3,684,658,374,831,637,500
30.754386
79
0.550276
false
pascalmouret/treeio-achievements
achievements/views.py
1
13734
""" Here are the functions which actually prepare the data and render the pages. Most of the functions here are very similar since tree.io is, more or less, following the CRUD (Create, Retrieve, Update, Delete) pattern. The only thing special are the MassForms, which are quite common in tree.io and I only adapted the c...
bsd-2-clause
7,595,113,110,143,997,000
39.040816
119
0.66754
false
gdestuynder/MozDef
alerts/cloudtrail_logging_disabled.py
1
1132
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.que...
mpl-2.0
-3,568,129,083,789,123,600
32.294118
97
0.671378
false
Thortoise/Super-Snake
Blender/animation_nodes-master/operators/profiling.py
1
2009
import bpy import cProfile from bpy.props import * from io import StringIO from contextlib import redirect_stdout class ProfileAnimationNodes(bpy.types.Operator): bl_idname = "an.profile" bl_label = "Profile" function = StringProperty() output = StringProperty() sort = StringProperty() def ex...
gpl-3.0
-5,066,411,222,461,000,000
28.115942
65
0.645595
false
dvl/pyclub
pyclub/content/tests.py
1
1153
# -*- coding: utf-8 -*- from itertools import cycle from django.test import TestCase from model_mommy.recipe import Recipe from .models import Post class TestPostModel(TestCase): def setUp(self): self.recipe = Recipe(Post, slug=None) def test_str(self): post = self.recipe.make(title='foob...
mit
7,779,069,518,148,872,000
27.8
80
0.655382
false
eepgwde/pyeg0
eg/dispatch0.py
1
1483
## @file dispatch0.py # @author weaves # @brief Demonstrate extrinisc visitor pattern. # # The visitor pattern (or double dispatch) is well-known. In languages # that support reflection you can use a single dispatch like this # method. # # You can test this package on the command-line with # <code>python dispatch0.py</...
gpl-3.0
-5,117,124,997,730,889,000
30.553191
70
0.727579
false
LoIdo/nparty-server
interface/technical/cache.py
1
1049
import zope.interface class ICache(zope.interface.Interface): """ interface of cache center wrapper of sth. like memcache and redis """ def set_value(key, value, expire): """ set key value pair to cache """ def get_value(key): """ get v...
gpl-2.0
-9,053,837,666,354,800,000
19.44898
63
0.521449
false
googleapis/googleapis-gen
google/devtools/containeranalysis/v1/devtools-containeranalysis-v1-py/docs/conf.py
1
12687
# -*- 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
9,167,672,694,095,156,000
32.742021
87
0.698037
false
allenlavoie/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/distribution_test.py
1
11315
# Copyright 2016 The TensorFlow 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 applica...
apache-2.0
-136,941,286,766,181,460
37.486395
80
0.62563
false
aamirmajeedkhan/P4-conference-central
main.py
1
2470
#!/usr/bin/env python import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail,memcache from conference import ConferenceApi,MEMCACHE_FEATURED_SPEAKER_KEY from google.appengine.ext import ndb from models import Session, Speaker class SetAnnouncementHandler(webapp2.RequestHandl...
apache-2.0
-3,581,929,336,231,128,000
40.881356
98
0.639271
false
RasaHQ/rasa_core
tests/core/test_channels.py
1
29687
import json import logging import mock import pytest import sanic from aioresponses import aioresponses from httpretty import httpretty from sanic import Sanic from rasa.core import utils from rasa.core.agent import Agent from rasa.core.interpreter import RegexInterpreter from rasa.core.utils import EndpointConfig fro...
apache-2.0
1,847,347,241,781,421,800
36.626109
80
0.581568
false
yuwen41200/biodiversity-analysis
utils/roadkill-packer/htmlGenerator.py
1
4419
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv html_beginning = '''<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.0/bootstrap-table.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitt...
gpl-3.0
-7,277,954,826,530,736,000
48.1
133
0.505318
false
grupodyd/python-filapp
setup.py
1
1785
#!/usr/bin/env python # # Copyright 2015 DyD Dinámica y Desarrollo SAS # # 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 ap...
apache-2.0
4,565,196,317,821,026,300
32.660377
74
0.67657
false
wtsi-hgi/CoGS-Webapp
cogs/db/interface.py
1
14479
""" Copyright (c) 2017, 2018 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either v...
agpl-3.0
-7,453,707,756,658,393,000
33.889157
114
0.558602
false
sloria/osf.io
api/nodes/permissions.py
1
9092
# -*- coding: utf-8 -*- from rest_framework import permissions from rest_framework import exceptions from addons.base.models import BaseAddonSettings from osf.models import ( AbstractNode, Contributor, DraftRegistration, Institution, Node, NodeRelation, OSFUser, PreprintService, Pri...
apache-2.0
-5,648,631,933,092,123,000
39.408889
232
0.66366
false
rbn920/feebb
feebb/test.py
1
1640
from feebb import * import matplotlib.pyplot as plt pre = Preprocessor() pre.load_json('ex_json/test2.json') elems = [Element(elem) for elem in pre.elements] print(pre.supports) beam = Beam(elems, pre.supports) post = Postprocessor(beam, 10) print(max(post.interp('moment'))) print(min(post.interp('moment'))) plt.plot(...
mit
-3,904,780,058,405,213,000
25.885246
48
0.714634
false
Cerfoglg/cattle
tests/integration/cattletest/core/test_healthcheck.py
1
58694
from common_fixtures import * # NOQA from cattle import ApiError import yaml def _get_agent_for_container(context, container): agent = None for map in container.hosts()[0].instanceHostMaps(): try: c = map.instance() except Exception: continue if c.agentId is no...
apache-2.0
-4,785,318,302,728,767,000
36.600256
79
0.629996
false
jrg365/gpytorch
test/variational/test_independent_multitask_variational_strategy.py
1
3533
#!/usr/bin/env python3 import unittest import torch import gpytorch from gpytorch.test.variational_test_case import VariationalTestCase def likelihood_cls(): return gpytorch.likelihoods.MultitaskGaussianLikelihood(num_tasks=2) def strategy_cls(model, inducing_points, variational_distribution, learn_inducing_...
mit
-2,250,295,315,782,813,200
29.721739
120
0.735918
false
sradanov/flyingpigeon
setup.py
1
1385
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'cdo', 'bokeh', 'ocgis', 'pandas', 'nose', ] classifiers=[ ...
apache-2.0
871,063,087,530,311,400
29.108696
81
0.607942
false
apurtell/phoenix
bin/psql.py
1
2718
#!/usr/bin/env python ############################################################################ # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The A...
apache-2.0
-4,959,389,883,573,509,000
37.28169
126
0.654157
false
huiyiqun/check_mk
tests/unit/checks/test_ra32e_sensors_check.py
1
4376
# -*- coding: utf-8 -*- import pytest from checktestlib import BasicCheckResult pytestmark = pytest.mark.checks @pytest.mark.parametrize('info,discoveries_expected,checks_expected', [ ( # internal temperature [[[u'2070', u'', u'']], []], [ ('ra32e_sensors', [('Internal', {})]), ...
gpl-2.0
4,729,765,366,589,821,000
42.227723
115
0.491296
false
BenWiederhake/House-Of-Tweets
backend/vomit.py
1
1212
#!/usr/bin/env python3 import json import mq from sys import argv from time import sleep def pull(filename): with open(filename, 'r') as fp: return json.load(fp) def check(tweets): assert len(tweets) > 0 first_batch = tweets[0] assert len(first_batch) > 0 first_tweet = first_batch[0] ...
gpl-3.0
2,856,715,746,268,283,000
24.25
99
0.626238
false
zzqcn/wireshark
tools/make-plugin-reg.py
1
5547
#!/usr/bin/env python3 # # Looks for registration routines in the plugins # and assembles C code to call all the routines. # import os import sys import re # # The first argument is the directory in which the source files live. # srcdir = sys.argv[1] # # The second argument is either "plugin", "plugin_wtap" or "plugi...
gpl-2.0
3,218,243,372,919,853,000
29.478022
103
0.628989
false
alphagov/notifications-api
app/dao/api_key_dao.py
1
1564
import uuid from datetime import datetime, timedelta from sqlalchemy import func, or_ from app import db from app.dao.dao_utils import autocommit, version_class from app.models import ApiKey @autocommit @version_class(ApiKey) def save_model_api_key(api_key): if not api_key.id: api_key.id = uuid.uuid4() ...
mit
3,697,148,109,029,428,000
29.076923
96
0.686061
false
moreati/pydgin
scripts/build.py
1
4989
#!/usr/bin/env python #========================================================================= # build.py #========================================================================= # Builds pydgin. import multiprocessing import os import shutil import sys import subprocess import distutils.spawn usage = """Usage: ...
bsd-3-clause
-7,807,380,443,629,281,000
26.871508
74
0.588495
false
oasis-open/cti-pattern-validator
setup.py
1
1795
#!/usr/bin/env python from setuptools import find_packages, setup with open('README.rst') as f: readme = f.read() doc_requires = [ 'sphinx', 'sphinx-prompt', ] test_requires = [ 'coverage', 'pytest', 'pytest-cov', ] dev_requires = doc_requires + test_requires + [ 'bumpversion', 'che...
bsd-3-clause
2,211,151,469,891,606,000
25.397059
73
0.596657
false
alpodrezov/ordering_lunch
xavchik/settings.py
1
2241
""" Django settings for xavchik project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
unlicense
-7,114,326,989,939,682,000
23.637363
95
0.720214
false
splotz90/urh
src/urh/signalprocessing/SimulatorItem.py
1
2278
class SimulatorItem(object): protocol_manager = None expression_parser = None def __init__(self): self.__parentItem = None self.__childItems = [] self.logging_active = True self.is_valid = True def check(self): return True def get_pos(self): if self...
gpl-3.0
3,334,993,551,861,423,000
21.79
69
0.53863
false
zalf-lsa/monica
installer/Hohenfinow2/python/run-producer.py
1
2337
#!/usr/bin/python # -*- coding: UTF-8 # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. */ # Authors: # Michael Berg-Mohnicke <michael.berg@zalf.de> # # Maintainers: # C...
mpl-2.0
-8,362,076,501,140,330,000
26.833333
83
0.620454
false
JacobFischer/Joueur.py
games/anarchy/building.py
1
3963
# Building: A basic building. It does nothing besides burn down. Other Buildings inherit from this class. # DO NOT MODIFY THIS FILE # Never try to directly create an instance of this class, or modify its member variables. # Instead, you should only be reading its variables and calling its functions. from games.anarch...
mit
-4,873,034,364,806,907,000
30.452381
146
0.633611
false
gento/dionaea
modules/python/scripts/pptp/include/packets.py
1
4630
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2015 Tan Kean Siong #* #* This program is free software; you can redistribute it and/or #* modify it under the terms of the...
gpl-2.0
-748,663,431,541,799,300
31.605634
82
0.700432
false
dmilith/SublimeText3-dmilith
Packages/pyte/all/pyte/graphics.py
1
3441
# -*- coding: utf-8 -*- """ pyte.graphics ~~~~~~~~~~~~~ This module defines graphic-related constants, mostly taken from :manpage:`console_codes(4)` and http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html. :copyright: (c) 2011-2012 by Selectel. :copyright: (c) 2012-2017 by pyte ...
mit
1,003,358,980,977,163,300
22.09396
78
0.561465
false
BrainTech/openbci
obci/logic/logic_speller_peer.py
1
1099
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: # Mateusz Kruszyński <mateusz.kruszynski@gmail.com> # import time from obci.utils import tags_helper from multiplexer.multiplexer_constants import peers, types from obci.logic import logic_helper from obci.logic.logic_decision_peer import LogicDecision from ob...
gpl-3.0
-3,186,616,234,418,498,600
33.3125
73
0.711293
false
ethanbao/artman
artman/pipelines/core_generation.py
1
2951
# 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 agree...
apache-2.0
2,257,717,541,070,692,400
31.428571
79
0.698746
false
kevinsung/OpenFermion
src/openfermion/utils/_testing_utils.py
1
13228
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribu...
apache-2.0
2,406,659,572,818,670,000
35.541436
79
0.590036
false
kdart/pycopia
core/pycopia/stringmatch.py
1
4548
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 ...
apache-2.0
-7,621,170,586,221,871,000
28.921053
125
0.599824
false
germanovm/vdsm
vdsm/v2v.py
1
26018
# Copyright 2014 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 as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
gpl-2.0
1,767,331,554,670,716,700
31.360697
79
0.547352
false
kwilliams-mo/iris
lib/iris/tests/test_util.py
1
13481
# (C) British Crown Copyright 2010 - 2013, Met Office # # This file is part of Iris. # # Iris 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 l...
gpl-3.0
4,546,824,974,458,440,700
40.2263
475
0.6366
false
omriabnd/UCCA-App
Server/uccaApp/models/Users.py
1
1828
from datetime import datetime from rest_framework.exceptions import ValidationError from uccaApp.models import Tabs, Constants, Roles from django.db import models from django.contrib.auth.models import User, Group class Users(models.Model): id = models.AutoField(primary_key=True) user_auth = models.OneToOn...
gpl-3.0
-3,633,067,282,102,347,000
41.534884
132
0.721007
false
skosukhin/spack
lib/spack/spack/cmd/compiler.py
1
7883
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
1,675,584,116,106,376,700
36.899038
78
0.608905
false
380wmda999/sphinx2.2.11-string-4G
api/sphinxapi.py
1
35093
# # $Id$ # # Python version of Sphinx searchd client (Python API) # # Copyright (c) 2006, Mike Osadnik # Copyright (c) 2006-2016, Andrew Aksyonoff # Copyright (c) 2008-2016, Sphinx Technologies Inc # All rights reserved # # This program is free software; you can redistribute it and/or modify # it under the terms of the...
gpl-2.0
-197,369,445,877,807,000
27.323648
228
0.632576
false
nurnbeck/project-2-CMPUT-291
ret_DATA.py
1
1814
import os import time import bsddb3 as bsddb ''' Retrieve records with a given data - Assume that database is closed before calling ret_DATA(); - Writes (append) the result to the file 'answers'. For now I assume that indexfile = btree, further tests are necessary. Tested under DB_SIZE = 10 ''' DB_FILE = "/tmp/yish...
mit
2,081,410,483,051,653,400
24.914286
69
0.582139
false
benjamindeleener/odoo
addons/l10n_ca/__openerp__.py
1
1831
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Canada - Accounting', 'version': '1.0', 'author': 'Savoir-faire Linux', 'website': 'https://www.savoirfairelinux.com', 'category': 'Localization/Account Charts', 'description': """ This...
gpl-3.0
8,879,892,428,055,025,000
33.54717
96
0.656472
false
AnotherBobSmith/CLUZ
cluz_dialog3.py
1
15904
# -*- coding: utf-8 -*- """ /*************************************************************************** A QGIS plugin CLUZ for QGIS ------------------- begin : 2016-23-02 copyright : (C) 2016 by Bob Smith, DICE ...
gpl-2.0
-8,681,222,330,805,281,000
42.453552
131
0.624245
false
yakky/django-cms
cms/models/static_placeholder.py
1
3681
import uuid from django.contrib.auth import get_permission_codename from django.contrib.sites.models import Site from django.core.exceptions import ValidationError from django.db import models from django.utils.translation import ugettext_lazy as _ from six import text_type, python_2_unicode_compatible from cms.mode...
bsd-3-clause
-8,891,000,634,964,670,000
39.01087
114
0.659332
false
nickgentoo/LSTM-timepredictionPMdata
code/nick_evaluate_suffix_and_remaining_time_only_time_OHenc.py
1
15048
''' this script takes as input the LSTM or RNN weights found by train.py change the path in line 178 of this script to point to the h5 file with LSTM or RNN weights generated by train.py Author: Niek Tax ''' from __future__ import division from keras.models import load_model import csv import copy import numpy as np ...
gpl-3.0
-5,484,811,627,186,544,000
37.192893
126
0.624003
false
shoyer/xarray
xarray/tests/test_variable.py
1
87655
import warnings from copy import copy, deepcopy from datetime import datetime, timedelta from textwrap import dedent import numpy as np import pandas as pd import pytest import pytz from xarray import Coordinate, Dataset, IndexVariable, Variable, set_options from xarray.core import dtypes, duck_array_ops, indexing fr...
apache-2.0
-3,690,393,615,737,424,000
36.1105
88
0.53123
false
bountyful/bountyfulcoins
bountyfulcoinsapp/migrations/0001_initial.py
1
9626
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Link' db.create_table(u'bountyfulcoinsapp_link', ( ...
mit
-6,591,234,244,855,706,000
55.623529
195
0.566487
false
HengeSense/website
apps/news/widgets.py
1
2559
############################################################################ # This file is part of the Maui Web site. # # Copyright (c) 2012 Pier Luigi Fiorini # Copyright (c) 2009-2010 Krzysztof Grodzicki # # Author(s): # Pier Luigi Fiorini <pierluigi.fiorini@gmail.com> # # $BEGIN_LICENSE:AGPL3+$ # # This program ...
agpl-3.0
3,561,484,379,450,850,000
30.207317
76
0.664322
false
vine-comment/live_portal
live_portal/urls.py
1
1677
from live_portal import views from views import * from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from registration.backends.simple.views import RegistrationView from forms import * from django.contrib import admin admin.autodiscover() urlpatterns = patte...
gpl-3.0
2,427,552,201,301,461,000
39.902439
117
0.66607
false
karimbahgat/Pure-Python-Greiner-Hormann-Polygon-Clipping
GreinerHorman_Algo/KimKim/puremidpoints_v16(k&k,tryfixcrosschange).py
1
36981
# -*- coding: UTF-8 -*- # Efficient Clipping of Arbitrary Polygons # # Copyright (c) 2011, 2012 Helder Correia <helder.mc@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 vers...
gpl-3.0
691,236,750,043,469,000
37.399792
191
0.495308
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/PyKDE4/kdecore/KEncodingDetector.py
1
2735
# encoding: utf-8 # module PyKDE4.kdecore # from /usr/lib/python2.7/dist-packages/PyKDE4/kdecore.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore import PyQt4.QtNetwork as __PyQt4_QtNetwork class KEncodingDetector(): # skipped bases: <type 'sip.wrapper'> # no doc def analyze(s...
gpl-2.0
1,633,415,797,107,800,600
25.553398
101
0.643876
false
tamland/wimpy
docs/conf.py
1
7997
# -*- coding: utf-8 -*- # # complexity documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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. # ...
lgpl-3.0
3,739,961,892,431,767,000
30.116732
76
0.709391
false
mph-/lcapy
lcapy/nexpr.py
1
7914
"""This module provides the DiscreteTimeDomainExpression class to represent discrete-time expressions. Copyright 2020--2021 Michael Hayes, UCECE """ from __future__ import division from .domains import DiscreteTimeDomain from .sequence import Sequence from .functions import exp from .sym import j, oo, pi, fsym, oo f...
lgpl-2.1
6,243,116,347,179,922,000
30.15748
92
0.604372
false
Azure/azure-sdk-for-python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_09_01/aio/operations/_default_security_rules_operations.py
1
8844
# 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 may ...
mit
489,527,905,690,203,970
48.685393
236
0.655133
false
idiap/rgbd
Processing/Processor.py
1
3672
""" Copyright (c) 2014 Idiap Research Institute, http://www.idiap.ch/ Written by Kenneth Funes <kenneth.funes@idiap.ch> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the ...
lgpl-3.0
6,560,452,943,276,382,000
35
168
0.659858
false
jhartnett/ipCounter
src/ipCounter.py
1
1779
#!/bin/python #/************************************************************************** #* File: ipCounter.py #* #* This is a basic program to count the total number of IPs #* in a given range. Input is a txt formatted file similar #* to the sample provided #* #* This updated version uses Python to make it more a...
apache-2.0
33,192,525,953,773,740
23.708333
77
0.588533
false
dunkhong/grr
grr/test_lib/db_test_lib.py
1
2046
#!/usr/bin/env python """Test utilities for RELDB-related testing.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import functools import sys import mock from grr_response_core.lib.util import compatibility from grr_response_server import data_store ...
apache-2.0
5,616,811,757,687,994,000
29.537313
77
0.721896
false
fja05680/pinkfish
examples/310.cryptocurrencies/strategy.py
1
6833
""" The SMA-ROC-portfolio stategy. This is SMA-ROC strategy applied to a portfolio. SMA-ROC is a rate of change calculation smoothed by a moving average. This module allows us to examine this strategy and try different period, stop loss percent, margin, and whether to use a regime filter or not. We split up the tota...
mit
4,744,775,123,107,647,000
36.543956
102
0.56915
false
tasoc/photometry
notes/halo_shift.py
1
2629
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ .. codeauthor:: Rasmus Handberg <rasmush@phys.au.dk> """ import numpy as np import matplotlib.pyplot as plt from astropy.io import fits import sqlite3 import os.path #------------------------------------------------------------------------------ def mag2flux(mag): ...
gpl-3.0
-1,066,074,733,466,643,000
26.103093
142
0.657284
false
CacaoMovil/guia-de-cacao-django
cacao_app/config/common.py
1
11423
# -*- coding: utf-8 -*- """ Django settings for cacao_app project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.p...
bsd-3-clause
4,947,143,118,909,856,000
31.177465
108
0.617526
false
SergeyKubrak/django-rosetta
rosetta/polib.py
1
59163
# -* coding: utf-8 -*- # # License: MIT (see LICENSE file provided) # vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: """ **polib** allows you to manipulate, create, modify gettext files (pot, po and mo files). You can load existing files, iterate through it's entries, add, modify entries, comments or metada...
mit
-254,093,164,069,252,670
32.730331
79
0.520291
false
VladimirShe/in100gram
in100gram/in100gram/settings.py
1
2137
""" Django settings for in100gram project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) ...
apache-2.0
-7,077,503,071,250,312,000
23.563218
71
0.709406
false
mtdx/ml-algorithms
neural-networks/cnn.py
1
2621
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("/tmp/data/", one_hot=True) n_classes = 10 batch_size = 128 x = tf.placeholder('float', [None, 784]) y = tf.placeholder('float') keep_rate = 0.8 keep_prob = tf.placeholder(tf.float32) def conv2d(x,...
mit
-4,813,126,551,715,110,000
33.038961
87
0.595193
false
m4sth0/sauventory
tests/test_ranktransform.py
1
4574
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 # Author(s): # Thomas Leppelt <thomas.leppelt@dwd.de> # This file is part of sauventory. # Spatial Autocorrelated Uncertainty of Inventories # sauventory is free software: you can redistribute it and/or modify # it under the terms of the GNU Gener...
gpl-3.0
-1,744,700,304,624,888,300
42.980769
79
0.49366
false
T2DREAM/t2dream-portal
src/encoded/upgrade/file.py
1
22524
from snovault import upgrade_step from pyramid.traversal import find_root from datetime import datetime, time @upgrade_step('file', '', '2') def file_0_2(value, system): # http://redmine.encodedcc.org/issues/1295 # http://redmine.encodedcc.org/issues/1307 if 'status' in value: value['status'] = va...
mit
-7,386,508,491,949,481,000
38.93617
109
0.544752
false
tensorflow/ranking
tensorflow_ranking/python/keras/canned/dnn.py
1
5354
# Copyright 2021 The TensorFlow Ranking 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 ag...
apache-2.0
-1,788,232,522,490,547,200
38.080292
80
0.675196
false
berjc/aus-senate-audit
aus_senate_audit/audits/bayesian_audit.py
1
5902
# -*- coding: utf-8 -*- """ Implements the Bayesian Audit. """ from collections import Counter from itertools import chain from random import gammavariate from random import seed as set_seed from time import time def get_new_ballot_weights(election, r): """ Returns new ballot weights for the given election. ...
apache-2.0
373,211,840,810,849,340
42.080292
120
0.619282
false
zenofewords/zenofewords
tests/utils.py
1
1705
from copy import copy from django.conf import settings from django.urls import reverse def get_permissions(response_mapping, custom_mapping): """ Build permission mappings. :param response_mapping: usually a predefined permission template (FORBIDDEN, NOT_FOUND, etc.) :type response_mapping: dict ...
mit
-4,056,573,595,075,421,000
35.276596
98
0.674487
false
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/application_health_state_filter.py
1
6307
# 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
-3,039,962,441,478,437,400
55.81982
168
0.721896
false
guillaume-philippon/aquilon
lib/aquilon/worker/formats/chassis.py
1
1715
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2013,2014,2016 Contributor # # 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...
apache-2.0
9,082,157,566,535,196,000
38.883721
80
0.668222
false
bcarr092/CAHAL
test/test_driver.py
1
1595
try: import threading as _threading except ImportError: import dummy_threading as _threading import cahal_tests import unittest import sys ...
apache-2.0
-5,277,244,177,594,108,000
43.305556
85
0.497179
false
mlperf/training_results_v0.5
v0.5.0/nvidia/submission/code/rnn_translator/pytorch/seq2seq/data/sampler.py
1
5047
import logging import torch from torch.utils.data.sampler import Sampler from mlperf_compliance import mlperf_log from seq2seq.utils import gnmt_print from seq2seq.utils import get_world_size, get_rank class BucketingSampler(Sampler): """ Distributed data sampler supporting bucketing by sequence length. ...
apache-2.0
-4,972,239,737,936,623,000
32.646667
93
0.597781
false
smenon8/AlgDataStruct_practice
practice_problems/MorePractice.py
1
2289
# Divide and Conquer Algorithm for finding the maximum sub array sum def maxSubArraySum(arr,h,t): if h == t: return arr[h] m = (h+t)//2 # 1. find max in left subarray leftSum = maxSubArraySum(arr,h,m) # 2. find max in right subarray rightSum = maxSubArraySum(arr,m+1,t) # 3. find max in mid-point crossin...
mit
6,559,211,954,744,387,000
23.105263
118
0.671472
false
argv-minus-one/obnam
obnamlib/encryption.py
1
7876
# Copyright 2011 Lars Wirzenius # # 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. # # This program is distributed in th...
gpl-3.0
1,874,813,231,981,704,400
27.536232
77
0.603225
false
tuxar-uk/Merlyn
Merlyn.py
1
6041
""" Merlyn Speech Control for PC We load in commands (& spells) generated by lmtool.py and also language files generated by the Sphinx lmtool http://www.speech.cs.cmu.edu/tools/lmtool-new.html then open up a stream of words from the mic via LiveSpeech and try to parse it into commands and possibly some parameters...
mit
-4,345,104,676,021,986,300
30.463542
99
0.636484
false
DLR-SC/DataFinder
contrib/script_examples/command_line/items.py
1
4139
# $Filename$ # $Authors$ # Last Changed: $Date$ $Committer$ $Revision-Id$ # # Copyright (c) 2003-2011, German Aerospace Center (DLR) # All rights reserved. # # #Redistribution and use in source and binary forms, with or without #modification, are permitted provided that the following conditions are #met: # ...
bsd-3-clause
7,515,495,566,930,876,000
35.627273
92
0.70476
false
visionegg/visionegg
docs/conf.py
1
8232
# -*- coding: utf-8 -*- # # Vision Egg documentation build configuration file, created by # sphinx-quickstart on Fri Aug 29 21:31:07 2014. # # 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. # ...
lgpl-2.1
-9,219,821,388,749,676,000
30.54023
79
0.706876
false
soybean217/lora-python
UServer/http_api_no_auth/api/api_gateway.py
1
5817
import json from http_api_no_auth.api import api, root from http_api_no_auth.api.decorators import gateway_belong_to_user from userver.object.gateway import Gateway, Location from utils.errors import KeyDuplicateError, PatchError from .forms.form_gateway import AddGatewayForm, PatchGateway from ..http_auth import auth...
mit
255,426,881,030,014,140
43.10687
116
0.646702
false
valeriansaliou/django-gitlab-logging
gitlab_logging/handlers.py
1
2294
import logging class GitlabIssuesHandler(logging.Handler): """ Handles logs as issues with GitLab API """ def __init__(self): logging.Handler.__init__(self) def __open_issue(self, title, content, trace_raw): """ Open an issue on GitLab with given content """ ...
mit
2,486,562,706,917,107,700
30.424658
102
0.551003
false
cpieloth/GPGPU-on-Hadoop
hadoop_ocl_link_test/runTime/runtime.py
1
1118
#!/usr/bin/env python # Python 3 import shlex import subprocess import re import sys import time # read command line arguments if len(sys.argv) < 3: print('Usage: <program> <outputfile> <value name>') sys.exit(1) # Variables PRG_NAME = sys.argv[1] DATA_NAME = sys.argv[2] VAL_NAME = sys.argv[3] RUNS...
apache-2.0
-4,649,629,103,920,189,000
19.5
63
0.63059
false
duyuan11/glumpy
glumpy/app/window/backends/backend_sdl2.py
1
14801
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2014, Nicolas P. Rougier # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- import sys, ctypes fr...
bsd-3-clause
-7,783,163,129,631,949,000
36.85422
97
0.539018
false
NeurodataWithoutBorders/api-python
examples/create_scripts/general-e.py
1
2091
#!/usr/bin/python import sys from nwb import nwb_file from nwb import nwb_utils as utils """ Example using extension to add metadata to group /general Group /general contains general metadata, i.e. metadata that applies to the entire session. This example uses the extension defined in extensions/e-general.py to add ...
bsd-3-clause
7,030,291,989,708,587,000
33.278689
83
0.704926
false
guildai/guild
guild/remotes/gist.py
1
20430
# Copyright 2017-2021 TensorHub, 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
8,576,580,919,284,401,000
29.266667
88
0.598776
false
adamcandy/Gaia
FileTodo.py
1
56922
#!/usr/bin/env python # -*- coding: utf-8 -*- ########################################################################## # # Gaia, task list organiser in with Caldav server sync. # # Copyright (C) 2013-2014 Dr Adam S. Candy. # Dr Adam S. Candy, contact@gaiaproject.org # # This file is part of the Gaia project...
gpl-3.0
-4,814,139,854,392,383,000
34.845088
271
0.593531
false
Azure/azure-sdk-for-python
sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/azure/cognitiveservices/search/visualsearch/models/__init__.py
1
5495
# 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
-5,166,224,929,300,869,000
35.390728
77
0.722839
false
mlk/thefuck
tests/rules/test_dirty_unzip.py
1
2175
# -*- coding: utf-8 -*- import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command from unicodedata import normalize @pytest.fixture def zip_error(tmpdir): def zip_error_inner(filename): path = os.path.join(str(tmpdir),...
mit
3,121,337,484,747,704,300
29.464789
78
0.601942
false
Thortoise/Super-Snake
Blender/animation_nodes-master/sockets/shape_key.py
1
2668
import bpy from bpy.props import * from bpy.types import ShapeKey from .. events import propertyChanged from .. base_types.socket import AnimationNodeSocket from .. utils.id_reference import tryToFindObjectReference class ShapeKeySocket(bpy.types.NodeSocket, AnimationNodeSocket): bl_idname = "an_ShapeKeySocket" ...
gpl-3.0
-1,726,559,515,112,783,400
30.761905
107
0.652174
false
stanfordnmbl/osim-rl
tests/test.round2.py
1
1833
from osim.env import ProstheticsEnv, rect import numpy as np import unittest import math class SimulationTest(unittest.TestCase): def test_reset(self): env = ProstheticsEnv(visualize=False, difficulty=0) o = env.reset() self.assertEqual(type(o), list) o = env.reset(project = False) ...
mit
8,473,579,778,601,105,000
34.941176
95
0.599018
false
almostearthling/when-wizard
share/when-wizard/plugins/cond-event-batterylow.py
1
1402
# file: share/when-wizard/templates/cond-event-batterylow.py # -*- coding: utf-8 -*- # # Condition plugin for the low battery event # Copyright (c) 2015-2018 Francesco Garosi # Released under the BSD License (see LICENSE file) import locale from plugin import EventConditionPlugin, PLUGIN_CONST, plugin_name # setup i1...
bsd-3-clause
3,910,088,821,444,205,000
28.208333
74
0.669044
false
siddartha1992/cloud-custodian
tools/c7n_mailer/tests/test_email.py
1
9174
# Copyright 2016 Capital One Services, 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 agreed to in...
apache-2.0
-7,470,777,053,981,479,000
43.75122
99
0.629823
false
ghackebeil/PyORAM
src/pyoram/storage/block_storage.py
1
3293
__all__ = ('BlockStorageTypeFactory',) import logging log = logging.getLogger("pyoram") def BlockStorageTypeFactory(storage_type_name): if storage_type_name in BlockStorageTypeFactory._registered_devices: return BlockStorageTypeFactory.\ _registered_devices[storage_type_name] else: ...
mit
-4,740,640,862,702,392,000
38.674699
73
0.580626
false
henriquegemignani/randovania
randovania/cli/__init__.py
1
1781
import argparse import logging import os import sys from pathlib import Path import randovania def create_subparsers(root_parser): from randovania.cli import echoes, server, gui, prime_database echoes.create_subparsers(root_parser) prime_database.create_subparsers(root_parser) server.create_subparser...
gpl-3.0
-388,946,729,775,054,140
25.984848
93
0.653565
false
FABtotum/FAB-UI
recovery/python/boot.py
1
1621
import os, sys import time import serial import json import ConfigParser from subprocess import call config = ConfigParser.ConfigParser() config.read('/var/www/lib/config.ini') #startup script (see crontab) #print "Boot script" #time.sleep(60) #wait 60 seconds so connections can be made. #print "Sta...
gpl-2.0
-3,442,506,213,277,008,000
19.077922
60
0.6533
false
liweitianux/atoolbox
astro/radec2deg.py
1
1957
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Aaron LI # Created: 2015-04-17 # Updated: 2016-06-30 # """ Convert the coordinates data in format (??h??m??s, ??d??m??s) to format (degree, degree). """ import os import sys import re import getopt import math USAGE = """Usage: %(prog)s [ -h ] -i coords_file R...
mit
6,794,721,827,466,608,000
19.385417
64
0.502299
false
jfantom/incubator-airflow
airflow/contrib/auth/backends/proxied_auth.py
1
3179
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
3,035,449,064,927,744,000
28.165138
74
0.650834
false
dvklopfenstein/PrincetonAlgorithms
py/AlgsSedgewickWayne/Bag.py
1
2806
"""Bag class is a container for generic items.""" class Bag(object): # <Item> implements Iterable<Item>: """The Bag class represents a bag (or multiset) of generic items.""" class _Node(object): # private static class <Item>: """helper linked list class""" def __init__(self, Item, Next): self._item...
gpl-2.0
8,381,885,796,278,084,000
27.343434
83
0.612616
false
Parcks/core
test/service/test_post_installation_facade.py
1
3532
""" Scriptable Packages Installer - Parcks Copyright (C) 2017 JValck - Setarit This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version....
gpl-2.0
3,556,626,939,037,611,000
30.544643
99
0.592582
false
M32Media/redash
redash/tasks/queries.py
1
24668
import json import time import logging import signal import redis import re from celery.result import AsyncResult from celery.utils.log import get_task_logger from redash import redis_connection, models, statsd_client, settings, utils from redash.utils import gen_query_hash from redash.worker import celery from redash....
bsd-2-clause
-672,060,604,044,315,900
36.603659
160
0.59186
false
dios-game/dios-cocos
src/oslibs/cocos/cocos-src/tools/cocos2d-console/plugins/plugin_jscompile/__init__.py
1
12716
#!/usr/bin/python # ---------------------------------------------------------------------------- # cocos "jscompile" plugin # # Copyright 2013 (C) Intel # # License: MIT # ---------------------------------------------------------------------------- ''' "jscompile" plugin for cocos command line tool ''' __docformat__ =...
mit
2,858,667,076,001,205,000
37.88685
150
0.542781
false