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
noxdafox/vminspect
doc/conf.py
1
10006
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # VMInspect documentation build configuration file, created by # sphinx-quickstart on Tue Oct 4 22:26:44 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 # ...
bsd-3-clause
5,735,859,761,973,401,000
27.752874
80
0.689786
false
amurzeau/streamlink-debian
src/streamlink/logger.py
3
2996
import logging from datetime import datetime from logging import CRITICAL, DEBUG, ERROR, INFO, NOTSET, WARN from threading import Lock TRACE = 5 _levelToName = { CRITICAL: "critical", ERROR: "error", WARN: "warning", INFO: "info", DEBUG: "debug", TRACE: "trace", NOTSET: "none", } _nameToLev...
bsd-2-clause
-2,764,497,974,508,428,300
29.262626
104
0.621495
false
xiandiancloud/edx-platform-Y
lms/djangoapps/debug/views.py
12
1399
"""Views for debugging and diagnostics""" import pprint import traceback from django.http import Http404, HttpResponse from django.contrib.auth.decorators import login_required from django.utils.html import escape from django_future.csrf import ensure_csrf_cookie from edxmako.shortcuts import render_to_response fro...
agpl-3.0
433,049,715,711,952,830
30.088889
76
0.646891
false
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/bx_python-0.7.1-py2.7-linux-x86_64.egg/bx/pwm/position_weight_matrix.py
4
29980
#!/usr/bin/env python import sys import math import string from numpy import * from sets import * # This is the average of all species in the alignment outside of exons # > mean(r) # A T C G # 0.2863776 0.2878264 0.2129560 0.2128400 # > sd(r) # A T ...
apache-2.0
1,041,257,969,608,953,100
34.312132
139
0.515811
false
Nerucius/tutor-ecosystem
dashboard/views.py
1
6297
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.contrib.auth.decorators import login_required from django.contrib.auth import authenticate, login, logout from django.contrib.auth.models import User from django.contrib.auth.mixins import LoginRequiredMixin from django.shortcuts import rende...
mit
4,834,898,579,966,470,000
26.862832
117
0.730824
false
lahwaacz/qutebrowser
qutebrowser/commands/argparser.py
4
5141
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
9,063,815,852,551,650,000
30.347561
79
0.63509
false
mitocw/edx-platform
lms/djangoapps/course_blocks/transformers/split_test.py
4
3304
""" Split Test Block Transformer """ import six from openedx.core.djangoapps.content.block_structure.transformer import ( BlockStructureTransformer, FilteringTransformerMixin ) class SplitTestTransformer(FilteringTransformerMixin, BlockStructureTransformer): """ A nested transformer of the UserPart...
agpl-3.0
-4,465,659,162,091,184,000
35.307692
102
0.62954
false
microelly2/freecad-pluginloader
eventfilter.py
1
6814
# -*- coding: utf-8 -*- #------------------------------------------------- #-- event filter #-- #-- microelly 2015 #-- #-- GNU Lesser General Public License (LGPL) #------------------------------------------------- __Version__='huhu' __Author__="AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" from PySide import QtGui,QtCore import...
lgpl-3.0
-2,968,062,706,667,174,400
28.244635
113
0.63076
false
rlpy/rlpy
examples/blocksworld/ggq-tile.py
1
2392
from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from rlpy.Domains import BlocksWorld from rlpy.Agents import Greedy_GQ from rlpy.Representations import * from rlpy.Policies import eGreedy ...
bsd-3-clause
4,430,196,032,601,933,300
33.171429
98
0.534281
false
qk4l/Flexget
flexget/tests/test_utils.py
5
3596
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from datetime import datetime import math import pytest from flexget.utils import json from flexget.utils.tools import parse_filesize, split_title_year def compare_floa...
mit
1,072,883,505,974,665,100
34.96
110
0.616796
false
Microvellum/Fluid-Designer
win64-vc/2.78/python/lib/test/test_source_encoding.py
17
5265
# -*- coding: koi8-r -*- import unittest from test.support import TESTFN, unlink, unload, rmtree import importlib import os import sys import subprocess class SourceEncodingTest(unittest.TestCase): def test_pep263(self): self.assertEqual( "ðÉÔÏÎ".encode("utf-8"), b'\xd0\x9f\xd0\xb...
gpl-3.0
6,260,717,941,211,501,000
35.061644
77
0.537702
false
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247971765/PyQt4/QtGui/QStyleOptionSlider.py
1
1206
# encoding: utf-8 # module PyQt4.QtGui # from /usr/lib/python3/dist-packages/PyQt4/QtGui.cpython-34m-x86_64-linux-gnu.so # by generator 1.135 # no doc # imports import PyQt4.QtCore as __PyQt4_QtCore from .QStyleOptionComplex import QStyleOptionComplex class QStyleOptionSlider(QStyleOptionComplex): """ QStyl...
gpl-2.0
-639,000,858,629,209,200
30.736842
120
0.640133
false
xiangke/pycopia
mibs/pycopia/mibs/RS_232_MIB.py
1
15133
# python # This file is generated by a program (mib2py). Any edits will be lost. from pycopia.aid import Enum import pycopia.SMI.Basetypes Range = pycopia.SMI.Basetypes.Range Ranges = pycopia.SMI.Basetypes.Ranges from pycopia.SMI.Objects import ColumnObject, MacroObject, NotificationObject, RowObject, ScalarObject, N...
lgpl-2.1
3,163,449,220,048,995,000
36
767
0.731316
false
batearedcollie/seisTK
stk/Examples/hyperCubeTest.py
1
3891
# Copyright 2017 Bateared Collie # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, this # list of conditions and the following disclaimer. ...
bsd-3-clause
-9,054,939,747,505,624,000
33.442478
99
0.634541
false
lzamparo/SdA_reduce
utils/sample_reference_pop.py
1
1581
""" Utilities for data set extraction and scaling """ import tables import os import numpy as np from optparse import OptionParser from extract_datasets import draw_reference_population # parse required args parser = OptionParser() parser.add_option("-i", "--input", dest="infile", help="read input h5 from here") pars...
bsd-3-clause
-5,673,265,492,858,823,000
35.790698
127
0.73814
false
sudheesh001/oh-mainline
vendor/packages/scrapy/scrapy/utils/signal.py
17
2612
"""Helper functinos for working with signals""" from twisted.internet.defer import maybeDeferred, DeferredList, Deferred from twisted.python.failure import Failure from scrapy.xlib.pydispatch.dispatcher import Any, Anonymous, liveReceivers, \ getAllReceivers, disconnect from scrapy.xlib.pydispatch.robustapply imp...
agpl-3.0
-5,209,200,281,967,904,000
38.575758
79
0.659265
false
gizela/gizela
setup.py
1
1026
from distutils.core import setup setup( name='Gizela', version='1.0.18', author='Michal Seidl, Tomas Kubin', author_email='michal.seidl@fsv.cvut.cz, tomas.kubin@fsv.cvut.cz', packages=['gizela', 'gizela.data', 'gizela.stat', 'gizela.text', 'gi...
gpl-3.0
8,432,033,131,916,558,000
37
89
0.565302
false
cpcloud/blaze
blaze/expr/datetime.py
2
4978
from __future__ import absolute_import, division, print_function from .expressions import ElemWise, schema_method_list, method_properties import datashape from datashape import dshape, isdatelike, isnumeric __all__ = ['DateTime', 'Date', 'date', 'Year', 'year', 'Month', 'month', 'Day', 'day', 'Hour', 'ho...
bsd-3-clause
-1,034,056,861,780,481,400
20.364807
79
0.594616
false
emgee/formal
formal/widgets/textareawithselect.py
1
2264
from zope.interface import implements from nevow import tags as T, util from formal import iformal from formal.util import render_cssid class TextAreaWithSelect(object): """ A large text entry area that accepts newline characters. <textarea>...</textarea> """ implements( iformal.IWidget ) co...
mit
-4,935,414,397,167,781,000
34.375
219
0.611307
false
rds0751/colinkers
env/Lib/importlib/_bootstrap_external.py
21
54487
"""Core implementation of path-based import. This module is NOT meant to be directly imported! It has been designed such that it can be bootstrapped into Python as the implementation of import. As such it requires the injection of specific modules and attributes in order to work. One should use importlib as the public...
agpl-3.0
-2,798,698,403,231,078,400
36.759529
105
0.601538
false
mahim97/zulip
zerver/views/storage.py
2
1745
from django.http import HttpRequest, HttpResponse from django.utils.translation import ugettext as _ from zerver.lib.bot_storage import ( get_bot_storage, set_bot_storage, remove_bot_storage, get_keys_in_bot_storage, is_key_in_bot_storage, StateError, ) from zerver.decorator import has_request_v...
apache-2.0
-6,954,227,435,070,398,000
37.777778
102
0.711748
false
astex/peanuts
peanuts/models/base.py
1
1144
"""Abstract base model class(es).""" from peanuts.lib.database import db __all__ = ['Model'] class Model(db.Model): """A base model class.""" __abstract__ = True def get_dictionary(self, verbosity='all'): """Returns a JSON-serializable dictionary representation of the model. This...
mit
6,928,335,613,869,487,000
34.75
78
0.586538
false
ralphbean/ansible
lib/ansible/cache/jsonfile.py
13
4226
# (c) 2014, Brian Coca, Josh Drake, et al # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. ...
gpl-3.0
-4,356,776,823,761,134,600
28.760563
107
0.561997
false
hermes-jr/npui
netprofile/netprofile/common/ipaddr.py
3
60739
#!/usr/bin/python # # Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. # # 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/LICE...
agpl-3.0
5,499,759,163,943,763,000
30.800524
80
0.557467
false
StefanRijnhart/odoo
openerp/modules/__init__.py
23
1565
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
-7,876,433,411,418,295,000
42.472222
83
0.653674
false
pkexcellent/luigi
luigi/__init__.py
13
1504
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify 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 law...
apache-2.0
-1,850,835,322,321,366,800
29.08
89
0.781915
false
xxd3vin/spp-sdk
opt/Python27/Lib/bsddb/test/test_sequence.py
39
5447
import unittest import os from test_all import db, test_support, get_new_environment_path, get_new_database_path class DBSequenceTest(unittest.TestCase): import sys if sys.version_info < (2, 4) : def assertTrue(self, expr, msg=None): self.failUnless(expr,msg=msg) def setUp(self): ...
mit
3,788,986,019,955,205,000
37.359155
86
0.610244
false
gam-phon/taiga-back
taiga/projects/likes/mixins/viewsets.py
3
3211
# Copyright (C) 2014-2016 Andrey Antukh <niwi@niwi.nz> # Copyright (C) 2014-2016 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2016 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014-2016 Alejandro Alonso <alejandro.alonso@kaleidos.net> # This program is free software: you can redistribute it and/or mo...
agpl-3.0
6,279,274,426,862,648,000
36.752941
91
0.703334
false
onesfreedom/pybuilder
src/unittest/python/plugins/python/unittest_plugin_tests.py
6
11000
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2015 PyBuilder Team # # 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/l...
apache-2.0
6,255,679,239,321,876,000
41.953125
116
0.666151
false
neurodata/macho
packages/caffe_membrane_segmentation/deploy.py
4
11093
# Runs a previously trained DNN on new electron microscopy (EM) data. # # Assumes the network contains a layer named "prob" that contains the # output probabilities for each class. # # Example usage: (see also Makefile) # PYTHONPATH=~/Apps/caffe-master/python ipython # %run deploy.py -s caffe_files/n3-solv...
apache-2.0
1,472,411,796,440,134,700
40.860377
140
0.593618
false
xtr4nge/sslstrip
sslstrip/URLMonitor.py
6
3263
# Copyright (c) 2004-2009 Moxie Marlinspike # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distri...
gpl-3.0
-1,063,064,109,971,670,300
31.306931
99
0.613852
false
Arlefreak/arte7
cms/context_processors.py
1
1237
__author__ = 'Arlefreak' # -*- coding: utf-8 -*- from django.urls import reverse def menu(request): menu = {"menu": [ {'name': 'carrera de cine', 'url': reverse('carrera')}, {'name': 'cursos / talleres', 'url': reverse('cursos')}, {'name': 'Óperas primas / cortometrajes', 'url': reverse('c...
gpl-3.0
-779,481,641,215,951,000
38.83871
79
0.538462
false
Vagab0nd/SiCKRAGE
sickchill/oldbeard/network_timezones.py
1
4523
import datetime import re from dateutil import tz from sickchill.helper.common import try_int from .. import logger from . import db, helpers # regex to parse time (12/24 hour format) time_regex = re.compile(r'(?P<hour>\d{1,2})(?:[:.](?P<minute>\d{2})?)? ?(?P<meridiem>[PA]\.? ?M?)?\b', re.I) network_dict = {} sb_...
gpl-3.0
-8,740,480,543,092,089,000
28.756579
184
0.620164
false
qpython-android/QPypi-numpy
numpy/core/code_generators/generate_ufunc_api.py
1
3307
import os import genapi h_template = r""" #ifdef _UMATHMODULE static PyTypeObject PyUFunc_Type; %s #else #if defined(PY_UFUNC_UNIQUE_SYMBOL) #define PyUFunc_API PY_UFUNC_UNIQUE_SYMBOL #endif #if defined(NO_IMPORT) || defined(NO_IMPORT_UFUNC) extern void **PyUFunc_API; #else #if defined(PY_UFUNC_UNIQUE_SYMBOL) voi...
bsd-3-clause
-2,659,602,935,797,491,000
23.679104
169
0.629574
false
tudennis/LeetCode---kamyu104-11-24-2015
Python/integer-to-english-words.py
2
2287
# Time: O(logn) = O(1), n is the value of the integer, which is less than 2^31 - 1 # Space: O(1) # # Convert a non-negative integer to its english words representation. # Given input is guaranteed to be less than 2^31 - 1. # # For example, # 123 -> "One Hundred Twenty Three" # 12345 -> "Twelve Thousand Three Hundred F...
mit
6,649,146,194,763,269,000
34.734375
98
0.543507
false
atlassian/dd-agent
tests/checks/mock/test_system_core.py
46
2489
import mock import psutil from tests.checks.common import AgentCheckTest from utils.platform import Platform if Platform.is_mac(): CHECK_RATES = [ 'system.core.idle', 'system.core.nice', 'system.core.system', 'system.core.user', ] MOCK_PSUTIL_CPU_TIMES = [ psutil._p...
bsd-3-clause
5,476,939,463,796,643,000
38.507937
88
0.558859
false
ryanss/holidays.py
holidays/countries/nigeria.py
2
1466
# -*- coding: utf-8 -*- # python-holidays # --------------- # A fast, efficient Python library for generating country, province and state # specific sets of holidays on the fly. It aims to make determining whether a # specific date is a holiday as fast and flexible as possible. # # Author: ryanss <ryanssdev@icl...
mit
3,502,470,218,551,087,000
25.654545
78
0.618008
false
x75/paparazzi
sw/tools/doxygen_gen/gen_modules_doc.py
15
12818
#!/usr/bin/env python from __future__ import print_function from optparse import OptionParser import xml.etree.ElementTree as ET import os import sys import glob import re import copy import string def dox_new_page(name, title): return "/** @page " + name + " " + title + "\n\n" def dox_section(name, title): ...
gpl-2.0
-2,522,501,689,326,226,400
33.364611
150
0.549852
false
WALR/taiga-back
taiga/base/tags.py
20
1151
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-4,075,748,763,557,333,500
40
74
0.75784
false
ethanrublee/ecto-release
test/scripts/gil_exercise.py
2
2031
#!/usr/bin/env python # # Copyright (c) 2011, Willow Garage, Inc. # 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 # not...
bsd-3-clause
9,149,033,390,615,818,000
37.320755
77
0.728213
false
Eloston/YAMCL
graphical_interface/LocalLibraryInstaller.py
1
12623
''' YAMCL is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. YAMCL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;...
gpl-3.0
-5,144,951,323,001,908,000
49.694779
173
0.664897
false
jalavik/invenio
invenio/legacy/bibexport/webinterface.py
16
22855
# -*- coding: utf-8 -*- # $Id: webmessage_webinterface.py,v 1.13 2008/03/12 16:48:08 tibor Exp $ # # 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 ...
gpl-2.0
130,515,196,328,057,470
42.45057
98
0.483395
false
waynegm/OpendTect-5-plugins
bin/python/wmpy/Experimental/GradientStructureTensor/ex_gst_cvals.py
3
2568
# Some Attributes derived from the Eigenvalues of the Gradient Structure Tensor # # Cline = (e2-e3)/(e2+e3) (Bakker, 2001) # Cplane = (e1-e2)/(e1+e2) (Bakker, 2001) # Cfault = Cline * (1 - Cplane) (Bakker, 2001) # Cchaos = 4*e1*e3*(e1+e2+e3)/(e1+e3)^2 (Wang etal, 2009) # Ctype = ((e1-e2)^2 + (e1-e3)^2 + (e2-e3)^2) / (e...
gpl-3.0
1,889,608,851,599,727,900
26.612903
96
0.628894
false
felixma/nova
nova/tests/unit/compute/test_resource_tracker.py
6
60618
# Copyright (c) 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
apache-2.0
6,834,570,783,391,148,000
38.854043
79
0.59352
false
patricmutwiri/pombola
pombola/hansard/tests/test_sitting.py
4
1538
import os import datetime from datetime import date, time from django.test import TestCase from pombola.hansard.models import Source, Sitting, Venue class HansardSittingTest(TestCase): fixtures = ['hansard_test_data'] def setUp(self): # grab a source from the test_data self.source = Source....
agpl-3.0
-5,132,152,706,076,639,000
32.434783
98
0.620286
false
X-DataInitiative/tick
tick/hawkes/model/model_hawkes_sumexpkern_leastsq.py
2
5875
# License: BSD 3 clause import sys from warnings import warn import numpy as np from tick.base_model import LOSS_AND_GRAD from tick.hawkes.model.build.hawkes_model import ( ModelHawkesSumExpKernLeastSq as _ModelHawkesSumExpKernLeastSq) from .base import ModelHawkes class ModelHawkesSumExpKernLeastSq(ModelHawke...
bsd-3-clause
-7,704,628,060,993,150,000
32.571429
78
0.6
false
h3llrais3r/Auto-Subliminal
lib/decorator.py
5
17244
# ######################### LICENSE ############################ # # Copyright (c) 2005-2018, Michele Simionato # 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 so...
gpl-3.0
2,588,467,180,713,017,000
36.898901
79
0.572025
false
pshowalter/solutions-geoprocessing-toolbox
military_aspects_of_weather/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/constants.py
2
2118
# -*- coding: utf-8 -*- import mds.keyword import mds.keywords SELECT_BY_VALUE = 1 """ Boundary coordinate values are interpreted as coordinate values. These values correspond to the values stored in the dataset. The value of this constant is not relevant. Assume it will be changed. """ SELECT_BY_INDEX = 2 """ Boun...
apache-2.0
8,650,807,125,404,420,000
22.021739
79
0.652975
false
sorenh/cc
vendor/boto/boto/sdb/regioninfo.py
5
1806
# Copyright (c) 2006-2009 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
2,950,846,429,383,937,500
44.15
74
0.738095
false
BumblebeeBat/FlyingFox
docs/rough_drafts/python/networking.py
2
3557
import socket, tools, custom, time, sys, select from json import dumps as package, loads as unpackage MAX_MESSAGE_SIZE = 60000 def serve_forever(handler, port, heart_queue='default', external=False): if heart_queue=='default': import Queue heart_queue=Queue.Queue() if external: host='0.0...
unlicense
5,012,091,792,297,191,000
30.201754
81
0.584762
false
GodBlessPP/W17test_2nd_2
wsgi.py
1
42641
#@+leo-ver=5-thin #@+node:2014fall.20141212095015.1775: * @file wsgi.py # coding=utf-8 # 上面的程式內容編碼必須在程式的第一或者第二行才會有作用 ################# (1) 模組導入區 # 導入 cherrypy 模組, 為了在 OpenShift 平台上使用 cherrypy 模組, 必須透過 setup.py 安裝 #@@language python #@@tabwidth -4 #@+<<declarations>> #@+node:2014fall.20141212095015.1776: ** <<declar...
gpl-3.0
4,220,092,343,189,159,400
31.333903
184
0.575945
false
HybridF5/jacket
jacket/api/compute/openstack/compute/networks_associate.py
1
3398
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
-6,835,734,169,315,040,000
34.768421
78
0.679517
false
PavelVeselsky/fft-convolution-filter
fft_filter_dialog.py
1
1855
# -*- coding: utf-8 -*- """ /*************************************************************************** FFTConvolutionDialog A QGIS plugin Smoothing and edge detection based on fftconvolve() SciPy function ------------------- begin ...
gpl-3.0
5,825,685,822,243,332,000
44.219512
77
0.435814
false
kevinmanncito/django-markdown-blog
setup.py
1
1542
import os from setuptools import find_packages, setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme: README = readme.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-markdown-blog', ...
unlicense
6,455,381,694,110,707,000
34.883721
78
0.613489
false
openstack/networking-odl
networking_odl/sfc/flowclassifier/sfc_flowclassifier_v2.py
1
3576
# Copyright (c) 2016 Brocade Communication Systems # 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 # # ...
apache-2.0
2,971,060,287,484,287,500
38.733333
78
0.722315
false
3ptscience/steno3dpy
steno3d/user.py
1
2530
"""user.py contains basic information about the steno3d user""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import properties class User(properties.HasProperties): """Class representing a user instance""" ...
mit
3,436,486,090,745,093,000
29.853659
65
0.616206
false
Coaxis-ASP/open-printing-tunnel
daemon/api/output_parser.py
2
5865
import logging import re logger = logging.getLogger(__name__) def list_sites(lines): parser = re.compile(r'[\s]*(?P<id>[^\s]+)[\s]*(?P<hostname>[^\n\t]+)') response = [] for line in lines: matches = parser.search(line) if matches: data = matches.groupdict() respons...
gpl-3.0
-8,537,862,489,874,501,000
22.27381
106
0.527877
false
qtumproject/qtum
test/functional/wallet_importmulti.py
1
43476
#!/usr/bin/env python3 # Copyright (c) 2014-2019 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 importmulti RPC. Test importmulti by generating keys on node0, importing the scriptPubKeys an...
mit
8,714,834,497,141,868,000
49.730455
316
0.546301
false
crichardson17/starburst_atlas
Low_resolution_sims/Dusty_LowRes/Geneva_cont_NoRot/Geneva_cont_NoRot_0/fullgrid/Optical1.py
30
9342
import csv import matplotlib.pyplot as plt from numpy import * import scipy.interpolate import math from pylab import * from matplotlib.ticker import MultipleLocator, FormatStrFormatter import matplotlib.patches as patches from matplotlib.path import Path import os # --------------------------------------------------...
gpl-2.0
-7,892,739,848,078,319,000
28.285266
203
0.592164
false
jwoglom/ionbot
commands/shibe.py
1
1479
# Copyright (C) 2013-2015 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Fox Wilson # # 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 ve...
gpl-2.0
-2,378,780,923,793,881,000
37.921053
134
0.690331
false
CLLKazan/iCQA
qa-engine/forum/migrations/0020_create_absolute_parents.py
1
25277
# encoding: utf-8 import datetime from south.db import db from south.v2 import DataMigration from django.db import models from forum.migrations import ProgressBar class Migration(DataMigration): def forwards(self, orm): def get_abs_par(n): if n.parent: return ge...
gpl-3.0
-4,284,059,525,869,870,600
82.256667
190
0.545674
false
robertnishihara/ray
rllib/agents/a3c/tests/test_a3c.py
2
1234
import unittest import ray import ray.rllib.agents.a3c as a3c from ray.rllib.utils.test_utils import check_compute_single_action, \ framework_iterator class TestA3C(unittest.TestCase): """Sanity tests for A2C exec impl.""" def setUp(self): ray.init(num_cpus=4) def tearDown(self): ra...
apache-2.0
501,731,716,321,467,500
28.380952
78
0.577796
false
daspecster/google-cloud-python
monitoring/unit_tests/test_resource.py
4
12608
# Copyright 2016 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, ...
apache-2.0
8,558,634,928,758,125,000
34.316527
79
0.596288
false
yuanyelele/solfege
tools/buildutil.py
1
2897
#/usr/bin/python # GNU Solfege - free ear training software # Copyright (C) 2006, 2007, 2008, 2011 Tom Cato Amundsen # # 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 Li...
gpl-3.0
1,927,607,300,545,959,400
30.835165
102
0.609596
false
jamesbeebop/CouchPotatoServer
couchpotato/core/media/movie/providers/automation/goodfilms.py
64
2135
from bs4 import BeautifulSoup from couchpotato.core.logger import CPLog from couchpotato.core.media.movie.providers.automation.base import Automation log = CPLog(__name__) autoload = 'Goodfilms' class Goodfilms(Automation): url = 'https://goodfil.ms/%s/queue?page=%d&without_layout=1' interval = 1800 ...
gpl-3.0
2,654,291,370,526,704,000
24.416667
101
0.478689
false
nwebs/rdflib
test/test_datetime.py
1
2759
import sys import unittest from datetime import datetime from isodate import datetime_isoformat, UTC from isodate.isostrf import DATE_EXT_COMPLETE, TZ_EXT from rdflib.term import URIRef from rdflib.term import Literal from rdflib.namespace import XSD class TestRelativeBase(unittest.TestCase): def test_equality...
bsd-3-clause
4,926,195,483,832,378,000
33.924051
95
0.594056
false
alexschiller/osf.io
website/views.py
2
7676
# -*- coding: utf-8 -*- import itertools import httplib as http import logging import math import os import urllib from django.apps import apps from modularodm import Q from modularodm.exceptions import NoResultsFound from flask import request, send_from_directory from framework import utils, sentry from framework.au...
apache-2.0
-1,807,370,050,917,212,200
28.29771
112
0.642262
false
Seklfreak/Robyul-Red-DiscordBot
cogs/streams.py
1
19784
import discord from discord.ext import commands from .utils.dataIO import dataIO from .utils.chat_formatting import escape_mass_mentions from .utils import checks from __main__ import send_cmd_help from collections import defaultdict import os import re import aiohttp import asyncio import logging class Streams: ...
gpl-3.0
5,098,187,432,527,035,000
38.647295
104
0.527093
false
Webcampak/v1.0
src/bin/wpakPhidget.py
1
6675
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010-2012 Infracom & Eurotechnia (support@webcampak.com) # This file is part of the Webcampak project. # Webcampak 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 Fo...
gpl-2.0
-6,959,005,898,352,783,000
39.70122
121
0.697528
false
izhaohui/gardener
controller/home/flower/models.py
1
2048
from django.db import models import socket,logging # Create your models here. class Sensor(models.Model): timestamp = models.DateTimeField(auto_now_add=True) env_light = models.IntegerField() env_humid = models.IntegerField() env_raindrop = models.IntegerField() env_temperature = models.IntegerFie...
gpl-3.0
3,707,433,678,206,195,700
36.236364
87
0.625977
false
clobrano/personfinder
app/jautils.py
16
23150
#!/usr/bin/python2.7 # coding: utf-8 # 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...
apache-2.0
115,380,066,444,422,270
33.15082
117
0.454301
false
epeli/subssh
subssh/__init__.py
1
1195
# -*- coding: utf-8 -*- """ Copyright (C) 2010 Esa-Matti Suuronen <esa-matti@suuronen.org> This file is part of subssh. Subssh 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 Lic...
agpl-3.0
4,914,919,520,180,936,000
31.324324
65
0.786611
false
osynge/ceph-deploy
ceph_deploy/util/templates.py
9
2150
ceph_repo = """[ceph] name=Ceph packages for $basearch baseurl={repo_url}/$basearch enabled=1 gpgcheck=1 priority=1 type=rpm-md gpgkey={gpg_url} [ceph-noarch] name=Ceph noarch packages baseurl={repo_url}/noarch enabled=1 gpgcheck=1 priority=1 type=rpm-md gpgkey={gpg_url} [ceph-source] name=Ceph source packages base...
mit
2,408,301,658,899,909,000
21.87234
75
0.609302
false
felipenaselva/felipe.repository
script.module.resolveurl/lib/resolveurl/plugins/uploadx.py
1
1995
''' clicknupload resolveurl plugin Copyright (C) 2015 tknorris This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is...
gpl-2.0
-6,997,402,342,953,203,000
33.396552
95
0.667168
false
Heart2009/buck
third-party/py/twitter-commons/src/python/twitter/common/python/finders.py
18
8512
# ================================================================================================== # Copyright 2014 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
-2,573,441,727,234,134,500
33.048
100
0.690202
false
zhaque/django-threadedcomments
threadedcomments/templatetags/threadedcommentstags.py
1
18508
import re from django import template from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from threadedcomments.models import ThreadedComment, FreeThreadedComment from thread...
bsd-3-clause
7,044,726,378,025,140,000
41.547126
225
0.671601
false
azatoth/scons
test/CXX/SHCXXCOM.py
5
2837
#!/usr/bin/env python # # __COPYRIGHT__ # # 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, modify, merge, publish, ...
mit
6,187,321,239,522,328,000
31.988372
73
0.683821
false
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/test/test_zipapp.py
4
16302
"""Test harness for the zipapp module.""" import io import pathlib import stat import sys import tempfile import unittest import zipapp import zipfile from test.support import requires_zlib from unittest.mock import patch class ZipAppTest(unittest.TestCase): """Test zipapp module functionality.""" def setU...
apache-2.0
6,782,433,612,805,700,000
39.451613
100
0.598945
false
audioburn/pymedia-redux-full
meta.py
5
1247
import os, traceback import pymedia HEADER_CHUNK_SIZE= 30000 FREQUENCY_KEY= 'sample_freq' CHANNELS_KEY= 'channels' BITRATE_KEY= 'bitrate' # ----------------------------------------------------- # Get metadata from the media file def getMetaData( f, ext= None ): info= {} if type( f ) in ( str, unicode ): ext=...
lgpl-2.1
-997,784,336,825,090,800
24.979167
55
0.57498
false
glorpen/webassets
src/webassets/filter/autoprefixer.py
13
2072
from __future__ import with_statement from webassets.filter import ExternalTool from webassets.utils import working_directory class AutoprefixerFilter(ExternalTool): """Prefixes vendor-prefixes using `autoprefixer <https://github.com/ai/autoprefixer>`, which uses the `Can I Use? <http://www.caniuse.com>`...
bsd-2-clause
7,221,917,998,269,030,000
36.672727
91
0.656853
false
joxeankoret/pyew
vstruct/__init__.py
17
11433
import struct from inspect import isclass from StringIO import StringIO import vstruct.primitives as vs_prims def isVstructType(x): return isinstance(x, vs_prims.v_base) class VStruct(vs_prims.v_base): ''' The VStruct class is the bases for all groups of primitive fields which define a "structure". ...
gpl-2.0
7,538,216,614,009,070,000
28.619171
99
0.550599
false
bartekjagiello/inteygrate_flaskapp
build/lib/yowsup/layers/protocol_chatstate/protocolentities/chatstate_outgoing.py
70
1210
from .chatstate import ChatstateProtocolEntity class OutgoingChatstateProtocolEntity(ChatstateProtocolEntity): ''' INCOMING <chatstate from="xxxxxxxxxxx@s.whatsapp.net"> <{{composing|paused}}></{{composing|paused}}> </chatstate> OUTGOING <chatstate to="xxxxxxxxxxx@s.whatsapp.net"> <{{...
gpl-3.0
6,824,779,444,699,318,000
28.512195
80
0.639669
false
ryanjmccall/nupic
tests/swarming/nupic/swarming/experiments/simpleV2/description.py
3
15630
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
5,515,187,775,449,135,000
38.075
110
0.578183
false
rsj217/tornado--scaffold
tornapro/ghost/app/orm.py
1
21067
#!/usr/bin/env python # -*- coding:utf-8 -*- __author__ = 'ghost' import logging import contextlib import datetime from settings import dbconn as conn from settings import config logger = logging.getLogger('orm') logger.setLevel(config.ORM_LOGGER_LEVEL) class FieldException(Exception): pass class FieldTypeEx...
mit
5,212,193,690,023,057,000
32.614007
115
0.545424
false
mikewiebe-ansible/ansible
lib/ansible/modules/cloud/vmware/vmware_evc_mode.py
31
8204
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Michael Tipton <mike () ibeta.org> # 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'...
gpl-3.0
-833,880,748,828,246,000
34.362069
140
0.597757
false
ChinaMassClouds/copenstack-server
openstack/src/ceilometer-2014.2.2/ceilometer/compute/discovery.py
5
1589
# # Copyright 2014 Red Hat, Inc # # Author: Eoghan Glynn <eglynn@redhat.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 req...
gpl-2.0
9,015,673,950,021,969,000
32.104167
75
0.674638
false
ananthonline/grpc
src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py
5
12452
# Copyright 2015, Google Inc. # 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 conditions and the f...
bsd-3-clause
149,734,771,704,011,740
37.079511
83
0.727915
false
aostapenko/manila
manila/tests/test_share_rpcapi.py
2
5552
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 NetApp # # 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 # # Unl...
apache-2.0
-7,764,207,628,488,947,000
35.768212
78
0.56304
false
frappe/erpnext
erpnext/crm/doctype/lead/lead.py
2
10754
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from erpnext.accounts.party import set_taxes from erpnext.controllers.selling_controller import SellingController from frappe import _ fr...
gpl-3.0
-1,296,988,993,855,127,600
28.463014
119
0.677143
false
lukess/heron
heron/tools/cli/src/python/version.py
4
1249
# Copyright 2016 Twitter. 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 agree...
apache-2.0
1,558,780,774,081,146,600
26.152174
74
0.714171
false
Anderson-Lab/anderson-lab.github.io
csc_466_2020_winter/MLCode/Ch15/rejectionsampling.py
3
1447
# Code from Chapter 15 of Machine Learning: An Algorithmic Perspective (2nd Edition) # by Stephen Marsland (http://stephenmonika.net) # You are free to use, change, or redistribute the code in any way you wish for # non-commercial purposes, but please maintain the name of the original author. # This code comes with n...
mit
-4,785,781,056,820,718,000
23.525424
84
0.602626
false
dfang/odoo
addons/website_sale_digital/controllers/main.py
9
4345
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 from cStringIO import StringIO from werkzeug.utils import redirect from odoo import http from odoo.http import request from odoo.addons.website_portal.controllers.main import website_account from odoo.addo...
agpl-3.0
-30,369,055,205,601,748
39.990566
211
0.609896
false
unaxfromsibiria/simwg
src/simwg/django_simwg/management/commands/simwg_service.py
1
1458
# -*- coding: utf-8 -*- ''' @author: Michael Vorotyntsev ''' from django.conf import settings from django.core.management.base import ( BaseCommand, CommandError) from optparse import make_option SETTINGS_FIELD = 'SIMWG_SETTINGS' class Command(BaseCommand): args = '<simwg_service --start>' help = u'...
mit
-7,526,302,720,511,880,000
23.711864
69
0.591907
false
dracos/QGIS
tests/src/python/test_qgsdelimitedtextprovider.py
4
25651
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDelimitedTextProvider. .. 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 versi...
gpl-2.0
7,481,453,154,765,586,000
34.576976
123
0.567424
false
ubunatic/dotfiles
scripts/vm-indicator.py
2
1929
#!/usr/bin/env python import gobject, gtk, appindicator, os, threading, sched, time def vmcount(): return sh_vboxcount() + sh_dockercount() def sh_vboxcount(): ps = os.popen("pgrep VBoxHeadless").read() return len(ps) def sh_dockercount(): ps = os.popen("docker ps -aq").read() return len(ps) def sh...
mit
7,010,058,041,726,704,000
22.52439
67
0.563504
false
alexmogavero/home-assistant
homeassistant/components/sensor/hddtemp.py
3
3423
""" Support for getting the disk temperature of a host. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.hddtemp/ """ import logging from datetime import timedelta from telnetlib import Telnet import voluptuous as vol import homeassistant.helpers....
apache-2.0
-5,339,301,714,954,590,000
27.525
76
0.634531
false
prawn-cake/pilvi
pilvi/aiohandler/test/test_main.py
1
3223
# -*- coding: utf-8 -*- import django django.setup() from django.conf import settings from pilvi.management.models import Client from aiohttp.test_utils import AioHTTPTestCase, unittest_run_loop from pilvi.aiohandler.main import create_app from unittest import mock class AioHandlerTestCase(AioHTTPTestCase): def ...
mit
-5,355,443,534,351,532,000
34.032609
91
0.626435
false
yollamttam/WordPrediction
RunNN.py
1
1115
from fann2 import libfann import pickle import numpy as np # load neural network ann = libfann.neural_net() ann.create_from_file("NN.net") # obvious alpha = 0.5 numWords = 500 # load pickle wordsInOrder = pickle.load( open( "wordsInOrder.p", "rb" ) ) wordProb = pickle.load( open( "wordProbability.p", "rb" ) ) rWord...
apache-2.0
-6,301,226,734,917,895,000
21.3
62
0.641256
false
riolet/SAM
spec/python/models/test_whois.py
2
5954
from spec.python import db_connection from sam.models import whois import pytest db = db_connection.db sub_id = db_connection.default_sub ds_id = db_connection.dsid_default ip_arin1 = '104.31.70.170' ip_arin1_name = 'Cloudflare, Inc.' ip_arin1_net = ('CLOUDFLARENET', 1745879040, 1746927615, 12) ip_arin2 = '199.59.148...
gpl-3.0
4,104,710,541,611,897,300
29.854922
108
0.628149
false
levilucio/SyVOLT
ECore_Copier_MM/transformation-Large/HedatatypeOUTeAnnotationsSolveRefEDataTypeEAnnotationEDataTypeEAnnotation.py
1
5056
from core.himesis import Himesis class HedatatypeOUTeAnnotationsSolveRefEDataTypeEAnnotationEDataTypeEAnnotation(Himesis): def __init__(self): """ Creates the himesis graph representing the AToM3 model HedatatypeOUTeAnnotationsSolveRefEDataTypeEAnnotationEDataTypeEAnnotation. """ ...
mit
1,541,680,426,329,202,700
48.087379
298
0.520767
false