repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
grapesmoker/regulations-parser
tests/tree_utils_tests.py
3
4264
# vim: set encoding=utf-8 import unittest from lxml import etree from regparser.tree.struct import Node from regparser.tree.xml_parser import tree_utils class TreeUtilsTest(unittest.TestCase): def test_split_text(self): text = "(A) Apples (B) Bananas (Z) Zebras" tokens = ['(A)', '(B)'] ...
cc0-1.0
-4,419,260,421,148,290,000
36.026087
79
0.575388
false
dennisss/sympy
sympy/matrices/sparse.py
4
43652
from __future__ import print_function, division import copy from collections import defaultdict from sympy.core.containers import Dict from sympy.core.compatibility import is_sequence, as_int from sympy.core.singleton import S from sympy.functions.elementary.miscellaneous import sqrt from sympy.utilities.iterables im...
bsd-3-clause
-4,068,299,058,737,986,000
27.363873
112
0.439613
false
aarmea/McMillen12Step-bitwig
client/sockutil.py
1
5038
"""Various low-level utility functions for sockets. Modified from https://github.com/markokr/skytools/blob/018d85b644f24cadef344e562aded22fee14d036/python/skytools/sockutil.py Original license ================ SkyTools - tool collection for PostgreSQL Copyright (c) 2007 Marko Kreen, Skype Technologies Permission t...
mit
-6,819,269,375,270,745,000
28.988095
123
0.64867
false
benjaoming/kolibri
kolibri/auth/test/test_permissions_classes.py
3
5747
from __future__ import absolute_import, print_function, unicode_literals from django.test import TestCase from mock import Mock from .helpers import create_superuser from ..models import FacilityUser, Facility, KolibriAnonymousUser from ..api import KolibriAuthPermissions from ..permissions.base import BasePermissio...
mit
-4,047,654,272,939,319,300
44.611111
113
0.708544
false
mehdidc/scikit-learn
sklearn/linear_model/tests/test_least_angle.py
11
16102
from nose.tools import assert_equal import numpy as np from scipy import linalg from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_less from sklearn.utils.testing import assert_greater from sklearn.utils.testing import ass...
bsd-3-clause
2,529,933,273,364,877,300
33.928416
79
0.589616
false
harshilasu/GraphicMelon
y/google-cloud-sdk/.install/.backup/lib/apiclient/discovery.py
5
37418
# Copyright 2014 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 ...
gpl-3.0
-8,657,726,699,740,054,000
36.60603
84
0.669704
false
drakeloud/louderdev
louderdev/core/views.py
1
5391
import os from django.conf import settings as django_settings from django.contrib import messages from django.contrib.auth import update_session_auth_hash from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.paginator import EmptyPage, PageNotAnInteger,...
mit
-7,148,828,891,179,885,000
31.871951
76
0.621035
false
cloudera/Impala
tests/benchmark/plugins/__init__.py
3
1407
# 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 ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-3,696,564,679,421,713,400
34.175
70
0.711443
false
anomitra/articleScraper
PyQt-gpl-5.4.1/examples/animation/moveblocks.py
2
8146
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
-7,652,856,938,194,048,000
33.961373
80
0.677019
false
jskye/car-classifier-research
src/image.proc.tools/py/labelroi.py
1
4177
# USAGE # python click_and_crop.py --image jurassic_park_kitchen.jpg # import the necessary packages import argparse import cv2 import glob # from gi.repository import Gtk # initialize the list of reference points and boolean indicating # whether cropping is being performed or not refPt = [] cropping = False outputi...
mit
-3,855,644,297,113,608,000
30.406015
75
0.67321
false
tensorflow/model-optimization
tensorflow_model_optimization/python/core/sparsity/keras/prune.py
1
9714
# Copyright 2019 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
-797,842,022,771,012,500
35.795455
102
0.693226
false
angdraug/nova
nova/tests/virt/hyperv/test_utilsfactory.py
12
2094
# Copyright 2014 Cloudbase Solutions SRL # 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 r...
apache-2.0
-8,863,784,196,907,203,000
35.736842
78
0.689112
false
chielk/dndmake
dndraces/elf.py
1
2365
from dndraces import Race import random class Elf(Race): NAME = "elf" LAWFULNESS = (-3, 2) # mu, sigma GOODNESS = (2, 2) # mu, sigma HAIR = {"black": 20, "brown": 35, "blond": 15, "ginger": 8, "green": 1, "blue": 1, "white": 1,...
gpl-3.0
-3,738,826,518,536,718,300
25.863636
69
0.388325
false
kdeloach/nyc-trees
src/nyc_trees/nyc_trees/settings/production.py
3
3371
"""Production settings and globals.""" from os import environ from dns import resolver, exception from boto.utils import get_instance_metadata from base import * # NOQA # Normally you should not import ANYTHING from Django directly # into your settings, but ImproperlyConfigured is an exception. from django.core.ex...
agpl-3.0
-5,422,635,833,353,874,000
32.04902
103
0.735983
false
stefan-caraiman/python-lab
python/solutii/vlad_cristia_avram/caesar/caesar.py
5
1200
"""Rezolvare problema caesar""" from __future__ import print_function def gaseste_cheia(mesaj): """Aflam cheia mesajului""" prima_litera = mesaj[0] cheie = (ord('z') + 1 - ord(prima_litera)) % 26 return cheie def afiseaza_mesajul(mesaj, cheie): """Functie de afisare mesaj""" for litera in m...
mit
6,510,986,399,228,709,000
22.529412
63
0.544167
false
switowski/cds-demosite
cds/base/recordext/functions/sync_corparate_names.py
12
1885
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014 CERN. ## ## Invenio 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) a...
gpl-2.0
-7,320,243,428,681,449,000
43.880952
93
0.605305
false
yaqiyang/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/StorageManagementClient/storagemanagementclient/models/storage_account.py
4
6450
# 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
-2,966,732,839,862,981,000
51.439024
305
0.686512
false
minimail/minimail
template_management/views.py
1
3220
from django.http.response import HttpResponse from django.views.generic import ListView, DetailView, CreateView, UpdateView,\ DeleteView from django.urls import reverse_lazy from django.contrib.auth.decorators import login_required from django.contrib import messages from django.contrib...
mit
1,908,705,646,142,656,000
31.525253
79
0.68882
false
whausen/part
src/adhocracy/model/tagging.py
6
2477
from datetime import datetime import logging from sqlalchemy import Table, Column, Integer, ForeignKey, DateTime import meta log = logging.getLogger(__name__) tagging_table = Table( 'tagging', meta.data, Column('id', Integer, primary_key=True), Column('create_time', DateTime, default=datetime.utcnow),...
agpl-3.0
-8,086,492,964,784,305,000
31.168831
76
0.595882
false
christianbecke/rhythmbox-multiple-libraries
plugins/im-status/im-status/__init__.py
2
10273
# coding: utf-8 # vim: set et sw=2: # # Copyright (C) 2007-2008 - Vincent Untz # # 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, or (at your option) # any later version. # # T...
gpl-2.0
-6,244,222,777,913,569,000
33.40604
102
0.662538
false
eshijia/magnum
magnum/common/pythonk8sclient/swagger_client/models/v1_secret_list.py
5
5135
# 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
-1,367,728,650,382,144,300
28.511494
126
0.576047
false
manahl/arctic
arctic/scripts/arctic_prune_versions.py
1
2253
from __future__ import print_function import logging import optparse import pymongo from .utils import do_db_auth, setup_logging from ..arctic import Arctic, ArcticLibraryBinding from ..hooks import get_mongodb_uri logger = logging.getLogger(__name__) def prune_versions(lib, symbols, keep_mins): logger.info("...
lgpl-2.1
2,199,328,562,808,808,400
33.136364
116
0.676875
false
bitmonk/fabric
fabric/io.py
25
9677
from __future__ import with_statement import sys import time import re import socket from select import select from fabric.state import env, output, win32 from fabric.auth import get_password, set_password import fabric.network from fabric.network import ssh, normalize from fabric.utils import RingBuffer from fabric....
bsd-2-clause
-2,421,830,554,437,730,300
38.823045
91
0.530226
false
umitproject/openmonitor-aggregator
build/django-debug-toolbar/debug_toolbar/panels/template.py
12
5970
from os.path import normpath from pprint import pformat from django import http from django.conf import settings from django.template.context import get_standard_processors from django.test.signals import template_rendered from django.utils.translation import ugettext_lazy as _ from django.db.models.query import Query...
agpl-3.0
7,098,565,449,596,766,000
40.748252
98
0.587437
false
mikofski/Carousel
carousel/tests/test_data.py
2
5322
""" Test data sources """ from nose.tools import ok_, eq_ from carousel.tests import logging from carousel.core import UREG from carousel.core.data_sources import DataSource, DataParameter from carousel.core.data_readers import XLRDReader from carousel.tests import PROJ_PATH, TESTS_DIR import os LOGGER = logging.getL...
bsd-3-clause
-690,172,727,919,426,300
28.403315
79
0.537204
false
smishenk/blink-crosswalk
Tools/Scripts/webkitpy/common/checkout/scm/git.py
27
14958
# Copyright (c) 2009, 2010, 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must reta...
bsd-3-clause
8,745,298,033,427,037,000
45.74375
169
0.641195
false
yavalvas/yav_com
build/matplotlib/doc/mpl_examples/user_interfaces/embedding_in_gtk2.py
9
1452
#!/usr/bin/env python """ show how to add a matplotlib FigureCanvasGTK or FigureCanvasGTKAgg widget and a toolbar to a gtk.Window """ import gtk from matplotlib.figure import Figure from numpy import arange, sin, pi # uncomment to select /GTK/GTKAgg/GTKCairo #from matplotlib.backends.backend_gtk import FigureCanvasGT...
mit
1,903,161,130,819,998,200
26.923077
92
0.77686
false
JohnCremona/CremonaPacetti
code/KSp.py
1
18244
# KSp.py: code to compute p-Selmer groups of number fields ####################################################################### # # Copyright 2018 John Cremona # # This 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 ...
gpl-3.0
7,234,085,552,036,957,000
31.404973
124
0.585727
false
guorendong/iridium-browser-ubuntu
native_client/pnacl/driver/pathtools.py
8
3069
#!/usr/bin/python # Copyright (c) 2012 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pathtools is meant to be a drop-in replacement for "os.path" # # All pathnames passed into the driver are "normalized" to # a po...
bsd-3-clause
8,624,855,698,261,831,000
28.228571
72
0.70088
false
shoelzer/buildbot
master/buildbot/test/fake/fakebuild.py
6
3000
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
8,668,132,655,584,157,000
26.272727
79
0.687333
false
goldcoin/Goldcoin-GLD
qa/rpc-tests/txn_doublespend.py
2
6932
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test proper accounting with a double-spend conflict # from test_framework.test_framework import Bitc...
mit
-1,700,670,968,282,653,400
44.605263
112
0.586555
false
Lemma1/MAC-POSTS
doc_builder/sphinx-contrib/traclinks/sphinxcontrib/traclinks.py
2
1062
''' Sphinx/docutils extension to create links to a Trac site using a RestructuredText interpreted text role that looks like this: :trac:`trac_link_text` for example: :trac:`#2015` creates a link to ticket number 2015. adapted from recipe here: http://stackoverflow.com/questions/2096401/sph...
mit
2,804,587,890,816,942,000
26.756757
110
0.640301
false
petewarden/tensorflow
tensorflow/python/keras/saving/saved_model/serialized_attributes.py
1
13351
# Copyright 2018 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
5,526,067,801,508,030,000
41.519108
80
0.713729
false
iulian787/spack
var/spack/repos/builtin/packages/kassiopeia/package.py
2
2937
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Kassiopeia(CMakePackage): """Simulation of electric and magnetic fields and particle track...
lgpl-2.1
4,810,716,133,183,114,000
42.835821
95
0.684372
false
midroid/mediadrop
mediadrop/lib/filetypes.py
10
5359
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2015 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
gpl-3.0
6,381,285,242,181,021,000
29.976879
79
0.641724
false
brayden2544/Mystuff-final
manage/models.py
2
6310
from django.db import models from account.models import User from django.conf import settings from django.utils import timezone from account import models as amod class Store(models.Model): active = models.BooleanField(default=True) store_number = models.IntegerField(default=0, blank=True, null=True) ...
apache-2.0
-1,022,488,772,565,956,200
43.125874
98
0.712995
false
migue/voltdb
tools/toolrunner.py
2
19296
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # This file contains original code and/or modifications of original code. # Any modifications made by VoltDB Inc. are licensed under the following # terms and conditions: # # Permission is hereby granted, free of charge, to any person obtaining # a...
agpl-3.0
-6,562,185,719,734,969,000
33.767568
112
0.599502
false
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/models/__init__.py
1
35488
# 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
-8,375,254,461,826,944,000
46.698925
102
0.764766
false
niboshi/chainer
tests/chainermn_tests/optimizer_tests/test_multi_node_optimizer.py
2
9956
import chainer from chainer.backends.cuda import cupy import chainer.testing import chainer.testing.attr import chainermn import mock import numpy as np import unittest class ExampleModel(chainer.Chain): def __init__(self): super(ExampleModel, self).__init__() with self.init_scope(): s...
mit
-7,424,995,401,902,875,000
42.666667
77
0.599237
false
petr-tichy/thefuck
tests/rules/test_django_south_merge.py
20
2113
import pytest from thefuck.rules.django_south_merge import match, get_new_command from tests.utils import Command @pytest.fixture def stderr(): return '''Running migrations for app: ! Migration app:0003_auto... should not have been applied before app:0002_auto__add_field_query_due_date_ but was. Traceback (most ...
mit
542,531,086,048,707,000
48.139535
115
0.710364
false
pinterb/st2contrib
packs/libcloud/actions/create_vm.py
8
1847
from libcloud.compute.base import NodeSize from libcloud.compute.base import NodeImage from libcloud.compute.base import NodeLocation from lib.actions import BaseAction __all__ = [ 'CreateVMAction' ] class CreateVMAction(BaseAction): api_type = 'compute' def run(self, credentials, name, size_id=None, i...
apache-2.0
-752,134,328,594,870,000
35.215686
98
0.592312
false
ismail-s/fireblog
fireblog/settings/mapping.py
1
3714
from collections import namedtuple from . import validators Entry = namedtuple('Entry', [ 'registry_name', # Registry name 'display_name', # Display name 'description', # Description 'type', # eg int, str... A func that returns an obj of the right type. # Validator is a function that takes a va...
gpl-2.0
6,351,171,381,094,050,000
38.510638
79
0.623586
false
chappers/script2package
example/script2package/script2package/__init__.py
5
3175
#!/usr/bin/env python """script2package: turn a python script into a python package""" import argparse import os.path from script2package import * def generate_skeleton(script=None, base="package"): """Generates a package skeleton within current working directory. :param script: file path to the script of i...
mit
-6,684,506,078,431,677,000
32.421053
82
0.64063
false
dfroger/dfndarray
test/test_array1d.py
1
3580
import unittest from dfndarray import DoubleArray1D, Array1DComputeTestValue class TestArray1DBase: """Tests to pass whatever Array1D allocation method is""" def test_str(self): expected_re = "<Array1D of shape \(4\) at 0x\w*>" s = '%s' % self.a self.assertRegexpMatches(s, expected_re)...
gpl-3.0
2,419,825,719,442,931,000
28.105691
76
0.607821
false
thylong/exitmap
src/util.py
1
5849
# Copyright 2013-2015 Philipp Winter <phw@nymity.ch> # # This file is part of exitmap. # # exitmap 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,049,871,103,180,259,000
27.256039
79
0.637716
false
wbond/asn1crypto
tests/setup.py
1
4750
import codecs import os import shutil import sys import warnings import setuptools from setuptools import setup, Command from setuptools.command.egg_info import egg_info PACKAGE_NAME = 'asn1crypto' PACKAGE_VERSION = '1.4.0' TEST_PACKAGE_NAME = '%s_tests' % PACKAGE_NAME TESTS_ROOT = os.path.dirname(os.path.abspath(__...
mit
5,509,437,058,154,964,000
29.448718
77
0.613053
false
undoware/neutron-drive
google_appengine/google/appengine/api/files/file_service_pb.py
12
146256
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
bsd-3-clause
3,129,811,020,666,528,000
26.029385
777
0.638449
false
hackersql/sq1map
Web/xpath_injection/Xpath/Xtract/_Error.py
1
81246
#!/usr/bin/python ####################################################### # Xpath tool v2.0 - Automated Xpath Sql Injection # # Author: Nasir khan (r0ot h3x49) # ####################################################### import os, re from Payload.ErrorPayloads import * from _compat import ( ...
gpl-3.0
6,825,923,647,074,689,000
42.634264
187
0.599463
false
gsauthof/utility
test/pargs.py
1
15714
#!/usr/bin/env python3 # # pargs unittests # # 2017, Georg Sauthoff <mail@gms.tf> # # SPDX-License-Identifier: GPL-3.0-or-later import glob import os import pytest import re import shutil import subprocess import tempfile src_dir = os.getenv('src_dir', os.getcwd()+'/..') test_dir = src_dir + '/test/in' pargs = os...
gpl-3.0
3,478,138,980,019,795,000
32.292373
86
0.640003
false
stackforge/poppy
tests/unit/provider/akamai/test_mod_san_queue.py
2
5168
# Copyright (c) 2015 Rackspace, 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
-7,805,028,341,830,593,000
36.179856
78
0.601974
false
hamishmb/wxfixboot
Tests/Tools/DialogToolsTests.py
1
3102
#!/usr/bin/env python # -*- coding: utf-8 -*- # DialogTools tests for WxFixBoot Version 2.0.3 # This file is part of WxFixBoot. # Copyright (C) 2013-2018 Hamish McIntyre-Bhatty # WxFixBoot is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3 or, # at ...
gpl-3.0
2,059,863,111,196,046,300
39.815789
212
0.706641
false
drammock/mne-python
examples/simulation/simulate_evoked_data.py
6
2810
""" ============================== Generate simulated evoked data ============================== Use :func:`~mne.simulation.simulate_sparse_stc` to simulate evoked data. """ # Author: Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # # License: BSD (3-clau...
bsd-3-clause
-2,156,848,165,290,073,300
35.025641
79
0.588256
false
loco-odoo/localizacion_co
openerp/addons-extra/l10n_co_account/__openerp__.py
3
1860
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2015 I.A.S. INGENIERÍA, APLICACIONES Y SOFTWARE Johan Alejandro Olano (<http:http://www.ias.com.co). # # This program is free software: you can r...
agpl-3.0
-7,525,978,906,629,870,000
34.018868
119
0.596983
false
intelie/django-yajf
yajf/encoder.py
1
2669
# -*- coding: utf-8 -*- import json from django.utils.functional import Promise from django.db.models.query import QuerySet from django.utils.encoding import force_text from django.utils import six, timezone import datetime from datetime import timedelta import decimal import uuid class FakeFloat(float): """ ...
gpl-3.0
-1,537,054,328,288,086,800
35.067568
112
0.61671
false
nameoftherose/python-zeroconf
examples/self_test.py
8
1605
#!/usr/bin/env python from __future__ import absolute_import, division, print_function, unicode_literals import logging import socket import sys from zeroconf import __version__, ServiceInfo, Zeroconf if __name__ == '__main__': logging.basicConfig(level=logging.DEBUG) if len(sys.argv) > 1: assert sys...
lgpl-2.1
6,033,828,405,536,089,000
39.125
87
0.619315
false
rcrowder/nupic
examples/opf/experiments/multistep/hotgym_best_sp_5step/description.py
10
3246
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
-1,626,276,287,187,717,600
58.018182
107
0.401725
false
kbase/trees
service/glassfish_administer_service.py
3
12951
#!/usr/bin/env python ''' Created on Dec 6, 2013 @author: gaprice@lbl.gov ''' from __future__ import print_function from argparse import ArgumentParser import subprocess import os import xml.etree.ElementTree as ET import urllib2 from subprocess import CalledProcessError import sys _PARALLEL_GC = "-XX:-UseParallelGC"...
mit
-5,904,721,624,878,219,000
41.048701
92
0.54436
false
yangdw/repo.python
src/project/web-crawler/douban_WebCrawler.py
2
2988
#!/usr/bin/env python # -*- coding:utf-8 -*- import os import re import time import random import urllib,urllib2 def download_picture( pictrue_url , title ): ''' ''' path = r'E:\douban'+os.sep+title+os.sep if not os.path.exists(path): os.makedirs(path) file_path = path+pictrue_url.split('/')[-...
mit
547,430,320,940,881,860
29.842105
135
0.55529
false
caasiu/xbmc-addons-chinese
plugin.video.cntv-live/epgservice.py
8
6351
# -*- coding: utf-8 -*- import xbmc import xbmcaddon import datetime import re import shutil import traceback import urllib2 addon = xbmcaddon.Addon(id="plugin.video.cntv-live") addon_path = xbmc.translatePath(addon.getAddonInfo("path")) def updateChannel(fHandle, channelID, channelName): try: print("Updating ch...
gpl-2.0
-3,637,042,978,797,846,500
37.432258
143
0.679872
false
recipy/recipy
setup.py
1
3177
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) setup( name='recipy', # Versions should comply with PEP440. For a discussion on single-sourcing # t...
apache-2.0
-1,122,147,261,581,804,700
34.696629
79
0.626062
false
sunspec/pysunspec
setup.py
1
1300
#!/usr/bin/env python """ Copyright (c) 2018, SunSpec Alliance All Rights Reserved """ from distutils.core import setup setup(name = 'pysunspec', version = '2.1.1', description = 'Python SunSpec Tools', author = 'Bob Fox', author_email = 'bob@sunspec.org', classifiers = [ ...
mit
-7,677,205,293,987,355,000
37.235294
115
0.546923
false
adaptive-learning/proso-apps
proso/django/request.py
1
3326
from threading import currentThread import datetime import json as simplejson import re import urllib.parse def load_query_json(query_dict, key, default_json=None): value = query_dict.get(key, default_json) try: return simplejson.loads(value) except ValueError: return simplejson.loads(urll...
mit
-7,258,798,370,872,251,000
25.608
83
0.546001
false
facebookexperimental/eden
eden/scm/edenscm/mercurial/crecord.py
1
67542
# Portions Copyright (c) Facebook, Inc. and its affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # stuff related specifically to patch manipulation / parsing # # Copyright 2008 Mark Edgington <edgimar@gmail.com> # # This software may be use...
gpl-2.0
1,711,821,608,135,230,500
35.707609
89
0.588271
false
MMKrell/pyspace
pySPACE/missions/nodes/regression/scikit_decorators.py
2
2653
""" Scikit decorators for optimizing hyperparameters """ from pySPACE.missions.nodes import DEFAULT_NODE_MAPPING, NODE_MAPPING # noinspection PyUnresolvedReferences from pySPACE.missions.nodes.scikit_nodes import SVRRegressorSklearnNode from pySPACE.missions.nodes.decorators import LogUniformParameter, LogNormalParame...
gpl-3.0
-498,357,951,437,703,100
51.019608
120
0.620053
false
Daniex/horizon
openstack_dashboard/dashboards/admin/flavors/workflows.py
43
12939
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
-4,819,797,779,899,520,000
39.946203
79
0.524152
false
bbockelm/condor-network-accounting
src/condor_utils/condor_log_reader.py
10
24479
#! /usr/bin/env python ##************************************************************** ## ## Copyright (C) 1990-2008, Condor Team, Computer Sciences Department, ## University of Wisconsin-Madison, WI. ## ## Licensed under the Apache License, Version 2.0 (the "License"); you ## may not use this file except in complian...
apache-2.0
8,822,964,728,051,052,000
34.272334
79
0.544753
false
qrkourier/ansible
lib/ansible/modules/net_tools/omapi_host.py
29
11915
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Loic Blot <loic.blot@unix-experience.fr> # Sponsored by Infopro Digital. http://www.infopro-digital.com/ # Sponsored by E.T.A.I. http://www.etai.fr/ # # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ impo...
gpl-3.0
7,198,465,932,404,070,000
36.705696
134
0.579689
false
log2timeline/plaso
plaso/parsers/docker.py
3
12935
# -*- coding: utf-8 -*- """Parser for Docker configuration and log files.""" import codecs import json import os from dfdatetime import semantic_time as dfdatetime_semantic_time from dfdatetime import time_elements as dfdatetime_time_elements from dfvfs.helpers import text_file from plaso.containers import events fr...
apache-2.0
-6,820,813,953,497,394,000
36.063037
80
0.684345
false
lichi6174/django-api-lab
src/blog/urls.py
1
1740
"""blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
mit
4,748,679,259,774,233,000
41.463415
83
0.69023
false
ondra-novak/blink
Source/bindings/scripts/generate_global_constructors.py
15
8212
#!/usr/bin/python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates interface properties on global objects. Concretely these are implemented as "constructor attributes", meaning "attributes w...
bsd-3-clause
6,122,160,803,430,949,000
44.120879
199
0.700073
false
mborho/foafer
rdf/http.py
1
3345
#!/usr/bin/python # -*- coding: utf-8 -*- # # FOAFer # Copyright (C) 2003, 2010, Martin Borho <martin@borho.net> # # 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 version 3 of th...
agpl-3.0
1,553,628,472,759,499,800
37.895349
102
0.553064
false
gigglearrows/anniesbot
alembic/versions/514f4b9bc74_added_columns_for_duel_win_lose_streaks_.py
1
1069
"""Added columns for duel win/lose streaks in the tb_user_duel_stats table Revision ID: 514f4b9bc74 Revises: 1d6dbeb93c9 Create Date: 2015-12-22 00:17:51.509756 """ # revision identifiers, used by Alembic. revision = '514f4b9bc74' down_revision = '1d6dbeb93c9' branch_labels = None depends_on = None from alembic imp...
mit
5,059,715,069,040,605,000
32.40625
102
0.703461
false
stevenmizuno/QGIS
python/plugins/processing/algs/grass7/ext/v_net_flow.py
5
2124
# -*- coding: utf-8 -*- """ *************************************************************************** v_net_flow.py --------------------- Date : December 2015 Copyright : (C) 2015 by Médéric Ribreux Email : medspx at medspx dot fr ************************...
gpl-2.0
4,885,700,446,181,923,000
34.898305
108
0.474032
false
googleapis/python-automl
samples/snippets/get_model_evaluation.py
1
3697
# Copyright 2019 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 agreed to in writing, so...
apache-2.0
-7,284,008,452,598,232,000
41.494253
85
0.711929
false
phracek/rebase-helper
rebasehelper/__init__.py
1
1129
# -*- coding: utf-8 -*- # # This tool helps you to rebase package to the latest version # Copyright (C) 2013-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...
gpl-2.0
5,605,196,220,216,150,000
37.931034
73
0.750221
false
Alwnikrotikz/paimei
debuggee_procedure_call.py
1
11874
#!c:\python\python.exe # # PyDbg Debuggee Procedure Call Hack # Copyright (C) 2006 Pedram Amini <pedram.amini@gmail.com> # # $Id$ # # 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...
gpl-2.0
-7,953,247,128,727,441,000
33.450746
120
0.564679
false
darrenbilby/grr
lib/data_stores/mysql_advanced_data_store_test.py
4
1560
#!/usr/bin/env python """Tests the mysql data store.""" import unittest import logging from grr.lib import access_control from grr.lib import data_store from grr.lib import data_store_test from grr.lib import flags from grr.lib import test_lib from grr.lib.data_stores import mysql_advanced_data_store class MysqlAd...
apache-2.0
-1,940,198,993,024,092,400
29.588235
80
0.685256
false
ddzialak/boto
boto/s3/connection.py
1
26258
# Copyright (c) 2006-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation file...
mit
-8,775,643,437,793,005,000
38.426426
111
0.59757
false
beiko-lab/gengis
bin/Lib/site-packages/win32/Demos/getfilever.py
4
1087
import os, win32api ver_strings=('Comments','InternalName','ProductName', 'CompanyName','LegalCopyright','ProductVersion', 'FileDescription','LegalTrademarks','PrivateBuild', 'FileVersion','OriginalFilename','SpecialBuild') fname = os.environ["comspec"] d=win32api.GetFileVersionInfo(fname, '\\') ...
gpl-3.0
-2,031,292,292,911,051,800
49.761905
126
0.720331
false
johngian/remo
docs/conf.py
8
7229
# -*- coding: utf-8 -*- # # playdoh documentation build configuration file, created by # sphinx-quickstart on Tue Jan 4 15:11:09 2011. # # 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...
bsd-3-clause
-2,281,941,958,961,641,500
31.859091
125
0.70895
false
MerryMage/dynarmic
externals/fmt/support/rst2md.py
3
3958
#!/usr/bin/env python # reStructuredText (RST) to GitHub-flavored Markdown converter import re, sys from docutils import core, nodes, writers def is_github_ref(node): return re.match('https://github.com/.*/(issues|pull)/.*', node['refuri']) class Translator(nodes.NodeVisitor): def __init__(self, document):...
gpl-2.0
9,083,898,776,519,506,000
23.893082
80
0.561142
false
mnaboka/dcos
packages/dcos-integration-test/extra/test_applications.py
3
9315
import logging import uuid import pytest from test_util.marathon import get_test_app, get_test_app_in_docker, get_test_app_in_ucr log = logging.getLogger(__name__) def test_if_marathon_app_can_be_deployed(dcos_api_session): """Marathon app deployment integration test This test verifies that marathon app c...
apache-2.0
-8,388,294,923,881,702,000
39.324675
112
0.630059
false
nilmini20s/gem5-2016-08-13
src/mem/slicc/ast/TypeAST.py
92
2238
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bsd-3-clause
-6,428,859,622,578,002,000
41.226415
77
0.733691
false
ivoflipse/devide.johannes
extra/soappy-cvp/tests/cardServer.py
5
2999
#!/usr/bin/env python # Copyright (c) 2001 actzero, inc. All rights reserved. import string import sys sys.path.insert (1, '..') from SOAPpy import * ident = '$Id: cardServer.py,v 1.4 2004/02/18 21:22:13 warnes Exp $' # create the list of all cards, and keep strings for each suit __cs = "Clubs" __ds = "Diamonds" ...
bsd-3-clause
8,754,451,022,431,537,000
25.776786
80
0.565188
false
wubr2000/googleads-python-lib
examples/dfp/v201508/forecast_service/get_availability_forecast_for_line_item.py
4
2272
#!/usr/bin/python # # Copyright 2015 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 b...
apache-2.0
3,155,967,955,401,109,500
35.063492
80
0.698063
false
mavjs/ProcAnalyst
procanalyst.py
1
3109
#!/usr/bin/env python import os import sys import web import psutil from convert import HumanReadable from configparse import ParseConfig urls = ( '/', 'Index', '/proc', 'ProcList', '/favicon.ico', 'favicon', ) class favicon(object): """ On base web.py process, the request for f...
gpl-2.0
-4,700,249,065,902,330,000
34.329545
106
0.588614
false
jbzdak/pygenie
pygenie/lib/params/_par_type.py
1
6047
from _operator import itemgetter import collections import enum import re from pygenie import init; from pygenie.init import SAD_LIB from pygenie.lib.errors import GenieDatetimeConversionError init._make_initialized() from pygenie.lib.params._data import par_map, text_lengths, absolute_time_params class ParamType(o...
lgpl-3.0
-6,578,331,627,380,840,000
28.076923
116
0.621134
false
mansonul/events
events/views.py
1
50067
import logging import json from django.contrib.auth.mixins import LoginRequiredMixin from django.http import HttpResponse, QueryDict, HttpResponseRedirect from django.core.urlresolvers import reverse, reverse_lazy from django.views.generic import ( CreateView, DetailView, ListView, UpdateView, Del...
mit
-7,103,525,363,251,056,000
31.91716
83
0.562786
false
haypo/bytecode
bytecode/tests/test_code.py
1
1482
import unittest from bytecode import ConcreteBytecode, Bytecode, ControlFlowGraph from bytecode.tests import get_code class CodeTests(unittest.TestCase): """Check that bytecode.from_code(code).to_code() returns code.""" def check(self, source, function=False): ref_code = get_code(source, function=fu...
mit
2,037,071,801,119,486,500
25
69
0.516194
false
fzimmermann89/pyload
module/plugins/accounts/FreakshareCom.py
1
1490
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class FreakshareCom(Account): __name__ = "FreakshareCom" __type__ = "account" __version__ = "0.18" __status__ = "testing" __description__ = """Freakshare.com account plugin""" __license_...
gpl-3.0
3,207,318,259,331,541,000
27.113208
89
0.518792
false
deanishe/alfred-workflow-dummy
src/workflow/background.py
2
6171
#!/usr/bin/env python # encoding: utf-8 # # Copyright © 2014 deanishe@deanishe.net # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-04-06 # """ Run background tasks """ from __future__ import print_function, unicode_literals import sys import os import subprocess import pickle from workfl...
mit
-6,637,798,976,903,900,000
24.390947
78
0.609076
false
ReganBell/QReview
build/lib/networkx/algorithms/centrality/__init__.py
9
1239
from networkx.algorithms.centrality.betweenness import * from networkx.algorithms.centrality.betweenness_subset import * from networkx.algorithms.centrality.closeness import * from networkx.algorithms.centrality.current_flow_closeness import * from networkx.algorithms.centrality.current_flow_betweenness import * from n...
bsd-3-clause
-3,776,924,352,605,188,000
55.318182
76
0.869249
false
sgordon007/jcvi_062915
formats/sizes.py
1
4608
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os import os.path as op import sys import logging import numpy as np from jcvi.formats.base import LineFile from jcvi.apps.base import OptionParser, ActionDispatcher, need_update, sh, \ get_abs_path, which class Sizes (LineFile): """ Two-colu...
bsd-2-clause
-5,013,986,353,859,409,000
25.331429
77
0.565538
false
DrSleep/tensorflow-deeplab-resnet
kaffe/tensorflow/transformer.py
3
10312
import numpy as np from ..errors import KaffeError, print_stderr from ..graph import GraphBuilder, NodeMapper from ..layers import NodeKind from ..transformers import (DataInjector, DataReshaper, NodeRenamer, ReLUFuser, BatchNormScaleBiasFuser, BatchNormPreprocessor, ParameterNamer) from ....
mit
-476,553,708,143,358,400
35.182456
97
0.589701
false
MinhalSyed/MovieLibrary
LibraryImporter.py
1
4145
'''You need python3 installed on your computer to run this program.''' import re from os import listdir, walk from os.path import isfile, join from tkinter.filedialog import askdirectory, asksaveasfilename #path = "./Movies/" path = askdirectory(title="Please select a movie directory") outputpath = asksaveasfilename(...
mit
2,350,329,632,189,715,000
37.37963
141
0.593245
false
uw-it-aca/canvas-sis-provisioner
sis_provisioner/builders/accounts.py
1
2563
# Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from sis_provisioner.builders import Builder from sis_provisioner.models.account import Curriculum from sis_provisioner.csv.format import AccountCSV from sis_provisioner.dao.account import ( get_all_campuses, get_all_colleges, g...
apache-2.0
-199,273,288,973,789,730
43.964912
79
0.569645
false
admcrae/tensorflow
tensorflow/contrib/losses/__init__.py
23
1205
# Copyright 2015 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
-6,667,677,021,512,173,000
37.870968
80
0.721992
false
Francis-Liu/animated-broccoli
nova/crypto.py
14
14437
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
apache-2.0
-945,007,648,203,035,300
36.017949
79
0.619935
false
eHealthAfrica/onadata
onadata/apps/sms_support/providers/telerivet.py
2
3908
""" Telerivet WebHook gateway Supports Receiving and replying SMS from/to Telerivet Service See: http://telerivet.com/help/api/webhook/receiving """ import json import datetime from django.http import HttpResponse from django.core.urlresolvers import reverse from django.views.decorators.http import require_...
bsd-2-clause
6,995,010,597,197,296,000
36.576923
79
0.577021
false
ebukoz/thrive
erpnext/setup/setup_wizard/operations/sample_data.py
9
4547
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils.make_random import add_random_children import frappe.utils import random, os, json from frappe import _ def make_sampl...
gpl-3.0
4,250,881,906,569,239,600
24.840909
83
0.653398
false