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
JensGrabner/mpmath
mpmath/function_docs.py
1
280518
""" Extended docstrings for functions.py """ pi = r""" `\pi`, roughly equal to 3.141592654, represents the area of the unit circle, the half-period of trigonometric functions, and many other things in mathematics. Mpmath can evaluate `\pi` to arbitrary precision:: >>> from mpmath import * >>> mp.dps = 50; m...
bsd-3-clause
-8,398,017,694,677,076,000
26.906685
94
0.628188
false
BenKeyFSI/poedit
deps/boost/tools/build/test/library_property.py
44
1126
#!/usr/bin/python # Copyright 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that the <library> property has no effect on "obj" targets. Previously, # it affected all targets, so # # project : ...
mit
9,121,069,835,786,699,000
19.107143
81
0.650977
false
jaggu303619/asylum-v2.0
openerp/addons/project_issue/__init__.py
433
1131
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
1,729,967,506,114,666,200
40.888889
80
0.623342
false
snowch/bluemix-spark-examples
examples/DashDB/importfromdashdb.py
2
1389
# # 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 us...
apache-2.0
1,663,112,396,057,408,500
31.302326
109
0.733621
false
lmgichin/formations
python/npyscr.py
1
1948
# -*- coding: utf-8 -*- import npyscreen class MyAutoComplete(npyscreen.Autocomplete): colors = ["Jaune","Bleu","Rouge","Vert", "Vert foncé"] def auto_complete(self, input): choices = [] for word in MyAutoComplete.colors: if word.startswith(self.value): choices....
gpl-2.0
6,961,815,802,718,789,000
30.918033
108
0.600206
false
pexip/meson
mesonbuild/modules/__init__.py
5
2345
import os from .. import build class ExtensionModule: def __init__(self, interpreter): self.interpreter = interpreter self.snippets = set() # List of methods that operate only on the interpreter. def is_snippet(self, funcname): return funcname in self.snippets def get_include_args(...
apache-2.0
6,426,759,657,867,208,000
32.028169
85
0.61322
false
pim89/youtube-dl
youtube_dl/extractor/noz.py
26
3664
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_xpath, ) from ..utils import ( int_or_none, find_xpath_attr, xpath_text, update_url_query, ) class NozIE(InfoExtractor): _VALID_URL = r'http...
unlicense
3,701,815,465,301,491,000
40.157303
196
0.528529
false
akaihola/django
django/core/cache/backends/filebased.py
11
4711
"File-based cache backend" import hashlib import os import shutil import time try: import cPickle as pickle except ImportError: import pickle from django.core.cache.backends.base import BaseCache class FileBasedCache(BaseCache): def __init__(self, dir, params): BaseCache.__init__(self, params) ...
bsd-3-clause
5,261,399,535,842,471,000
28.816456
116
0.54447
false
rimbalinux/MSISDNArea
django/utils/simplejson/decoder.py
13
12297
"""Implementation of JSONDecoder """ import re import sys import struct from django.utils.simplejson.scanner import make_scanner c_scanstring = None __all__ = ['JSONDecoder'] FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF80000000000007FF0000000000000'.decode('he...
bsd-3-clause
8,789,575,553,706,194,000
33.643478
108
0.507034
false
DSLituiev/scikit-learn
examples/plot_johnson_lindenstrauss_bound.py
8
7473
r""" ===================================================================== The Johnson-Lindenstrauss bound for embedding with random projections ===================================================================== The `Johnson-Lindenstrauss lemma`_ states that any high dimensional dataset can be randomly projected i...
bsd-3-clause
-1,598,708,507,861,591,600
36.552764
99
0.722869
false
40023154/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/unittest/result.py
727
6397
"""Test result object""" import io import sys import traceback from . import util from functools import wraps __unittest = True def failfast(method): @wraps(method) def inner(self, *args, **kw): if getattr(self, 'failfast', False): self.stop() return method(self, *args, **kw) ...
gpl-2.0
-709,746,041,949,951,400
31.805128
79
0.582304
false
tnkteja/myhelp
virtualEnvironment/lib/python2.7/site-packages/pkginfo/installed.py
3
1987
import glob import os import sys import warnings from pkginfo.distribution import Distribution from pkginfo._compat import STRING_TYPES class Installed(Distribution): def __init__(self, package, metadata_version=None): if isinstance(package, STRING_TYPES): self.package_name = package ...
mit
-4,016,740,089,818,886,000
36.490566
78
0.508807
false
JGarcia-Panach/odoo
addons/procurement_jit/__init__.py
374
1078
# -*- 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
-4,534,564,349,899,700,000
43.916667
79
0.611317
false
seanchen/taiga-back
taiga/export_import/serializers.py
4
22718
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # 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 F...
agpl-3.0
4,087,791,144,488,356,400
35.28754
106
0.685244
false
openstack/ironic-inspector
ironic_inspector/test/unit/test_pxe_filter.py
1
19461
# 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 # distributed under the...
apache-2.0
-4,775,636,206,923,448,000
38.635438
79
0.624069
false
djmuhlestein/fx2lib
examples/eeprom/client.py
9
2964
# Copyright (C) 2009 Ubixum, Inc. # # 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 2.1 of the License, or (at your option) any later version. # # This library is dis...
gpl-3.0
4,221,992,412,039,080,000
31.217391
117
0.657557
false
brianmay/karaage
karaage/tests/projects/test_forms.py
2
2372
# Copyright 2010-2017, The University of Melbourne # Copyright 2010-2017, Brian May # # This file is part of Karaage. # # Karaage 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...
gpl-3.0
9,215,623,259,874,224,000
33.882353
70
0.634907
false
gpiotti/tsflask
server/lib/werkzeug/debug/__init__.py
310
7800
# -*- coding: utf-8 -*- """ werkzeug.debug ~~~~~~~~~~~~~~ WSGI application traceback debugger. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import json import mimetypes from os.path import join, dirname, basename, isfile ...
apache-2.0
2,949,149,047,933,335,000
41.162162
78
0.587436
false
ArcherSys/ArcherSys
Lib/tkinter/ttk.py
1
167711
<<<<<<< HEAD <<<<<<< HEAD """Ttk wrapper. This module provides classes to allow using Tk themed widget set. Ttk is based on a revised and enhanced version of TIP #48 (http://tip.tcl.tk/48) specified style engine. Its basic idea is to separate, to the extent possible, the code implementing a widget's behavior from th...
mit
5,245,644,120,300,814,000
33.465886
93
0.608106
false
dstockwell/pachi
tools/sgflib/typelib.py
11
14710
#!/usr/local/bin/python # typelib.py (Type Class Library) # Copyright (c) 2000 David John Goodger # # This software is provided "as-is", without any express or implied warranty. # In no event will the authors be held liable for any damages arising from the # use of this software. # # Permission is granted to anyone...
gpl-2.0
-619,525,922,261,596,800
25.941392
85
0.646431
false
tizianasellitto/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/utils.py
982
2545
from __future__ import absolute_import, division, unicode_literals from types import ModuleType try: import xml.etree.cElementTree as default_etree except ImportError: import xml.etree.ElementTree as default_etree __all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair", "surrogatePairTo...
mpl-2.0
-4,285,529,845,807,071,000
30.036585
78
0.616896
false
jamielennox/tempest
tempest/api/compute/admin/test_quotas_negative.py
1
7093
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
2,859,684,301,012,371,000
43.892405
78
0.612153
false
cafecivet/django_girls_tutorial
Lib/site-packages/django/db/models/sql/subqueries.py
66
10450
""" Query subclasses which provide extra functionality beyond simple data retrieval. """ from django.conf import settings from django.core.exceptions import FieldError from django.db import connections from django.db.models.query_utils import Q from django.db.models.constants import LOOKUP_SEP from django.db.models.fi...
gpl-2.0
-4,727,673,045,453,679,000
35.666667
121
0.604498
false
eino-makitalo/odoo
addons/edi/models/res_currency.py
437
2892
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
agpl-3.0
-3,118,350,269,596,763,000
42.818182
118
0.59751
false
AuyaJackie/odoo
addons/resource/resource.py
81
42822
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP SA (http://www.openerp.com) # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
9,137,665,114,203,164,000
50.345324
356
0.57363
false
SCSSG/Odoo-SCS
openerp/addons/base/res/res_request.py
342
1677
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
6,838,821,030,197,906,000
38
78
0.605844
false
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/bitcoin/rpc.py
1
24025
# Copyright (C) 2007 Jan-Klaas Kollhof # Copyright (C) 2011-2015 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be ...
gpl-3.0
-8,538,065,926,282,861,000
34.279001
124
0.581061
false
rlewis1988/lean
script/check_md_links.py
17
2586
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2016 Sebastian Ullrich. All rights reserved. # Released under Apache 2.0 license as described in the file LICENSE. # # Author: Sebastian Ullrich # # Python 2/3 compatibility from __future__ import print_function import argparse import collections import o...
apache-2.0
5,352,114,230,549,614,000
29.785714
121
0.619876
false
alexmojaki/blaze
docs/source/conf.py
8
9883
# -*- coding: utf-8 -*- # # Blaze documentation build configuration file, created by # sphinx-quickstart on Mon Oct 8 12:29:11 2012. # # 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 c...
bsd-3-clause
6,952,066,812,865,936,000
30.57508
80
0.656076
false
danmergens/mi-instrument
mi/dataset/dataset_driver.py
7
2920
import os from mi.logging import config from mi.core.log import get_logger from mi.core.exceptions import NotImplementedException __author__ = 'wordenm' log = get_logger() class ParticleDataHandler(object): def __init__(self): self._samples = {} self._failure = False def addParticleSample(...
bsd-2-clause
-7,939,177,868,648,343,000
31.444444
113
0.643151
false
UniMOOC/gcb-new-module
modules/dashboard/unit_lesson_editor.py
3
30735
# Copyright 2013 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 ...
apache-2.0
-6,512,185,131,179,540,000
35.808383
80
0.585684
false
Apelsin/trello-tools
trello_tools/burndown.py
1
6529
import re from pprint import pprint from StringIO import StringIO ProgISO8601Date = re.compile('(\d{4})-([01]\d)-([0-3]\d)') def _get_next_row(d): def _get_next_element(_list): for element in _list: yield element return row = {} while True: for key, column in d.iteritem...
lgpl-2.1
-4,438,705,502,268,646,000
35.892655
107
0.498698
false
shownomercy/django
django/contrib/auth/backends.py
468
6114
from __future__ import unicode_literals from django.contrib.auth import get_user_model from django.contrib.auth.models import Permission class ModelBackend(object): """ Authenticates against settings.AUTH_USER_MODEL. """ def authenticate(self, username=None, password=None, **kwargs): UserMod...
bsd-3-clause
-6,925,748,106,298,386,000
37.2125
95
0.616454
false
prospwro/odoo
openerp/report/printscreen/ps_list.py
381
11955
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
6,119,848,660,432,600,000
42.791209
132
0.487746
false
jimb0616/namebench
nb_third_party/jinja2/filters.py
199
22056
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import imap, groupby from jinja2....
apache-2.0
-6,190,842,606,843,897,000
29.213699
82
0.587459
false
butala/pyrsss
pyrsss/emtf/grdio/grd_io.py
1
5556
""" Read/write tools for nonuniform electric field .grd format. Matthew Grawe, grawe2 (at) illinois.edu January 2017 """ import numpy as np def next_line(grd_file): """ next_line Function returns the next line in the file that is not a blank line, unless the line is '', which is a typical EOF marker...
mit
1,698,533,633,989,522,400
24.721154
77
0.610151
false
openqt/algorithms
leetcode/python/lc945-minimum-increment-to-make-array-unique.py
1
1062
# coding=utf-8 import unittest """945. Minimum Increment to Make Array Unique https://leetcode.com/problems/minimum-increment-to-make-array-unique/description/ Given an array of integers A, a _move_ consists of choosing any `A[i]`, and incrementing it by `1`. Return the least number of moves to make every value in `...
gpl-3.0
6,598,860,312,799,576,000
16.847458
103
0.572505
false
esiivola/GPYgradients
GPy/models/gp_grid_regression.py
6
1195
# Copyright (c) 2012-2014, GPy authors (see AUTHORS.txt). # Licensed under the BSD 3-clause license (see LICENSE.txt) # Kurt Cutajar from ..core import GpGrid from .. import likelihoods from .. import kern class GPRegressionGrid(GpGrid): """ Gaussian Process model for grid inputs using Kronecker products ...
bsd-3-clause
800,365,994,982,342,300
32.194444
145
0.693724
false
flyfei/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_frombuffer.py
52
2485
from ctypes import * import array import gc import unittest class X(Structure): _fields_ = [("c_int", c_int)] init_called = False def __init__(self): self._init_called = True class Test(unittest.TestCase): def test_fom_buffer(self): a = array.array("i", range(16)) x = (c_int * ...
apache-2.0
-7,650,167,065,506,483,000
29.679012
93
0.538028
false
FEniCS/uflacs
test/unit/xtest_ufl_shapes_and_indexing.py
1
3320
#!/usr/bin/env python """ Tests of utilities for dealing with ufl indexing and components vs flattened index spaces. """ from ufl import * from ufl import product from ufl.permutation import compute_indices from uflacs.analysis.indexing import (map_indexed_arg_components, map_c...
gpl-3.0
6,493,757,585,278,681,000
33.947368
103
0.612651
false
nttcom/eclcli
eclcli/rca/v2/user.py
2
4491
# -*- coding: utf-8 -*- from eclcli.common import command from eclcli.common import exceptions from eclcli.common import utils from ..rcaclient.common.utils import objectify class ListUser(command.Lister): def get_parser(self, prog_name): parser = super(ListUser, self).get_parser(prog_name) ret...
apache-2.0
5,470,362,338,758,852,000
31.543478
88
0.580717
false
anderson-81/djangoproject
crud/migrations/0001_initial.py
1
2095
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-27 00:23 from __future__ import unicode_literals from decimal import Decimal from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations...
mit
2,575,349,278,705,911,000
43.574468
121
0.579952
false
bigdataelephants/scikit-learn
sklearn/datasets/tests/test_lfw.py
50
6849
"""This test for the LFW require medium-size data dowloading and processing If the data has not been already downloaded by running the examples, the tests won't run (skipped). If the test are run, the first execution will be long (typically a bit more than a couple of minutes) but as the dataset loader is leveraging ...
bsd-3-clause
30,111,154,124,737,570
37.05
79
0.649146
false
saghul/aiohttp
aiohttp/helpers.py
1
10084
"""Various helper functions""" __all__ = ['BasicAuth', 'FormData', 'parse_mimetype'] import base64 import binascii import io import os import uuid import urllib.parse from collections import namedtuple from wsgiref.handlers import format_date_time from . import hdrs, multidict class BasicAuth(namedtuple('BasicAuth'...
apache-2.0
-5,142,592,529,588,322,000
29.282282
79
0.540361
false
tthtlc/volatility
volatility/plugins/gui/gahti.py
44
2226
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
gpl-2.0
2,695,576,877,743,722,500
36.728814
72
0.570979
false
moto-timo/ironpython3
Src/StdLib/Lib/getpass.py
86
6069
"""Utilities to get a password and/or the current user name. getpass(prompt[, stream]) - Prompt for a password, with echo turned off. getuser() - Get the user name from the environment or password database. GetPassWarning - This UserWarning is issued when getpass() cannot prevent echoing of the passw...
apache-2.0
803,129,823,616,422,000
31.629032
81
0.588235
false
vanpact/scipy
scipy/signal/cont2discrete.py
68
5033
""" Continuous to discrete transformations for state-space and transfer function. """ from __future__ import division, print_function, absolute_import # Author: Jeffrey Armstrong <jeff@approximatrix.com> # March 29, 2011 import numpy as np from scipy import linalg from .ltisys import tf2ss, ss2tf, zpk2ss, ss2zpk __...
bsd-3-clause
1,442,810,713,257,586,700
34.443662
98
0.591496
false
ClaudiaSaxer/PlasoScaffolder
src/plasoscaffolder/bll/mappings/formatter_init_mapping.py
1
1250
# -*- coding: utf-8 -*- """Class representing the mapper for the formatter init files.""" from plasoscaffolder.bll.mappings import base_mapping_helper from plasoscaffolder.bll.mappings import base_sqliteplugin_mapping from plasoscaffolder.model import init_data_model class FormatterInitMapping( base_sqliteplugin_...
apache-2.0
2,401,879,130,831,245,300
31.051282
78
0.7008
false
nwhidden/ND101-Deep-Learning
transfer-learning/tensorflow_vgg/utils.py
145
1972
import skimage import skimage.io import skimage.transform import numpy as np # synset = [l.strip() for l in open('synset.txt').readlines()] # returns image of shape [224, 224, 3] # [height, width, depth] def load_image(path): # load image img = skimage.io.imread(path) img = img / 255.0 assert (0 <= ...
mit
-3,846,405,492,483,713,500
26.388889
81
0.592292
false
cs243iitg/vehicle-webapp
webapp/vms/admin_views.py
1
18451
from django.shortcuts import render, render_to_response from django.http import HttpResponse, HttpResponseRedirect from django.views import generic from django.core.context_processors import csrf from django.views.decorators.csrf import csrf_protect, csrf_exempt from django.contrib import auth from django.contrib.auth....
mit
8,053,553,436,382,796,000
38.67957
169
0.586635
false
knifeyspoony/pyswf
swf/movie.py
1
5645
""" SWF """ from tag import SWFTimelineContainer from stream import SWFStream from export import SVGExporter try: import cStringIO as StringIO except ImportError: import StringIO class SWFHeaderException(Exception): """ Exception raised in case of an invalid SWFHeader """ def __init__(self, message): ...
mit
-8,566,016,073,623,992,000
32.011696
84
0.55713
false
foss-transportationmodeling/rettina-server
.env/local/lib/python2.7/encodings/cp1257.py
593
13630
""" Python Character Mapping Codec cp1257 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1257.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,in...
apache-2.0
8,060,740,897,651,665,000
43.397394
119
0.544901
false
rdaton/ARS2015
otroScript.py
1
3473
#!/usr/bin/python2 # -*- coding: utf-8 -*- ##intento import cElementTree que es código nativo import sys reload(sys) sys.setdefaultencoding('utf-8') import csv import os import glob try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET """ Creado 1 de Diciembre 2015 @...
gpl-3.0
-7,756,345,002,758,109,000
30.788991
107
0.716017
false
lincolnloop/emailed-me
lib/werkzeug/routing.py
25
55181
# -*- coding: utf-8 -*- """ werkzeug.routing ~~~~~~~~~~~~~~~~ When it comes to combining multiple controller or view functions (however you want to call them) you need a dispatcher. A simple way would be applying regular expression tests on the ``PATH_INFO`` and calling registered callback fun...
bsd-3-clause
2,565,140,452,500,172,300
37.480474
82
0.577953
false
zmaruo/coreclr
src/pal/automation/compile.py
154
2660
import logging as log import sys import getopt import os import subprocess import shutil def RunCMake(workspace, target, platform): # run CMake print "\n==================================================\n" returncode = 0 if platform == "windows": print "Running: vcvarsall.bat x86_amd64 && " +...
mit
-5,234,175,158,317,980,000
37
176
0.556767
false
Windowsfreak/OpenNI2
Packaging/ReleaseVersion.py
32
6788
#!/usr/bin/python #/**************************************************************************** #* * #* OpenNI 2.x Alpha * #* Copyright (C) 2012 PrimeSense Ltd. ...
apache-2.0
4,098,053,627,494,208,500
35.691892
140
0.546258
false
iho/wagtail
wagtail/wagtailcore/migrations/0014_add_verbose_name.py
26
4031
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0013_update_golive_expire_help_text'), ] operations = [ migrations.AlterField( model_name='groupp...
bsd-3-clause
4,108,682,181,955,955,700
42.815217
273
0.596874
false
samuellefever/server-tools
cron_run_manually/ir_cron.py
42
2778
# -*- coding: utf-8 -*- # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>) # Code snippets from openobject-server copyright (C) 2004-2013 OpenERP S.A. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Ge...
agpl-3.0
3,361,049,242,280,642,600
34.615385
75
0.610151
false
andreadean5/python-hpOneView
hpOneView/resources/servers/id_pools_vsn_ranges.py
1
1946
# -*- coding: utf-8 -*- ### # (C) Copyright (2012-2016) Hewlett Packard Enterprise Development LP # # 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 limi...
mit
-5,179,355,912,824,232,000
39.541667
85
0.747174
false
kaday/rose
lib/python/rose/macros/duplicate.py
1
3415
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2012-6 Met Office. # # This file is part of Rose, a framework for meteorological suites. # # Rose is free software: you can redistribute it and/or modify # it under the terms of the GNU ...
gpl-3.0
-9,092,590,079,516,549,000
42.782051
79
0.558126
false
Alwnikrotikz/pmx
scripts/DTI_analysis.py
2
88009
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" > <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" > <meta name="ROBOTS" content="NOARCHIVE"> <link rel="icon" type="image/vnd.microsoft.icon" href="https://ssl.gstatic.com/codesite/ph/images/phosti...
lgpl-3.0
8,436,432,717,271,101,000
32.024015
419
0.72446
false
wwj718/ANALYSE
cms/envs/aws.py
4
11519
""" This is the default template for our main set of AWS servers. """ # We intentionally define lots of variables that aren't used, and # want to import all variables from base settings files # pylint: disable=W0401, W0614 import json from .common import * from logsettings import get_logger_config import os from p...
agpl-3.0
-8,380,252,749,934,635,000
37.784512
120
0.701189
false
maohongyuan/kbengine
kbe/res/scripts/common/Lib/test/test_email/test__encoded_words.py
123
6387
import unittest from email import _encoded_words as _ew from email import errors from test.test_email import TestEmailBase class TestDecodeQ(TestEmailBase): def _test(self, source, ex_result, ex_defects=[]): result, defects = _ew.decode_q(source) self.assertEqual(result, ex_result) self.a...
lgpl-3.0
2,052,561,620,146,257,400
32.255208
81
0.557713
false
iamprakashom/offlineimap
offlineimap/folder/GmailMaildir.py
10
13398
# Maildir folder support with labels # Copyright (C) 2002 - 2011 John Goerzen & contributors # # 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 # (...
gpl-2.0
2,524,864,323,799,201,300
39.847561
103
0.615166
false
PeterWangIntel/chromium-crosswalk
native_client_sdk/src/tools/tests/create_nmf_test.py
3
19466
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import posixpath import shutil import subprocess import sys import tempfile import unittest SCRIPT_DIR = os.p...
bsd-3-clause
-7,886,083,085,232,335,000
31.335548
79
0.578239
false
adityacs/ansible
lib/ansible/modules/network/nxos/nxos_mtu.py
11
11446
#!/usr/bin/python # # This file is part of Ansible # # Ansible 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. # # Ansible is distribut...
gpl-3.0
4,923,917,830,572,851,000
29.200528
85
0.578805
false
drufat/sympy
sympy/physics/mechanics/kane.py
6
37043
from __future__ import print_function, division from sympy import zeros, Matrix, diff, solve_linear_system_LU, eye from sympy.core.compatibility import range from sympy.utilities import default_sort_key from sympy.physics.vector import (ReferenceFrame, dynamicsymbols, partial_velocity...
bsd-3-clause
-3,747,339,343,442,382,000
43.151371
91
0.564668
false
kevin8909/xjerp
openerp/addons/account/account_invoice.py
9
96259
# -*- 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 GNU...
agpl-3.0
-1,727,593,621,761,000,200
52.211166
307
0.559449
false
lakewood999/Ciphers
rcipherx.py
1
5693
''' ================================================================================================= R Cipher Suite Includes all variants of the R cipher ================================================================================================= Developed by: ProgramRandom, a division of RandomCorporations A Pa...
mit
2,846,263,050,524,925,000
23.433476
230
0.529773
false
SnappyDataInc/spark
examples/src/main/python/mllib/fpgrowth_example.py
158
1280
# # 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 us...
apache-2.0
5,924,723,334,621,177,000
37.787879
74
0.73125
false
webjunkie/python-social-auth
social/backends/slack.py
68
2414
""" Slack OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/slack.html https://api.slack.com/docs/oauth """ import re from social.backends.oauth import BaseOAuth2 class SlackOAuth2(BaseOAuth2): """Slack OAuth authentication backend""" name = 'slack' AUTHORIZATION_URL = 'https://...
bsd-3-clause
-3,803,897,133,941,440,500
35.575758
78
0.575394
false
DESHRAJ/crowdsource-platform
crowdsourcing/models.py
4
22804
from django.contrib.auth.models import User from django.db import models from django.utils import timezone from oauth2client.django_orm import FlowField, CredentialsField from crowdsourcing.utils import get_delimiter import pandas as pd import os class RegistrationModel(models.Model): user = models.OneToOneField(...
mit
-9,201,666,082,569,424,000
40.691042
149
0.710139
false
andela-bojengwa/talk
venv/lib/python2.7/site-packages/pip/req/req_set.py
79
24967
from __future__ import absolute_import import logging import os from pip._vendor import pkg_resources from pip._vendor import requests from pip.download import (url_to_path, unpack_url) from pip.exceptions import (InstallationError, BestVersionAlreadyInstalled, DistributionNotFound, Previ...
mit
-1,400,298,254,899,841,800
43.346359
79
0.464894
false
apurvbhartia/gnuradio-routing
gr-wxgui/grc/top_block_gui.py
18
2250
# Copyright 2008, 2009 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 option) # any later version....
gpl-3.0
7,023,478,842,067,168,000
29.405405
73
0.708444
false
borisroman/vdsm
vdsm_hooks/ovs/ovs_after_network_setup_fail.py
1
1636
#!/usr/bin/env python # Copyright 2015 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program ...
gpl-2.0
-1,356,778,651,513,556,700
31.078431
78
0.69621
false
40223220/2015_cdb_g7_40223220
static/Brython3.1.1-20150328-091302/Lib/xml/sax/__init__.py
637
3505
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
gpl-3.0
3,683,180,443,397,805,600
32.380952
73
0.690728
false
tntnatbry/tensorflow
tensorflow/contrib/learn/python/learn/estimators/state_saving_rnn_estimator.py
9
38410
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,088,845,920,904,883,000
42.847032
116
0.664827
false
TripleDogDare/RadioWCSpy
env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/pyopenssl.py
153
9905
'''SSL with SNI_-support for Python 2. Follow these instructions if you would like to verify SSL certificates in Python 2. Note, the default libraries do *not* do certificate checking; you need to do additional work to validate certificates yourself. This needs the following packages installed: * pyOpenSSL (tested wi...
mit
7,411,130,221,127,615,000
31.689769
89
0.641999
false
elkingtonmcb/scikit-learn
sklearn/feature_selection/tests/test_feature_select.py
103
22297
""" Todo: cross-check the F-value with stats model """ from __future__ import division import itertools import warnings import numpy as np from scipy import stats, sparse from sklearn.utils.testing import assert_equal from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_raises...
bsd-3-clause
-3,523,390,748,438,043,000
38.958781
79
0.609364
false
jnishi/chainer
chainer/links/connection/lstm.py
2
12108
import six import chainer from chainer.backends import cuda from chainer.functions.activation import lstm from chainer.functions.array import concat from chainer.functions.array import split_axis from chainer import initializers from chainer import link from chainer.links.connection import linear from chainer import u...
mit
8,633,784,803,710,555,000
35.251497
79
0.569954
false
israeltobias/DownMedia
youtube-dl/youtube_dl/extractor/atresplayer.py
5
7688
from __future__ import unicode_literals import time import hmac import hashlib import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( ExtractorError, float_or_none, int_or_none, sanitized_Request, urlencode_postdata, xpath_text, ) class AtresPlayerI...
gpl-3.0
-1,045,066,340,403,646,200
38.025381
164
0.562175
false
ocadotechnology/django-forge
forge/views/v3.py
2
4771
import urllib import urlparse from django.core.paginator import Paginator from django.core.urlresolvers import reverse from .utils import json_response from ..models import Author, Module, Release ## Helper methods def error_response(errors, **kwargs): """ Returns an error response for v3 Forge API. ""...
apache-2.0
-1,914,287,290,377,931,000
26.578035
76
0.584783
false
wouwei/PiLapse
picam/picamEnv/Lib/site-packages/pip/req/req_install.py
50
45589
from __future__ import absolute_import import logging import os import re import shutil import sys import tempfile import traceback import warnings import zipfile from distutils import sysconfig from distutils.util import change_root from email.parser import FeedParser from pip._vendor import pkg_resources, six from...
apache-2.0
-5,672,599,904,934,145,000
37.536771
79
0.535239
false
talbrecht/pism_pik07
site-packages/PISM/options.py
2
8548
# Copyright (C) 2011, 2014, 2015 David Maxwell # # This file is part of PISM. # # PISM 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
-8,233,226,754,999,077,000
39.131455
122
0.667174
false
armab/st2contrib
packs/opsgenie/actions/list_users.py
4
1144
# Licensed to the StackStorm, Inc ('StackStorm') 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 th...
apache-2.0
-1,229,180,218,176,857,600
34.75
74
0.681818
false
Linaro/squad
squad/core/migrations/0028_suite_and_test_name_length.py
2
1629
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-06-06 15:14 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0027_project_notification_strategy'), ] opera...
agpl-3.0
8,913,729,166,419,853,000
34.413043
153
0.576427
false
zorroz/microblog
flask/lib/python2.7/site-packages/sqlalchemy/testing/fixtures.py
32
10721
# testing/fixtures.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from . import config from . import assertions, schema from .util import adict fr...
bsd-3-clause
6,513,110,466,575,245,000
26.774611
77
0.582595
false
cneumann/vrjuggler
modules/gadgeteer/tools/matrix_solver/matrix_solver.py
7
3642
""" Matrix Solver Parses a calibration table and solves the equations for the alpha constants used in the Hardy's Multi-Quadric method of calibration. """ import os, sys, string from math import sqrt from xml.dom import * from xml.dom.minidom import * import Numeric, LinearAlgebra # Define useful functions def length(...
lgpl-2.1
-4,380,167,994,130,430,000
29.864407
92
0.644975
false
pilou-/ansible
lib/ansible/modules/network/aci/aci_contract_subject.py
22
10735
#!/usr/bin/python # -*- coding: utf-8 -*- # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
-634,954,004,349,788,900
29.070028
141
0.609595
false
georgid/sms-tools
lectures/5-Sinusoidal-model/plots-code/sine-analysis-synthesis.py
2
1538
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris import sys, os, functools, time from scipy.fftpack import fft, ifft, fftshift sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import dftModel as DFT import ...
agpl-3.0
1,270,301,819,498,110,500
27.481481
103
0.653446
false
commtrack/temp-aquatest
apps/user_registration/forms.py
1
4996
""" Forms and validation code for user user_registration. """ from django.contrib.auth.models import User from django import forms from django.utils.translation import ugettext_lazy as _ # I put this on all required fields, because it's easier to pick up # on them with CSS or JavaScript if they have a ...
bsd-3-clause
-5,780,155,725,748,824,000
38.617886
141
0.602082
false
sg00dwin/origin
vendor/github.com/google/certificate-transparency/python/ct/crypto/asn1/x509_extension.py
34
7546
"""ASN.1 specification for X509 extensions.""" from ct.crypto.asn1 import named_value from ct.crypto.asn1 import oid from ct.crypto.asn1 import tag from ct.crypto.asn1 import types from ct.crypto.asn1 import x509_common from ct.crypto.asn1 import x509_name # Standard extensions from RFC 5280. class BasicConstraints(...
apache-2.0
2,483,610,300,752,415,000
29.305221
80
0.708852
false
dkroy/luigi
luigi/six.py
65
29796
"""Utilities for writing code that runs on Python 2 and 3 In luigi, we hard-copy this file into the project itself, to ensure that all luigi users use the same version of six. """ # Copyright (c) 2010-2015 Benjamin Peterson # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this so...
apache-2.0
5,586,783,883,803,160,000
34.345196
98
0.632602
false
kalxas/geonode
geonode/base/api/pagination.py
6
1935
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
gpl-3.0
-1,415,260,359,998,245
41.065217
105
0.645478
false
joshblum/django-with-audit
django/contrib/localflavor/ar/forms.py
87
4024
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Selec...
bsd-3-clause
-8,263,621,960,817,804,000
33.367521
92
0.59239
false
yamila-moreno/django
django/templatetags/i18n.py
16
18205
from __future__ import unicode_literals import sys from django.conf import settings from django.template import Library, Node, TemplateSyntaxError, Variable from django.template.base import TOKEN_TEXT, TOKEN_VAR, render_value_in_context from django.template.defaulttags import token_kwargs from django.utils import six...
bsd-3-clause
1,640,208,146,679,332,600
33.349057
117
0.604779
false
SublimeText-Markdown/MarkdownEditing
references.py
1
26853
""" Commands related to links, references and footnotes. Exported commands: ReferenceJumpCommand ReferenceJumpContextCommand ReferenceNewReferenceCommand ReferenceNewInlineLinkCommand ReferenceNewInlineImage ReferenceNewImage ReferenceNewFootnote ReferenceDeleteReference ReferenceOr...
mit
3,459,411,057,167,930,400
38.521355
242
0.543767
false
gdelpierre/ansible-modules-core
utilities/helper/meta.py
11
3274
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Ansible, a Red Hat company # # This file is part of Ansible # # Ansible 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, o...
gpl-3.0
4,374,397,211,470,802,400
49.369231
285
0.733048
false
tangentlabs/wagtail
wagtail/wagtailsearch/tests/test_backends.py
18
7650
import unittest import time from django.test import TestCase from django.test.utils import override_settings from django.conf import settings from django.core import management from django.utils.six import StringIO from wagtail.tests.utils import WagtailTestUtils from wagtail.tests.search import models from wagtail.w...
bsd-3-clause
-3,600,358,642,008,149,000
35.428571
141
0.657255
false
kxliugang/edx-platform
common/djangoapps/util/model_utils.py
31
6782
""" Utilities for django models. """ import unicodedata import re from eventtracking import tracker from django.conf import settings from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country # The setting name used for events when "sett...
agpl-3.0
-2,166,354,602,985,927,700
35.858696
114
0.664258
false