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
joachimmetz/plaso
plaso/parsers/asl.py
2
11003
# -*- coding: utf-8 -*- """The Apple System Log (ASL) file parser.""" import os from dfdatetime import posix_time as dfdatetime_posix_time from dfdatetime import semantic_time as dfdatetime_semantic_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions fr...
apache-2.0
137,836,419,511,823,490
31.943114
80
0.669908
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/ctypes/test/test_parameters.py
80
6196
import unittest, sys from ctypes.test import need_symbol class SimpleTypesTestCase(unittest.TestCase): def setUp(self): import ctypes try: from _ctypes import set_conversion_mode except ImportError: pass else: self.prev_conv_mode = set_conversion...
gpl-2.0
4,392,718,686,375,580,000
34.204545
88
0.596998
false
SamReha/Concepts-Game
languages/pt-br.py
88
7249
# -*- coding: utf-8 -*- { '!langcode!': 'pt-br', '!langname!': 'Português (do Brasil)', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "campo1=\'novovalor\'". Você não pode atualizar ou apagar os resultados de u...
gpl-2.0
7,410,207,669,485,902,000
39.693182
290
0.683608
false
ubic135/odoo-design
addons/auth_signup/__openerp__.py
313
1571
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
9,124,591,899,266,322,000
33.152174
78
0.552514
false
dlazz/ansible
lib/ansible/plugins/connection/funcd.py
59
3533
# Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # Based on chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com> # Copyright (c) 2013, Michael Scherer <misc@zarb.org> # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.tx...
gpl-3.0
8,316,919,214,908,818,000
33.300971
110
0.638834
false
chamakov/namebench
nb_third_party/dns/rdtypes/ANY/CNAME.py
248
1092
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
apache-2.0
5,879,144,980,193,845,000
44.5
73
0.774725
false
alfredoavanzosc/odoomrp-wip-1
sale_product_variants/__openerp__.py
14
1775
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licen...
agpl-3.0
-8,752,300,256,465,916,000
35.979167
78
0.578592
false
titasakgm/brc-stock
openerp/addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/tests/regressiontests/null_queries/models.py
16
1789
from django.db import models class Poll(models.Model): question = models.CharField(max_length=200) def __unicode__(self): return u"Q: %s " % self.question class Choice(models.Model): poll = models.ForeignKey(Poll) choice = models.CharField(max_length=200) def __unicode__(self): r...
agpl-3.0
-7,627,443,570,640,662,000
29.322034
90
0.681386
false
gsmaxwell/phase_offset_rx
gr-digital/python/qa_probe_density.py
7
2141
#!/usr/bin/env python # # Copyright 2012 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) ...
gpl-3.0
-9,129,614,604,184,167,000
29.15493
70
0.633349
false
rnestler/servo
tests/wpt/mozilla/tests/webgl/conformance-2.0.0/deqp/functional/gles3/uniformbuffers/uniformbuffers_test_generator.py
51
3333
#!/usr/bin/env python # Copyright (c) 2016 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...
mpl-2.0
1,367,308,292,002,420,500
27.982609
73
0.691269
false
alu042/edx-platform
common/djangoapps/student/tests/test_credit.py
28
8077
""" Tests for credit courses on the student dashboard. """ import unittest import datetime from mock import patch import pytz from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from xmodule.modulestore.tests.django_utils import ModuleStoreTes...
agpl-3.0
-928,681,149,202,278,400
37.831731
117
0.653213
false
snnn/tensorflow
tensorflow/contrib/losses/python/losses/loss_ops.py
19
28132
# 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
-8,104,154,935,110,994,000
40.738872
80
0.688789
false
tjanez/ansible
lib/ansible/module_utils/dellos9.py
47
4862
# # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # # Copyright (c) 2016 Dell Inc. # # This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still b...
gpl-3.0
8,573,506,676,213,166,000
35.014815
125
0.654669
false
TaylorOshan/pysal
pysal/contrib/glm/links.py
35
20123
''' Defines the link functions to be used with GLM and GEE families. ''' import numpy as np import scipy.stats FLOAT_EPS = np.finfo(float).eps class Link(object): """ A generic link function for one-parameter exponential family. `Link` does nothing, but lays out the methods expected of any subclass. ...
bsd-3-clause
-4,901,116,892,870,221,000
20.115425
77
0.476917
false
athena-voice/athena-voice-client
athena/modules/active/athena_control.py
1
1425
""" Finds and returns the latest bitcoin price Usage Examples: - "What is the price of bitcoin?" - "How much is a bitcoin worth?" """ from athena.classes.module import Module from athena.classes.task import ActiveTask from athena import brain class QuitTask(ActiveTask): d...
gpl-3.0
8,207,512,318,211,203,000
24.886792
79
0.582456
false
jumpstarter-io/neutron
neutron/tests/unit/ryu/test_ryu_plugin.py
9
1570
# Copyright (c) 2012 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
3,802,356,748,824,914,000
30.4
78
0.745223
false
TimBuckley/effective_django
tests/custom_pk/fields.py
33
1629
import random import string from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class MyWrapper(object): def __init__(self, value): self.value = value def __repr__(self): return "<%s: %s>" % (sel...
bsd-3-clause
3,720,848,702,035,211,300
27.086207
81
0.601596
false
CeltonMcGrath/TACTIC
3rd_party/CherryPy/cherrypy/test/modfcgid.py
6
4258
"""Wrapper for mod_fcgid, for use as a CherryPy HTTP server when testing. To autostart fcgid, the "apache" executable or script must be on your system path, or you must override the global APACHE_PATH. On some platforms, "apache" may be called "apachectl", "apache2ctl", or "httpd"--create a symlink to them if needed. ...
epl-1.0
-2,568,828,127,213,745,700
33.33871
77
0.662987
false
bergercookie/Pump3000
for_keep/final_code/device_configuration.py
1
1621
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'new_dev.ui' # # Created: Sun Jun 8 13:50:08 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.1 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_Dialog(object): def setupUi(self,...
bsd-2-clause
6,336,461,285,662,444,000
42.810811
117
0.719309
false
FrankTsui/robust_rescaled_svm
common.py
1
1636
import numpy as np import matplotlib.pyplot as plt def plot_decision_function(classifier, fea, gnd, title): ''' plot the decision function in 2-d plane classifiers: the svm models fea: array like, shape = (smp_num, fea_num) gnd: array like, shape = (smp_num,) title: title ...
apache-2.0
-7,288,017,175,188,139,000
39.925
124
0.579462
false
JeanKossaifi/scikit-learn
sklearn/tree/tests/test_tree.py
48
47506
""" Testing for the tree module (sklearn.tree). """ import pickle from functools import partial from itertools import product import platform import numpy as np from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sparse import coo_matrix from sklearn.random_projection import sparse_rand...
bsd-3-clause
3,487,207,254,565,511,000
35.403065
79
0.58862
false
miku/siskin
siskin/test_openurl.py
1
5627
from siskin.openurl import openurl_parameters_from_intermediateschema def test_openurl_from_intermediateschema(): cases = ( ('empty doc', {}, {}), ( 'title only', { 'rft.atitle': 'empty doc' }, { 'ctx_enc': 'info:ofi/e...
gpl-3.0
-3,538,089,728,913,000,400
34.16875
154
0.376577
false
barryHub20/ServerAss2
lib/itsdangerous.py
626
31840
# -*- coding: utf-8 -*- """ itsdangerous ~~~~~~~~~~~~ A module that implements various functions to deal with untrusted sources. Mainly useful for web applications. :copyright: (c) 2014 by Armin Ronacher and the Django Software Foundation. :license: BSD, see LICENSE for more details. """ imp...
apache-2.0
-2,543,009,830,124,408,300
35.513761
81
0.632004
false
felixbb/forseti-security
tests/common/gcp_api/bigquery_test.py
1
5019
# Copyright 2017 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 or agreed to in writing, s...
apache-2.0
1,886,433,124,228,149,000
37.906977
78
0.664873
false
slohse/ansible
setup.py
34
11028
from __future__ import print_function import json import os import os.path import re import sys import warnings from collections import defaultdict from distutils.command.build_scripts import build_scripts as BuildScripts from distutils.command.sdist import sdist as SDist try: from setuptools import setup, find...
gpl-3.0
-3,264,189,986,342,779,400
33.35514
121
0.609993
false
sekikn/incubator-airflow
airflow/contrib/hooks/aws_athena_hook.py
12
1153
# # 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...
apache-2.0
727,083,354,184,739,200
37.433333
89
0.766696
false
clumsy/intellij-community
python/lib/Lib/encodings/cp866.py
593
34652
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP866.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_map) def decode(self,input,errors='strict'): ...
apache-2.0
4,318,136,999,309,368,000
48.644699
97
0.611278
false
BackupTheBerlios/espressopp
contrib/mpi4py/mpi4py-1.3/test/test_attributes.py
3
8196
from mpi4py import MPI import mpiunittest as unittest from sys import getrefcount as getrc class BaseTestCommAttr(object): keyval = MPI.KEYVAL_INVALID def tearDown(self): self.comm.Free() if self.keyval != MPI.KEYVAL_INVALID: self.keyval = MPI.Comm.Free_keyval(self.keyval) ...
gpl-3.0
3,733,257,960,122,746,000
31.141176
69
0.630063
false
Simran-B/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/numbers.py
59
10271
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. TODO: Fill out more detailed documentation on the operators.""" from __future__ import division from abc import ABCMeta, abstractmethod, abstractprop...
apache-2.0
3,724,814,421,603,377,700
25.268542
80
0.595852
false
mgracer48/panda3d
direct/src/distributed/MsgTypes.py
5
5594
"""MsgTypes module: contains distributed object message types""" from direct.showbase.PythonUtil import invertDictLossless MsgName2Id = { # 2 new params: passwd, char bool 0/1 1 = new account # 2 new return values: 129 = not found, 12 = bad passwd, 'CLIENT_LOGIN': 1, '...
bsd-3-clause
-4,714,705,701,539,997,000
41.70229
102
0.499821
false
Bulochkin/tensorflow_pack
tensorflow/python/kernel_tests/distributions/multinomial_test.py
48
13141
# 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
-627,194,293,295,146,100
37.311953
80
0.602542
false
sebmarchand/syzygy
third_party/numpy/files/numpy/distutils/fcompiler/gnu.py
85
14383
import re import os import sys import warnings import platform import tempfile from subprocess import Popen, PIPE, STDOUT from numpy.distutils.cpuinfo import cpu from numpy.distutils.fcompiler import FCompiler from numpy.distutils.exec_command import exec_command from numpy.distutils.misc_util import msvc_runtime_libr...
apache-2.0
-6,499,297,468,068,734,000
36.455729
109
0.538761
false
KirtoXX/Security_Camera
ssd_mobilenet/object_detection/models/faster_rcnn_inception_resnet_v2_feature_extractor.py
13
9042
# 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 required by applica...
apache-2.0
-2,878,342,389,594,409,500
42.263158
80
0.641009
false
jkyeung/XlsxWriter
xlsxwriter/test/comparison/test_fit_to_pages01.py
1
1354
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
bsd-2-clause
7,276,973,820,359,425,000
28.434783
91
0.581241
false
est31/godot
tools/translations/extract.py
4
3162
#!/bin/python import fnmatch import os import shutil import subprocess import sys line_nb = False for arg in sys.argv[1:]: if (arg == "--with-line-nb"): print("Enabling line numbers in the context locations.") line_nb = True else: os.sys.exit("Non supported argument '" + arg + "'. Aborting.") if (not os.p...
mit
-9,170,374,170,648,537,000
25.571429
114
0.629981
false
kerrpy/kerrpy
docs/source/conf.py
1
10716
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # kerrpy documentation build configuration file, created by # sphinx-quickstart on Wed Aug 10 14:00:40 2016. # # 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 # aut...
gpl-3.0
4,364,511,312,134,557,000
29.434659
183
0.692803
false
crazcalm/AngelHack_python34
myenv/Lib/site-packages/pip/exceptions.py
398
1086
"""Exceptions used throughout package""" class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class UninstallationError(PipError): """General exception during uninstallation""" class DistributionNotFound(InstallationError)...
mit
7,565,227,415,835,890,000
22.608696
77
0.739411
false
feroda/django
django/contrib/postgres/fields/hstore.py
45
2945
import json from django.contrib.postgres import forms, lookups from django.contrib.postgres.fields.array import ArrayField from django.core import exceptions from django.db.models import Field, TextField, Transform from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStore...
bsd-3-clause
6,559,330,261,788,073,000
27.317308
69
0.647878
false
Juniper/tempest
tempest/tests/lib/common/test_http.py
1
2801
# 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 agreed to in...
apache-2.0
4,677,533,993,914,791,000
40.191176
78
0.625134
false
pratikmallya/hue
desktop/core/ext-py/Django-1.6.10/django/views/decorators/cache.py
129
2286
from functools import wraps from django.utils.decorators import decorator_from_middleware_with_args, available_attrs from django.utils.cache import patch_cache_control, add_never_cache_headers from django.middleware.cache import CacheMiddleware def cache_page(*args, **kwargs): """ Decorator for views that tri...
apache-2.0
-3,524,898,767,110,126,000
40.563636
140
0.704724
false
sf-wind/caffe2
caffe2/python/pipeline_test.py
4
3358
# Copyright (c) 2016-present, Facebook, 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...
apache-2.0
-5,869,858,987,812,251,000
35.5
78
0.603931
false
tody411/ImageViewerFramework
ivf/cmds/save_depth.py
1
1284
# -*- coding: utf-8 -*- ## @package ivf.cmds.save_depth # # ivf.cmds.save_depth utility package. # @author tody # @date 2016/02/02 from PyQt4.QtGui import * from PyQt4.QtCore import * import os from ivf.cmds.base_cmds import BaseCommand from ivf.scene.gl3d.image_plane import ImagePlane from ivf.io_u...
mit
-5,482,225,773,421,896,000
26.934783
124
0.614486
false
David-Amaro/bank-payment
account_payment_blocking/__init__.py
16
1081
# -*- encoding: utf-8 -*- ############################################################################## # # Account Payment Blocking module for Odoo # Copyright (C) 2014-2015 ACSONE SA/NV (http://acsone.eu) # @author Stéphane Bidoul <stephane.bidoul@acsone.eu> # # This program is free software: you can red...
agpl-3.0
5,374,418,594,436,135,000
44
78
0.613889
false
kisel/trex-core
scripts/astf/param_mss_err.py
2
1056
from trex_astf_lib.api import * # IPV6 tunable example # # ipv6.src_msb # ipv6.dst_msb # ipv6.enable # class Prof1(): def __init__(self): pass def get_profile(self, **kwargs): # ip generator ip_gen_c = ASTFIPGenDist(ip_range=["16.0.0.0", "16.0.0.255"], distribution="seq") ...
apache-2.0
7,100,825,590,404,855,000
28.333333
100
0.484848
false
vschs007/buck
third-party/py/pex/pex/interpreter.py
52
12996
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). """pex support for interacting with interpreters.""" from __future__ import absolute_import import os import re import subprocess import sys from collections import defaultdict from pkg...
apache-2.0
-4,550,507,036,375,673,300
29.578824
99
0.657433
false
AOKP/external_chromium_org
tools/python/google/gethash_timer.py
182
4366
#!/usr/bin/env python # Copyright (c) 2011 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. """Issue a series of GetHash requests to the SafeBrowsing servers and measure the response times. Usage: $ ./gethash_timer.py -...
bsd-3-clause
-2,610,213,376,318,876,000
28.302013
78
0.653
false
srinathv/vispy
vispy/visuals/isocurve.py
18
7809
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import numpy as np from .line import LineVisual from ..color import ColorArray from ..color.colormap import _normalize, get_colormap from ..g...
bsd-3-clause
4,437,686,698,291,279,000
33.25
77
0.560891
false
jef-n/QGIS
python/plugins/processing/tests/SagaAlgorithmsTest.py
36
6002
# -*- coding: utf-8 -*- """ *************************************************************************** SagaAlgorithmsTests.py --------------------- Date : September 2017 Copyright : (C) 2017 by Alexander Bruy Email : alexander dot bruy at gmail dot com ***...
gpl-2.0
-5,906,617,634,566,161,000
42.158273
179
0.601934
false
cbare/Etudes
python/strings.py
1
1543
""" String algorithms """ def balanced_parens(s: str) -> bool: open = 0 for c in s: if c=='(': open += 1 if c==')': if open > 0: open -= 1 else: return False return open==0 assert balanced_parens('') assert balanced_parens('()') asser...
apache-2.0
6,885,814,736,535,310,000
23.492063
78
0.473104
false
lorenzo-desantis/mne-python
mne/preprocessing/eog.py
6
7587
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import numpy as np from .peak_finder import peak_finder from .. import pick_types, pick_channels from ..utils import...
bsd-3-clause
-1,182,136,550,195,087,600
35.475962
79
0.568604
false
ttrifonov/EventBrain
src/eventbrain/bin/launcher.py
1
9958
#!/usr/bin/env python # file: launcher.py import os import sys import logging from optparse import OptionParser, OptionGroup from eventbrain.util.daemon import Daemon FORMAT = '%(asctime)-15s:%(name)s:%(process)d:%(levelname)s === %(message)s' logging.basicConfig(format=FORMAT, level=logging.INFO, stream=sys.stdout) ...
apache-2.0
-816,246,304,667,039,600
31.864686
78
0.527214
false
dhalleine/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/exponential_test.py
3
4546
# 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,137,812,298,313,653,000
34.795276
80
0.630444
false
BraveSirRobbo/steam-scraper
test.py
1
4225
import unittest from bs4 import BeautifulSoup import re def justOne(ls): assert(len(ls) == 1) return ls[0] def scrapePage(html_doc): soup = BeautifulSoup(html_doc, 'html.parser') ratings = [s.get_text() for s in soup.find_all("span",attrs={ "class": re.compile(r"game_review_summary .*")})] assert(len(ratin...
apache-2.0
8,001,148,401,895,838,000
35.73913
351
0.624615
false
felipeAraujo/Bet-Calculator
test_bet.py
1
13680
import unittest from bet_calculator.bet_calculator import Bet_Calculator from decimal import * class Bet_Test_Case(unittest.TestCase): """Test the Bet_Calculator class""" def setUp(self): self.bet_calculator = Bet_Calculator() def test_if_is_calculating_that_odds_will_profit(self): """ ...
mit
-3,532,013,752,297,662,000
40.707317
127
0.619591
false
zoyanhui/flask
tests/test_templating.py
148
13057
# -*- coding: utf-8 -*- """ tests.templating ~~~~~~~~~~~~~~~~ Template functionality :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import pytest import flask import logging from jinja2 import TemplateNotFound def test_context_processing(): app = f...
bsd-3-clause
-3,852,446,670,625,639,400
32.308673
82
0.603967
false
eljost/pysisyphus
deprecated/tests/test_dynamics/test_dynamics.py
1
2531
from matplotlib.patches import Circle import matplotlib.pyplot as plt import numpy as np import pytest from pysisyphus.calculators.AnaPot import AnaPot from pysisyphus.dynamics.velocity_verlet import md def test_velocity_verlet(): geom = AnaPot.get_geom((0.52, 1.80, 0)) x0 = geom.coords.copy() v0 = .1 * ...
gpl-3.0
-5,884,419,591,824,381,000
26.51087
83
0.591861
false
yashsharan/sympy
sympy/calculus/euler.py
16
3263
""" This module implements a method to find Euler-Lagrange Equations for given Lagrangian. """ from itertools import combinations_with_replacement from sympy import Function, sympify, diff, Eq, S, Symbol, Derivative from sympy.core.compatibility import (iterable, range) def euler_equations(L, funcs=(), vars=()): ...
bsd-3-clause
1,317,070,981,513,880,300
30.679612
78
0.579835
false
Bachaco-ve/odoo
addons/account_test/report/account_test_report.py
194
3819
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify #...
agpl-3.0
3,707,707,582,298,795,500
38.371134
121
0.59204
false
adit-chandra/tensorflow
tensorflow/python/keras/applications/imagenet_utils.py
5
1439
# 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
5,496,285,182,079,640,000
38.972222
80
0.737318
false
fibbo/DIRAC
Interfaces/scripts/dirac-wms-job-attributes.py
8
1197
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-wms-job-attributes # Author : Stuart Paterson ######################################################################## """ Retrieve attributes associated with the given DIRAC job """ __RCSID__...
gpl-3.0
6,073,621,364,408,975,000
28.925
95
0.482038
false
nikhil93uf/Qemu
scripts/tracetool/backend/simple.py
97
2669
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simple built-in backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012-2014, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi"...
gpl-2.0
-3,565,729,492,435,361,000
25.939394
103
0.493063
false
tod31/pyload
module/plugins/hoster/RPNetBiz.py
5
3545
# -*- coding: utf-8 -*- import re from module.plugins.internal.MultiHoster import MultiHoster from module.plugins.internal.misc import json class RPNetBiz(MultiHoster): __name__ = "RPNetBiz" __type__ = "hoster" __version__ = "0.20" __status__ = "testing" __pattern__ = r'https?://.+rpnet\...
gpl-3.0
5,885,631,327,325,925,000
42.765432
105
0.490268
false
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/theano/tensor/tests/test_io.py
7
2053
import unittest import theano from theano import tensor, function, Variable, Generic import numpy import os class T_load_tensor(unittest.TestCase): def setUp(self): self.data = numpy.arange(5, dtype=numpy.int32) self.filename = os.path.join( theano.config.compiledir, "_test...
mit
-4,291,947,874,992,496,600
35.660714
76
0.574769
false
Hellowlol/HTPC-Manager
libs/mako/_ast_util.py
60
25652
# mako/_ast_util.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ ast ~~~ The `ast` module helps Python applications to process trees of the Pyth...
mit
607,937,448,600,968,600
29.357396
79
0.555668
false
40223117cda/cda
static/Brython3.1.1-20150328-091302/Lib/test/test_int.py
765
12587
import sys import unittest from test.support import run_unittest L = [ ('0', 0), ('1', 1), ('9', 9), ('10', 10), ('99', 99), ('100', 100), ('314', 314), (' 314', 314), ('314 ', 314), (' \t\t 314 \t\t ', 314), (repr(sys.maxsize...
gpl-3.0
-2,974,264,190,853,167,600
38.090062
81
0.561373
false
mzdaniel/oh-mainline
vendor/packages/python-otp/otp/hash.py
16
2386
import struct class BaseHash: def __init__(self, name): self.name = name def prepare(self, hash): if type(hash) is long: newhash = '' for i in range(56, -8, -8): newhash += chr((hash>>i)%256) hash = newhash return hash class HashMD5(...
agpl-3.0
-1,892,038,729,153,453,000
23.10101
62
0.489103
false
rdio/sentry
tests/sentry/udp/tests.py
4
1167
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry.models import Project, User from sentry.services.udp import SentryUDPServer from sentry.testutils import TestCase, get_auth_header class SentryUDPTest(TestCase): def setUp(self): self.address = (('0.0.0.0', 0)) self.serve...
bsd-3-clause
408,418,204,307,300,900
42.222222
111
0.667524
false
hoonkim/Lesser
parsers/tests/test_http_parser.py
1
1060
from unittest import TestCase from parsers.http_parser import * __author__ = 'kimothy' class TestHttpParser(TestCase): def test_parse_url(self): testList = parse_url("//foo/bar//") self.assertEqual(testList[0], "foo") self.assertEqual(testList[1], "bar") self.assertEqual(len(test...
mit
-4,969,871,266,550,382,000
30.176471
88
0.570755
false
kashev/kashev.rocks
manage.py
1
1238
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # kashev.rocks # Kashev Dalmia - kashev.dalmia@gmail.com from flask.ext.script import Manager from flask.ext.assets import ManageAssets from src.kashevrocks import app from src.assets import register_assets manager = Manager(app) assets_env = register_assets(app) manag...
mit
-2,425,773,170,606,357,000
22.807692
79
0.642973
false
brayden2544/Mystuff-final
account/cached_templates/templates/password_reset.html.py
1
1886
# -*- coding:ascii -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 9 _modified_time = 1397087641.387625 _enable_loop = True _template_filename = 'C:\\app\\account\\templates/password_reset.html' _template_uri = 'password_rese...
apache-2.0
1,488,263,980,460,247,600
30.966102
143
0.626723
false
nathanial/lettuce
tests/integration/lib/Django-1.3/tests/modeltests/model_inheritance/models.py
118
3888
""" XX. Model inheritance Model inheritance exists in two varieties: - abstract base classes which are a way of specifying common information inherited by the subclasses. They don't exist as a separate model. - non-abstract base classes (the default), which are models in their own right with ...
gpl-3.0
-5,259,749,329,917,326,000
24.411765
89
0.675154
false
AtsushiSakai/PythonRobotics
PathPlanning/Eta3SplinePath/eta3_spline_path.py
1
13649
""" eta^3 polynomials planner author: Joe Dinius, Ph.D (https://jwdinius.github.io) Atsushi Sakai (@Atsushi_twi) Ref: - [eta^3-Splines for the Smooth Path Generation of Wheeled Mobile Robots] (https://ieeexplore.ieee.org/document/4339545/) """ import numpy as np import matplotlib.pyplot as plt from scipy.i...
mit
5,245,574,693,435,425,000
36.808864
125
0.486776
false
steenzout/python-barcode
docs/conf.py
1
11075
# -*- coding: utf-8 -*- # # Copyright 2010-2013, Thorsten Weimann; 2014, Alexander Shorin; 2016 Pedro Salgado # # 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/lic...
mit
4,455,014,411,438,905,000
26.413366
85
0.68614
false
SpredfastLegacy/JsBeautify
jsbeautifier/unpackers/packer.py
76
3302
# # Unpacker for Dean Edward's p.a.c.k.e.r, a part of javascript beautifier # by Einar Lielmanis <einar@jsbeautifier.org> # # written by Stefano Sanfilippo <a.little.coder@gmail.com> # # usage: # # if detect(some_string): # unpacked = unpack(some_string) # """Unpacker for Dean Edward's p.a.c.k.e.r""" import r...
bsd-3-clause
-3,147,354,450,630,264,000
30.75
78
0.586917
false
midma101/AndIWasJustGoingToBed
.venv/lib/python2.7/site-packages/markupsafe/__init__.py
371
8205
# -*- coding: utf-8 -*- """ markupsafe ~~~~~~~~~~ Implements a Markup string. :copyright: (c) 2010 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re from markupsafe._compat import text_type, string_types, int_types, \ unichr, PY2 __all__ = ['Markup', 'soft_unicod...
mit
1,277,062,579,156,340,500
34.064103
85
0.577331
false
denfromufa/pythonnet
demo/helloform.py
8
1769
#!/usr/bin/env python # -*- coding: utf-8 -*- import clr SWF = clr.AddReference("System.Windows.Forms") print (SWF.Location) import System.Windows.Forms as WinForms from System.Drawing import Size, Point class HelloApp(WinForms.Form): """A simple hello world app that demonstrates the essentials of winfor...
mit
-985,810,494,902,420,700
27.079365
74
0.626343
false
SpOOnman/claws
tools/vcard2xml.py
11
8810
#!/usr/bin/env python # -*- coding: latin-1 -*- """ Copyright © 2003 Bogdan Sumanariu <zarrok@yahoo.com> This file 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 ...
gpl-3.0
1,002,031,994,638,320,500
27.419355
197
0.56084
false
overtherain/scriptfile
software/googleAppEngine/lib/django_1_4/django/contrib/localflavor/za/forms.py
89
1940
""" South Africa-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField from django.utils.checksums import luhn from django.utils.translation import gettext as _ import re from datetime import date id_re ...
mit
3,290,177,538,023,332,400
31.333333
88
0.624742
false
linearregression/socorro
socorro/app/fetch_transform_save_app.py
7
11493
# 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/. """this is the basis for any app that follows the fetch/transform/save model * the configman versions of the crash move...
mpl-2.0
-2,816,078,811,531,067,000
41.409594
79
0.553641
false
Weihonghao/ECM
Vpy34/lib/python3.5/site-packages/numpy/f2py/__init__.py
63
2038
#!/usr/bin/env python """Fortran to Python Interface Generator. """ from __future__ import division, absolute_import, print_function __all__ = ['run_main', 'compile', 'f2py_testing'] import sys from . import f2py2e from . import f2py_testing from . import diagnose run_main = f2py2e.run_main main = f2py2e.main de...
agpl-3.0
-8,136,486,999,501,733,000
26.540541
71
0.61629
false
gomiero/PTVS
Python/Product/Pyvot/Pyvot/xl/__init__.py
18
4494
# Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the LICENSE.txt file at the root of this distribution. If # you cannot locate the Apache License, Version 2.0, please send an email to # vsp...
apache-2.0
-5,316,928,215,186,286,000
56.38961
133
0.683133
false
odootr/odoo
addons/account/wizard/account_tax_chart.py
385
3247
# -*- 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,979,491,283,107,187,200
41.116883
110
0.55905
false
blitzmann/Pyfa
eos/saveddata/fighterAbility.py
1
5887
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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, ...
gpl-3.0
-2,150,383,331,423,504,100
36.737179
134
0.625786
false
davidwaroquiers/pymatgen
pymatgen/io/abinit/tests/test_inputs.py
5
10923
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import tempfile import unittest import numpy as np from pymatgen.core.structure import Structure from pymatgen.io.abinit.inputs import ( BasicAbinitInput, BasicMultiDataset, ShiftMode, ...
mit
-6,020,666,609,939,037,000
34.349515
107
0.590955
false
yasoob/youtube-dl-GUI
youtube_dl/extractor/glide.py
64
1543
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class GlideIE(InfoExtractor): IE_DESC = 'Glide mobile video messages (glide.me)' _VALID_URL = r'https?://share\.glide\.me/(?P<id>[A-Za-z0-9\-=_+]+)' _TEST = { 'url': 'http://share.glide.me/UZF8zlmuQbe4mr+7dC...
mit
8,006,231,734,576,173,000
34.883721
83
0.52884
false
acshi/osf.io
website/util/rubeus.py
7
11153
# -*- coding: utf-8 -*- """Contains helper functions for generating correctly formatted hgrid list/folders. """ import logging import hurry.filesize from django.utils import timezone from framework import sentry from framework.auth.decorators import Auth from django.apps import apps from website import settings fro...
apache-2.0
5,438,896,815,541,774,000
34.406349
124
0.60477
false
daafgo/Server_LRS
lrs/util/retrieve_statement.py
1
11615
import bencode import hashlib import json from datetime import datetime from itertools import chain from django.core.cache import cache from django.conf import settings from django.core.paginator import Paginator from django.db.models import Q from util import convert_to_utc, convert_to_dict from ..models import Stat...
apache-2.0
5,895,940,552,125,944,000
39.190311
137
0.624193
false
RAtechntukan/CouchPotatoServer
libs/subliminal/services/tvsubtitles.py
106
6240
# -*- coding: utf-8 -*- # Copyright 2012 Nicolas Wack <wackou@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of the Licen...
gpl-3.0
3,814,871,655,794,799,000
42.943662
145
0.604487
false
ds-hwang/chromium-crosswalk
remoting/tools/zip2msi.py
89
8691
#!/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. """Generates .msi from a .zip archive or an unpacked directory. The structure of the input archive or directory should look like t...
bsd-3-clause
7,209,941,797,004,164,000
30.952206
80
0.682085
false
rolobio/DictORM
dictorm/pg.py
1
10974
""" This module is used to build queries for Postgresql. You shouldn't really need to import anything from this file because they can all be built using dictorm.Table. Sqlite queries are slightly different, but use these methods as their base. """ from copy import copy from typing import Union global sort_keys sort_...
apache-2.0
-8,272,285,528,467,006,000
27.80315
91
0.558958
false
megraf/asuswrt-merlin
release/src/router/libxml2/python/tests/xpath.py
87
1188
#!/usr/bin/python -u # # this test exercise the XPath basic engine, parser, etc, and # allows to detect memory leaks # import sys import libxml2 # Memory debug specific libxml2.debugMemory(1) doc = libxml2.parseFile("tst.xml") if doc.name != "tst.xml": print "doc.name error" sys.exit(1); ctxt = doc.xpathNewC...
gpl-2.0
-4,336,757,916,907,250,000
22.294118
61
0.654882
false
mmatyas/skia
tools/misc_utils.py
68
7711
# Copyright 2014 Google Inc. # # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Module to host the VerboseSubprocess, ChangeDir, and ReSearch classes. """ import os import re import subprocess def print_subprocess_args(prefix, *args, **kwargs): """Print o...
bsd-3-clause
-5,381,130,281,967,364,000
33.424107
77
0.59253
false
mbauskar/helpdesk-frappe
frappe/patches/v5_2/change_checks_to_not_null.py
58
1267
from __future__ import unicode_literals import frappe from frappe.utils import cint from frappe.model import default_fields def execute(): for table in frappe.db.get_tables(): doctype = table[3:] if frappe.db.exists("DocType", doctype): fieldnames = [df["fieldname"] for df in frappe.get_all("DocField", fie...
mit
7,124,992,491,837,945,000
36.264706
102
0.671665
false
wiltonlazary/arangodb
3rdParty/V8/V8-5.0.71.39/tools/swarming_client/tests/lru_test.py
6
6265
#!/usr/bin/env python # Copyright 2013 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. import json import logging import os import sys import tempfile import unittest ROOT_DIR = os.path.dirname(os.path.dirn...
apache-2.0
-7,147,157,685,968,510,000
26.47807
80
0.622666
false
kkampardi/Plinth
plinth/modules/matrixsynapse/views.py
2
2670
# # This file is part of Plinth. # # 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 # License, or (at your option) any later version. # # This program is distribute...
agpl-3.0
345,140,781,094,044,350
34.131579
75
0.695506
false
ZihengJiang/mxnet
python/mxnet/profiler.py
31
2161
# 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
7,532,587,623,368,357,000
36.258621
90
0.698751
false
critiqjo/key-mon
src/keymon/options.py
15
14492
#!/usr/bin/python # # Copyright 2010 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 or a...
apache-2.0
-6,279,942,363,672,504,000
32.162471
84
0.619031
false
maciekcc/tensorflow
tensorflow/python/ops/linalg_grad.py
23
9040
# 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
-1,518,084,748,407,574,500
37.468085
80
0.645796
false
kirkbroadhurst/sudokupy
test_moves.py
1
3391
from moves import find_possible_moves, find_impossible_moves, resolve_moves def test_find_possible_moves_1(): # the first item, with value 0, is 'missing'. find_possible_moves will tell us it should be a 9. state = [((i,i), i) for i in range(9)] moves = find_possible_moves(state) assert len(moves...
mit
3,486,412,079,220,668,000
36.274725
133
0.539664
false
Fireblend/chromium-crosswalk
tools/cygprofile/cyglog_to_orderfile.py
6
8358
#!/usr/bin/python # Copyright 2015 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. """Symbolizes a log file produced by cyprofile instrumentation. Given a log file and the binary being profiled, creates an orderfile. """ ...
bsd-3-clause
-5,208,371,290,180,285,000
31.395349
90
0.684015
false