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
Bionetbook/bionetbook
bnbapp/bionetbook/wsgi.py
2
1142
""" WSGI config for bionetbook project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION...
mit
5,382,544,484,474,726,000
39.785714
79
0.801226
false
Hellowlol/plexpy
lib/enum/test_enum.py
95
62283
import enum import sys import unittest from enum import Enum, IntEnum, unique, EnumMeta from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL pyver = float('%s.%s' % sys.version_info[:2]) try: any except NameError: def any(iterable): for element in iterable: if element: ...
gpl-3.0
-3,010,181,025,591,458,000
35.853846
104
0.506222
false
s-gv/rnicu-webapp
ecg/ecg_visualizer_ble_PC/visualizer.py
3
1891
''' This program visualizes ECG waveforms on the PC Copyright (C) 2014 Sagar G V (sagar.writeme@gmail.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 Free Software Foundation, either version 3 of the License, or...
agpl-3.0
7,422,528,916,849,213,000
32.175439
109
0.659439
false
opencord/xos
scripts/add_copyright.py
2
8212
# Copyright 2017-present Open Networking 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 agr...
apache-2.0
-5,216,006,732,385,254,000
30.224335
98
0.644666
false
SNAPPETITE/backend
flask/lib/python2.7/site-packages/sqlalchemy/orm/__init__.py
34
8033
# orm/__init__.py # Copyright (C) 2005-2016 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 """ Functional constructs for ORM configuration. See the SQLAlchemy object relation...
mit
-1,563,828,996,709,540,400
28.210909
78
0.695257
false
eXistenZNL/SickRage
lib/sqlalchemy/dialects/firebird/fdb.py
79
4365
# firebird/fdb.py # Copyright (C) 2005-2014 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 """ .. dialect:: firebird+fdb :name: fdb :dbapi: pyodbc :connectstring: fi...
gpl-3.0
-4,547,185,883,407,874,600
36.956522
94
0.682474
false
Arquanite/mcshopgen
shopgen.py
1
2584
#!/bin/python3 import os import yaml config = '' subdir = '__output__' with open("shop.yml", 'r') as stream: try: config = yaml.load(stream) except yaml.YAMLError as exc: print(exc) try: os.mkdir(subdir) except Exception: pass for shop in config['shop']: with open(os.path.join(su...
gpl-3.0
611,764,600,495,408,300
49.666667
167
0.590557
false
VimVincent/three.js
utils/exporters/blender/addons/io_three/exporter/api/material.py
124
7818
from bpy import data, types from .. import constants, logger from .constants import MULTIPLY, WIRE, IMAGE def _material(func): """ :param func: """ def inner(name, *args, **kwargs): """ :param name: :param *args: :param **kwargs: """ if isinstance(...
mit
-668,670,251,938,130,200
19.046154
69
0.615631
false
Kismuz/btgym
btgym/research/model_based/datafeed/base.py
1
29953
############################################################################### # # Copyright (C) 2017, 2018 Andrew Muzikin # # 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 ...
lgpl-3.0
-1,337,916,439,103,172,900
34.743437
137
0.563182
false
hcorg/thrift
contrib/fb303/py/fb303/FacebookBase.py
43
2038
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
-1,783,600,556,118,951,400
23.554217
61
0.668302
false
harshilasu/LinkurApp
y/google-cloud-sdk/.install/.backup/lib/apiclient/channel.py
120
9848
"""Channel notifications support. Classes and functions to support channel subscriptions and notifications on those channels. Notes: - This code is based on experimental APIs and is subject to change. - Notification does not do deduplication of notification ids, that's up to the receiver. - Storing the Chan...
gpl-3.0
6,679,275,396,474,055,000
33.554386
80
0.695979
false
daavery/audacity
lib-src/lv2/lilv/waflib/Tools/gnu_dirs.py
329
2796
#! /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 from waflib import Utils,Options,Context _options=[x.split(', ')for x in''' bindir, user executables, ${EXEC_PREFIX}/bin sbindir, system admin executables, ${EXEC_PR...
gpl-2.0
-6,042,557,353,677,752,000
42.015385
115
0.736052
false
ad-m/django-avatar
avatar/templatetags/avatar_tags.py
4
3479
from django import template try: from django.urls import reverse except ImportError: # For Django < 1.10 from django.core.urlresolvers import reverse from django.template.loader import render_to_string # Issue 182: six no longer included with Django 3.0 try: from django.utils import six except ImportErr...
bsd-3-clause
1,891,902,675,824,016,600
28.735043
79
0.640126
false
alexforencich/python-ivi
ivi/tektronix/tektronixDPO5104.py
1
1552
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2017 Alex Forencich 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 limitation the righ...
mit
-2,564,353,242,682,129,400
36.853659
77
0.756443
false
mdworks2016/work_development
Python/05_FirstPython/Chapter9_WebApp/fppython_develop/lib/python3.7/site-packages/pip/_vendor/pep517/check.py
22
5885
"""Check a project and backend by attempting to build using PEP 517 hooks. """ import argparse import logging import os from os.path import isfile, join as pjoin from pip._vendor.pytoml import TomlError, load as toml_load import shutil from subprocess import CalledProcessError import sys import tarfile from tempfile im...
apache-2.0
7,047,989,392,016,295,000
28.133663
79
0.572982
false
tfukushima/midonet-kubernetes
midonet_kubernetes/plugin.py
2
25380
#!/usr/bin/env python # 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, softwar...
apache-2.0
-1,841,881,752,858,278,400
35.102418
89
0.617533
false
tempbottle/Firefly
firefly/dbentrust/mmode.py
8
9318
#coding:utf8 ''' Created on 2013-5-8 @author: lan (www.9miao.com) ''' from memclient import mclient from memobject import MemObject import util import time MMODE_STATE_ORI = 0 #未变更 MMODE_STATE_NEW = 1 #创建 MMODE_STATE_UPDATE = 2 #更新 MMODE_STATE_DEL = 3 #删除 TIMEOUT = 1800 def _insert(args): record,...
mit
-6,684,196,976,386,222,000
28.445161
87
0.493865
false
yojota/volatility
volatility/plugins/linux/sk_buff_cache.py
58
2810
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # 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 Free Software Foundation; either version 2 of the License, or # (at your o...
gpl-2.0
-5,065,067,336,616,833,000
31.298851
160
0.64306
false
ptisserand/ansible
test/runner/lib/cloud/cs.py
40
8903
"""CloudStack plugin for integration tests.""" from __future__ import absolute_import, print_function import json import os import re import time from lib.cloud import ( CloudProvider, CloudEnvironment, ) from lib.util import ( find_executable, ApplicationError, display, SubprocessError, ...
gpl-3.0
-595,869,796,879,018,100
31.140794
141
0.59553
false
prajesh-ananthan/Tools
income_worksheet_creator/generate_annual_income_worksheet.py
1
3139
import calendar import json import os from datetime import * import xlsxwriter """generate_annual_income_worksheet.py: Automates my personal Income Statement Excel workbook""" __author__ = "Prajesh Ananthan 2016" def create_excel_sheet(year): workbook = None table_position = 'B3:D13' merge_range = 'B2:...
mit
3,229,156,186,431,150,000
25.158333
96
0.594138
false
w1ll1am23/home-assistant
homeassistant/components/script/__init__.py
3
12329
"""Support for scripts.""" from __future__ import annotations import asyncio import logging import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_MODE, ATTR_NAME, CONF_ALIAS, CONF_DEFAULT, CONF_DESCRIPTION, CONF_ICON, CONF_MODE, CONF_NAME, CONF_SELECT...
apache-2.0
2,576,097,326,194,194,000
29.366995
89
0.638251
false
jumpstarter-io/neutron
neutron/openstack/common/fixture/lockutils.py
34
1890
# Copyright 2011 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
apache-2.0
-7,524,883,546,856,790,000
36.058824
79
0.680423
false
ogonzalez29/blog
wp-content/plugins/wp-leads-builder-any-crm/lib/vtwsclib/third-party/python/json.py
49
10236
import string import types ## json.py implements a JSON (http://json.org) reader and writer. ## Copyright (C) 2005 Patrick D. Logan ## Contact mailto:patrickdlogan@stardecisions.com ## ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Lesser Genera...
gpl-2.0
1,069,283,970,679,255,300
32.019355
136
0.505959
false
davidhrbac/spacewalk
client/tools/rhncfg/actions/rhn-actions-control.py
7
4440
#!/usr/bin/python # # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should...
gpl-2.0
-3,791,766,937,555,046,400
36.948718
146
0.626802
false
akash1808/nova_test_latest
nova/cmd/compute.py
31
2399
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a ...
apache-2.0
7,253,030,350,226,651,000
31.418919
78
0.682784
false
coder-han/hugula
Client/tools/site-packages/PIL/BdfFontFile.py
13
3337
# # The Python Imaging Library # $Id: BdfFontFile.py 2134 2004-10-06 08:55:20Z fredrik $ # # bitmap distribution font (bdf) file parser # # history: # 1996-05-16 fl created (as bdf2pil) # 1997-08-25 fl converted to FontFile driver # 2001-05-25 fl removed bogus __init__ call # 2002-11-20 fl robustification (from...
mit
238,810,348,189,866,600
24.090226
71
0.496554
false
petecummings/django
tests/flatpages_tests/test_views.py
290
6953
from django.conf import settings from django.contrib.auth.models import User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from .settings import FLATPAGES_TEMPLATES class TestDataMixin(object): ...
bsd-3-clause
7,697,847,662,350,609,000
44.149351
115
0.678268
false
takeshineshiro/django
tests/admin_custom_urls/tests.py
276
6381
from __future__ import unicode_literals import datetime from django.contrib.admin.utils import quote from django.contrib.auth.models import User from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase, override_settings from .models import A...
bsd-3-clause
-7,891,936,894,892,501,000
42.408163
116
0.635324
false
openstack/nova-solver-scheduler
nova_solverscheduler/tests/scheduler/solvers/constraints/test_constraints.py
1
3368
# Copyright (c) 2014 Cisco Systems, 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 r...
apache-2.0
-537,950,114,564,312,900
39.095238
78
0.664786
false
trolldbois/python-haystack
haystack/allocators/win32/profiles/win7_32.py
1
36870
# -*- coding: utf-8 -*- # # TARGET arch is: ['-target', 'i386-win'] # WORD_SIZE is: 4 # POINTER_SIZE is: 4 # LONGDOUBLE_SIZE is: 12 # import ctypes c_int128 = ctypes.c_ubyte*16 c_uint128 = c_int128 void = None if ctypes.sizeof(ctypes.c_longdouble) == 12: c_long_double_t = ctypes.c_longdouble else: c_long_doub...
gpl-3.0
-3,247,399,862,895,260,700
33.393657
140
0.656252
false
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/site-packages/Werkzeug-0.9.6-py2.7.egg/werkzeug/debug/repr.py
280
9350
# -*- coding: utf-8 -*- """ werkzeug.debug.repr ~~~~~~~~~~~~~~~~~~~ This module implements object representations for debugging purposes. Unlike the default repr these reprs expose a lot more information and produce HTML instead of ASCII. Together with the CSS and JavaScript files of the debug...
apache-2.0
7,029,716,295,029,472,000
32.392857
77
0.534118
false
laurent-george/bokeh
examples/glyphs/trail.py
33
4656
# -*- coding: utf-8 -*- from __future__ import print_function from math import sin, cos, atan2, sqrt, radians import numpy as np import scipy.ndimage as im from bokeh.document import Document from bokeh.embed import file_html from bokeh.resources import INLINE from bokeh.browserlib import view from bokeh.models.gl...
bsd-3-clause
5,023,554,614,189,639,000
29.03871
110
0.623201
false
avtoritet/httpie
tests/test_cli.py
46
11737
"""CLI argument parsing related tests.""" import json # noinspection PyCompatibility import argparse import pytest from requests.exceptions import InvalidSchema from httpie import input from httpie.input import KeyValue, KeyValueArgType, DataDict from httpie import ExitStatus from httpie.cli import parser from utils ...
bsd-3-clause
2,397,499,246,188,206,600
34.35241
78
0.565391
false
ryanfitch/Python3_Koans_Solutions
python3/koans/about_generators.py
95
4406
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Written in place of AboutBlocks in the Ruby Koans # # Note: Both blocks and generators use a yield keyword, but they behave # a lot differently # from runner.koan import * class AboutGenerators(Koan): def test_generating_values_on_the_fly(self): result =...
mit
181,612,091,231,908,640
29.178082
94
0.557876
false
teltek/edx-platform
openedx/core/djangoapps/contentserver/middleware.py
4
15575
""" Middleware to serve assets. """ import logging import datetime log = logging.getLogger(__name__) try: import newrelic.agent except ImportError: newrelic = None # pylint: disable=invalid-name from django.http import ( HttpResponse, HttpResponseNotModified, HttpResponseForbidden, HttpResponseBadRequ...
agpl-3.0
-458,681,965,100,306,000
45.354167
119
0.608475
false
osaddon/cimi
cimi/cimi.py
1
6606
# Copyright (c) 2012 IBM # # 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
6,334,174,431,128,621,000
41.346154
78
0.596882
false
stacywsmith/ansible
test/units/executor/test_playbook_executor.py
60
6304
# (c) 2012-2014, Michael DeHaan <michael.dehaan@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) an...
gpl-3.0
5,978,112,353,671,083,000
43.70922
152
0.610565
false
jddixon/fieldz
tests/test_reg.py
1
1974
#!/usr/bin/env python3 # test_reg.py # import time import unittest # from rnglib import SimpleRNG from wireops.enum import FieldTypes from fieldz.reg import NodeReg from fieldz.enum import CoreTypes # TESTS -------------------------------------------------------------- class TestReg(unittest.TestCase): def te...
mit
-5,980,230,759,174,637,000
29.369231
78
0.567882
false
bradparks/sleepy-puppy
sleepypuppy/admin/user/views.py
13
1706
# Copyright 2015 Netflix, 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...
apache-2.0
3,146,149,155,207,035,400
33.816327
98
0.679367
false
lipro/linux-tqs
arch/ia64/scripts/unwcheck.py
916
1718
#!/usr/bin/env python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthe...
gpl-2.0
-5,452,972,454,956,677,000
25.84375
89
0.593132
false
sosy-lab/benchexec
benchexec/test_cgroups.py
3
2072
# This file is part of BenchExec, a framework for reliable benchmarking: # https://github.com/sosy-lab/benchexec # # SPDX-FileCopyrightText: 2007-2020 Dirk Beyer <https://www.sosy-lab.org> # # SPDX-License-Identifier: Apache-2.0 import logging import subprocess import sys import unittest from benchexec import check_c...
apache-2.0
-5,859,944,832,714,446,000
29.470588
79
0.612934
false
mmagnus/rna-pdb-tools
rna_tools/tools/rna_calc_rmsd/lib/rmsd/calculate_rmsd.py
2
5276
#!/usr/bin/env python """ Calculate RMSD between two XYZ files by: Jimmy Charnley Kromann <jimmy@charnley.dk> and Lars Andersen Bratholm <larsbratholm@gmail.com> project: https://github.com/charnley/rmsd license: https://github.com/charnley/rmsd/blob/master/LICENSE """ import numpy as np import re from rna_tools.too...
gpl-3.0
-5,767,986,949,644,791,000
31.975
130
0.56558
false
morelab/appcomposer
alembic/versions/d5126053d47e_delete_english_history_records_over_50.py
3
3289
"""delete English history records over 50 Revision ID: d5126053d47e Revises: bbe219b77366 Create Date: 2019-01-06 18:12:12.357726 """ # revision identifiers, used by Alembic. revision = 'd5126053d47e' down_revision = 'bbe219b77366' import sys import time from alembic import op import sqlalchemy as sa import sqlalch...
bsd-2-clause
-1,572,337,139,114,123,500
40.1125
256
0.610216
false
kmonsoor/python-for-android
python3-alpha/python3-src/Lib/test/test_sundry.py
55
2275
"""Do a minimal test of all the modules that aren't otherwise tested.""" from test import support import sys import unittest class TestUntestedModules(unittest.TestCase): def test_at_least_import_untested_modules(self): with support.check_warnings(quiet=True): import bdb import cgi...
apache-2.0
1,674,081,492,023,348,700
32.455882
72
0.60044
false
vipul-sharma20/oh-mainline
vendor/packages/twisted/twisted/python/test/test_deprecate.py
18
24646
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for Twisted's deprecation framework, L{twisted.python.deprecate}. """ import sys, types import warnings from os.path import normcase from twisted.trial.unittest import TestCase from twisted.python import deprecate from twisted.python....
agpl-3.0
-5,108,323,097,750,152,000
34.718841
80
0.638765
false
tilenkranjc/cellprofiler-plugins
MeasurementRWC.py
1
20417
'''<b>Measure RWC</b> measures the Rank Weighted Correlation (RWC) between intensities in different images (e.g., different color channels) on a pixel-by-pixel basis, within identified objects or across an entire image <hr> Given two or more images, this module calculates the RWC between the pixel intensities. The RWC...
gpl-2.0
7,985,662,639,960,025,000
43.774123
134
0.547044
false
mythnc/gbf-bot
gbf_bot/slime_blasting.py
1
1115
import logging import random import time import pyautogui from .constants import slime_blasting_config as config from .components import Button, Mouse logger = logging.getLogger(__name__) start = Button("start.png", config["start"]) character1 = Button("character.png", config["character1"]) skill = Button("skill.p...
mit
4,247,831,508,655,320,600
24.340909
58
0.670852
false
xchenum/quantum
quantum/tests/unit/database_stubs.py
7
6968
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011, Cisco 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-...
apache-2.0
1,324,444,023,866,374,700
35.673684
78
0.538318
false
jmacmahon/invenio
modules/websearch/lib/websearch_external_collections_templates.py
3
7238
# -*- coding: utf-8 -*- # This file is part of Invenio. # Copyright (C) 2006, 2007, 2008, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at...
gpl-2.0
1,274,915,638,804,777,700
35.741117
123
0.585245
false
volatilityfoundation/volatility
volatility/plugins/linux/threads.py
4
3427
# Volatility # # 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 is distributed in the hope that it will ...
gpl-2.0
4,537,316,562,078,674,400
37.943182
100
0.565217
false
mccheung/kbengine
kbe/src/lib/python/Lib/test/test_print.py
96
4258
import unittest from io import StringIO from test import support NotDefined = object() # A dispatch table all 8 combinations of providing # sep, end, and file. # I use this machinery so that I'm not just passing default # values to print, I'm either passing or not passing in the # arguments. dispatch = { (False,...
lgpl-3.0
-9,078,592,778,628,744,000
31.257576
79
0.523485
false
attilahorvath/phantomjs
src/qt/qtbase/src/3rdparty/freetype/src/tools/docmaker/formatter.py
515
4962
# Formatter (c) 2002, 2004, 2007, 2008 David Turner <david@freetype.org> # from sources import * from content import * from utils import * # This is the base Formatter class. Its purpose is to convert # a content processor's data into specific documents (i.e., table of # contents, global index, and individual API...
bsd-3-clause
2,802,733,419,276,202,000
25.393617
76
0.551794
false
indhub/mxnet
tools/caffe_translator/scripts/convert_caffe_model.py
30
5271
# 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
8,466,113,593,700,070,000
42.561983
97
0.605009
false
thegooglecodearchive/healpy
healpy/fitsfunc.py
2
14186
# # This file is part of Healpy. # # Healpy 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. # # Healpy is distributed in the h...
gpl-2.0
1,108,211,845,214,810,800
33.684597
109
0.582617
false
ezrover/pjsip-2.3
tests/pjsua/mod_call.py
22
5288
# $Id$ import time import imp import sys import inc_const as const from inc_cfg import * # Load configuration cfg_file = imp.load_source("cfg_file", ARGS[1]) # Check media flow between ua1 and ua2 def check_media(ua1, ua2): ua1.send("#") ua1.expect("#") ua1.send("1122") ua2.expect(const.RX_DTMF + "1") ua2.expect...
gpl-2.0
695,461,934,673,410,400
22.39823
84
0.718608
false
DistributedSystemsGroup/zoe
zoe_master/backends/docker/backend.py
1
7197
# Copyright (c) 2017, Daniele Venzano # # 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 w...
apache-2.0
2,917,583,269,205,343,700
42.884146
154
0.645825
false
okfn/hashtag-listener
controllers.py
1
1538
from flask import render_template, request, json, send_from_directory from bleach import linkify from app import app, db import models as m @app.route('/') def index(): params = { 'title': 'Hashtag Listener', } return render_template('index.html', **params) @app.route('/api', methods=['POST']) ...
mit
-1,481,555,101,495,986,200
28.576923
79
0.585176
false
gdetor/SI-RF-Structure
DiCarloProtocol/figure2-dicarlo.py
1
18122
# Copyright (c) 2014, Georgios Is. Detorakis (gdetor@gmail.com) and # Nicolas P. Rougier (nicolas.rougier@inria.fr) # 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. Redis...
gpl-3.0
5,669,406,050,359,273,000
36.211499
102
0.542159
false
ccomb/OpenUpgrade
addons/stock/product.py
6
25318
# -*- 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
-520,155,076,249,301,700
54.889625
286
0.589541
false
jmhsi/justin_tinker
data_science/courses/learning_dl_packages/models/research/pcl_rl/gym_wrapper.py
7
3481
# 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 applicab...
apache-2.0
2,926,957,215,893,642,000
29.269565
80
0.628842
false
jj46/fastdns
fastdns/resolver.py
1
10001
# -*- coding: utf-8 -*- """ resolver.py - A fast multi-threaded DNS resolver using the dnspython library Examples: # Importing the library # from fastdns import resolver # Resolving many DNS hosts # >>> from pprint import pprint # >>> r = resolver.Resolver(domain='cisco.com') # >>> r.hostnames...
mit
1,988,488,411,694,052,400
29.398176
112
0.545745
false
simonwydooghe/ansible
lib/ansible/modules/network/avi/avi_microservicegroup.py
28
3952
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ANSIB...
gpl-3.0
578,868,878,639,900,700
30.870968
93
0.610071
false
go-lab/labmanager
labmanager/rlms/ext/rest.py
5
9234
# -*-*- encoding: utf-8 -*-*- # # gateway4labs is free software: you can redistribute it and/or modify # it under the terms of the BSD 2-Clause License # gateway4labs is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A P...
bsd-2-clause
8,131,321,475,159,476,000
37.157025
167
0.622157
false
hoangminhitvn/flask
flask/lib/python2.7/site-packages/pip/commands/zip.py
34
15782
from __future__ import absolute_import import sys import re import fnmatch import logging import os import shutil import warnings import zipfile from pip.utils import display_path, backup_dir, rmtree from pip.utils.deprecation import RemovedInPip7Warning from pip.utils.logging import indent_log from pip.exceptions im...
bsd-3-clause
-8,607,781,392,829,449,000
37.492683
79
0.457547
false
googleinterns/smart-content-summary
classifier/preprocess_cola_dataset_for_classifier.py
1
7832
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
-3,428,303,878,906,808,300
42.270718
122
0.679648
false
palkeo/nebulosa
django_extensions/templatetags/widont.py
43
2034
import re from django.template import Library try: from django.utils.encoding import force_text except ImportError: # Django 1.4 compatibility from django.utils.encoding import force_unicode as force_text register = Library() re_widont = re.compile(r'\s+(\S+\s*)$') re_widont_html = re.compile(r'([^<>\s])\s...
unlicense
3,318,709,328,765,257,000
30.292308
161
0.629302
false
hexxter/home-assistant
homeassistant/components/climate/nest.py
2
6379
""" Support for Nest thermostats. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/climate.nest/ """ import logging import voluptuous as vol import homeassistant.components.nest as nest from homeassistant.components.climate import ( STATE_AUTO, STATE_C...
mit
2,729,192,009,824,337,400
31.217172
74
0.600878
false
intersense/stencil-overlapped-tiling-ics
scripts/yaml/constructor.py
391
25145
__all__ = ['BaseConstructor', 'SafeConstructor', 'Constructor', 'ConstructorError'] from error import * from nodes import * import datetime import binascii, re, sys, types class ConstructorError(MarkedYAMLError): pass class BaseConstructor(object): yaml_constructors = {} yaml_multi_constructors =...
mit
3,214,425,244,911,302,000
36.251852
98
0.571406
false
balister/gnuradio
gnuradio-runtime/python/gnuradio/gr/gr_threading_24.py
94
25507
"""Thread module emulating a subset of Java's threading model.""" # This started life as the threading.py module of Python 2.4 # It's been patched to fix a problem with join, where a KeyboardInterrupt # caused a lock to be left in the acquired state. import sys as _sys try: import thread except ImportError: ...
gpl-3.0
-204,766,961,882,858,660
31.165195
81
0.529502
false
MaximNevrov/neutron
neutron/api/rpc/agentnotifiers/metering_rpc_agent_api.py
38
4380
# Copyright (C) 2013 eNovance SAS <licensing@enovance.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 applicabl...
apache-2.0
2,697,927,201,990,531,600
40.320755
75
0.648402
false
RiccardoPecora/MP
Lib/email/feedparser.py
55
21090
# Copyright (C) 2004-2006 Python Software Foundation # Authors: Baxter, Wouters and Warsaw # Contact: email-sig@python.org """FeedParser - An email feed parser. The feed parser implements an interface for incrementally parsing an email message, line by line. This has advantages for certain applications, such ...
gpl-3.0
-5,732,206,065,220,182,000
41.399177
85
0.515031
false
shashank19gaurav/tatoeba2
docs/tatoeba2-django/tatoeba2/tests/conftest.py
1
7611
from tatoeba2.models import Sentences, SentenceComments, SentencesTranslations, Users, TagsSentences, SentencesSentencesLists, FavoritesUsers, SentenceAnnotations, Contributions, Wall from datetime import datetime from tatoeba2.management.commands.deduplicate import Dedup from django.db import connections from django.d...
agpl-3.0
-4,724,363,367,749,477,000
48.109677
183
0.676258
false
fluxw42/youtube-dl
youtube_dl/extractor/weiqitv.py
64
1681
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class WeiqiTVIE(InfoExtractor): IE_DESC = 'WQTV' _VALID_URL = r'https?://(?:www\.)?weiqitv\.com/index/video_play\?videoId=(?P<id>[A-Za-z0-9]+)' _TESTS = [{ 'url': 'http://www.weiqitv.com/index/video_play?vi...
unlicense
-7,370,701,629,758,238,000
30.596154
98
0.523433
false
XiaosongWei/blink-crosswalk
Tools/Scripts/webkitpy/style/checkers/python_unittest.py
33
2675
# Copyright (C) 2010 Chris Jerdonek (cjerdonek@webkit.org) # # 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...
bsd-3-clause
6,296,560,700,953,266,000
40.796875
88
0.678879
false
arthurSena/processors
tests/processors/euctr/test_extractor.py
2
4326
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import copy import datetime import pytest import processors.euctr.extractors as extractors class TestEUCTRExtractors(object): def test_stub_...
mit
-831,942,350,165,428,200
38.688073
109
0.647018
false
chrisfilda/edx_platform
lms/djangoapps/instructor/tests/test_hint_manager.py
31
9180
import json from django.test.client import Client, RequestFactory from django.test.utils import override_settings from mock import patch, MagicMock from courseware.models import XModuleUserStateSummaryField from courseware.tests.factories import UserStateSummaryFactory from courseware.tests.modulestore_config import ...
agpl-3.0
2,760,780,281,826,489,300
46.319588
120
0.563725
false
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/distutils/text_file.py
136
12467
"""text_file provides the TextFile class, which gives an interface to text files that (optionally) takes care of stripping comments, ignoring blank lines, and joining lines with backslashes.""" import sys, os, io class TextFile: """Provides a file-like object that takes care of all the things you commonl...
gpl-2.0
859,525,449,486,243,500
42.74386
89
0.555386
false
anthonyfok/frescobaldi
frescobaldi_app/midifile/output.py
1
5282
# Python midifile package -- parse, load and play MIDI files. # Copyright (c) 2011 - 2014 by Wilbert Berendsen # # 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...
gpl-2.0
1,947,005,215,703,255,300
32.220126
86
0.603559
false
mattholl/three.js
utils/exporters/maya/plug-ins/threeJsFileTranslator.py
210
16160
__author__ = 'Sean Griffin' __version__ = '1.0.0' __email__ = 'sean@thoughtbot.com' import sys import os.path import json import shutil from pymel.core import * from maya.OpenMaya import * from maya.OpenMayaMPx import * kPluginTranslatorTypeName = 'Three.js' kOptionScript = 'ThreeJsExportScript' kDefaultOptionsStri...
mit
6,548,904,970,891,416,000
35.314607
208
0.575
false
tobinjt/Flexget
flexget/plugin.py
4
22382
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from future.moves.urllib.error import HTTPError, URLError from future.utils import python_2_unicode_compatible import logging import os import re import time import pkg_res...
mit
1,072,442,851,667,187,200
32.505988
112
0.608971
false
agry/NGECore2
scripts/mobiles/corellia/drall_guard.py
2
1581
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from java.util import Vector def addTemplate(core): mobileTemplate = MobileTemplate...
lgpl-3.0
3,646,913,829,328,549,400
32.413043
127
0.802657
false
hotpxl/mxnet
python/mxnet/module/module.py
1
30717
# pylint: disable=too-many-instance-attributes, too-many-arguments, protected-access, too-many-branches # pylint: disable=too-many-public-methods """A `Module` implement the `BaseModule` API by wrapping a `Symbol` and one or more `Executor` for data parallelization. """ import logging import warnings from .. import c...
apache-2.0
-1,896,597,020,610,198,300
39.363995
103
0.58326
false
yograterol/flask-bundle-system
setup.py
1
1161
""" flask-bundle-system ------------------- Links ````` * `documentation <http://packages.python.org/flask-bundle-system>`_ * `development version <http://github.com/yograterol/flask-bundle-system/zipball/master>`_ """ from setuptools import setup setup( name='flask-bundle-system', version='0.2', l...
bsd-3-clause
3,530,426,491,561,758,000
25.386364
70
0.627046
false
HydrelioxGitHub/home-assistant
homeassistant/components/proximity/__init__.py
3
9248
"""Support for tracking the proximity of a device.""" import logging import voluptuous as vol from homeassistant.const import ( CONF_DEVICES, CONF_UNIT_OF_MEASUREMENT, CONF_ZONE) import homeassistant.helpers.config_validation as cv from homeassistant.helpers.entity import Entity from homeassistant.helpers.event i...
apache-2.0
713,883,254,325,656,600
36.290323
79
0.610294
false
derekforeman/Wox
PythonHome/Lib/site-packages/pip/commands/zip.py
393
14821
import sys import re import fnmatch import os import shutil import zipfile from pip.util import display_path, backup_dir, rmtree from pip.log import logger from pip.exceptions import InstallationError from pip.basecommand import Command class ZipCommand(Command): """Zip individual packages.""" name = 'zip' ...
mit
3,917,571,217,415,492,600
41.225071
131
0.48546
false
pamoakoy/invenio
modules/bibknowledge/lib/bibknowledge.py
2
18790
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at yo...
gpl-2.0
8,930,061,497,682,860,000
35.204239
94
0.619212
false
tdtrask/ansible
lib/ansible/plugins/lookup/password.py
18
12098
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2013, Javier Candeira <javier@candeira.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, divisio...
gpl-3.0
8,123,855,825,880,119,000
38.927393
157
0.643164
false
bigpete/pyNES
pynes/examples/movingsprite_translated.py
28
1399
import pynes from pynes.game import Game from pynes.bitbag import * from pynes.nes_types import * game = Game() palette = game.assign('palette', NesArray([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,15, 0x0F, 48, 49, 50, 51, 53, 54, 55, 56, 57, 58, 59, 60, 61, ...
bsd-3-clause
-8,377,713,786,322,254,000
18.178082
77
0.617584
false
vrutkovs/atomic-reactor
tests/test_buildimage.py
3
1998
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals from glob import glob import os from atomic_reactor.buildimage import BuildImageBuilder from atomic...
bsd-3-clause
-7,929,988,543,313,649,000
27.542857
79
0.713213
false
lumig242/Hue-Integration-with-CDAP
desktop/core/ext-py/boto-2.38.0/boto/pyami/startup.py
153
2475
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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 limitation the rights to use, copy, modi...
apache-2.0
-6,905,031,002,311,803,000
40.25
103
0.621414
false
hortonworks/hortonworks-sandbox
desktop/core/ext-py/Mako-0.7.2/test/test_lexer.py
2
28620
import unittest from mako.lexer import Lexer from mako import exceptions, util from util import flatten_result, result_lines from mako.template import Template import re from test import TemplateTest, template_base, skip_if, eq_, assert_raises_message # create fake parsetree classes which are constructed # exactly as...
apache-2.0
1,940,321,585,688,037,600
31.858783
81
0.383438
false
HopeFOAM/HopeFOAM
ThirdParty-0.1/ParaView-5.0.1/VTK/ThirdParty/Twisted/twisted/python/systemd.py
42
2784
# -*- test-case-name: twisted.python.test.test_systemd -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Integration with systemd. Currently only the minimum APIs necessary for using systemd's socket activation feature are supported. """ __all__ = ['ListenFDs'] from os import getpid ...
gpl-3.0
4,639,021,845,698,449,000
31
80
0.613865
false
MissingNoIOI/reddit2ebook
reddit2ebook/ebooklib_patched/__init__.py
4
1381
# This file is part of EbookLib. # Copyright (c) 2013 Aleksandar Erkalovic <aerkalov@gmail.com> # # EbookLib 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 you...
gpl-3.0
8,992,539,405,733,429,000
31.880952
77
0.641564
false
miconof/CouchPotatoServer
libs/pyutil/assertutil.py
106
2753
# Copyright (c) 2003-2009 Zooko Wilcox-O'Hearn # This file is part of pyutil; see README.rst for licensing terms. """ Tests useful in assertion checking, prints out nicely formated messages too. """ from humanreadable import hr def _assert(___cond=False, *___args, **___kwargs): if ___cond: return True ...
gpl-3.0
1,872,923,078,449,356,500
44.883333
147
0.507083
false
xin3liang/platform_external_chromium_org
tools/safely-roll-deps.py
16
5639
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generate a CL to roll a DEPS entry to the specified revision number and post it to Rietveld so that the CL will land automatically i...
bsd-3-clause
-8,167,681,746,552,554,000
34.024845
80
0.613939
false
mjn19172/Savu
savu/data/experiment_collection.py
1
3664
# Copyright 2014 Diamond Light Source Ltd. # # 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 t...
apache-2.0
-6,825,953,802,895,881,000
36.387755
96
0.634007
false
viur-framework/server
render/vi/__init__.py
1
4264
# -*- coding: utf-8 -*- from server.render.vi.default import DefaultRender as default from server.render.vi.user import UserRender as user from server.render.json.file import FileRender as file from server.skeleton import Skeleton from google.appengine.api import app_identity from server import conf from server import...
lgpl-3.0
8,539,912,098,143,763,000
28.611111
161
0.67636
false
mrinalabrol/magik
env/lib/python3.4/site-packages/pip/_vendor/lockfile/pidlockfile.py
488
6221
# -*- coding: utf-8 -*- # pidlockfile.py # # Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Foundation. # No ...
gpl-3.0
5,321,161,826,675,775,000
31.030928
75
0.581107
false
tvibliani/odoo
openerp/tools/__init__.py
337
1447
# -*- 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...
agpl-3.0
-3,106,524,600,355,917,000
33.452381
79
0.651693
false
WendellDuncan/or-tools
examples/python/fill_a_pix.py
5
5022
# 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
-3,591,295,001,333,891,600
25.712766
77
0.581641
false