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
h2oai/h2o-dev
h2o-py/h2o/exceptions.py
4
6460
# -*- encoding: utf-8 -*- # Copyright: (c) 2016 H2O.ai # License: Apache License Version 2.0 (see LICENSE for details) """ :mod:`h2o.exceptions` -- all exceptions classes in h2o module. All H2O exceptions derive from :class:`H2OError`. """ from __future__ import absolute_import, division, print_function, unicode_lit...
apache-2.0
-7,529,625,104,596,845,000
41.781457
120
0.571672
false
recap/pumpkin
examples/tweeter/filters-cat2/filterhaikus.py
1
3418
__author__ = 'reggie' ###START-CONF ##{ ##"object_name": "filterhaikus", ##"object_poi": "qpwo-2345", ##"parameters": [ ## { ## "name": "tweet", ## "description": "english tweets", ## "required": true, ## "type": "Twee...
mit
3,389,837,827,390,922,000
26.126984
80
0.404915
false
Diegojnb/JdeRobot
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_misc.py
11
8845
#!/usr/bin/env python '''miscellaneous commands''' import time, math from pymavlink import mavutil from MAVProxy.modules.lib import mp_module from os import kill from signal import signal from subprocess import PIPE, Popen class RepeatCommand(object): '''repeated command object''' def __init__(self, period...
gpl-3.0
-931,757,112,820,439,600
38.842342
111
0.520746
false
cjellick/rancher
tests/integration/suite/test_globaldns.py
4
12409
from .common import random_str from rancher import ApiError from kubernetes.client import CustomObjectsApi from kubernetes.client import CoreV1Api import pytest import time import kubernetes import base64 def test_dns_fqdn_unique(admin_mc): client = admin_mc.client provider_name = random_str() access = ra...
apache-2.0
-4,750,172,076,927,140,000
35.931548
77
0.593037
false
bioinfo-center-pasteur-fr/ReGaTE
regate/remag.py
2
7997
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created on Jun. 16, 2014 @author: Olivia Doppelt-Azeroual, CIB-C3BI, Institut Pasteur, Paris @author: Fabien Mareuil, CIB-C3BI, Institut Pasteur, Paris @author: Hervé Ménager, CIB-C3BI, Institut Pasteur, Paris @contact: fabien.mareuil@pasteur.fr @project: ReGaTE @githu...
gpl-2.0
5,132,948,319,338,434,000
32.592437
119
0.593996
false
dcclogin/TextGenerator
TitleCrawler/ccf_conference/categories/network/lcn2015.py
1
3390
# -*- coding: utf-8 -*- import re import copy import random import os, sys import MySQLdb import requests from time import sleep from threading import Thread from bs4 import BeautifulSoup reload(sys) sys.setdefaultencoding('utf-8') clade = 'http://dblp.uni-trier.de/db/conf/lcn/' months = { 'January': '01', 'F...
mit
1,076,613,601,963,601,900
23.751825
98
0.638053
false
cmelange/ansible
lib/ansible/modules/cloud/misc/virt.py
44
15378
#!/usr/bin/python # -*- coding: utf-8 -*- """ Virt management features Copyright 2007, 2012 Red Hat, Inc Michael DeHaan <michael.dehaan@gmail.com> Seth Vidal <skvidal@fedoraproject.org> This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of th...
gpl-3.0
-1,194,582,161,413,826,300
26.708108
116
0.55872
false
atopuzov/nitro-python
nssrc/com/citrix/netscaler/nitro/resource/config/tm/tmsessionpolicy_tmglobal_binding.py
3
5241
# # Copyright (c) 2008-2015 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
apache-2.0
-7,394,561,106,741,248,000
27.796703
134
0.702538
false
seungjin/app5-seungjin-net.appspot.com
dbindexer/backends.py
74
18859
from django.db import models from django.db.models.fields import FieldDoesNotExist from django.db.models.sql.constants import JOIN_TYPE, LHS_ALIAS, LHS_JOIN_COL, \ TABLE_NAME, RHS_JOIN_COL from django.utils.tree import Node from djangotoolbox.fields import ListField from .lookups import StandardLookup OR = 'OR' #...
bsd-3-clause
5,055,951,464,444,808,000
39.55914
87
0.570709
false
KaranToor/MA450
google-cloud-sdk/platform/gsutil/third_party/boto/boto/ec2/instancestatus.py
181
6854
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
apache-2.0
8,925,168,710,787,599,000
31.330189
74
0.628976
false
mach6/selenium
py/test/unit/selenium/webdriver/remote/test_new_session.py
9
2867
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
377,334,481,453,727,170
45.241935
95
0.729683
false
SaganBolliger/nupic
src/nupic/swarming/hypersearch/experimentutils.py
40
9312
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
7,031,728,772,097,014,000
39.486957
81
0.602234
false
ak2703/edx-platform
lms/djangoapps/certificates/tests/test_create_fake_cert.py
107
2003
"""Tests for the create_fake_certs management command. """ from django.test import TestCase from django.core.management.base import CommandError from nose.plugins.attrib import attr from opaque_keys.edx.locator import CourseLocator from student.tests.factories import UserFactory from certificates.management.commands i...
agpl-3.0
-1,804,695,863,457,671,400
36.092593
90
0.664004
false
SohKai/ChronoLogger
web/flask/lib/python2.7/site-packages/whoosh/spelling.py
39
12750
# Copyright 2007 Matt Chaput. 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 the...
mit
6,058,262,299,961,608,000
36.946429
80
0.634902
false
TeamExodus/external_chromium_org
third_party/tlslite/tlslite/utils/openssl_rsakey.py
200
4670
# Author: Trevor Perrin # See the LICENSE file for legal information regarding use of this file. """OpenSSL/M2Crypto RSA implementation.""" from .cryptomath import * from .rsakey import * from .python_rsakey import Python_RSAKey #copied from M2Crypto.util.py, so when we load the local copy of m2 #we can still use i...
bsd-3-clause
4,369,961,042,199,362,000
33.338235
73
0.466809
false
rldhont/Quantum-GIS
tests/src/python/test_qgsserver_projectutils.py
27
2853
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsServerProject. .. note:: 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. """...
gpl-2.0
1,455,714,124,086,651,100
33.373494
96
0.698212
false
DBrianKimmel/PyHouse
Project/src/Modules/House/Family/Hue/hue_hub.py
1
25036
""" @name: Modules/House/Family/hue/hue_hub.py @author: D. Brian Kimmel @contact: D.BrianKimmel@gmail.com @copyright: (c) 2017-2020 by D. Brian Kimmel @note: Created on Dec 19, 2017 @license: MIT License @summary: /config /lights /groups /schedules /scenes /sensors /rules Read the hub info and popula...
mit
-2,782,662,431,639,316,500
32.560322
126
0.543378
false
lgscofield/odoo
addons/l10n_be_hr_payroll/__init__.py
438
1072
# -*- 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
4,699,206,533,591,164,000
45.608696
78
0.61847
false
mapclient-plugins/trcsourcestep
mapclientplugins/trcsourcestep/ui_configuredialog.py
1
3575
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'configuredialog.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ##########...
apache-2.0
-2,478,812,506,755,879,000
39.168539
121
0.682797
false
landscapeio/astroid
brain/py2stdlib.py
1
5939
"""Astroid hooks for the Python 2 standard library. Currently help understanding of : * hashlib.md5 and hashlib.sha1 """ from astroid import MANAGER, AsStringRegexpPredicate, UseInferenceDefault, inference_tip from astroid import nodes from astroid.builder import AstroidBuilder MODULE_TRANSFORMS = {} # module spe...
gpl-2.0
-367,528,999,626,220,400
26.623256
88
0.64691
false
nikolas/lettuce
tests/integration/lib/Django-1.3/django/core/serializers/base.py
202
5487
""" Module for abstract serializer/unserializer base classes. """ from StringIO import StringIO from django.db import models from django.utils.encoding import smart_str, smart_unicode from django.utils import datetime_safe class SerializationError(Exception): """Something bad happened during serialization.""" ...
gpl-3.0
-2,018,896,434,435,930,000
30.901163
102
0.602515
false
arcivanov/unittest-xml-reporting
setup.py
4
1728
#!/usr/bin/env python from setuptools import setup, find_packages from distutils.util import convert_path import codecs # Load version information main_ns = {} ver_path = convert_path('xmlrunner/version.py') with codecs.open(ver_path, 'rb', 'utf8') as ver_file: exec(ver_file.read(), main_ns) install_requires = [...
bsd-2-clause
-6,121,670,633,159,836,000
31.603774
82
0.627315
false
adambrenecki/django
django/contrib/gis/tests/geoapp/tests.py
4
37417
from __future__ import unicode_literals import re import unittest from unittest import skipUnless from django.db import connection from django.contrib.gis import gdal from django.contrib.gis.geos import HAS_GEOS from django.contrib.gis.tests.utils import ( HAS_SPATIAL_DB, no_mysql, no_oracle, no_spatialite, m...
bsd-3-clause
-5,255,689,310,111,231,000
46.604326
227
0.62215
false
BrandonY/python-docs-samples
tasks/pull_queue_snippets_test.py
1
1231
# 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, soft...
apache-2.0
5,580,290,444,639,018,000
34.171429
74
0.73355
false
shashank971/edx-platform
common/djangoapps/terrain/stubs/http.py
139
8556
""" Stub implementation of an HTTP service. """ from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler import urlparse import threading import json from functools import wraps from lazy import lazy from logging import getLogger LOGGER = getLogger(__name__) def require_params(method, *required_keys): """ ...
agpl-3.0
-9,055,320,953,270,088,000
29.888087
110
0.563114
false
espadrine/opera
chromium/src/v8/tools/testrunner/local/utils.py
21
3476
# Copyright 2012 the V8 project authors. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditi...
bsd-3-clause
-2,962,663,490,647,458,000
31.185185
76
0.698504
false
klonage/nlt-gcs
packages/IronPython.StdLib.2.7.4/content/Lib/encodings/hex_codec.py
88
2388
""" Python 'hex_codec' Codec - 2-digit hex content transfer encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs, binascii ### Codec APIs def...
gpl-3.0
-4,965,252,707,678,812,000
28.227848
68
0.663735
false
zaina/nova
tools/install_venv_common.py
333
5959
# Copyright 2013 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
-6,384,204,946,865,733,000
33.645349
79
0.589025
false
charbeljc/OCB
openerp/tools/convert.py
205
41282
# -*- 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
2,073,025,872,213,796,600
40.656912
219
0.529626
false
nagyistoce/kaggle-galaxies
try_convnet_cc_multirotflip_3x69r45_maxout2048_extradense_pysexgen1_dup.py
7
17744
import numpy as np # import pandas as pd import theano import theano.tensor as T import layers import cc_layers import custom import load_data import realtime_augmentation as ra import time import csv import os import cPickle as pickle from datetime import datetime, timedelta # import matplotlib.pyplot as plt # plt.i...
bsd-3-clause
7,384,490,626,677,839,000
40.074074
486
0.686147
false
jspan/Open-Knesset
apis/tests.py
14
6111
import datetime, json, csv from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.contenttypes.models import ContentType from django.contrib.auth.models import User, Group, Permission from tagging.models import Tag, TaggedItem from laws.models import Vote, VoteAction, Bill, La...
bsd-3-clause
2,665,480,174,076,305,400
45.295455
109
0.624775
false
liyu1990/sklearn
examples/ensemble/plot_gradient_boosting_oob.py
50
4764
""" ====================================== Gradient Boosting Out-of-Bag estimates ====================================== Out-of-bag (OOB) estimates can be a useful heuristic to estimate the "optimal" number of boosting iterations. OOB estimates are almost identical to cross-validation estimates but they can be compute...
bsd-3-clause
-6,497,814,080,348,959,000
34.029412
79
0.691646
false
DennisDenuto/puppet-commonscripts
files/aws_cli/AWS-ElasticBeanstalk-CLI-2.6.3/eb/macosx/python3/lib/aws/exception.py
8
3871
#!/usr/bin/env python #============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the...
mit
5,605,147,423,601,906,000
40.634409
98
0.658486
false
les69/calvin-base
calvin/actorstore/systemactors/std/Alternate3.py
2
1901
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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 ...
apache-2.0
6,361,832,392,234,150,000
28.703125
76
0.598106
false
Srogozins/aiohttp
tests/test_py35/test_resp.py
3
1443
import pytest import aiohttp from aiohttp import web from aiohttp.client import _RequestContextManager from collections.abc import Coroutine @pytest.mark.run_loop async def test_await(create_server, loop): async def handler(request): return web.HTTPOk() app, url = await create_server() app.rout...
apache-2.0
2,736,350,668,307,375,600
25.236364
63
0.685378
false
smurfix/p2pool
p2pool/bitcoin/script.py
2
1585
from p2pool.bitcoin import data as bitcoin_data from p2pool.util import bases def reads_nothing(f): return '', f def protoPUSH(length): return lambda f: bitcoin_data.read(f, length) def protoPUSHDATA(size_len): def _(f): length_str, f = bitcoin_data.read(f, size_len) length = bases.string_t...
gpl-3.0
1,570,432,070,719,183,600
30.078431
88
0.642271
false
lgarren/spack
var/spack/repos/builtin/packages/libelf/package.py
3
2051
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-3,376,593,994,144,040,400
40.857143
78
0.660166
false
domob1812/bitcoin
test/functional/feature_rbf.py
2
25198
#!/usr/bin/env python3 # Copyright (c) 2014-2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the RBF code.""" from decimal import Decimal from test_framework.blocktools import COINBASE_MATU...
mit
489,323,382,248,004,300
39.060413
126
0.614057
false
bob-the-hamster/commandergenius
project/jni/python/src/Lib/plat-mac/lib-scriptpackages/Finder/Files.py
80
6439
"""Suite Files: Classes representing files Level 1, version 1 Generated from /System/Library/CoreServices/Finder.app AETE/AEUT resource version 0/144, language 0, script 0 """ import aetools import MacOS _code = 'fndr' class Files_Events: pass class alias_file(aetools.ComponentItem): """alias file - An a...
lgpl-2.1
-3,083,165,114,349,103,600
29.372642
113
0.669514
false
imply/chuu
tools/vim/chromium.ycm_extra_conf.py
47
6223
# 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. # Autocompletion config for YouCompleteMe in Chromium. # # USAGE: # # 1. Install YCM [https://github.com/Valloric/YouCompleteMe] # (Googlers s...
bsd-3-clause
-5,269,646,192,685,857,000
29.655172
80
0.657561
false
matbra/bokeh
examples/interactions/interactive_bubble/data.py
49
1265
import numpy as np from bokeh.palettes import Spectral6 def process_data(): from bokeh.sampledata.gapminder import fertility, life_expectancy, population, regions # Make the column names ints not strings for handling columns = list(fertility.columns) years = list(range(int(columns[0]), int(columns[-...
bsd-3-clause
5,114,000,577,044,321,000
37.333333
90
0.72253
false
tehpug/TehPUG-flask
wsgi/app/forms.py
1
1502
from flask.ext.wtf import Form from wtforms import TextField, BooleanField, PasswordField, TextAreaField, SelectField from wtforms.validators import Required, Length, email, url, Optional import os class RegisterForm(Form): username = TextField('username', validators = [Required(), Length(min = 4, max = 50)]) passwo...
gpl-2.0
-2,651,351,099,410,685,400
50.827586
91
0.691079
false
shawnadelic/shuup
shuup/core/utils/vat.py
2
8413
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2016, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from __future__ import unicode_literals import re import six from django.c...
agpl-3.0
-144,633,080,479,738,750
28.612676
127
0.537337
false
sekikn/incubator-airflow
airflow/providers/jenkins/example_dags/example_jenkins_job_trigger.py
8
2916
# # 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
1,314,985,646,564,380,200
42.522388
110
0.718793
false
sebastic/QGIS
python/plugins/processing/algs/gdal/ogr2ogrclipextent.py
6
3700
# -*- coding: utf-8 -*- """ *************************************************************************** ogr2ogrclipextent.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
gpl-2.0
5,683,246,203,710,712,000
37.14433
108
0.572432
false
Audacity-Team/Audacity
lib-src/lv2/lv2/plugins/eg02-midigate.lv2/waflib/Tools/msvc.py
70
27831
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,sys,re,tempfile from waflib import Utils,Task,Logs,Options,Errors from waflib.Logs import debug,warn from waflib.TaskGen import after_method,feature from waflib.Conf...
mit
8,346,765,446,274,844,000
36.108
297
0.708239
false
logicus4078/vertx-web
src/test/sockjs-protocol/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2924
3268
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
apache-2.0
3,449,815,437,914,763,300
37
78
0.594859
false
longmen21/edx-platform
lms/djangoapps/verify_student/tests/test_views.py
3
106566
# encoding: utf-8 """ Tests of verify_student views. """ import json import urllib from datetime import timedelta, datetime from uuid import uuid4 import ddt import httpretty import mock from nose.plugins.attrib import attr import boto import moto import pytz from bs4 import BeautifulSoup from mock import patch, Mock...
agpl-3.0
-1,914,971,750,501,064,400
40.219342
145
0.636853
false
MIPS/external-chromium_org-tools-gyp
test/copies/gyptest-slash.py
249
1433
#!/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 file copies with a trailing slash in the destination directory. """ import TestGyp test = TestGyp.TestGyp() test.run_gyp('cop...
bsd-3-clause
8,556,398,514,487,747,000
36.710526
72
0.577809
false
dolphin-emu/dolphin
docs/DSP/prefix_replace.py
164
1049
# this can be used to upgrade disassemblies that aren't too annotated. # won't do very well on the current zelda disasm. import os import sys def GetPrefixLine(l, a): for s in a: if s[0:len(l)] == l: return s return "" def GetComment(l): comment_start = l.find("//") if comment_start < 0: comm...
gpl-2.0
-6,106,910,879,947,386,000
22.333333
70
0.597712
false
nash-x/hws
neutron/db/migration/alembic_migrations/versions/16c8803e1cf_trunk_port.py
1
1549
# Copyright 2014 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 ...
apache-2.0
4,849,109,674,138,148,000
31.957447
79
0.693996
false
shingonoide/odoo
addons/procurement_jit_stock/procurement_jit_stock.py
64
2047
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2013 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
-8,509,350,440,075,620,000
43.5
167
0.638007
false
jmcanterafonseca/fiware-orion
test/acceptance/behave/components/common_steps/entities/delete_steps.py
5
3670
# -*- coding: utf-8 -*- """ Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U This file is part of Orion Context Broker. Orion Context Broker 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,...
agpl-3.0
8,758,400,781,217,366,000
42.105882
157
0.701692
false
jaimahajan1997/sympy
sympy/series/tests/test_limitseq.py
62
3139
from sympy import symbols, oo, Sum, harmonic, Add, S, binomial, factorial from sympy.series.limitseq import limit_seq from sympy.series.limitseq import difference_delta as dd from sympy.utilities.pytest import raises, XFAIL n, m, k = symbols('n m k', integer=True) def test_difference_delta(): e = n*(n + 1) e...
bsd-3-clause
4,658,436,460,113,190,000
28.336449
76
0.486142
false
b-jesch/service.fritzbox.callmonitor
resources/lib/PhoneBooks/pyicloud/vendorlibs/requests/packages/urllib3/exceptions.py
515
5599
from __future__ import absolute_import # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class PoolError(HTTPError): "Base exception for errors caused within a pool." def __init__(se...
gpl-2.0
-9,071,719,050,610,124,000
25.789474
84
0.701732
false
avanov/django
tests/generic_views/urls.py
194
14571
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib.auth import views as auth_views from django.contrib.auth.decorators import login_required from django.views.decorators.cache import cache_page from django.views.generic import TemplateView from . impor...
bsd-3-clause
-5,119,776,499,333,351,000
49.411765
127
0.616515
false
kyrias/cjdns
node_build/dependencies/libuv/build/gyp/test/escaping/gyptest-colon.py
216
1428
#!/usr/bin/env python # Copyright (c) 2012 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. """ Tests that filenames that contain colons are handled correctly. (This is important for absolute paths on Windows.) """ import os import...
gpl-3.0
6,800,756,538,011,165,000
32.209302
80
0.69958
false
paulsoh/moxie
moxie/social/strategies/django_strategy.py
52
5052
from django.conf import settings from django.http import HttpResponse from django.db.models import Model from django.contrib.contenttypes.models import ContentType from django.contrib.auth import authenticate from django.shortcuts import redirect from django.template import TemplateDoesNotExist, RequestContext, loader ...
mit
9,086,650,016,513,033,000
33.60274
78
0.642122
false
ropik/androguard
androguard/core/bytecodes/apk.py
1
58292
# This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # 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...
apache-2.0
3,609,272,022,803,543,600
31.366463
283
0.530605
false
Limags/MissionPlanner
Lib/site-packages/numpy/distutils/tests/test_misc_util.py
51
2430
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" from numpy.testing import * from numpy.distutils.misc_util import appendpath, minrelpath, gpaths, rel_path from os.path import join, sep, dirname ajoin = lambda *paths: join(*((sep,)+paths)) class TestAppendpath(Test...
gpl-3.0
8,683,271,359,492,046,000
40.896552
100
0.574486
false
MathieuDuponchelle/gobject-introspection
giscanner/girwriter.py
1
26509
# -*- Mode: Python -*- # GObject-Introspection - a framework for introspecting GObject libraries # Copyright (C) 2008 Johan Dahlin # Copyright (C) 2008, 2009 Red Hat, 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 publish...
gpl-2.0
-1,240,516,225,499,027,000
41.825525
99
0.569052
false
Serag8/Bachelor
google_appengine/google/appengine/ext/admin_redirect/main.py
8
2616
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
mit
-8,541,275,971,834,269,000
25.424242
78
0.667813
false
helium/helium-client-python
setup.py
1
2330
#!/usr/bin/env python """ setup.py file for helium-client-python """ from setuptools import setup, find_packages from setuptools.extension import Extension from setuptools.command.build_ext import build_ext import codecs import versioneer def get_ext_modules(): local_inc = 'helium_client/helium-client' local...
bsd-3-clause
-794,048,752,122,516,400
36.580645
74
0.57897
false
xeoron/namebench
nb_third_party/jinja2/tests.py
285
3313
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from jinja2.runtime import Undefined # nose, nothing here to test __test__ = False number_r...
apache-2.0
2,176,545,024,465,804,300
21.691781
73
0.589798
false
bukepo/openthread
tests/scripts/thread-cert/pktverify/verify.py
7
3121
#!/usr/bin/env python3 # # Copyright (c) 2020, The OpenThread Authors. # 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 # ...
bsd-3-clause
6,312,570,464,396,989,000
36.60241
101
0.713553
false
KousikaGanesh/purchaseandInventory
openerp/addons/mrp_repair/__openerp__.py
35
2497
# -*- 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
-769,582,949,480,938,500
37.415385
78
0.573889
false
datamade/openelections-core
openelex/us/ia/transform.py
2
1161
from openelex.base.transform import Transform, registry from openelex.models import RawResult class FixVanBurenTransform(Transform): """ s/VanBuren/Van Buren in RawResults from the source file 20001107__ia__general__state_senate__county.csv """ name = 'fix_van_buren' def __call__(self): ...
mit
-3,220,123,441,521,502,000
37.7
77
0.62963
false
sumanthns/flask-project
flask_project/templates/factory.py
1
2162
from flask import Flask from werkzeug.utils import import_string class NoBlueprintException(Exception): pass class NoRouteModuleException(Exception): pass def _get_imported_stuff_by_path(path): module_name, object_name = path.rsplit('.', 1) module = import_string(module_name) return module, o...
mit
1,485,140,431,797,699,300
29.450704
98
0.582331
false
cloudmesh/cmd3light
cloudmesh_cmd3light/console.py
1
3669
import textwrap from colorama import Fore, Back, Style import colorama colorama.init() class Console(object): """ A simple way to print in a console terminal in color. Instead of using simply the print statement you can use special methods to indicate warnings, errors, ok and regular messages. ...
apache-2.0
1,963,679,051,398,093,800
22.075472
75
0.541292
false
jemofthewest/mykoans
python2/koans/about_asserts.py
10
2289
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): """ We shall contemplate truth by testing reality, via asserts. """ # Confused? This video should help: # # http://bit.ly/about_assert...
mit
6,201,426,503,639,093,000
27.974684
84
0.570555
false
darkleons/odoo
addons/hr_expense/report/hr_expense_report.py
287
5652
# -*- 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
5,320,746,796,010,623,000
49.017699
180
0.557325
false
thnee/ansible
lib/ansible/modules/cloud/vultr/vultr_dns_record.py
21
10067
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # 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', ...
gpl-3.0
5,818,126,169,287,994,000
26.056452
117
0.563537
false
dhomeier/astropy
astropy/convolution/tests/test_convolve_nddata.py
12
1761
# Licensed under a 3-clause BSD style license - see LICENSE.rst import pytest import numpy as np from astropy.convolution.convolve import convolve, convolve_fft from astropy.convolution.kernels import Gaussian2DKernel from astropy.nddata import NDData def test_basic_nddata(): arr = np.zeros((11, 11)) arr[5,...
bsd-3-clause
-2,447,203,834,322,577,000
30.446429
91
0.665531
false
47lining/ansible
lib/ansible/runner/lookup_plugins/csvfile.py
121
2645
# (c) 2013, Jan-Piet Mens <jpmens(at)gmail.com> # # 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 ver...
gpl-3.0
7,255,945,061,523,529,000
31.256098
106
0.558034
false
froch/kubernetes-py
kubernetes_py/models/v1/LoadBalancerStatus.py
3
1579
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes_py.models.v1.LoadBalancerIngress import LoadBalancerIngress from kubernetes_py.utils import is_valid_list class LoadBalancer...
apache-2.0
-7,630,295,677,407,446,000
29.960784
101
0.550982
false
Johnzero/OE7
openerp/addons-modules/base_gengo/res_company.py
34
1601
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
agpl-3.0
4,168,023,327,768,589,300
42.27027
146
0.613991
false
phase4ground/DVB-receiver
modem/python/library/demodulator.py
1
2190
import numpy as np import iir_filter import pi_filter class demodulator: 'General purpose demodulator that supports BPSK, QPSK and OQPSK' def __init__(self, modulation_type, samples_per_symbol): """ Create the classical Costas loop carrier recovery object """ # store the pa...
gpl-3.0
-1,065,047,188,241,007,700
29.84507
122
0.556164
false
drowningchild/lgog_old
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
3,594,935,474,822,208,500
23.122727
70
0.49463
false
psgganesh/sparkplug
packages/Sparkplug/Admin/src/node_modules/laravel-elixir/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py
2736
6387
# Copyright (c) 2012 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. """Visual Studio project reader/writer.""" import gyp.common import gyp.easy_xml as easy_xml #-------------------------------------------------------------------...
mit
-21,774,723,299,539,844
29.706731
79
0.62361
false
usirin/koding
go/src/vendor/github.com/caglar10ur/lxc/config/apparmor/lxc-generate-aa-rules.py
34
3770
#!/usr/bin/env python3 import sys blocks = [] # # blocks is an array of paths under which we want to block by # default. # # blocks[0] = ['path' = '/sys', 'children' = [A,B] ] # blocks[1] = ['path' = '/proc/sys', 'children' = [ E ] ] # A = [ 'path' = 'fs', children = [C] ] # C = [ 'path' = 'cgroup', children = [...
apache-2.0
5,589,174,180,813,709,000
26.122302
71
0.471353
false
jaxxstorm/fullerite
src/diamond/collectors/portstat/portstat.py
51
1984
""" The PortStatCollector collects metrics about ports listed in config file. ##### Dependencies * psutil """ from collections import defaultdict import diamond.collector try: import psutil except ImportError: psutil = None def get_port_stats(port): """ Iterate over connections and count states f...
apache-2.0
7,592,469,356,822,668,000
25.453333
78
0.576613
false
jruiperezv/ANALYSE
lms/djangoapps/shoppingcart/processors/helpers.py
169
1025
""" Helper methods for credit card processing modules. These methods should be shared among all processor implementations, but should NOT be imported by modules outside this package. """ from django.conf import settings from microsite_configuration import microsite def get_processor_config(): """ Return a dic...
agpl-3.0
4,789,410,187,150,981,000
32.064516
87
0.729756
false
kenrachynski/powerline
powerline/renderers/vim.py
32
5785
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import sys import vim from powerline.bindings.vim import vim_get_func, vim_getoption, environ, current_tabpage, get_vim_encoding from powerline.renderer import Renderer from powerline.colorscheme import...
mit
-7,180,432,641,266,247,000
29.75
125
0.667878
false
saurabhbajaj207/CarpeDiem
venv/Lib/site-packages/Crypto/SelfTest/Cipher/test_DES3.py
117
15558
# -*- coding: utf-8 -*- # # SelfTest/Cipher/DES3.py: Self-test for the Triple-DES cipher # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedicati...
mit
-4,086,194,489,357,829,600
45.720721
93
0.631508
false
MSusik/invenio
invenio/legacy/webstyle/templates.py
3
29772
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Lic...
gpl-2.0
-3,385,006,754,124,190,700
38.748999
143
0.51891
false
davgibbs/django
django/forms/widgets.py
184
37166
""" HTML Widget classes """ from __future__ import unicode_literals import copy import datetime import re from itertools import chain from django.conf import settings from django.forms.utils import flatatt, to_current_timezone from django.utils import datetime_safe, formats, six from django.utils.datastructures impo...
bsd-3-clause
-2,982,774,737,967,685,000
34.195076
116
0.586396
false
project-magpie/enigma2-openpli
lib/python/Components/PluginList.py
6
1926
from MenuList import MenuList from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE from Components.MultiContent import MultiContentEntryText, MultiContentEntryPixmapAlphaTest from enigma import eListboxPythonMultiContent, gFont from Tools.LoadPixmap import LoadPixmap def PluginEntryComponent(plugin, width...
gpl-2.0
8,180,996,352,548,178,000
34.666667
94
0.723261
false
paolodedios/shift-detect
build.py
1
6581
# -*- c-file-style: "sourcery" -*- # # Use and distribution of this software and its source code is governed # by the terms and conditions defined in the "LICENSE" file that is part # of this source code package. # from pybuilder.core import use_bldsup from pybuilder.core import use_plugin from pybuilder.core import...
mpl-2.0
9,222,085,803,752,756,000
42.013072
136
0.696095
false
zafar-hussain/or-tools
examples/python/traffic_lights.py
32
3902
# Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com # # 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 ...
apache-2.0
1,034,879,588,576,957,300
27.071942
80
0.645566
false
isaac-playground/git-python
run_git_python.py
1
1941
""" """ import os.path import git REPO_ROOT = os.path.abspath(os.path.dirname(__file__)) DATA_DIR = os.path.join(REPO_ROOT, 'data') CURRENT_EXECUTION_VERSION = 16 NEW_AND_MODIFIED = '.' REMOVED = '-A' COMMIT_MSG='-m "Automated commit {index}. Running through."'.format(index=CURRENT_EXECUTION_VERSION) VERSION_TAG = 'v1...
mit
7,852,443,103,548,331,000
34.290909
101
0.716126
false
ahamilton/vigil
eris/webserver.py
1
2593
#!/usr/bin/env python3.8 # Copyright (C) 2018-2019 Andrew Hamilton. All rights reserved. # Licensed under the Artistic License 2.0. import gzip import http.server import os import sys import pickle import eris.fill3 as fill3 import eris.tools as tools USAGE = """Usage: eris-webserver <directory> Example: eri...
artistic-2.0
8,779,917,104,911,399,000
26.273684
79
0.601698
false
yd0str/infernal-twin
build/pillow/PIL/FliImagePlugin.py
26
4782
# # The Python Imaging Library. # $Id$ # # FLI/FLC file handling. # # History: # 95-09-01 fl Created # 97-01-03 fl Fixed parser, setup decoder tile # 98-07-15 fl Renamed offset attribute to avoid name clash # # Copyright (c) Secret Labs AB 1997-98. # Copyright (c) Fredrik Lundh 1995-97. # ...
gpl-3.0
5,004,803,420,460,204,000
24.43617
69
0.5
false
imzers/gsutil-with-php
gslib/tests/test_defacl.py
22
8847
# -*- coding: utf-8 -*- # 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 require...
apache-2.0
5,353,667,576,438,776,000
42.156098
80
0.640782
false
ddelemeny/calligra
3rdparty/google-breakpad/src/tools/gyp/test/small/gyptest-small.py
89
1405
#!/usr/bin/env python # Copyright (c) 2012 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. """ Runs small tests. """ import imp import os import sys import unittest import TestGyp test = TestGyp.TestGyp() # Add pylib to the im...
gpl-2.0
7,685,911,221,956,526,000
25.509434
72
0.720996
false
claws/txcosm
examples/subscribe.py
1
3214
#!/usr/bin/env python """ Subscribe to a feed or a datastream that is visible to the supplied Cosm user API key To use this script you must create a text file containing your API key and pass it to this script using the --keyfile argument as follows: Subscribe for updates to a particular feed: $ simple_subscribe.py ...
mit
-1,308,822,438,510,303,500
30.203883
127
0.690728
false
followloda/PornGuys
FlaskServer/venv/Lib/site-packages/werkzeug/exceptions.py
176
18733
# -*- coding: utf-8 -*- """ werkzeug.exceptions ~~~~~~~~~~~~~~~~~~~ This module implements a number of Python exceptions you can raise from within your views to trigger a standard non-200 response. Usage Example ------------- :: from werkzeug.wrappers import BaseRequest ...
gpl-3.0
-712,162,899,535,290,400
27.469605
79
0.645172
false
flit/cmdis
cmdis/formatter.py
1
6910
# Copyright (c) 2016-2019 Chris Reed # # SPDX-License-Identifier: Apache-2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
-2,868,916,636,484,870,700
28.279661
79
0.519392
false
mdblv2/joatu-django
application/site-packages/django/contrib/admindocs/utils.py
216
3801
"Misc. utility functions/classes for admin documentation generator." import re from email.parser import HeaderParser from email.errors import HeaderParseError from django.utils.safestring import mark_safe from django.core.urlresolvers import reverse from django.utils.encoding import force_bytes try: import docuti...
apache-2.0
1,197,862,237,521,927,400
34.858491
140
0.643778
false
ismtabo/huffman_algorithm
main.py
2
2098
#!/usr/bin/env python # -*- coding: utf-8 -*- """Python implementation of Huffman Coding This script test the implementation software of Huffman Coding at \'main.py\'. """ __author__ = 'Ismael Taboada' __version__= '1.0' from collections import defaultdict import csv import os.path import time from huffman import...
gpl-2.0
-3,842,315,511,699,367,000
22.840909
137
0.691611
false
harterj/moose
modules/tensor_mechanics/test/tests/capped_mohr_coulomb/small_deform_hard_21.py
12
1567
#!/usr/bin/env python3 #* This file is part of the MOOSE framework #* https://www.mooseframework.org #* #* All rights reserved, see COPYRIGHT for full restrictions #* https://github.com/idaholab/moose/blob/master/COPYRIGHT #* #* Licensed under LGPL 2.1, please see LICENSE for details #* https://www.gnu.org/licenses/lgp...
lgpl-2.1
2,339,575,841,629,909,000
32.340426
107
0.620932
false