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
cripplet/MonitorToys
weather.py
1
13407
#!/usr/bin/env python """ weather.py Copyright 2011 Aaron Goss This file is part of Monitor Toys. Monitor Toys 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 opt...
gpl-3.0
1,244,452,170,847,939,800
40.125767
120
0.622511
false
Idematica/django-oscar
oscar/apps/customer/alerts/utils.py
1
3960
import logging from django.core import mail from django.conf import settings from django.template import loader, Context from django.contrib.sites.models import Site from django.db.models import get_model, Max from oscar.apps.customer.notifications import services from oscar.core.loading import get_class ProductAler...
bsd-3-clause
-5,266,943,256,070,779,000
30.935484
73
0.612879
false
mried/beetsplug
beetsplug/autosingleton.py
1
3040
# This file is part of beets. # Copyright 2015,2016, Malte Ried # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, ...
mit
4,649,073,978,372,009,000
33.942529
87
0.632566
false
NicoSantangelo/sublime-text-i18n-rails
yaml.py
1
2787
from . import pyyaml class Yaml(): def __init__(self, locales_path): self.locales_path = locales_path self.setup() def move_to(self, selected_text): # Reset the intermediate value self.intermediate_value = None # Find the full paths file name key on the dict inside ...
mit
3,243,475,606,101,454,300
28.967742
139
0.569071
false
dsweet04/rekall
rekall-core/rekall/plugins/yarascanner.py
1
8252
# Rekall Memory Forensics # Copyright (c) 2012, Michael Cohen <scudette@gmail.com> # Copyright (c) 2010, 2011, 2012 Michael Ligh <michael.ligh@mnin.org> # Copyright 2013 Google Inc. All Rights Reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Publ...
gpl-2.0
1,141,355,418,252,413,700
36.171171
80
0.565681
false
VirusTotal/misp-modules
misp_modules/modules/expansion/__init__.py
1
1324
from . import _vmray # noqa import os import sys sys.path.append('{}/lib'.format('/'.join((os.path.realpath(__file__)).split('/')[:-3]))) __all__ = ['cuckoo_submit', 'vmray_submit', 'bgpranking', 'circl_passivedns', 'circl_passivessl', 'countrycode', 'cve', 'cve_advanced', 'dns', 'btc_steroids', 'domaintoo...
agpl-3.0
7,726,162,262,551,316,000
68.684211
101
0.608006
false
txomon/vdsm
lib/vdsm/tool/nwfilter.py
1
2909
#! /usr/bin/python # Copyright 2012-2013 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 progra...
gpl-2.0
-3,775,511,512,733,428,700
29.302083
78
0.640426
false
danielfrg/jupyterhub-kubernetes_spawner
kubernetes_spawner/swagger_client/models/v1_load_balancer_status.py
1
3408
# coding: utf-8 """ Copyright 2015 SmartBear Software 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
-5,133,778,285,184,325,000
28.894737
147
0.588908
false
treycausey/scikit-learn
examples/cluster/plot_agglomerative_clustering.py
1
2912
""" Agglomerative clustering with and without structure =================================================== This example shows the effect of imposing a connectivity graph to capture local structure in the data. The graph is simply the graph of 20 nearest neighbors. Two consequences of imposing a connectivity can be s...
bsd-3-clause
5,133,317,422,193,793,000
36.818182
79
0.655563
false
fluxer/spm
nuitka/nuitka/finalizations/FinalizeClosureTaking.py
1
2544
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
2,738,212,916,007,118,300
36.970149
79
0.678852
false
azariven/BioSig_SEAS
bin_stable/pandexo/bin_spectra_to_JWST_sensitivity.py
1
7940
""" data processing and playing with pendexo results Horizontal Bin: 100ppm data should be a combination between NIRSpec and MIRI detection could indicate if the data is from NIRSpec of MIRI. 3 sigma detection: signal1-signal2 > 3*(signal1_error+signal2_error) """ """ ['FinalSpectrum', 'OriginalInput', 'timin...
gpl-3.0
7,680,132,176,350,514,000
28.087912
309
0.591688
false
elbeardmorez/quodlibet
quodlibet/quodlibet/browsers/playlists/util.py
1
4399
# -*- coding: utf-8 -*- # Copyright 2014-2017 Nick Boultbee # # 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. import os...
gpl-2.0
-1,448,277,696,774,770,000
31.109489
77
0.642419
false
codesyntax/cs.linguaploneblueprint
cs/linguaploneblueprint/tests.py
1
1443
import unittest #from zope.testing import doctestunit #from zope.component import testing from Testing import ZopeTestCase as ztc from Products.Five import fiveconfigure from Products.PloneTestCase import PloneTestCase as ptc from Products.PloneTestCase.layer import PloneSite ptc.setupPloneSite() import cs.linguaplo...
gpl-2.0
7,539,410,498,591,084,000
25.236364
62
0.659737
false
samluescher/django-media-tree
media_tree/admin/change_list.py
1
3274
import django from media_tree.models import FileNode from media_tree.admin.utils import get_current_request, is_search_request, \ get_request_attr from django.contrib.admin.views.main import ChangeList from django.db import models class MediaTreeChangeList(ChangeList): def is_filtered(self, request): ...
bsd-3-clause
252,501,002,351,166,600
41.519481
104
0.61179
false
ScholarTools/crossref_api_python
crossref/doi.py
1
3280
# -*- coding: utf-8 -*- """ These methods are specific to working with DOIs and are not part of the standard API or may expose a part of the API in a different in useful way. DOI notes: ---------- 1) DOIs are not case sensitive """ import requests from .errors import InvalidDOI, UnhandledHTTPResonseFailure # TO...
mit
803,647,996,120,041,000
27.521739
105
0.597866
false
tnwhitwell/lexicon
lexicon/providers/rage4.py
1
5124
from __future__ import absolute_import from __future__ import print_function import json import logging import requests from .base import Provider as BaseProvider logger = logging.getLogger(__name__) def ProviderParser(subparser): subparser.add_argument("--auth-username", help="specify email address used to a...
mit
-5,749,159,318,801,691,000
33.16
109
0.57377
false
Jumpscale/jumpscale6_core
lib/JumpScale/portal/docgenerator/Docgenerator.py
1
4197
from JumpScale import j from Confluence2HTML import Confluence2HTML from Confluence2RST import Confluence2RST class DocgeneratorFactory: def __init__(self): pass def getConfluenceClient(self, url, login, passwd, spacename, erasespace=False, erasepages=False): """ @param url e.g. htt...
bsd-2-clause
-2,757,643,876,178,571,000
38.971429
117
0.641649
false
PetukhovVictor/compiler
src/Parser/Parsers/statements/loop.py
1
1574
from ...combinators import Lazy from ...AST.statements.loop import WhileStatement, ForStatement, RepeatStatement def while_stmt(): """ Parsing 'while' statement. """ from ..common import keyword from ..expressions import logical from ..statements import base def process(parsed): (...
mit
-6,239,727,314,899,469,000
30.48
92
0.60864
false
abinit/abinit
fkiss/test_parser_tricky.py
1
6530
""" Units Tests for Parser """ from __future__ import print_function, division, unicode_literals, absolute_import from unittest import TestCase from .parser import FortranKissParser from .project import AbinitProject class TestTrickyCode(TestCase): def test_tricky_module(self): """Parsing tricky Fortran...
gpl-3.0
6,486,281,368,288,218,000
31.167488
105
0.628331
false
dfridovi/compressed_sensing
src/python/test_basis_sketching_dct_2D.py
1
1263
""" Test script. Run compressed sensing on a 2D image in Fourier domain and see what we get. """ import numpy as np import matplotlib.pyplot as plt from scipy import misc import BasicFunctions as bf import Sketching as sketch # Parameters. IMAGE_PATH = "../../data/" IMAGE_NAME = "lenna.png" SIZE = (50, 50) ALPHA = 2...
gpl-2.0
6,039,611,539,954,895,000
27.066667
98
0.718923
false
Micronaet/micronaet-bom
order_bom/report/__init__.py
1
1178
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
-1,023,565,151,717,977,100
44.307692
79
0.631579
false
robwebset/script.pinsentry
plugin.py
1
38814
# -*- coding: utf-8 -*- import sys import os import urllib import urlparse import xbmc import xbmcgui import xbmcplugin import xbmcaddon if sys.version_info < (2, 7): import simplejson else: import json as simplejson # Import the common settings from resources.lib.settings import Settings from resources.lib.s...
gpl-2.0
4,811,090,829,362,698,000
45.262217
220
0.593935
false
kmshi/miroguide
channelguide/moderate/views.py
1
7043
# Copyright (c) 2008-2009 Participatory Culture Foundation # See LICENSE for details. from django.http import HttpResponseRedirect from django.core import cache from django.core.paginator import Paginator, InvalidPage from django.contrib.auth.decorators import permission_required from django.db.models import Count fro...
agpl-3.0
-8,478,159,749,297,703,000
40.429412
179
0.64305
false
Jacotsu/pepenet
pepedb.py
1
3086
#!/usr/bin/env python3 import sqlite3 from sqlite3 import IntegrityError import logging from pepe import Pepe queries = {"init_pepe_hashes_tbl": "CREATE TABLE IF NOT EXISTS pepe_hashes (" "hash VARCHAR(128) NOT NULL," "banned BIT DEFAULT 'TRUE'," ...
agpl-3.0
7,499,702,028,987,201,000
34.068182
79
0.47278
false
ifanrx/django-oauth2-provider
provider/oauth2/backends.py
1
2869
import codecs from ..utils import now, MergeDict from .forms import ClientAuthForm, PublicPasswordGrantForm from .models import AccessToken import binascii class BaseBackend(object): """ Base backend used to authenticate clients as defined in :rfc:`1` against our database. """ def authenticate(sel...
mit
-2,330,183,553,365,629,400
27.69
91
0.623214
false
RyanHope/AutobahnPython
examples/twisted/wamp/rpc/arguments/frontend.py
1
3404
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software with...
mit
-562,642,779,276,927,300
35.602151
85
0.643948
false
braintree/braintree_python
tests/integration/test_visa_checkout.py
1
5280
from tests.test_helper import * class TestVisaCheckout(unittest.TestCase): def test_create_from_nonce(self): customer = Customer.create().customer result = PaymentMethod.create({ "customer_id": customer.id, "payment_method_nonce": Nonces.VisaCheckoutVisa }) ...
mit
4,026,339,170,774,813,000
46.142857
95
0.696402
false
erdem/DRF-TDD-example
todoapp/todoapp/settings.py
1
3674
""" Django settings for todoapp project. Generated by 'django-admin startproject' using Django 1.9.3. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os #...
mit
429,275,996,174,183,040
23.993197
91
0.679913
false
nazmizorlu/python-euromsg
euromsg/euromsg.py
1
2109
# encoding: utf-8 import zeep class EuromsgMailer(object): """ Provides a simple interface for sending an email over euro.message service. """ AUTHORIZATION_URL = "https://ws.euromsg.com/live/auth.asmx?wsdl" POST_URL = "https://ws.euromsg.com/live/post.asmx?wsdl" username = "" password = ...
mit
7,132,670,849,879,594,000
33.016129
123
0.572783
false
tachijuan/python
myscripts/gameoflife.py
1
2170
#JOHN CONWAY'S GAME OF LIFE import time import random import serial from plotter import mybuffer def countSurrounding(universe, a, b): count = 0 surrounding = ((a - 1, b - 1), (a - 1, b ), (a - 1, b + 1), (a , b - 1), (a , b +...
mit
4,504,501,008,302,187,500
27.552632
97
0.482488
false
blueboxgroup/nova
nova/tests/unit/virt/vmwareapi/test_read_write_util.py
1
1977
# Copyright 2013 IBM Corp. # 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.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
6,471,982,315,284,460,000
39.346939
78
0.538695
false
miing/mci_migo
identityprovider/models/const.py
1
2776
# Copyright 2010, 2012 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). from django.utils.translation import ugettext_lazy as _ class BaseConst(object): @classmethod def _get_choices(cls): attrs = [(getattr(cls, attr), attr) for ...
agpl-3.0
215,333,135,043,336,400
28.849462
75
0.666066
false
hipnusleo/laserjet
resource/pypi/cryptography-1.7.1/docs/development/custom-vectors/arc4/generate_arc4.py
1
2676
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import binascii from cryptography.hazmat.backends import default...
apache-2.0
-4,067,945,267,181,852,000
25.306122
79
0.546338
false
MuckRock/muckrock
muckrock/tags/models.py
1
1153
""" Models for the tags application """ # pylint: disable=model-missing-unicode # Django from django.db import models # Standard Library import re # Third Party from taggit.models import GenericTaggedItemBase, Tag as TaggitTag from taggit.utils import _parse_tags def parse_tags(tagstring): """Normalize tags a...
agpl-3.0
-3,860,341,060,295,800,300
21.607843
83
0.647008
false
LoRexxar/Cobra-W
tests/test_detection.py
1
3783
#!/usr/bin/env python # -*- coding: utf-8 -*- """ cobra ~~~~~ Implements cobra main :author: BlBana <635373043@qq.com> :homepage: https://github.com/wufeifei/cobra :license: MIT, see LICENSE for more details. :copyright: Copyright (c) 2017 Feei. All rights reserved """ import xml.et...
mit
3,212,599,887,361,926,700
31.895652
116
0.58102
false
stefanv/scipy3
scipy/io/array_import.py
1
17710
# Authors: Travis Oliphant, Trent Oliphant # with support from Lee Barford's group at Agilent, Inc. # """This module allows for the loading of an array from an ASCII Text File """ __all__ = ['read_array', 'write_array'] # Standard library imports. import os import re import sys import types # Numpy imports. impor...
bsd-3-clause
6,912,863,567,193,047,000
34.349301
96
0.571993
false
nilgoyyou/dipy
doc/examples/gradients_spheres.py
2
6248
""" ===================== Gradients and Spheres ===================== This example shows how you can create gradient tables and sphere objects using dipy_. Usually, as we saw in :ref:`example_quick_start`, you load your b-values and b-vectors from disk and then you can create your own gradient table. But this time le...
bsd-3-clause
3,460,100,473,134,985,000
29.778325
83
0.668854
false
supergarotinho/ambari-mongodb
package/scripts/mongo_startable.py
1
4283
from mongo_base import MongoBase from resource_management.core.logger import Logger from resource_management.core.resources.system import Execute from resource_management.libraries.functions import check_process_status class MongoStartable(MongoBase): def start(self,env): self.configure(env) Logger...
bsd-3-clause
8,679,353,821,729,686,000
44.084211
120
0.590474
false
google/edward2
edward2/tensorflow/program_transformations.py
1
4527
# coding=utf-8 # Copyright 2021 The Edward2 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 o...
apache-2.0
8,156,045,043,530,767,000
34.928571
79
0.684118
false
EmhyrVarEmreis/LessSyntaxValidator
Parser.py
1
4541
from Tokenizer import Tokenizer class Parser: def __init__(self, input_content, file=True, debug=False): self.tokenizer = Tokenizer(input_content, file) self.tokenizer.tokenize() self.token = None self.is_debug = debug self.pos = 0 self.info = [] self.debug ...
apache-2.0
-6,505,733,249,550,220,000
27.38125
115
0.508699
false
klahnakoski/intermittents
pyLibrary/queries/list/aggs.py
1
4655
# encoding: 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/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __...
mpl-2.0
-9,038,071,592,435,119,000
34.265152
131
0.549946
false
thuydang/djagazin
wsgi/djagazin/djagazin/settings_cmspluginblog.py
1
5456
# -*- coding: utf-8 -*- import os gettext = lambda s: s PROJECT_DIR = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS LANGUAGES = [('en', 'en')] DEFAULT_LANGUAGE = 0 DATABASES = { 'default': { ...
bsd-2-clause
-401,843,231,126,464,300
28.491892
102
0.705279
false
sagemath/git-trac-command
git_trac/digest_transport.py
1
4942
r""" HTTP transport to the trac server AUTHORS: - David Roe, Julian Rueth, Robert Bradshaw: initial version """ #***************************************************************************** # Copyright (C) 2013 David Roe <roed.math@gmail.com> # Julian Rueth <julian.rueth@fsfe.org> # ...
gpl-3.0
2,998,220,303,857,756,000
33.802817
220
0.563537
false
rbiswas4/cambio
configdict.py
1
3613
#!/usr/bin/env python def repdictval(fname , paramdict , oname , ignorestrings=['#'], dictdelim = '='): """repdictval (fname , paramdict, oname, ignorestrings=["#], dictdelim ='=') rewrites the file fname to oname but replacing all keys in fname according to the dictionary paramdict args: fname: mandatory fi...
mit
6,862,792,546,798,256,000
23.578231
81
0.596734
false
sklam/numba
numba/tests/test_mangling.py
1
1296
# -*- coding: utf-8 -*- """ Test function name mangling. The mangling affects the ABI of numba compiled binaries. """ from numba.core import types, utils from numba.core.funcdesc import default_mangler from numba.tests.support import unittest, TestCase class TestMangling(TestCase): def test_one_args(self): ...
bsd-2-clause
8,696,882,194,415,940,000
30.560976
62
0.609737
false
gsi-upm/soba
projects/oldProyects/EWESim/Visual.py
1
2183
from mesa.visualization.ModularVisualization import ModularServer from LabModel import LabModel from CoffeMakerAgent import CoffeMakerAgent from TVAgent import TVAgent from AccessAgent import AccessAgent from PC import PC from DrawLabMapBackEnd import DrawLabMapBackEnd from DrawLabMapBackEnd import RepresentationModule...
mit
-3,161,618,585,566,298,600
26.987179
65
0.505268
false
wdv4758h/ZipPy
lib-python/3/test/test_xml_etree_c.py
1
1997
# xml.etree test for cElementTree from test import support from test.support import bigmemtest, _2G import unittest cET = support.import_module('xml.etree.cElementTree') # cElementTree specific tests def sanity(): r""" Import sanity. >>> from xml.etree import cElementTree Issue #6697. >>> e ...
bsd-3-clause
-260,507,079,625,493,950
26.356164
72
0.619429
false
sonofeft/XYmath
xymath/exhaustive.py
1
1911
#!/usr/bin/env python # -*- coding: ascii -*- r""" Support routines for exhaustive equation search in curve fit routines. Uses itertools to find all combinations. """ from __future__ import print_function from builtins import str from itertools import combinations from math import factorial full_funcL = ['const','...
gpl-3.0
-525,025,727,344,207,300
27.969697
101
0.556253
false
StuartLittlefair/astropy
astropy/modeling/tests/test_core.py
1
16785
# Licensed under a 3-clause BSD style license - see LICENSE.rst # pylint: disable=invalid-name import os import sys import subprocess import pytest import numpy as np from inspect import signature from numpy.testing import assert_allclose import astropy from astropy.modeling.core import Model, custom_model from astro...
bsd-3-clause
1,570,213,112,422,574,300
30.083333
109
0.581293
false
puttarajubr/commcare-hq
corehq/apps/commtrack/signals.py
1
2350
from collections import defaultdict import itertools from django.dispatch import Signal from casexml.apps.case.signals import cases_received from casexml.apps.case.xform import get_case_updates from corehq.apps.commtrack import const from corehq.apps.commtrack.const import is_supply_point_form from corehq.apps.commtrac...
bsd-3-clause
8,584,708,459,433,800,000
41.727273
107
0.711915
false
forallsystems/21stbadgepathways
users/views.py
1
18332
from django.http import HttpResponseRedirect, HttpResponse from django.template import RequestContext from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required ##from django.views.generic.simple import direct_to_template from django.shortcuts import render from django.db....
gpl-2.0
-2,927,636,180,874,615,300
38.941176
136
0.534693
false
tppsr/tppsr.github.io
obraz/_scripts/make_tsv.py
1
2512
# author : Johann-Mattis List # email : mattis.list@uni-marburg.de # created : 2014-10-22 16:52 # modified : 2014-10-22 16:52 """ convert tppsr data to qlc table for easy editing possibilities """ __author__="Johann-Mattis List" __date__="2014-10-22" from lingpyd import * import json # get places first orte = ...
gpl-2.0
821,586,110,226,958,200
23.627451
87
0.539809
false
jwg4/flask-restless
tests/test_serialization.py
1
19030
# test_serialization.py - unit tests for serializing resources # # Copyright 2011 Lincoln de Sousa <lincoln@comum.org>. # Copyright 2012, 2013, 2014, 2015, 2016 Jeffrey Finkelstein # <jeffrey.finkelstein@gmail.com> and contributors. # # This file is part of Flask-Restless. # # Flask-Restless is distributed un...
agpl-3.0
-1,573,802,013,990,848,500
37.136273
79
0.614714
false
rschwager-mm/polymr
redis/tests/test_endtoend.py
1
2094
import os import shutil import tempfile import unittest from io import StringIO import polymr.index import polymr.storage import polymr.query import polymr.record import polymr_redis to_index = StringIO("""01001,MA,DONNA,AGAWAM,WUCHERT,PO BOX 329,9799PNOVAY 01007,MA,BERONE,BELCHERTOWN,BOARDWAY,135 FEDERAL ST,9799JA8...
apache-2.0
-6,689,539,681,040,428,000
31.71875
78
0.657593
false
jldbc/pybaseball
tests/integration/pybaseball/test_standings.py
1
1230
from typing import Optional import pandas as pd import pytest from pybaseball.standings import standings from pybaseball.utils import most_recent_season def get_division_counts_by_season(season: Optional[int]) -> int: if season is None: season = most_recent_season() - 1 if season >= 1994: r...
mit
3,364,428,428,907,323,400
25.170213
75
0.628455
false
sajeeshcs/nested_projects_keystone
keystone/common/ldap/core.py
1
69881
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
7,993,627,596,492,166,000
38.795558
79
0.570727
false
arnaudlimbourg/heroku-libsass-python
docs/conf.py
1
7941
# -*- coding: utf-8 -*- # # heroku-libsass-python documentation build configuration file, created by # sphinx-quickstart. # # 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. # # All configuration...
bsd-3-clause
101,770,669,574,846,960
31.412245
80
0.699282
false
stormi/tsunami
src/primaires/meteo/perturbations/nuages_neige.py
1
3142
# -*-coding:Utf-8 -* # Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # l...
bsd-3-clause
3,164,862,924,788,352,500
43.642857
79
0.67136
false
renzon/reqgithub
reqgithub/catalogo.py
1
4649
import xmltodict catalogo = '''<?xml version="1.0" encoding="UTF-8"?> <CATALOG> <CD> <TITLE>Empire Burlesque</TITLE> <ARTIST>Bob Dylan</ARTIST> <COUNTRY>USA</COUNTRY> <COMPANY>Columbia</COMPANY> <PRICE>10.90</PRICE> <YEAR>1985</YEAR> </CD> <CD> <TITLE>Hide your heart</TITLE> <ARTIST>Bonnie Tyler</AR...
mit
3,913,484,430,644,209,700
20.330275
52
0.642074
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/dns/dnsnsrec_args.py
1
1541
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
8,914,623,597,450,243,000
28.634615
79
0.700844
false
borismus/lightning
src/Article.py
1
2652
import warnings class Article(object): def __init__(self, title, type_name, content, date_created, source_path, slug, permalink, snip, output_path, meta_description, yaml): # The title of this article. self.title = title # Name of the template to use for this article. self.type_name = type_name...
apache-2.0
6,203,739,876,596,297,000
27.826087
80
0.649321
false
baroquebobcat/pants
tests/python/pants_test/test_base.py
1
21076
# coding=utf-8 # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import itertools imp...
apache-2.0
8,602,379,964,321,368,000
34.9046
103
0.655864
false
ultmaster/eoj3
contest/migrations/0045_auto_20181108_2301.py
1
1602
# Generated by Django 2.1.3 on 2018-11-08 23:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contest', '0044_auto_20181106_1212'), ] operations = [ migrations.AddField( model_name='contestproblem', name='ac_co...
mit
-5,309,897,329,051,852,000
29.226415
69
0.557428
false
ekohl/ganeti
test/ganeti.mcpu_unittest.py
1
2194
#!/usr/bin/python # # Copyright (C) 2009, 2011 Google 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 p...
gpl-2.0
9,176,143,231,902,964,000
29.472222
74
0.697356
false
mnieber/dodo_commands
dodo_commands/framework/container/actions/layers.py
1
2136
from collections import OrderedDict from dodo_commands.framework import ramda as R from dodo_commands.framework.config_layers import layer_filename_superset from dodo_commands.framework.container.container import Container from dodo_commands.framework.container.facets import ( CommandLine, Layers, i_, ...
mit
-4,676,313,501,840,980,000
25.37037
81
0.666199
false
Azure/azure-sdk-for-python
sdk/datalake/azure-mgmt-datalake-analytics/azure/mgmt/datalake/analytics/account/models/create_data_lake_analytics_account_parameters_py3.py
1
6983
# 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
9,160,240,290,828,039,000
56.237705
433
0.690105
false
kije/PySpyX
pyspy/models.py
1
1199
# -*- coding: utf-8 -*- from __future__ import unicode_literals """ Camera Surveillance tool for Raspberry Pi with Camera module Project in ICT M152. Copyright (C) 2015 Kim D. Jeker This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published ...
gpl-3.0
6,659,538,990,149,907,000
36.46875
112
0.758132
false
woobe/h2o
py/testdir_single_jvm/test_summary2_percentile2.py
1
5756
import unittest, time, sys, random, math, getpass sys.path.extend(['.','..','py']) import h2o, h2o_cmd, h2o_hosts, h2o_import as h2i import h2o_summ DO_MEDIAN = True def write_syn_dataset(csvPathname, rowCount, colCount, expectedMin, expectedMax, SEED): r1 = random.Random(SEED) dsf = open(csvPathname, "w+") ...
apache-2.0
942,799,294,077,880,000
36.135484
124
0.518763
false
BrianHicks/emit
emit/router/rq.py
1
1434
from __future__ import absolute_import from rq import Queue from rq.decorators import job from .core import Router class RQRouter(Router): 'Router specifically for RQ routing' def __init__(self, redis_connection, *args, **kwargs): '''\ Specific routing when using RQ :param redis_conn...
mit
-5,814,888,620,309,620,000
34.85
79
0.609484
false
jitter77/practice
choose_CoM.py
1
4754
#!/usr/bin/env python2.7 #_*_ coding: utf-8 _*_ __version__ = '0.1' """ This file contains all available modules and the depending bootloader. Also the available filesystems (rootfs), especially for linux to be flashed. Currently implemented Modules: TX25, TX28, TX28S, TX48, TX53, TX6U, TX6Q, CompactTFT (all KaRo)...
gpl-2.0
7,994,087,551,314,057,000
40.347826
115
0.633572
false
agharibi/linchpin
linchpin/provision/InventoryFilters/GenericInventory.py
1
2122
#!/usr/bin/env python import StringIO from camel import Camel from InventoryFilter import InventoryFilter from InventoryProviders import get_all_drivers class GenericInventory(InventoryFilter): def __init__(self): InventoryFilter.__init__(self) self.filter_classes = get_all_drivers() def g...
gpl-3.0
4,296,843,620,019,809,000
33.225806
78
0.609331
false
gwu-libraries/vivo2notld
vivo2notld/definitions/__init__.py
1
1115
from .document_summary import definition as document_summary_definition from .organization_summary import definition as organization_summary_definition from .person_definition import definition as person_definition from .person_summary_definition import definition as person_summary_definition from .person_summary_defin...
mit
-8,812,346,855,011,742,000
52.095238
103
0.808969
false
CGenie/solar
solar/solar/orchestration/graph.py
1
3033
import json import uuid import networkx as nx import redis from solar import utils from .traversal import states r = redis.StrictRedis(host='10.0.0.2', port=6379, db=1) def save_graph(name, graph): # maybe it is possible to store part of information in AsyncResult backend r.set('{}:nodes'.format(name), ...
apache-2.0
-4,254,927,419,307,855,400
23.658537
79
0.581932
false
alvarovmz/PyLinkedIn
codegen/templates/LinkedInObject.py
1
1515
# Copyright 2012 Alvaro Vila # alvarovmz@gmail.com ########## # This file is part of PyLinkedIn. ########## # PyLinkedIn 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, ...
gpl-3.0
-381,119,048,633,685,440
31.234043
142
0.70033
false
seken/nink
pyglet/window/carbon/__init__.py
1
40222
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
gpl-3.0
977,834,912,983,223,200
36.945283
97
0.599846
false
monokal/GAZE
gaze/gazelib/core/bootstrap.py
1
3236
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ GAZE Turnkey Open Media Center __ .-. .-"` .`'. /\\| _(\-/)_" , . ,\ /\\\/ =o O= {(=o^O=)} . ./, |/\\\/ `-.(Y).-` , | , |\.-` /~/,_/~~~\,__.-` =O o= ////~ // ~...
gpl-3.0
8,491,496,615,669,577,000
28.688073
79
0.514833
false
makelove/OpenCV-Python-Tutorial
ch38-使用特征匹配和单应性查找对象/findHomography.py
1
3198
# -*- coding: utf-8 -*- # @Time : 2017/7/13 下午5:13 # @Author : play4fun # @File : findHomography.py # @Software: PyCharm """ findHomography.py:联合使用特征提取和 calib3d 模块中的 findHomography 在复杂图像中查找已知对象 """ import numpy as np import cv2 from matplotlib import pyplot as plt MIN_MATCH_COUNT = 10 img1 = cv2.imread('../da...
mit
5,273,761,605,515,775,000
34.589041
135
0.666282
false
miguelinux/vbox
src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Xml/ModuleSurfaceAreaXml.py
1
37012
## @file # This file is used to parse a Module file of .PKG file # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # distribution. The full ...
gpl-2.0
-4,743,107,407,899,620,000
35.681863
120
0.607317
false
whoback/googpython
basic/string1.py
1
3644
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Basic string exercises # Fill in the code for the functions below. main() is already se...
apache-2.0
5,167,168,185,837,401,000
28.868852
78
0.663831
false
EiNSTeiN-/deluge-gtk3
deluge/core/rpcserver.py
1
18619
# # rpcserver.py # # Copyright (C) 2008,2009 Andrew Resch <andrewresch@gmail.com> # # Deluge is free software. # # You may 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 late...
gpl-3.0
4,345,317,697,061,277,700
34.532443
126
0.600623
false
artus40/maraudes_project
website/tests.py
1
1324
from django.test import TestCase, Client from utilisateurs.models import Maraudeur # Create your tests here. class RestrictedAccessAnonymousUserTestCase(TestCase): modules = ["maraudes", "notes", "utilisateurs"] def setUp(self): self.client = Client() def test_access_restricted_modules(self): ...
gpl-3.0
-1,491,895,242,576,531,000
29.068182
81
0.632653
false
bigswitch/nova
nova/tests/unit/scheduler/test_filter_scheduler.py
1
13816
# Copyright 2011 OpenStack Foundation # 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 requ...
apache-2.0
-8,932,909,917,861,188,000
40.365269
79
0.579401
false
jonge-democraten/dyonisos
subscribe/views.py
1
9340
import datetime import logging import Mollie from django.conf import settings from django.contrib.auth.decorators import login_required from django.template.context_processors import csrf from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts impor...
mit
3,150,483,725,742,663,000
41.844037
311
0.673555
false
Vallher/zulip
zilencer/views.py
1
4990
from __future__ import absolute_import from django.utils.translation import ugettext as _ from django.http import HttpResponse, HttpRequest from django.views.decorators.csrf import csrf_exempt from django.contrib.auth.views import login as django_login_page from django.http import HttpResponseRedirect from zilencer.m...
apache-2.0
604,761,024,584,877,700
36.238806
115
0.677154
false
windskyer/nova
nova/network/api.py
1
23187
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
gpl-2.0
5,222,163,939,739,262,000
41.005435
79
0.608703
false
ahlusar1989/geocoder
setup.py
1
2493
#!/usr/bin/python # coding: utf8 import os from codecs import open import re try: from setuptools import setup except ImportError: from distutils.core import setup def find_version(*file_paths): # Open in Latin-1 so that we avoid encoding errors. # Use codecs.open for Python 2 compatibility here ...
mit
1,628,420,099,275,741,200
33.150685
76
0.624148
false
Yipit/envelop
tests/functional/test_envelop.py
1
3053
# -*- coding: utf-8 -*- # envelop - Environment variables manager # # Copyright (c) 2013 Yipit, Inc <coders@yipit.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 ...
lgpl-3.0
-2,870,870,984,269,270,500
37.1625
77
0.687193
false
wagnerluis1982/speakerfight
core/forms.py
1
2172
# from django.contrib.auth.models import User from django.utils.translation import ugettext as _ from django.contrib.auth.models import User from django.core.exceptions import ValidationError from django import forms from core.models import Profile class ProfileForm(forms.ModelForm): username = forms.CharField(...
mit
2,638,071,516,526,770,000
33.47619
77
0.624309
false
smart-solution/odoo-manufacturing-70
mrp_production_order_report_purchase_info/__openerp__.py
1
1577
# -*- coding: utf-8 -*- ############################################################################## # # Smart Solution bvba # Copyright (C) 2010-Today Smart Solution BVBA (<http://www.smartsolution.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
-6,566,190,760,300,360,000
39.435897
82
0.60241
false
MiroK/INF5650
Lecture-5/cea_supg.py
1
3165
""" Consider to convection diffusion problem -alpha*u`` - u` = f in (0, 1) u = g on \partial(0, 1) 1) f = alpha*pi**2*sin(pi*x) - pi*cos(pi*x), u(0) = u(1) = 0 2) f = 0, u(0) = 0, u(1) = 1 Use supg stabilization and in both cases estimate the constant from Cea's lemma. """ # FIXME add problem 2 # FIXME add supg n...
gpl-3.0
-5,288,071,937,445,712,000
23.160305
79
0.552291
false
nttcom/eclcli
eclcli/orchestration/heatclient/shell.py
1
30756
# 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 # d...
apache-2.0
1,969,773,989,123,590,700
41.955307
79
0.492749
false
jumpmanjay/PyHDHR
PyHDHR.py
1
38860
import time import string from datetime import datetime import urllib2 import json import os from decimal import Decimal import operator import re try: Log except NameError: class Logger: def __init__(self): return def Debug(self, s): print(s) def Info(se...
mit
5,337,613,110,872,147,000
33.60374
144
0.542177
false
quokkaproject/quokka-fundraising
views.py
1
5776
# coding: utf-8 from flask import request, redirect, url_for, current_app from flask.views import MethodView from quokka.utils import get_current_user from quokka.modules.cart.models import Cart, Item from quokka.core.templates import render_template from quokka.core.models.channel import Channel from .models import D...
mit
-2,101,742,650,899,588,900
33.795181
78
0.526835
false
yugangw-msft/azure-cli
src/azure-cli/azure/cli/command_modules/monitor/tests/latest/test_monitor_autoscale.py
2
24374
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
198,693,106,789,416,320
57.033333
223
0.601748
false
syseleven/vim-config
.vim/bundle/jedi-vim/jedi/jedi/evaluate/precedence.py
2
8081
""" Handles operator precedence. """ from jedi._compatibility import unicode from jedi.parser import representation as pr from jedi import debug from jedi.common import PushBackIterator from jedi.evaluate.compiled import CompiledObject, create, builtin class PythonGrammar(object): """ Some kind of mirror of ...
apache-2.0
3,771,404,311,949,246,000
31.716599
92
0.570721
false
lgarren/spack
var/spack/repos/builtin/packages/r-limma/package.py
1
1754
############################################################################## # 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
6,144,001,010,521,606,000
43.974359
124
0.67959
false
rstens/gwells
gwells/models/WellStatusCode.py
1
1252
""" 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 distri...
apache-2.0
-6,481,166,179,080,037,000
35.823529
87
0.703674
false
sghai/robottelo
tests/foreman/cli/test_repository_set.py
1
12698
"""Tests for cli repository set :Requirement: Repository Set :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: CLI :TestType: Functional :CaseImportance: High :Upstream: No """ from robottelo.cli.factory import make_org from robottelo.cli.product import Product from robottelo.cli.repository_set i...
gpl-3.0
3,896,546,145,935,715,300
30.046455
75
0.52969
false
stickypants/asset_manager
pygal/test/test_stacked.py
1
2129
# -*- coding: utf-8 -*- # This file is part of pygal # # A python svg graph plotting library # Copyright © 2012-2016 Kozea # # 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...
gpl-3.0
-4,399,197,424,031,799,300
33.322581
79
0.638158
false
TheLazyBastard/InXource
main.py
1
3432
import PySide from API import P18F4550 from UI.Main import Ui_MainWindow from UI.FrmAgregarEvento import Ui_FrmAgregarEvento from PySide.QtGui import * from PySide.QtCore import * from Commons import Db import sys import os ROOT_DIR = os.path.abspath(sys.path[0]) CONF_DIR = os.path.join(ROOT_DIR,"Commons") class FrmAg...
gpl-3.0
5,873,281,448,068,205,000
36.714286
109
0.652098
false