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
Azulinho/ansible
test/units/modules/cloud/amazon/test_data_pipeline.py
23
10635
# (c) 2017 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is dis...
gpl-3.0
5,407,424,223,258,380,000
40.22093
127
0.674941
false
chornsby/hayes
hayes/indexing.py
1
4216
# -- encoding: UTF-8 -- from hayes.analysis import AnalysisBase, builtin_simple_analyzer from hayes.utils import object_to_dict class DocumentIndex(object): name = None fields = {} enable_source = True enable_size = False enable_timestamp = False def get_model(self): # For Django compat. return None def g...
mit
5,233,673,200,490,511,000
24.707317
143
0.672913
false
jjalling/domoticz
plugins/examples/DenonMarantz.py
15
23003
# # Denon AVR 4306 Plugin # # Author: Dnpwwo, 2016 - 2017 # # Mode4 ("Sources") needs to have '|' delimited names of sources that the Denon knows about. The Selector can be changed afterwards to any text and the plugin will still map to the actual Denon name. # """ <plugin key="Denon4306" version="3...
gpl-3.0
-7,805,844,891,380,772,000
49.334792
203
0.543886
false
Hamza5/Basic-Regular-Expressions-Tester
GUI/bret_gui.py
1
30151
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'GUI/bret.ui' # # Created: Thu Sep 18 22:16:21 2014 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attri...
gpl-3.0
-4,058,000,122,194,564,000
68.47235
160
0.745813
false
jessstrap/servotk
tests/wpt/run.py
40
2301
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import multiprocessing import os import sys import mozlog import grouping_formatter here = os.path.split(__file__)[0] s...
mpl-2.0
-2,021,515,338,196,502,000
27.7625
77
0.641895
false
sinkpoint/dipy
dipy/tracking/markov.py
10
17454
# -*- coding: utf-8 -*- """Implemention of various Tractography methods these tools are meant to be paired with diffusion reconstruction methods from dipy.reconst This module uses the trackvis coordinate system, for more information about this coordinate system please see dipy.tracking.utils The following modules als...
bsd-3-clause
8,217,968,246,394,872,000
36.535484
80
0.61029
false
drammock/mne-python
tutorials/machine-learning/30_strf.py
10
14437
# -*- coding: utf-8 -*- """ ===================================================================== Spectro-temporal receptive field (STRF) estimation on continuous data ===================================================================== This demonstrates how an encoding model can be fit with multiple continuous input...
bsd-3-clause
-5,160,603,969,925,348,000
40.479885
79
0.631867
false
bakhtout/odoo-educ
addons/account/report/account_partner_balance.py
286
11049
# -*- 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
3,638,072,188,252,509,700
40.69434
134
0.487284
false
trondhindenes/ansible
test/integration/targets/async_fail/action_plugins/normal.py
152
2566
# (c) 2012, 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) any lat...
gpl-3.0
5,609,728,954,497,913,000
40.387097
105
0.674981
false
jaggu303619/asylum-v2.0
openerp/addons/point_of_sale/report/pos_lines.py
61
2251
# -*- 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,458,071,733,882,998,000
39.927273
135
0.569969
false
sjsucohort6/openstack
python/venv/lib/python2.7/site-packages/tablib/packages/yaml/scanner.py
434
52630
# Scanner produces tokens of the following types: # STREAM-START # STREAM-END # DIRECTIVE(name, value) # DOCUMENT-START # DOCUMENT-END # BLOCK-SEQUENCE-START # BLOCK-MAPPING-START # BLOCK-END # FLOW-SEQUENCE-START # FLOW-MAPPING-START # FLOW-SEQUENCE-END # FLOW-MAPPING-END # BLOCK-ENTRY # FLOW-ENTRY # KEY # VALUE # AL...
mit
918,104,743,901,413,400
35.122169
103
0.530173
false
Fl0rianFischer/sme_odoo
addons/hr_expense/__openerp__.py
23
1789
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Expense Tracker', 'version': '2.0', 'category': 'Human Resources', 'sequence': 95, 'summary': 'Expenses Validation, Invoicing', 'description': """ Manage expenses by Employees ========...
gpl-3.0
4,849,301,913,212,807,000
37.847826
244
0.663682
false
cdorer/crits
crits/core/management/commands/create_default_dashboard.py
21
3882
from django.core.management.base import BaseCommand from optparse import make_option class Command(BaseCommand): """ Script Class. """ option_list = BaseCommand.option_list + ( make_option('--drop', '-d', dest='drop', action="store_tru...
mit
4,386,532,414,713,677,000
39.020619
106
0.52679
false
Teagan42/home-assistant
tests/components/zwave/test_climate.py
2
32574
"""Test Z-Wave climate devices.""" import pytest from homeassistant.components.climate.const import ( ATTR_TARGET_TEMP_HIGH, ATTR_TARGET_TEMP_LOW, CURRENT_HVAC_COOL, CURRENT_HVAC_HEAT, HVAC_MODE_COOL, HVAC_MODE_HEAT, HVAC_MODE_HEAT_COOL, HVAC_MODE_OFF, HVAC_MODES, PRESET_AWAY, ...
apache-2.0
-4,320,639,877,863,021,600
35.517937
88
0.678578
false
dbckz/ansible
lib/ansible/plugins/terminal/asa.py
57
2408
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
gpl-3.0
-3,324,383,777,638,621,700
31.106667
88
0.605066
false
912/M-new
virtualenvironment/experimental/lib/python2.7/site-packages/django/contrib/admin/tests.py
19
6158
import os from unittest import SkipTest from django.contrib.staticfiles.testing import StaticLiveServerCase from django.utils.module_loading import import_string from django.utils.translation import ugettext as _ class AdminSeleniumWebDriverTestCase(StaticLiveServerCase): available_apps = [ 'django.cont...
gpl-2.0
6,682,319,920,171,870,000
38.474359
89
0.626827
false
frobnitzem/forcesolve
cg_topol/edge.py
1
3933
# Edge creation logic def add_edge(edge, i, j): if i < j: edge.add((i,j)) else: edge.add((j,i)) def srt2(i,j): if i > j: return j,i return i,j def add_all_redge(edge, pdb, res_table, oi, ai, oj, aj): mino = min(oi,oj) maxo = max(oi,oj) for i in reversed(range(len(re...
gpl-3.0
8,625,489,048,809,630,000
28.795455
67
0.521485
false
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/numpy/distutils/mingw32ccompiler.py
4
25201
""" Support code for building Python extensions on Windows. # NT stuff # 1. Make sure libpython<version>.a exists for gcc. If not, build it. # 2. Force windows to use gcc (we're struggling with MSVC and g77 support) # 3. Force windows to use g77 """ from __future__ import division, absolute_import, p...
mit
8,671,930,165,551,452,000
37.357686
176
0.586683
false
loopCM/chromium
third_party/tlslite/tlslite/X509CertChain.py
76
9052
"""Class representing an X.509 certificate chain.""" from utils import cryptomath from X509 import X509 class X509CertChain: """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite.X509.X509} instances, starting with the end-entity certificate ...
bsd-3-clause
-3,038,778,064,394,999,000
36.409091
80
0.558551
false
merutak/python-social-auth
social/backends/loginradius.py
83
2617
""" LoginRadius BaseOAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/loginradius.html """ from social.backends.oauth import BaseOAuth2 class LoginRadiusAuth(BaseOAuth2): """LoginRadius BaseOAuth2 authentication backend.""" name = 'loginradius' ID_KEY = 'ID' ACCESS_TOKEN_URL = 'h...
bsd-3-clause
-4,597,198,649,388,083,700
36.927536
74
0.586932
false
cswiercz/sympy
sympy/physics/unitsystems/tests/test_unitsystem.py
92
2822
# -*- coding: utf-8 -*- from sympy.physics.unitsystems.dimensions import Dimension, DimensionSystem from sympy.physics.unitsystems.units import Unit, UnitSystem from sympy.physics.unitsystems.quantities import Quantity from sympy.utilities.pytest import raises length = Dimension(name="length", symbol="L", length=1) m...
bsd-3-clause
-7,763,931,265,552,091,000
27.505051
77
0.605599
false
spektom/incubator-airflow
tests/providers/google/cloud/operators/test_sftp_to_gcs_system.py
4
1875
# # 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
5,139,196,697,956,305,000
37.265306
102
0.738133
false
Azure/azure-sdk-for-python
sdk/securityinsight/azure-mgmt-securityinsight/azure/mgmt/securityinsight/aio/operations/_alert_rule_templates_operations.py
1
9059
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
mit
-2,481,787,813,296,180,700
49.327778
257
0.648637
false
osamirabo/kaggle-youtube
convert_prediction_from_json_to_csv.py
15
3247
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
8,726,734,383,124,099,000
30.524272
78
0.694179
false
scottlittle/nolearn
nolearn/lasagne/visualize.py
3
7850
from itertools import product from lasagne.layers import get_output import matplotlib.pyplot as plt import numpy as np import theano import theano.tensor as T def plot_loss(net): train_loss = [row['train_loss'] for row in net.train_history_] valid_loss = [row['valid_loss'] for row in net.train_history_] ...
mit
504,910,181,258,693,500
31.983193
78
0.596306
false
NeCTAR-RC/horizon
openstack_dashboard/dashboards/admin/networks/forms.py
1
15955
# Copyright 2012 NEC Corporation # # 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 ag...
apache-2.0
5,333,086,204,870,579,000
43.817416
79
0.541022
false
ucldc/harvester
scripts/external-redirect-get-solr_prod-id.py
1
4313
#! /bin/env python # -*- coding: utf-8 -*- # Use when Calisphere Object URLs for a collection change, to generate # a redirect file mapping 'old' (on SOLR-PROD) to 'new' (on SOLR-TEST) URLs. # # This script takes a Collection ID and a 'match' field in SOLR (i.e. best # field to use for matching SOLR-PROD record to cor...
bsd-3-clause
7,547,076,333,822,371,000
45.869565
122
0.709416
false
rodrigosurita/GDAd
sdaps/setup/pdftools/pdfpath.py
1
2761
# pdftools - A library of classes for parsing and rendering PDF documents. # Copyright(C) 2001-2008 by David Boddie # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 ...
gpl-3.0
-2,471,769,911,386,140,000
20.570313
80
0.628396
false
italomandara/JZ80
node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/input.py
53
115735
# 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. from compiler.ast import Const from compiler.ast import Dict from compiler.ast import Discard from compiler.ast import List from compiler.ast import Module from co...
mit
-2,624,844,192,908,367,400
39.074446
80
0.654867
false
asadziach/tensorflow
tensorflow/contrib/bayesflow/python/ops/entropy.py
85
1246
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-1,314,210,407,051,974,700
39.193548
80
0.710273
false
ymcagodme/Norwalk-Judo
django/contrib/gis/gdal/srs.py
291
11717
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print srs GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHORI...
bsd-3-clause
-8,482,760,662,576,213,000
33.768546
96
0.607664
false
samuelchong/libcloud
libcloud/test/common/test_cloudstack.py
4
7293
# 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 use ...
apache-2.0
210,170,693,286,806,430
33.728571
80
0.566845
false
fldc/CouchPotatoServer
libs/tornado/auth.py
102
61853
#!/usr/bin/env python # # Copyright 2009 Facebook # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
gpl-3.0
-3,449,011,700,904,206,000
40.708024
109
0.595541
false
garvitr/sympy
sympy/stats/crv_types.py
22
60361
""" Continuous Random Variables - Prebuilt variables Contains ======== Arcsin Benini Beta BetaPrime Cauchy Chi ChiNoncentral ChiSquared Dagum Erlang Exponential FDistribution FisherZ Frechet Gamma GammaInverse Kumaraswamy Laplace Logistic LogNormal Maxwell Nakagami Normal Pareto QuadraticU RaisedCosine Rayleigh Studen...
bsd-3-clause
9,060,704,986,744,468,000
23.029061
90
0.487832
false
dracos/django
django/contrib/contenttypes/checks.py
107
1234
from itertools import chain from django.apps import apps from django.core.checks import Error def check_generic_foreign_keys(app_configs=None, **kwargs): from .fields import GenericForeignKey if app_configs is None: models = apps.get_models() else: models = chain.from_iterable(app_config...
bsd-3-clause
-5,275,881,949,610,452,000
29.097561
91
0.577796
false
f3r/scikit-learn
examples/model_selection/grid_search_text_feature_extraction.py
99
4163
""" ========================================================== Sample pipeline for text feature extraction and evaluation ========================================================== The dataset used in this example is the 20 newsgroups dataset which will be automatically downloaded and then cached and reused for the d...
bsd-3-clause
1,599,506,824,553,376,000
31.023077
79
0.63608
false
pnedunuri/scikit-learn
examples/decomposition/plot_image_denoising.py
181
5819
""" ========================================= Image denoising using dictionary learning ========================================= An example comparing the effect of reconstructing noisy fragments of the Lena image using firstly online :ref:`DictionaryLearning` and various transform methods. The dictionary is fitted o...
bsd-3-clause
1,072,608,827,991,678,700
34.699387
80
0.641004
false
robinro/ansible
lib/ansible/modules/cloud/cloudstack/cs_network_acl.py
27
6173
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2017, René Moser <mail@renemoser.net> # # 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 Lice...
gpl-3.0
-587,662,091,044,338,600
26.549107
96
0.619835
false
jaysuk/Printrun
printrun/gcodeplater.py
2
10956
#!/usr/bin/env python3 # This file is part of the Printrun suite. # # Printrun 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. # # Pri...
gpl-3.0
-2,721,166,645,051,867,000
42.824
117
0.538244
false
marcoantoniooliveira/labweb
oscar/lib/python2.7/site-packages/docutils/parsers/rst/directives/html.py
128
3098
# $Id: html.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parsers...
bsd-3-clause
-6,939,121,412,753,285,000
35.023256
73
0.574564
false
raviflipsyde/servo
tests/wpt/web-platform-tests/tools/py/testing/path/test_svnauth.py
163
16079
import py import svntestbase from py.path import SvnAuth import time import sys svnbin = py.path.local.sysfind('svn') def make_repo_auth(repo, userdata): """ write config to repo user information in userdata is used for auth userdata has user names as keys, and a tuple (password, readwrite) as ...
mpl-2.0
-2,958,099,146,884,036,600
34.4163
86
0.551154
false
capone212/crashtec
src/crashtec/cdbprocessor/resultspublisher.py
1
2569
''' Created on 04.05.2013 @author: capone ''' from crashtec.db.provider import routines as dbroutines from crashtec.db.schema.fields import PRIMARY_KEY_FIELD import dbmodel # Utility class which used to make hack with meta-classes. See results_metaclass() class Acceptor(object): def __init__(self, class_name)...
gpl-3.0
311,177,267,490,819,500
35.714286
84
0.687816
false
ioana-delaney/spark
dev/pip-sanity-check.py
80
1384
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
8,322,740,488,415,096,000
35.421053
87
0.71604
false
ScreamingUdder/mantid
scripts/HFIRPowderReduction/HfirPDReductionGUI.py
1
91448
# pylint: disable=invalid-name, relative-import, too-many-lines,too-many-instance-attributes,too-many-arguments,C901 ################################################################################ # Main class for HFIR powder reduction GUI # Key word for future developing: FUTURE, NEXT, REFACTOR, RELEASE 2.0 #########...
gpl-3.0
7,550,116,174,824,050,000
36.804051
126
0.574337
false
whitehats/monitowl-agent
whmonit/client/sensors/ping/linux_01.py
1
1198
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' network ping sensor. ''' from ping import do_one as ping from whmonit.client.sensors import TaskSensorBase from whmonit.common.units import unit_reg class Sensor(TaskSensorBase): '''Generic 'ping' sensor.''' # W0232: Class has no __init__ method # R0201:...
apache-2.0
-2,783,414,607,513,833,000
25.043478
69
0.556761
false
jlspyaozhongkai/Uter
third_party_backup/Python-2.7.9/Lib/json/tests/__init__.py
145
2452
import os import sys import json import doctest import unittest from test import test_support # import json with and without accelerations cjson = test_support.import_fresh_module('json', fresh=['_json']) pyjson = test_support.import_fresh_module('json', blocked=['_json']) # create two base classes that will be used...
gpl-3.0
4,459,787,956,434,623,000
32.589041
100
0.649674
false
UniMOOC/AAClassroom
tests/functional/um_asmdates_service.py
1
2567
from datetime import datetime from datetime import timedelta from mock import patch from mock import MagicMock from functional import actions from modules.um_assessments.model import AsmDateDAO from modules.um_assessments.service import AsmDates START = datetime.utcnow() - timedelta(days=1) END = datetime.utcnow(...
apache-2.0
-8,441,614,425,171,123,000
35.671429
78
0.670432
false
Antiun/stock-logistics-workflow
stock_ownership_by_move/model/picking.py
17
2156
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # 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
4,100,862,519,551,155,700
36.172414
79
0.616419
false
josschne/BabyWomp
cocos2d/tools/android-mk-generator/android_mk_generator.py
16
3306
#!/usr/bin/python import sys import os import os.path import cStringIO import re def get_cur_dir(): path = sys.path[0] if os.path.isdir(path): return path elif os.path.isfile(path): return os.path.dirname(path) CUR_DIR = get_cur_dir() COCOS_ROOT = os.path.abspath(os.path.join(CUR_DIR, ".....
mit
8,726,174,983,119,706,000
25.66129
79
0.57441
false
jeffreywolf/afproj
afproj.py
1
6530
#! /usr/bin/env python """ Affine spatial transformation """ import numpy as np from numpy.linalg import inv import argparse, sys, csv, os, time def getArgs(): parser = argparse.ArgumentParser( description = """Affine spatial transformation""" ) parser.add_argument( "-c", "--controlPoints", type = str, re...
mit
1,466,481,811,613,060,600
20.839465
83
0.620214
false
TieWei/nova
nova/scheduler/filters/image_props_filter.py
9
3909
# Copyright (c) 2011-2012 OpenStack Foundation # Copyright (c) 2012 Canonical Ltd # Copyright (c) 2012 SUSE LINUX Products GmbH # 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 o...
apache-2.0
1,262,338,173,501,700,000
40.585106
79
0.628038
false
raildo/keystone
keystone/token/backends/sql.py
5
7517
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
2,309,474,170,943,966,700
36.212871
79
0.591326
false
joopert/home-assistant
homeassistant/components/feedreader/__init__.py
2
8552
"""Support for RSS/Atom feeds.""" from datetime import datetime, timedelta from logging import getLogger from os.path import exists from threading import Lock import pickle import voluptuous as vol import feedparser from homeassistant.const import EVENT_HOMEASSISTANT_START, CONF_SCAN_INTERVAL from homeassistant.helpe...
apache-2.0
6,960,122,236,555,138,000
37.522523
85
0.5808
false
bq/web2board
res/common/Scons/sconsFiles/SCons/Tool/docbook/__init__.py
7
30087
"""SCons.Tool.docbook Tool-specific initialization for Docbook. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001-7,2010 The SCons Foundation # # Permission is hereby granted, free of c...
lgpl-3.0
6,056,342,944,969,817,000
33.112245
130
0.598531
false
chrizandr/ITS_feedback
feedback_portal/main/forms.py
1
4400
from django import forms from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.forms import * from django.forms import CharField from django.forms import FileField from django.forms import FileInput from django.forms import Form from django.forms imp...
gpl-3.0
-354,116,775,259,310,140
31.592593
97
0.615455
false
ramitsurana/boto
boto/rds/vpcsecuritygroupmembership.py
177
3131
# Copyright (c) 2013 Anthony Tonns http://www.corsis.com/ # # 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...
mit
8,356,322,218,804,634,000
35.835294
78
0.683488
false
mplpl/m7z
lib7z/googletest/test/gtest_break_on_failure_unittest.py
2140
7339
#!/usr/bin/env python # # Copyright 2006, 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...
lgpl-2.1
-5,319,266,877,750,266,000
33.617925
79
0.663169
false
moonboots/tensorflow
tensorflow/contrib/ctc/ctc_loss_op_test.py
14
8764
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-1,353,370,523,242,633,500
41.543689
80
0.617298
false
ahmetdaglarbas/e-commerce
oscar/apps/offer/south_migrations/0001_initial.py
17
19312
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('catalogue', '0001_initial'), ('order', '0001_initial'), ) def forwards(self, orm): # Adding model ...
bsd-3-clause
2,243,180,588,089,213,200
71.329588
222
0.578656
false
liangazhou/django-rdp
packages/Django-1.8.6/django/middleware/clickjacking.py
36
1995
""" Clickjacking Protection Middleware. This module provides a middleware that implements protection against a malicious site loading resources from your site in a hidden frame. """ from django.conf import settings class XFrameOptionsMiddleware(object): """ Middleware that sets the X-Frame-Options HTTP head...
apache-2.0
6,563,901,944,391,316,000
37.365385
79
0.677694
false
CourseTalk/edx-platform
cms/djangoapps/contentstore/views/import_export.py
5
21168
""" These views handle all actions in Studio related to import and exporting of courses """ import base64 import logging import os import re import shutil import tarfile from path import Path as path from tempfile import mkdtemp from django.conf import settings from django.contrib.auth.decorators import login_required...
agpl-3.0
-8,143,262,784,806,564,000
40.102913
118
0.568594
false
MindsIgnited/libjingle
talk/site_scons/site_tools/talk_linux.py
22
11731
# Copyright 2010 Google Inc. # All Rights Reserved. # Author: tschmelcher@google.com (Tristan Schmelcher) """Tool for helpers used in linux building process.""" import os import SCons.Defaults import subprocess def _OutputFromShellCommand(command): process = subprocess.Popen(command, shell=True, stdout=subprocess...
bsd-3-clause
-563,508,860,234,328,640
36.479233
80
0.663882
false
vCentre/vFRP-6233
frappe/tests/test_email.py
37
3558
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import unittest, frappe from frappe.test_runner import make_test_records make_test_records("User") make_test_records("Email Account") class TestEmail(unittest.TestCase): def s...
mit
8,239,704,309,611,714,000
38.533333
98
0.706296
false
fenginx/django
tests/auth_tests/client.py
85
1414
import re from django.contrib.auth.views import ( INTERNAL_RESET_SESSION_TOKEN, INTERNAL_RESET_URL_TOKEN, ) from django.test import Client def extract_token_from_url(url): token_search = re.search(r'/reset/.*/(.+?)/', url) if token_search: return token_search.group(1) class PasswordResetConfirm...
bsd-3-clause
-4,928,800,471,602,909,000
33.487805
77
0.663366
false
bitcommoditiz/P2Pool
p2pool/__init__.py
278
1595
import os import re import sys import traceback import subprocess def check_output(*popenargs, **kwargs): process = subprocess.Popen(stdout=subprocess.PIPE, *popenargs, **kwargs) output, unused_err = process.communicate() retcode = process.poll() if retcode: raise ValueError((retcode, output)) ...
gpl-3.0
-4,711,327,222,918,679,000
31.55102
138
0.548589
false
PredictiveScienceLab/inverse-bgo
pydes/_prior.py
2
1157
""" Some priors for GPy. Author: Ilias Bilionis Date: 5/5/2015 """ __all__ = ['LogLogisticPrior', 'JeffreysPrior'] import GPy import numpy as np class LogLogisticPrior(GPy.priors.Prior): """ Log-Logistic prior suitable for lengthscale parameters. From Conti & O'Hagan (2010) """ ...
mit
-4,077,361,093,148,596,000
14.863014
64
0.538462
false
jamesob/bitcoin
test/functional/wallet_upgradewallet.py
13
16487
#!/usr/bin/env python3 # Copyright (c) 2018-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. """upgradewallet RPC functional test Test upgradewallet RPC. Download node binaries: test/get_previous_r...
mit
-1,106,340,302,424,587,900
45.182073
199
0.622672
false
r-owen/stui
TUI/Scripts/Observations/Fiducial Monitor.py
1
5425
# fiducialMon.py import time import RO.Wdg import Tkinter import TUI.Models import TUI.PlaySound class ScriptClass(object): def __init__(self, sr): # if True, run in debug-only mode (which doesn't DO anything) # if False, real time run sr.debug = False self.name="fiducialMon" ...
bsd-3-clause
-5,695,628,747,123,167,000
41.054264
103
0.598894
false
revanthkolli/osf.io
tests/test_addons_oauth.py
21
8289
from nose.tools import * from framework.auth.core import Auth from framework.exceptions import PermissionsError from website import settings from website.addons.base import AddonConfig from website.addons.base import AddonOAuthNodeSettingsBase from website.addons.base import AddonOAuthUserSettingsBase from website.oa...
apache-2.0
-8,800,695,465,775,176,000
27.290102
69
0.596936
false
makelove/OpenCV-Python-Tutorial
cv-Tkinter-GUI/Displaying-video-feed-with-OpenCV-and-Tkinter.py
1
1115
# -*- coding: utf-8 -*- # @Time : 2018/2/8 16:09 # @Author : play4fun # @File : Displaying a video feed with OpenCV and Tkinter.py # @Software: PyCharm """ Displaying a video feed with OpenCV and Tkinter.py: https://www.pyimagesearch.com/2016/05/30/displaying-a-video-feed-with-opencv-and-tkinter/ """ # import...
mit
3,519,450,146,013,889,500
30.857143
89
0.711211
false
guileschool/BEAGLEBONE-tutorials
BBB-firmware/u-boot-v2015.10-rc2/tools/patman/checkpatch.py
25
6127
# Copyright (c) 2011 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import collections import command import gitutil import os import re import sys import terminal def FindCheckPatch(): top_level = gitutil.GetTopLevel() try_list = [ os.getcwd(), os.path.join(os.getcwd(), '..'...
mit
8,947,467,912,923,879,000
34.416185
79
0.553289
false
dodger487/MIST
data/magnetak_detectors.py
1
14236
""" Copyright 2014 Google Inc. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in...
apache-2.0
6,587,832,307,439,860,000
32.895238
120
0.635642
false
CodingCat/mxnet
example/dsd/mlp.py
52
5126
# 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
1,330,241,811,208,025,900
35.098592
81
0.633437
false
ibab/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/mvn_test.py
8
11058
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-2,535,080,586,170,991,600
40.261194
80
0.584825
false
addgene/giraffe
src/django/giraffe/blat/models.py
2
11010
from django.db import models from django.db import utils import datetime import hashlib import re class BadSequenceError(Exception): def __init__(self,why): self.why = why def __str__(self): return repr(self.why) class Giraffe_Mappable_Model(models.Model): """ This is an abstract cla...
mit
7,344,844,566,621,466,000
31.099125
97
0.604632
false
Sunsoo/incodom
lib/bzrlib/merge3.py
5
16871
# Copyright (C) 2004, 2005 Canonical Ltd # # 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 distribut...
gpl-3.0
1,187,973,044,423,412,500
35.203863
84
0.488412
false
wannabeCitizen/quantifiedSelf
app/services_auth/spotify_auth.py
2
1324
from tornado import gen from . import spotifyMix as spot from lib.database.auth import save_token from lib.basehandler import OAuthRequestHandler class SpotifyAuth(OAuthRequestHandler, spot.SpotifyOAuth2Mixin): scope = [ 'playlist-read-private', 'playlist-read-collaborative', 'user-follow...
mit
-6,197,312,556,010,697,000
30.52381
78
0.594411
false
grilo/ansible-1
lib/ansible/plugins/action/set_stats.py
61
2792
# Copyright 2016 Ansible (RedHat, Inc) # # 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
8,891,473,093,125,226,000
36.226667
153
0.610315
false
tkasp/osmose-backend
analysers/analyser_osmosis_highway_motorway.py
4
3109
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2016 ## ## ...
gpl-3.0
-5,362,657,220,225,581,000
49.934426
121
0.544899
false
NeCTAR-RC/neutron
neutron/plugins/vmware/dbexts/nsx_models.py
26
10891
# Copyright 2015 VMware, 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 agree...
apache-2.0
2,982,003,862,461,113,000
38.748175
78
0.601873
false
ice9js/servo
tests/wpt/web-platform-tests/tools/wptserve/wptserve/handlers.py
44
13193
import cgi import json import os import traceback import urllib import urlparse from constants import content_types from pipes import Pipeline, template from ranges import RangeParser from request import Authentication from response import MultipartContent from utils import HTTPException __all__ = ["file_handler", "p...
mpl-2.0
8,003,260,679,682,004,000
34.369973
113
0.569772
false
Proxmark/proxmark3
tools/xorcheck.py
26
1624
#!/usr/bin/python # xorcheck.py - find xor values for 8-bit LRC # # Adam Laurie <adam@algroup.co.uk> # http://rfidiot.org/ # # This code is copyright (c) Adam Laurie, 2009, All rights reserved. # For non-commercial use only, the following terms apply - for all other # uses, please contact the author: # # Th...
gpl-2.0
-5,322,840,751,377,744,000
30.230769
96
0.700739
false
cemc/python3jail
static/maketrace/p4_encoder.py
1
6708
#!/usr/bin/python3 -u # given an arbitrary piece of Python data, encode it in such a manner # that it can be later encoded into JSON. # http://json.org/ # # Format: # * None, int, float, str, bool - unchanged (long is removed in Python 3) # (json.dumps encodes these fine verbatim) # * list - ['LIST', ...
gpl-3.0
-3,333,423,227,027,455,500
33.4
198
0.554114
false
tuhangdi/django
django/contrib/syndication/views.py
137
8793
from __future__ import unicode_literals from calendar import timegm from django.conf import settings from django.contrib.sites.shortcuts import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import Http404, HttpResponse from django.template import Templat...
bsd-3-clause
5,956,845,383,734,619,000
38.968182
96
0.582395
false
peterm-itr/edx-platform
lms/djangoapps/shoppingcart/migrations/0006_auto__add_field_order_refunded_time__add_field_orderitem_refund_reques.py
114
9755
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Order.refunded_time' db.add_column('shoppingcart_order', 'refunded_time', ...
agpl-3.0
-5,259,784,496,910,003,000
73.465649
182
0.55756
false
abartlet/samba-old
third_party/dnspython/dns/rcode.py
100
3105
# Copyright (C) 2001-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
5,516,634,023,245,732,000
25.092437
72
0.651852
false
jsynacek/systemd
test/networkd-test.py
5
45254
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # # networkd integration test # This uses temporary configuration in /run and temporary veth devices, and # does not write anything on disk or change any system configuration; # but it assumes (and checks at the beginning) that networkd is not currently # runn...
gpl-2.0
8,706,438,361,355,996,000
39.294746
114
0.600208
false
tigersirvine/occtigerscricket
django/contrib/syndication/views.py
85
7622
from django.conf import settings from django.contrib.sites.models import get_current_site from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist from django.http import HttpResponse, Http404 from django.template import loader, TemplateDoesNotExist, RequestContext from django.utils import feedgenera...
bsd-3-clause
3,970,797,828,907,509,000
39.978495
167
0.577145
false
wisechengyi/pants
src/python/pants/backend/jvm/targets/java_library.py
2
1370
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.backend.jvm.targets.exportable_jvm_library import ExportableJvmLibrary from pants.backend.jvm.targets.junit_tests import JUnitTests class JavaLibrary(ExportableJvmLibrary): ...
apache-2.0
4,087,748,571,675,163,000
37.055556
94
0.677372
false
rven/odoo
addons/sale/tests/test_onchange.py
5
12358
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.tests import Form from odoo.tests.common import TransactionCase class TestOnchangeProductId(TransactionCase): """Test that when an included tax is mapped by a fiscal position, the included tax must be ...
agpl-3.0
2,890,242,979,245,335,000
43.135714
203
0.548471
false
garg10may/youtube-dl
youtube_dl/extractor/techtalks.py
170
2432
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( get_element_by_attribute, clean_html, ) class TechTalksIE(InfoExtractor): _VALID_URL = r'https?://techtalks\.tv/talks/[^/]*/(?P<id>\d+)/' _TEST = { 'url': 'http://techtalks.tv/talks/lea...
unlicense
-5,894,873,732,093,140,000
29.78481
89
0.409539
false
Tokyo-Buffalo/tokyosouth
env/lib/python3.6/site-packages/twisted/python/test/test_appdirs.py
16
1081
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the data directory support. """ from __future__ import division, absolute_import try: from twisted.python import _appdirs except ImportError: _appdirs = None from twisted.trial import unittest class AppdirsTests(unittest...
mit
-1,670,037,150,882,143,000
24.738095
78
0.655874
false
barrywardell/git-module
GitSuperRepository.py
1
15137
# GitSuperRepository.py # # Copyright (C) 2011 Barry Wardell <barry.wardell@gmail.com> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your opt...
gpl-2.0
8,159,319,333,340,526,000
42.125356
218
0.59675
false
jitendra29/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/hybi00.py
675
11294
# Copyright 2011, 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...
mpl-2.0
5,924,809,920,136,350,000
37.546075
79
0.651673
false
charithag/iot-server-appliances
IU_workshop/Step 7/python_client/ControlAndPublish/BAMPythonPublisher/Publisher.py
15
3361
#!/usr/bin/env python import sys, time # sys.path.append('gen-py') from ThriftSecureEventTransmissionService import ThriftSecureEventTransmissionService from ThriftSecureEventTransmissionService.ttypes import * from thrift import Thrift from thrift.transport import TSSLSocket from thrift.transport import TTransport ...
apache-2.0
-6,506,114,635,998,022,000
29.279279
238
0.691461
false
mbauskar/internal-hr
erpnext/selling/report/sales_person_wise_transaction_summary/sales_person_wise_transaction_summary.py
10
2769
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ def execute(filters=None): if not filters: filters = {} columns = get_columns(filters) data = get_...
agpl-3.0
-695,089,311,166,645,900
37.472222
97
0.656194
false
rnowling/pop-gen-models
single-pop/calculate_phist.py
2
3690
import sys import numpy as np import matplotlib.pyplot as plt def ssdwpfunc(individuals, frequencies): """ Returns the sums squares deviation within populations from the population frequencies. individuals[pop] = counts frequencies[pop, haplotype] = freq """ ssdwp = 0.0 n_pop = frequencie...
apache-2.0
-1,053,115,247,363,095,700
26.954545
111
0.638211
false
PaddlePaddle/Paddle
tools/diff_use_default_grad_op_maker.py
2
1758
# Copyright (c) 2019 PaddlePaddle 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 appli...
apache-2.0
-4,830,334,416,919,107,000
27.354839
106
0.66041
false
czgu/opendataexperience
env/lib/python2.7/site-packages/django/contrib/contenttypes/fields.py
43
22826
from __future__ import unicode_literals from collections import defaultdict from django.core import checks from django.core.exceptions import ObjectDoesNotExist from django.db import connection from django.db import models, router, transaction, DEFAULT_DB_ALIAS from django.db.models import signals, FieldDoesNotExist,...
apache-2.0
6,435,825,217,384,055,000
40.729433
131
0.578857
false
shurihell/testasia
common/test/acceptance/tests/studio/test_studio_settings.py
32
19688
# coding: utf-8 """ Acceptance tests for Studio's Setting pages """ from __future__ import unicode_literals from nose.plugins.attrib import attr from base_studio_test import StudioCourseTest from bok_choy.promise import EmptyPromise from ...fixtures.course import XBlockFixtureDesc from ..helpers import create_user_par...
agpl-3.0
-7,310,050,230,001,674,000
40.444211
117
0.63121
false