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
stuartsierra/password-store
contrib/importers/kedpm2pass.py
42
1568
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012 Antoine Beaupré <anarcat@orangeseeds.org>. All Rights Reserved. # This file is licensed under the GPLv2+. Please see COPYING for more information. # # To double-check your import worked: # grep Path passwords | sed 's#^Path: ##;s/$/.gpg/' | sort > lis...
gpl-2.0
6,661,278,760,321,560,000
29.134615
106
0.577537
false
vyscond/cocos
cocos/batch.py
3
4429
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2015 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
bsd-3-clause
9,004,397,023,532,956,000
33.874016
82
0.641228
false
delhivery/django
tests/forms_tests/tests/test_forms.py
46
148965
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
bsd-3-clause
7,104,298,423,227,530,000
53.833886
519
0.609213
false
gangadharkadam/sher
erpnext/manufacturing/doctype/bom/test_bom.py
38
1471
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import unittest import frappe test_records = frappe.get_test_records('Bom') class TestBOM(unittest.TestCase): def test_get_items(self): from er...
agpl-3.0
-1,929,751,487,570,526,000
48.033333
98
0.732835
false
OpenTTD-Ladder/ladder-web
ladder/design/management/commands/compile_css.py
1
1028
import os from ..base import CompilerCommand, CSS_PROPERTY, CSS_STATIC_DIR class Command(CompilerCommand): static_dir = CSS_STATIC_DIR module_property = CSS_PROPERTY def queue_file(self, fname, module): return self.test_file_age(fname, ''.join([os.path.splitext(fname)[0], '.css'])) def ...
gpl-2.0
8,837,112,577,709,586,000
31.15625
87
0.561284
false
google/material-design-icons
update/venv/lib/python3.9/site-packages/setuptools/command/install_lib.py
5
5023
import os import sys from itertools import product, starmap import distutils.command.install_lib as orig class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" def initialize_options(self): orig.install_lib.initialize_options(self) self.multiarch ...
apache-2.0
6,992,083,474,491,409,000
33.170068
107
0.589289
false
stwunsch/gnuradio
gr-audio/examples/python/audio_fft.py
68
4596
#!/usr/bin/env python # # Copyright 2004,2005,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your ...
gpl-3.0
-2,957,092,252,860,519,000
32.304348
105
0.618799
false
FEniCS/dolfin
site-packages/dolfin_utils/documentation/extractdocumentation.py
1
7632
# -*- coding: utf-8 -*- """Script to extract documentation from docstrings in *.h files in the DOLFIN source tree.""" # Copyright (C) 2010 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as pub...
lgpl-3.0
-1,260,720,273,082,587,600
33.378378
100
0.539308
false
opennode/nodeconductor-openstack
src/waldur_openstack/openstack_tenant/tests/unittests/test_handlers.py
1
18087
from __future__ import unicode_literals from django.test import TestCase from django.contrib.contenttypes.models import ContentType from waldur_core.core.models import StateMixin from waldur_core.cost_tracking import models as cost_tracking_models from waldur_core.structure import models as structure_models from wald...
mit
4,625,497,592,013,013,000
42.900485
119
0.707856
false
MayankGo/ec2-api
ec2api/config.py
1
2017
# Copyright 2014 # The Cloudscaling Group, 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...
apache-2.0
7,144,816,583,722,957,000
39.34
78
0.631135
false
jaredkoontz/leetcode
Python/design-snake-game.py
3
2231
# Time: O(1) per move # Space: O(s), s is the current length of the snake. from collections import deque class SnakeGame(object): def __init__(self, width,height,food): """ Initialize your data structure here. @param width - screen width @param height - screen height @pa...
mit
-5,936,794,719,119,591,000
34.412698
102
0.50874
false
mikebenfield/scipy
scipy/fftpack/tests/test_import.py
49
1352
"""Test possibility of patching fftpack with pyfftw. No module source outside of scipy.fftpack should contain an import of the form `from scipy.fftpack import ...`, so that a simple replacement of scipy.fftpack by the corresponding fftw interface completely swaps the two FFT implementations. Because this simply inspe...
bsd-3-clause
7,049,412,135,776,211,000
36.555556
79
0.613166
false
watermelo/libcloud
libcloud/test/dns/test_godaddy.py
14
7283
# 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 use ...
apache-2.0
1,445,131,565,873,339,000
39.237569
90
0.636825
false
helinwang/Paddle
paddle/api/test/util.py
20
1752
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
6,792,482,890,558,770,000
28.694915
76
0.667808
false
hmendozap/master-arbeit-projects
autosk_dev_test/component/RegDeepNet.py
1
19049
import numpy as np import scipy.sparse as sp from HPOlibConfigSpace.configuration_space import ConfigurationSpace from HPOlibConfigSpace.conditions import EqualsCondition, InCondition from HPOlibConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter...
mit
-3,206,617,817,468,268,500
50.763587
102
0.484435
false
RohitDas/cubeproject
lib/django/utils/ipv6.py
26
7971
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. https://github.com/google/ipaddr-py # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
4,517,284,391,431,646,000
28.413284
75
0.585874
false
simplyvikram/google-chartwrapper
templating/djangoproj/views.py
9
1670
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response def example(request): greek_elections = [ { 'type': 'Pie3D', 'title': 'Greek Elections 2009', 'data': [43.92, 33.48, 7.54, 5.63, 4.60, 2.53, 2.3], 'labels': 'ΠΑΣΟΚ|ΝΔ|ΚΚΕ|ΛΑΟΣ|ΣΥΡΙΖΑ|Οικολόγοι Πράσι...
bsd-3-clause
8,264,279,140,925,557,000
37.775
75
0.533204
false
tiagocardosos/stoq
stoqlib/domain/parameter.py
2
2126
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2006-2007 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## 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 Softw...
gpl-2.0
3,888,851,263,437,780,500
32.21875
78
0.697554
false
develru/InformationDevicePy
modules/weatherdata.py
1
4214
""" Copyright (C) 2016 Richard Schwalk 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 ...
gpl-3.0
-1,921,819,125,867,300,000
25.658228
77
0.624881
false
tdubourg/downsizing-game
transactions.py
1
10019
from enum import Enum from utils import i, d Resources = Enum("CASH", "VOTE", "TRUST") class AbstractTransaction(object): """Transaction interface""" last_id = -1 player_1 = None player_2 = None @staticmethod def next_id(): # @TODO thread safety? AbstractTransaction.last_id +=...
lgpl-3.0
-4,558,418,088,270,029,000
38.916335
161
0.628007
false
derekgreene/topic-stability
unsupervised/hungarian.py
5
19460
#!/usr/bin/python """ Implementation of the Hungarian (Munkres) Algorithm using Python and NumPy References: http://www.ams.jhu.edu/~castello/362/Handouts/hungarian.pdf http://weber.ucsd.edu/~vcrawfor/hungar.pdf http://en.wikipedia.org/wiki/Hungarian_algorithm http://www.public.iastate.edu/~ddot...
apache-2.0
-2,089,404,783,177,320,700
39.711297
120
0.593371
false
openai/baselines
baselines/gail/dataset/mujoco_dset.py
1
4448
''' Data structure of the input .npz: the data is save in python dictionary format with keys: 'acs', 'ep_rets', 'rews', 'obs' the values of each item is a list storing the expert trajectory sequentially a transition can be: (data['obs'][t], data['acs'][t], data['obs'][t+1]) and get reward data['rews'][t] ''' from base...
mit
4,034,818,253,619,395,000
38.017544
104
0.590603
false
rhelmer/socorro-lib
socorro/lib/context_tools.py
10
1083
# 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/. import os from contextlib import contextmanager from socorro.lib.util import FakeLogger #----------------------------...
mpl-2.0
-1,485,149,046,700,728,600
35.1
75
0.566944
false
gbbr/superdesk
server/app.py
8
1307
#!/usr/bin/env python # -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/sup...
agpl-3.0
-7,921,608,483,047,963,000
25.14
107
0.65723
false
murali-munna/scikit-learn
sklearn/learning_curve.py
110
13467
"""Utilities to evaluate models with respect to a variable """ # Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de> # # License: BSD 3 clause import warnings import numpy as np from .base import is_classifier, clone from .cross_validation import check_cv from .externals.joblib import Parallel, delayed fro...
bsd-3-clause
-2,920,845,170,559,162,400
41.752381
79
0.639266
false
saisai/phantomjs
src/qt/qtbase/util/local_database/enumdata.py
102
38654
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of the test suite of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License...
bsd-3-clause
-1,086,870,543,704,711,300
49.727034
81
0.294019
false
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/pip/utils/glibc.py
350
2939
from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the retur...
mit
-5,932,181,460,405,319,000
35.283951
78
0.677101
false
shubhangiKishore/pattern
examples/08-server/03-wiki/wiki.py
3
4618
from __future__ import print_function import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.server import App, template, threadsafe from codecs import open # This example demonstrates a simple wiki served by pattern.server. # A wiki is a web app where each page can be e...
bsd-3-clause
-2,578,841,253,475,727,000
34.259542
87
0.657644
false
kornicameister/ansible-modules-extras
network/openvswitch_port.py
12
8270
#!/usr/bin/python #coding: utf-8 -*- # pylint: disable=C0111 # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # Portions copyright @ 2015 VMware, Inc. # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
-8,886,964,949,496,621,000
29.404412
79
0.557678
false
firebitsbr/infernal-twin
build/pillow/build/lib.linux-i686-2.7/PIL/BufrStubImagePlugin.py
77
1504
# # The Python Imaging Library # $Id$ # # BUFR stub adapter # # Copyright (c) 1996-2003 by Fredrik Lundh # # See the README file for information on usage and redistribution. # from PIL import Image, ImageFile _handler = None ## # Install application-specific BUFR image handler. # # @param handler Handler object. d...
gpl-3.0
-6,408,433,156,340,313,000
19.888889
73
0.589761
false
wanderer2/pymc3
pymc3/tests/test_glm.py
1
3145
import numpy as np from .helpers import SeededTest from pymc3 import glm, Model, Uniform, Normal, find_MAP, Slice, sample # Generate data def generate_data(intercept, slope, size=700): x = np.linspace(-1, 1, size) y = intercept + x * slope return x, y class TestGLM(SeededTest): @classmethod def...
apache-2.0
-5,631,591,739,067,999,000
39.320513
93
0.585374
false
bugobliterator/ardupilot-chibios
Tools/ardupilotwaf/px_mkfw.py
18
4864
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
gpl-3.0
-8,231,865,211,962,592,000
38.544715
109
0.700247
false
InakiZabala/odoomrp-wip
purchase_secondary_unit/models/pricelist.py
21
2471
# -*- encoding: utf-8 -*- ############################################################################## # # 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 the...
agpl-3.0
2,091,665,262,968,588,800
39.508197
78
0.609875
false
inspyration/odoo
doc/_themes/odoodoc/sphinx_monkeypatch.py
24
3166
# -*- coding: utf-8 -*- import sphinx.roles import sphinx.environment from sphinx.writers.html import HTMLTranslator from docutils.writers.html4css1 import HTMLTranslator as DocutilsTranslator def patch(): # navify toctree (oh god) @monkey(sphinx.environment.BuildEnvironment) def resolve_toctree(old_resolv...
agpl-3.0
-3,458,771,989,107,372,000
34.177778
79
0.581491
false
vprime/puuuu
env/lib/python2.7/site-packages/django/core/management/base.py
104
15912
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured ...
mit
-5,101,765,490,586,179,000
36.706161
177
0.623492
false
datapythonista/pandas
pandas/tests/util/test_validate_args_and_kwargs.py
8
2391
import pytest from pandas.util._validators import validate_args_and_kwargs _fname = "func" def test_invalid_total_length_max_length_one(): compat_args = ("foo",) kwargs = {"foo": "FOO"} args = ("FoO", "BaZ") min_fname_arg_count = 0 max_length = len(compat_args) + min_fname_arg_count actual_...
bsd-3-clause
-8,938,038,104,307,669,000
28.518519
88
0.60895
false
nanobox-io/git
contrib/hooks/multimail/git_multimail.py
186
110172
#! /usr/bin/env python2 # Copyright (c) 2015 Matthieu Moy and others # Copyright (c) 2012-2014 Michael Haggerty and others # Derived from contrib/hooks/post-receive-email, which is # Copyright (c) 2007 Andy Parkins # and also includes contributions by other authors. # # This file is part of git-multimail. # # git-mult...
gpl-2.0
-241,405,530,390,534,080
34.677461
99
0.588625
false
mancoast/CPythonPyc_test
fail/340_test_fcntl.py
96
5220
"""Test program for the fcntl C module. """ import platform import os import struct import sys import unittest from test.support import (verbose, TESTFN, unlink, run_unittest, import_module, cpython_only) # Skip test if no fcntl module. fcntl = import_module('fcntl') # TODO - Write tests fo...
gpl-3.0
8,376,566,355,159,416,000
33.342105
81
0.587356
false
rwaldron/mirovideoconverter3
mvc/widgets/osx/control.py
2
17828
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-3.0
-2,966,563,869,931,945,000
32.637736
119
0.632488
false
coldmind/django
django/core/mail/backends/filebased.py
558
2771
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailB...
bsd-3-clause
2,053,251,104,423,867,400
38.585714
107
0.59834
false
GladeRom/android_external_chromium_org
tools/json_schema_compiler/features_h_generator.py
94
2686
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os.path from code import Code import cpp_util class HGenerator(object): def Generate(self, features, source_file, namespace): return _Generat...
bsd-3-clause
-2,804,768,821,261,686,000
26.131313
76
0.610573
false
pettarin/aeneas
aeneas/audiofilemfcc.py
5
23930
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
agpl-3.0
3,151,908,285,531,111,400
34.399408
123
0.586335
false
michael-ball/sublime-text
sublime-text-3/Packages/Python PEP8 Autoformat/libs/py33/lib2to3/fixes/fix_print.py
164
2854
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for print. Change: 'print' into 'print()' 'print ...' into 'print(...)' 'print ... ,' into 'print(..., end=" ")' 'print >>x, ...' into 'print(..., file=x)' No changes are appl...
unlicense
-674,602,593,625,917,000
31.804598
78
0.519972
false
x303597316/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/tests/test_geos.py
89
45668
from __future__ import unicode_literals import ctypes import json import random from binascii import a2b_hex, b2a_hex from io import BytesIO from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis import memoryview from django.contrib.gis.geometry.test_data import TestDataMixin from django.utils.encodi...
apache-2.0
-3,789,537,276,482,337,000
40.216606
129
0.579684
false
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/test/test_errno.py
91
1184
#! /usr/bin/env python """Test the errno module Roger E. Masse """ import errno from test import test_support import unittest std_c_errors = frozenset(['EDOM', 'ERANGE']) class ErrnoAttributeTests(unittest.TestCase): def test_for_improper_attributes(self): # No unexpected attributes should be on the ...
gpl-2.0
9,007,566,669,092,644,000
28.6
81
0.637669
false
wxgeo/geophar
wxgeometrie/modules/tablatex/tests/test_tabsign.py
1
12983
# -*- coding: utf-8 -*- from wxgeometrie.modules.tablatex.tests.tabtestlib import assert_tableau from wxgeometrie.modules.tablatex.tabsign import tabsign from pytest import XFAIL def assert_tabsign(chaine, code_latex, **options): assert_tableau(tabsign, chaine, code_latex, **options) def test_mode_manuel():...
gpl-2.0
7,098,556,127,674,237,000
27.469298
127
0.346557
false
mihail911/nupic
examples/opf/experiments/anomaly/spatial/2field_many_novelAtEnd/description.py
40
15840
# ---------------------------------------------------------------------- # 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...
gpl-3.0
-8,916,489,403,285,606,000
36.894737
92
0.623864
false
kevmccor/openemr
phpmyadmin/doc/_ext/configext.py
141
6618
from sphinx.domains import Domain, ObjType from sphinx.roles import XRefRole from sphinx.domains.std import GenericObject, StandardDomain from sphinx.directives import ObjectDescription from sphinx.util.nodes import clean_astext, make_refnode from sphinx.util import ws_re from sphinx import addnodes from sphinx.util.do...
gpl-3.0
8,570,576,961,580,174,000
34.202128
96
0.562406
false
xuleiboy1234/autoTitle
tensorflow/tensorflow/tools/ci_build/update_version.py
4
12685
#!/usr/bin/python # Copyright 2017 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 r...
mit
2,476,023,095,633,056,000
34.236111
80
0.603153
false
vikatory/kbengine
kbe/res/scripts/common/Lib/distutils/command/bdist_msi.py
152
35217
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from distutils.core import Command from distutils.dir_util import remove_tree from distutils.sysconfig import...
lgpl-3.0
-2,207,692,972,586,438,700
46.524966
200
0.538562
false
suyashphadtare/sajil-final-erp
erpnext/startup/report_data_map.py
21
8867
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals # mappings for table dumps # "remember to add indexes!" data_map = { "Company": { "columns": ["name"], "conditions": ["docstatus < 2"] }, "F...
agpl-3.0
8,439,381,569,199,534,000
28.956081
115
0.570542
false
tovmeod/anaf
anaf/knowledge/forms.py
1
4996
""" Knowledge base model forms """ from django.forms import ModelForm, Form, ChoiceField from models import KnowledgeFolder, KnowledgeItem, KnowledgeCategory from anaf.core.models import Object from anaf.core.decorators import preprocess_form from django.utils.translation import ugettext as _ from django.core.urlresolv...
bsd-3-clause
9,082,211,403,079,981,000
34.183099
119
0.555845
false
newemailjdm/scipy
scipy/weave/examples/object.py
100
1679
""" Attribute and method access on Python objects from C++. Note: std::cout type operations currently crash python... Not sure what is up with this... """ from __future__ import absolute_import, print_function import scipy.weave as weave #----------------------------------------------------------------...
bsd-3-clause
3,781,669,792,563,363,300
26.983333
77
0.437761
false
salfab/CouchPotatoServer
libs/elixir/ext/perform_ddl.py
29
3315
''' DDL statements for Elixir. Entities having the perform_ddl statement, will automatically execute the given DDL statement, at the given moment: ether before or after the table creation in SQL. The 'when' argument can be either 'before-create' or 'after-create'. The 'statement' argument can be one of: - a single s...
gpl-3.0
-8,847,765,805,570,421,000
30.273585
77
0.643137
false
googleapis/python-talent
google/cloud/talent_v4/services/tenant_service/transports/base.py
1
9826
# -*- 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
-8,748,073,559,244,546,000
36.361217
103
0.602687
false
thedep2/CouchPotatoServer
libs/guessit/transfo/__init__.py
94
4117
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
8,548,563,577,860,957,000
36.770642
107
0.624727
false
freedesktop-unofficial-mirror/papyon
papyon/service/ContentRoaming/scenario/store_profile.py
6
3579
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) an...
gpl-2.0
472,551,720,358,592,400
41.105882
80
0.619447
false
google/deepvariant
deepvariant/model_train.py
1
11333
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
bsd-3-clause
9,046,718,908,291,514,000
36.40264
80
0.695756
false
avlach/univbris-ocf
optin_manager/src/python/openflow/optin_manager/sfa/rspecs/.oldversions/sfav1.py
2
8905
from copy import deepcopy from lxml import etree from openflow.optin_manager.sfa.util.sfalogging import logger from openflow.optin_manager.sfa.util.xrn import hrn_to_urn, urn_to_hrn from openflow.optin_manager.sfa.rspecs.version import RSpecVersion from openflow.optin_manager.sfa.rspecs.elements.element import Element...
bsd-3-clause
6,670,541,927,113,774,000
37.218884
88
0.612802
false
popazerty/openblackhole-SH4
lib/python/Screens/ServiceScan.py
6
4074
import Screens.InfoBar from enigma import eServiceReference from Screens.Screen import Screen from Components.ServiceScan import ServiceScan as CScan from Components.ProgressBar import ProgressBar from Components.Label import Label from Components.ActionMap import ActionMap from Components.FIFOList import FIFOList fro...
gpl-2.0
-1,745,740,406,013,722,600
34.426087
197
0.712322
false
jabesq/home-assistant
tests/components/mobile_app/test_entity.py
2
4044
"""Entity tests for mobile_app.""" # pylint: disable=redefined-outer-name,unused-import import logging _LOGGER = logging.getLogger(__name__) async def test_sensor(hass, create_registrations, webhook_client): # noqa: F401, F811, E501 """Test that sensors can be registered and updated.""" webhook_id = create_...
apache-2.0
-777,938,695,969,267,300
29.870229
92
0.527201
false
yodalee/servo
tests/wpt/web-platform-tests/encrypted-media/polyfill/make-polyfill-tests.py
16
1180
#!/usr/bin/python import os, re, os.path, glob head = re.compile( r"^(\s*</head>)", re.MULTILINE ) runtest = re.compile( r"runTest\(\s*(\S.*?)\s*\)", re.DOTALL ) scripts = ''' <!-- Polyfill files (NOTE: These are added by auto-generation script) --> <script src=/encrypted-media/polyfill/chrome-polyfill.js></s...
mpl-2.0
4,611,188,515,550,353,000
41.178571
116
0.620339
false
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/test_sorting.py
4
17560
import pytest from itertools import product from collections import defaultdict import warnings from datetime import datetime import numpy as np from numpy import nan import pandas as pd from pandas.core import common as com from pandas import DataFrame, MultiIndex, merge, concat, Series, compat from pandas.util impor...
apache-2.0
-3,648,030,989,463,786,000
39.091324
79
0.546185
false
zstyblik/infernal-twin
build/pillow/Tests/test_file_webp_metadata.py
11
3033
from helper import unittest, PillowTestCase from PIL import Image class TestFileWebpMetadata(PillowTestCase): def setUp(self): try: from PIL import _webp except ImportError: self.skipTest('WebP support not installed') return if not _webp.HAVE_WEBPMUX:...
gpl-3.0
-1,037,100,791,134,725,800
25.605263
73
0.602044
false
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_cameras/camera/_reference/_reference_optics_orthographic_zfar_znear/_reference_optics_orthographic_zfar_znear.py
8
3605
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis...
mit
5,521,097,287,295,862,000
49.069444
466
0.723717
false
Adel-Magebinary/odoo
addons/mrp_operations/report/mrp_code_barcode.py
381
1511
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
6,519,977,577,303,618,000
44.787879
167
0.630046
false
cl4rke/scikit-learn
sklearn/cluster/k_means_.py
128
54694
"""K-means clustering""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Thomas Rueckstiess <ruecksti@in.tum.de> # James Bergstra <james.bergstra@umontreal.ca> # Jan Schlueter <scikit-learn@jan-schlueter.de> # Nelle Varoquaux # Peter Prettenhofer <peter.prettenh...
bsd-3-clause
4,856,901,176,834,109,000
37.114286
79
0.611895
false
hidat/audio_pipeline
audio_pipeline/test/AudioFileTest.py
1
4157
import os import unittest import mutagen from . import TestUtil from .. import util test_files = "audio_pipeline\\test\\test_files\\audio\\tag_test_files" class TestAudioFileTags(TestUtil.TestUtilMixin): def test_artist_name(self): tag = self.format.album_artist(self.meta) self.check_af_tag(tag,...
mit
-7,871,462,770,664,625,000
31.484375
79
0.670195
false
liikGit/MissionPlanner
Lib/site-packages/numpy/lib/tests/test_index_tricks.py
53
4333
from numpy.testing import * import numpy as np from numpy import ( array, ones, r_, mgrid, unravel_index, zeros, where, ndenumerate, fill_diagonal, diag_indices, diag_indices_from, s_, index_exp ) class TestUnravelIndex(TestCase): def test_basic(self): assert unravel...
gpl-3.0
-5,947,847,048,425,951,000
29.514085
73
0.487422
false
awkspace/ansible
lib/ansible/modules/source_control/gitlab_project.py
10
14539
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, pri...
gpl-3.0
-7,707,419,299,261,808,000
33.699284
156
0.624596
false
tomaslaz/KLMC_Analysis
thirdparty/JPype-0.5.4.2/src/python/jpype/_refdaemon.py
8
1084
#***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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...
gpl-3.0
1,640,471,054,611,128,000
31.9375
78
0.580258
false
maxweisspoker/simplebitcoinfuncs
simplebitcoinfuncs/miscbitcoinfuncs.py
1
7265
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Misc functions related to Bitcoin, but which didn't feel right being in the main bitcoin funcs See _doctester.py for examples of most functions below. ''' import os import datetime from binascii import hexlify, unhexlify try: ModuleNotFoundError except: Mo...
mit
-1,177,901,497,831,714,800
28.766393
74
0.622608
false
andersk/zulip
zerver/migrations/0217_migrate_create_stream_policy.py
6
1270
# Generated by Django 1.11.20 on 2019-05-06 13:15 from django.db import migrations from django.db.backends.postgresql.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps def upgrade_create_stream_policy(apps: StateApps, schema_editor: DatabaseSchemaEditor) -> None: Realm = apps.ge...
apache-2.0
4,167,860,464,716,065,300
36.352941
95
0.723622
false
vauxoo-dev/vxtools-server
setup.py
1
1465
#!/usr/bin/env python # -*- coding: utf-8 -*- try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.rst').read() history = open('HISTORY.rst').read().replace('.. :changelog:', '') requirements = [ # TODO: put package requirements here ] test_requi...
bsd-3-clause
-7,057,690,043,334,302,000
26.148148
66
0.612969
false
webnotes/wnframework
core/doctype/file_data/file_data.py
32
1734
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ record of files naming for same name files: file.gif, file-1.gif, file-2.gif etc """ import webnotes, webnotes.utils, os from webnotes import conf class DocType(): def...
mit
8,421,549,943,214,468,000
31.12963
85
0.691465
false
FrankBian/kuma
vendor/packages/pyparsing/examples/simpleSQL.py
16
4698
# simpleSQL.py # # simple demo of using the parsing library to do simple-minded SQL parsing # could be extended to include where clauses etc. # # Copyright (c) 2003, Paul McGuire # from pyparsing import Literal, CaselessLiteral, Word, Upcase, delimitedList, Optional, \ Combine, Group, alphas, nums, alphanum...
mpl-2.0
-14,859,202,620,870,594
31.457746
112
0.590677
false
bootandy/sqlalchemy
test/engine/test_transaction.py
23
54427
from sqlalchemy.testing import eq_, assert_raises, \ assert_raises_message, ne_, expect_warnings import sys from sqlalchemy import event from sqlalchemy.testing.engines import testing_engine from sqlalchemy import create_engine, MetaData, INT, VARCHAR, Sequence, \ select, Integer, String, func, text, exc from s...
mit
-3,474,624,209,129,519,600
36.613683
85
0.588421
false
JeanKossaifi/scikit-learn
sklearn/utils/tests/test_fixes.py
281
1829
# Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Justin Vincent # Lars Buitinck # License: BSD 3 clause import numpy as np from nose.tools import assert_equal from nose.tools import assert_false from nose.tools import assert_true from numpy.testing import (assert_almost_equal, ...
bsd-3-clause
-6,774,058,060,806,427,000
32.254545
79
0.67906
false
maestrano/openerp
openerp/addons/l10n_be_hr_payroll/__openerp__.py
118
1817
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
-3,182,060,247,907,120,600
33.942308
78
0.60044
false
openstack/manila
manila/tests/share/drivers/glusterfs/test_layout.py
1
12982
# Copyright (c) 2015 Red Hat, 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 require...
apache-2.0
6,427,301,124,843,634,000
38.220544
79
0.612772
false
kartikgupta0909/gittest
configs/builds/releng_base_windows_32_builds.py
2
4098
import os import sys STAGE_USERNAME = 'ffxbld' STAGE_SSH_KEY = 'ffxbld_dsa' config = { ######################################################################### ######## WINDOWS GENERIC CONFIG KEYS/VAlUES # if you are updating this with custom 32 bit keys/values please add them # below under the '32 b...
mpl-2.0
-5,999,572,464,100,952,000
38.403846
100
0.531723
false
Neural-Network/TicTacToe
pybrain/datasets/supervised.py
21
4400
from __future__ import print_function __author__ = 'Thomas Rueckstiess, ruecksti@in.tum.de' from numpy import random from random import sample from scipy import isscalar from pybrain.datasets.dataset import DataSet from pybrain.utilities import fListToString class SupervisedDataSet(DataSet): """SupervisedDataS...
bsd-3-clause
-5,855,689,213,137,836,000
35.97479
80
0.594091
false
sakuraio/python-sakuraio
sakuraio/hardware/commands/operation.py
1
3230
import struct import datetime # Operation CMD_GET_PRODUCT_ID = 0xA0 CMD_GET_UNIQUE_ID = 0xA1 CMD_GET_FIRMWARE_VERSION = 0xA2 CMD_UNLOCK = 0xA8 CMD_UPDATE_FIRMWARE = 0xA9 CMD_GET_FIRMWARE_UPDATE_STATUS = 0xAA CMD_SOFTWARE_RESET = 0xAF CMD_SET_POWER_SAVE_MODE = 0xB0 CMD_GET_POWER_SAVE_MODE = 0xB1 UNLOCK_MAGIC_NUMBERS ...
mit
-1,776,822,353,497,591,000
24.84
92
0.588235
false
aviweit/libcloud
libcloud/common/brightbox.py
55
3413
# 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 use ...
apache-2.0
8,668,437,354,898,299,000
32.792079
79
0.64225
false
growingio/phoenix
bin/end2endTest.py
31
1881
#!/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
-1,432,413,328,038,505,200
39.021277
102
0.671983
false
torufuru/oolhackathon
ryu/lib/xflow/netflow.py
60
4009
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
208,989,595,103,367,400
31.072
70
0.607383
false
bq-xiao/mongo-python-driver
test/test_replica_set_reconfig.py
18
5751
# Copyright 2013-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
-5,490,628,702,185,979,000
30.086486
74
0.56738
false
rbooth200/DiscEvolution
DiscEvolution/internal_photo.py
1
30463
# internal_photo.py # # Author: A. Sellek # Date: 12 - Aug - 2020 # # Implementation of Photoevaporation Models ################################################################################ import numpy as np import argparse import json import matplotlib.pyplot as plt from DiscEvolution.constants import * from DiscE...
gpl-3.0
6,671,760,707,096,831,000
39.082895
218
0.549782
false
puttarajubr/commcare-hq
corehq/apps/hqadmin/system_info/checks.py
2
3064
from django.core import cache from django.conf import settings from django.utils.safestring import mark_safe from restkit import Resource import json from corehq.apps.hqadmin.system_info.utils import human_bytes from soil import heartbeat def check_redis(): #redis status ret = {} redis_status = "" red...
bsd-3-clause
6,678,510,842,359,630,000
34.627907
157
0.587467
false
phalax4/CarnotKE
jyhton/lib-python/2.7/test/test_abc.py
119
7715
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Unit tests for abc.py.""" import unittest, weakref from test import test_support import abc from inspect import isabstract class TestABC(unittest.TestCase): def test_abstractmethod_basics(self): @abc...
apache-2.0
838,110,080,379,842,700
32.111588
77
0.558782
false
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.5.127/roles/lib_openshift/library/oc_secret.py
12
57672
#!/usr/bin/env python # pylint: disable=missing-docstring # flake8: noqa: T001 # ___ ___ _ _ ___ ___ _ _____ ___ ___ # / __| __| \| | __| _ \ /_\_ _| __| \ # | (_ | _|| .` | _|| / / _ \| | | _|| |) | # \___|___|_|\_|___|_|_\/_/_\_\_|_|___|___/_ _____ # | \ / _ \ | \| |/ _ \_ _| | __| \_ ...
apache-2.0
6,445,151,070,839,982,000
32.08778
244
0.526131
false
CERNDocumentServer/invenio
modules/bibsword/lib/bibsword_webinterface.py
1
15249
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2010, 2011, 2012, 2013, 2014, 2015, 2016 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 # Li...
gpl-2.0
-6,689,792,295,317,898,000
28.9
77
0.506525
false
omnirom/android_external_chromium-org
chrome/browser/PRESUBMIT.py
36
2691
# 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. """Presubmit script for Chromium browser code. This script currently only checks HTML/CSS/JS files in resources/. See http://dev.chromium.org/developers/ho...
bsd-3-clause
-8,704,589,916,678,059,000
34.88
79
0.689335
false
TarasRudnyk/scrapy
docs/utils/linkfix.py
141
1764
#!/usr/bin/python """ Linkfix - a companion to sphinx's linkcheck builder. Uses the linkcheck's output file to fix links in docs. Originally created for this issue: https://github.com/scrapy/scrapy/issues/606 Author: dufferzafar """ import re # Used for remembering the file (and its contents) # so we don't have ...
bsd-3-clause
-4,291,072,471,067,289,600
27
73
0.592404
false
MarsSnail/gyp_tools
test/rules/gyptest-default.py
25
1660
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies simple rules when using an explicit build target of 'all'. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('actions...
bsd-3-clause
8,107,704,772,019,640,000
27.135593
75
0.713253
false
patvarilly/DNACC
examples/competing_linkages/competing_linkages.py
1
10390
# Copyright 2012 Patrick Varilly, Stefano Angioletti-Uberti # # 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...
gpl-3.0
7,039,810,188,648,784,000
31.984127
76
0.507988
false
sebrandon1/neutron
neutron/plugins/ml2/drivers/l2pop/mech_driver.py
2
14284
# Copyright (c) 2013 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...
apache-2.0
5,595,001,444,596,550,000
41.260355
79
0.577989
false
arenadata/ambari
ambari-server/src/main/resources/common-services/ZEPPELIN/0.6.0/package/scripts/interpreter_json_template.py
3
10516
#!/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 ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
apache-2.0
-9,195,726,142,445,262,000
28.130194
181
0.509985
false
EnviroCentre/jython-upgrade
jython/lib/test/test_sha.py
136
1703
# Testing sha module (NIST's Secure Hash Algorithm) # use the three examples from Federal Information Processing Standards # Publication 180-1, Secure Hash Standard, 1995 April 17 # http://www.itl.nist.gov/div897/pubs/fip180-1.htm import warnings warnings.filterwarnings("ignore", "the sha module is deprecated.*", ...
mit
587,045,028,039,699,600
29.410714
78
0.642983
false
Hawaii-Smart-Energy-Project/Maui-Smart-Grid
src/filelock.py
1
4303
# Copyright (c) 2009, Evan Fosmark # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and th...
bsd-3-clause
-4,454,241,437,241,890,000
37.079646
80
0.638624
false