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
AMOboxTV/AMOBox.LegoBuild
script.extendedinfo/resources/lib/LocalDB.py
1
22918
# -*- coding: utf8 -*- # Copyright (C) 2015 - Philipp Temminghoff <phil65@kodi.tv> # This program is Free Software see LICENSE file for details import simplejson as json import itertools import KodiJson from Utils import * class LocalDB(object): def __init__(self, *args, **kwargs): self.movie_imdbs = [...
gpl-2.0
-5,688,090,355,634,584,000
52.924706
369
0.510254
false
jostep/tensorflow
tensorflow/python/kernel_tests/softplus_op_test.py
82
4807
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
6,975,309,617,360,503,000
35.976923
80
0.578947
false
aboood40091/BFLIM-Extractor
build.py
1
1833
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # BFLIM Extractor # Version v2.3 # Copyright © 2016-2019 AboodXD # This file is part of BFLIM Extractor. # BFLIM Extractor 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 ...
gpl-3.0
7,864,167,027,041,723,000
23.756757
73
0.670306
false
Lyrositor/moul-scripts
Python/system/encodings/mac_cyrillic.py
593
13710
""" Python Character Mapping Codec mac_cyrillic generated from 'MAPPINGS/VENDORS/APPLE/CYRILLIC.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,inp...
gpl-3.0
6,172,184,646,068,417,000
43.65798
118
0.556747
false
aaronsw/watchdog
vendor/rdflib-2.4.0/test/store_performace.py
3
3343
import unittest from rdflib.Graph import Graph from rdflib import URIRef import gc import itertools from time import time from random import random from tempfile import mkdtemp def random_uri(): return URIRef("%s" % random()) class StoreTestCase(unittest.TestCase): """ Test case for testing store perfo...
agpl-3.0
9,213,674,532,947,174,000
23.947761
69
0.583009
false
florian-dacosta/OpenUpgrade
addons/hr_timesheet/hr_timesheet.py
39
10037
# -*- 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
-6,414,893,020,929,494,000
45.253456
202
0.596493
false
rasathus/pigredients
pigredients/ics/hmc5883l.py
1
4135
import sys import smbus import math from Adafruit_I2C import Adafruit_I2C _hmc5883l_address = 0x1e _mode_register = 0x02 _mode_map = { 'continuous' : 0x00, 'single' : 0x01, 'idle' : 0x03} _configuration_reg_a = 0x00 _configuration_reg_b = 0x01 _read_register = 0x03 class HMC5883L(o...
mit
-2,849,852,188,677,735,000
31.559055
116
0.541475
false
AOSP-S4-KK/platform_external_skia
bench/tile_analyze.py
198
12134
#!/usr/bin/env python # Copyright (c) 2013 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. """ Analyze per-tile and viewport bench data, and output visualized results. """ __author__ = 'bensong@google.com (Ben Chen)' imp...
bsd-3-clause
8,490,167,033,903,486,000
42.491039
136
0.671502
false
LilithWittmann/froide
froide/publicbody/south_migrations/0017_auto__add_field_foilaw_email_only.py
6
10646
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from froide.helper.auth_migration_util import USER_DB_NAME APP_MODEL, APP_MODEL_NAME = 'account.User', 'account.user' class Migration(SchemaMigration): def forwards(self, orm): ...
mit
-3,459,639,096,114,684,400
77.279412
203
0.555138
false
treycausey/scikit-learn
sklearn/externals/joblib/test/test_parallel.py
3
9997
""" Test the parallel module. """ # Author: Gael Varoquaux <gael dot varoquaux at normalesup dot org> # Copyright (c) 2010-2011 Gael Varoquaux # License: BSD Style, 3 clauses. import time import sys import io import os try: import cPickle as pickle PickleError = TypeError except: import pickle PickleE...
bsd-3-clause
898,931,521,777,544,100
29.111446
79
0.563769
false
neteler/QGIS
python/plugins/processing/modeler/CalculatorModelerAlgorithm.py
10
5860
# -*- coding: utf-8 -*- """ *************************************************************************** CalculatorModelerAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ************...
gpl-2.0
7,162,798,886,863,354,000
41.463768
122
0.619966
false
irwinlove/django
tests/m2m_multiple/tests.py
228
2386
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Category class M2MMultipleTests(TestCase): def test_multiple(self): c1, c2, c3, c4 = [ Category.objects.create(name=name) for name in ["Sports", "N...
bsd-3-clause
-4,315,805,321,268,808,700
26.744186
71
0.487427
false
brianmckenna/sci-wms
wms/migrations/0007_auto_20150424_1604.py
2
1179
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wms', '0006_auto_20150424_1058'), ] operations = [ migrations.RemoveField( model_name='style', name=...
gpl-3.0
2,706,575,663,931,435,500
27.071429
78
0.53944
false
zstackio/zstack-woodpecker
integrationtest/vm/ha/test_mysql_stop_create_vm.py
2
2011
''' Integration Test for creating KVM VM in HA mode with mysql stop on one node. @author: Quarkonics ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_state as test_state import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.operations.resource_operations as res...
apache-2.0
-824,340,017,135,892,400
27.144928
87
0.648931
false
FRESNA/atlite
atlite/utils.py
1
5135
# -*- coding: utf-8 -*- # SPDX-FileCopyrightText: 2016-2019 The Atlite Authors # # SPDX-License-Identifier: GPL-3.0-or-later """ General utility functions for internal use. """ from .gis import maybe_swap_spatial_dims import progressbar as pgb from pathlib import Path import pandas as pd import xarray as xr import t...
gpl-3.0
-2,088,479,679,973,751,600
31.916667
82
0.57001
false
koyuawsmbrtn/eclock
windows/Python27/Lib/site-packages/docutils/parsers/rst/tableparser.py
112
21007
# $Id: tableparser.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. """ This module defines table parser classes,which parse plaintext-graphic tables and produce a well-formed data structure suitable for building a CALS tab...
gpl-2.0
3,585,207,872,991,196,700
37.615809
79
0.516923
false
acsone/acsone-addons
account_analytic_project_id/__init__.py
1
1072
# -*- coding: utf-8 -*- ############################################################################## # # Author: Stéphane Bidoul # Copyright (c) 2012 Acsone SA/NV (http://www.acsone.eu) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General ...
agpl-3.0
-700,968,939,452,671,000
45.565217
78
0.618114
false
rocky/python-xdis
xdis/opcodes/base.py
1
14179
# (C) Copyright 2017, 2019-2021 by Rocky Bernstein # # 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 progr...
gpl-2.0
-2,818,771,102,464,315,400
29.104034
99
0.608153
false
chenc10/Spark-PAF
python/run-tests.py
4
7629
#!/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 "Li...
apache-2.0
-5,613,911,677,104,132,000
37.530303
100
0.634946
false
akshaynathr/mailman
src/mailman/interfaces/preferences.py
3
2789
# Copyright (C) 2007-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
8,620,201,573,345,936,000
34.75641
78
0.69308
false
justathoughtor2/atomicApe
cygwin/lib/python2.7/site-packages/astroid/inference.py
1
12104
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
gpl-3.0
-8,825,155,508,347,137,000
32.715877
80
0.655155
false
sternshus/arelle2.7
svr-2.7/arelle/plugin/TDnetLoader.py
1
9285
# -*- coding: utf-8 -*- ''' TDnetLoader is a plug-in to both GUI menu and command line/web service that loads a TDnet html index file. TDnet is Tokyo Stock Exchange's Timely Disclosure Network. (c) Copyright 2014 Mark V Systems Limited, All rights reserved. ''' from lxml import html import datetime, re, os from arel...
apache-2.0
-9,218,902,097,723,311,000
44.04878
107
0.509908
false
jorik041/paramiko
tests/test_sftp_big.py
25
13712
# Copyright (C) 2003-2009 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
lgpl-2.1
-4,965,951,956,157,150,000
36.159892
90
0.481039
false
yuezhonghua/tornado
tornado/test/import_test.py
124
1531
# flake8: noqa from __future__ import absolute_import, division, print_function, with_statement from tornado.test.util import unittest class ImportTest(unittest.TestCase): def test_import_everything(self): # Some of our modules are not otherwise tested. Import them # all (unless they have externa...
apache-2.0
-4,336,030,925,228,422,000
31.574468
80
0.6597
false
jluissandovalm/smd_lammps
tools/moltemplate/src/nbody_alternate_symmetry/nbody_Impropers_Jcenter.py
19
3134
from nbody_graph_search import Ugraph # To find 4-body "improper" interactions, # (by default, most of the time), we would use this subgraph: # 0 # * 1st bond connects atoms 1 and 0 # | => 2nd bond connects atoms 1 and 2 # _.*._ ...
gpl-2.0
-3,094,918,443,279,450,000
47.96875
84
0.667198
false
albertomurillo/ansible
test/units/modules/network/f5/test_bigip_gtm_monitor_firepass.py
38
4762
# -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # 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 import os import json import pytest import sys if sys.version_info < (2...
gpl-3.0
-197,106,290,738,211,260
29.525641
103
0.621378
false
bitbandi/all-hash-python
algorithm/x13-hash/setup.py
1
1280
from setuptools import setup, Extension x13_hash_module = Extension('x13_hash', sources = ['x13module.c', 'x13.c', '../../sph/blake.c', '../../sph/bmw.c', ...
mit
-8,343,259,073,127,324,000
48.230769
67
0.264063
false
ssssam/nightbus
nightbus/tasks.py
1
12497
# Copyright 2017 Codethink 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 to in writin...
apache-2.0
3,435,806,476,407,192,000
35.540936
90
0.586781
false
Nolan330/CS292
pymavlink/examples/magtest.py
11
3808
#!/usr/bin/env python ''' rotate APMs on bench to test magnetometers ''' import sys, os, time from math import radians from pymavlink import mavutil from optparse import OptionParser parser = OptionParser("rotate.py [options]") parser.add_option("--device1", dest="device1", default=None, help="mavlink device1") p...
lgpl-3.0
-8,865,388,615,737,971,000
31.547009
108
0.667542
false
kuke/models
legacy/ltr/lambda_rank.py
4
1560
""" LambdaRank is a listwise rank model. https://papers.nips.cc/paper/2971-learning-to-rank-with-nonsmooth-cost-functions.pdf """ import paddle.v2 as paddle def lambda_rank(input_dim, is_infer=False): """ The input data and label for LambdaRank must be sequences. parameters : input_dim, one documen...
apache-2.0
-1,690,820,186,525,114,600
34.454545
84
0.544872
false
colinnewell/odoo
addons/website_certification/__openerp__.py
320
1562
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
agpl-3.0
-2,545,425,755,068,226,600
39.051282
78
0.604353
false
LimpidTech/buildbot-manager
setup.py
1
1555
from setuptools import setup, find_packages import os, sys # The repository root directory project_root = os.path.abspath(os.path.dirname(__file__)) # The projects which this project depends upon dependancies = [ 'pyramid', 'buildbot', 'repoze.tm2>=1.0b1', 'WebError', 'pyramid_jinja2', 'zope.i...
mit
4,181,799,130,819,907,600
29.490196
80
0.666881
false
jbarriosc/ACSUFRO
Benchmark/components/src/perftestImpl/ErrTestComponent.py
4
2948
#******************************************************************************* # ALMA - Atacama Large Millimiter Array # (c) Associated Universities Inc., 2002 # (c) European Southern Observatory, 2002 # Copyright by ESO (in the framework of the ALMA collaboration) # and Cosylab 2002, All rights reserved # # This li...
lgpl-2.1
7,668,392,303,951,689,000
41.724638
128
0.469471
false
pascalchevrel/bedrock
lib/l10n_utils/management/commands/process_ftl.py
6
6296
# 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 shutil from subprocess import CalledProcessError from django.core.management.base import CommandError from djang...
mpl-2.0
4,501,357,163,735,908,000
34.977143
106
0.612452
false
stwunsch/gnuradio
gr-fft/python/fft/qa_goertzel.py
57
2049
#!/usr/bin/env python # # Copyright 2006,2007,2010,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at ...
gpl-3.0
-5,234,323,651,738,180,000
30.523077
70
0.707174
false
xq262144/hue
desktop/core/ext-py/cx_Oracle-5.2.1/test/uStringVar.py
3
10381
"""Module for testing string variables.""" class TestStringVar(BaseTestCase): def setUp(self): BaseTestCase.setUp(self) self.rawData = [] self.dataByKey = {} for i in range(1, 11): stringCol = u"String %d" % i fixedCharCol = (u"Fixed Char %d" % i).ljust(40) ...
apache-2.0
-1,745,278,677,801,349,600
40.194444
78
0.562181
false
evernym/plenum
plenum/test/checkpoints/test_view_change_after_checkpoint.py
2
4527
import pytest from plenum.test.checkpoints.helper import checkRequestCounts from plenum.test.node_catchup.helper import ensure_all_nodes_have_same_data from plenum.test.test_node import ensureElectionsDone from plenum.test.view_change.helper import ensure_view_change from stp_core.loop.eventually import eventually fro...
apache-2.0
8,715,446,357,795,103,000
45.193878
120
0.686106
false
takeshineshiro/horizon
openstack_dashboard/dashboards/admin/aggregates/tests.py
12
19957
# 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
-8,067,997,924,286,345,000
43.250554
79
0.550634
false
EKT1/valence
valence/bayes.py
1
1505
# -*- coding: utf-8 -*- from __future__ import print_function import sys import codecs import re import pkg_resources from nltk.classify import NaiveBayesClassifier space = re.compile('[\'".,!?\\s\\(\\)]+') cats = ('positiivne', 'negatiivne', 'neutraalne', 'vastuoluline') classifier = None corpus_name = pkg_resources....
gpl-3.0
2,704,303,086,885,572,600
29.1
82
0.627243
false
pudo/opennames
opensanctions/crawlers/eu_cor_members.py
1
4495
from urllib.parse import urljoin from normality import stringify, collapse_spaces, slugify from lxml import html from opensanctions.util import date_formats, DAY def parse_date(text): return date_formats(text, [("%d/%m/%Y", DAY)]) def crawl_person(context, name, url): context.log.debug("Crawling member", na...
mit
9,166,185,252,238,134,000
35.25
82
0.540601
false
computersalat/ansible
lib/ansible/plugins/callback/__init__.py
4
16578
# (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
495,303,256,956,061,500
37.198157
160
0.594221
false
fmcingvale/cherrypy_gae
test/test_httpauth.py
1
5799
from cherrypy.test import test test.prefer_parent_path() import md5, sha import cherrypy from cherrypy.lib import httpauth def setup_server(): class Root: def index(self): return "This is public." index.exposed = True class DigestProtected: def index(self): re...
bsd-3-clause
-2,309,190,446,473,761,000
35.936306
167
0.572685
false
smallyear/linuxLearn
salt/salt/returners/sqlite3_return.py
1
7987
# -*- coding: utf-8 -*- ''' Insert minion return data into a sqlite3 database :maintainer: Mickey Malone <mickey.malone@gmail.com> :maturity: New :depends: None :platform: All Sqlite3 is a serverless database that lives in a single file. In order to use this returner the database file must exist, h...
apache-2.0
-7,521,281,756,170,164,000
25.802013
95
0.590334
false
elpaso/QGIS
python/plugins/processing/algs/grass7/ext/r_li_padsd_ascii.py
45
1440
# -*- coding: utf-8 -*- """ *************************************************************************** r_li_padsd_ascii.py ------------------- Date : February 2016 Copyright : (C) 2016 by Médéric Ribreux Email : medspx at medspx dot fr ********************...
gpl-2.0
7,660,988,285,518,705,000
38.833333
75
0.475593
false
russellthackston/comp-chem-util
myriad/v1/bootstrap-myriad.py
2
2618
import argparse import glob import importlib import libmyriad import logging import myriad import os import requests import shutil import subprocess import sys import time class Bootstrap: def __init__(self): self.server = 'https://raw.githubusercontent.com/russellthackston/comp-chem-util/master/myriad' self.ver...
mit
-7,221,318,615,570,504,000
35.361111
157
0.734148
false
alsrgv/tensorflow
tensorflow/contrib/learn/python/learn/learn_io/data_feeder.py
3
32746
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
5,604,821,313,101,488,000
34.632209
100
0.623099
false
thedep2/CouchPotatoServer
libs/rsa/randnum.py
194
2414
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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...
gpl-3.0
1,795,215,202,469,924,000
27.388235
79
0.661832
false
dippatel1994/oppia
scripts/common.py
30
1406
# Copyright 2014 The Oppia 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 applicable ...
apache-2.0
807,450,606,767,775,700
32.47619
76
0.697013
false
tsiegleauq/OpenSlides
server/openslides/utils/models.py
6
7291
import time from typing import Any, Dict, List, Optional from django.db import models from . import logging from .autoupdate import AutoupdateElement, inform_changed_data, inform_elements from .rest_api import model_serializer_classes from .utils import convert_camel_case_to_pseudo_snake_case, get_element_id logger...
mit
-3,534,869,546,470,656,000
34.393204
86
0.599918
false
turbokongen/home-assistant
homeassistant/components/zestimate/sensor.py
19
4377
"""Support for zestimate data from zillow.com.""" from datetime import timedelta import logging import requests import voluptuous as vol import xmltodict from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ATTR_ATTRIBUTION, CONF_API_KEY, CONF_NAME import homeassistant.helpers.c...
apache-2.0
148,923,009,857,829,060
31.422222
83
0.621202
false
tmpgit/intellij-community
python/helpers/docutils/parsers/rst/roles.py
54
13187
# $Id: roles.py 6121 2009-09-10 12:05:04Z milde $ # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # Copyright: This module has been placed in the public domain. """ This module defines standard interpreted text role functions, a registry for interpreted text roles, and an API for adding to and retrieving from ...
apache-2.0
1,450,968,408,149,267,700
36.677143
79
0.651551
false
nycholas/ask-undrgz
src/ask-undrgz/django/contrib/messages/storage/cookie.py
65
5862
import hmac from django.conf import settings from django.contrib.messages import constants from django.contrib.messages.storage.base import BaseStorage, Message from django.http import CompatCookie from django.utils import simplejson as json from django.utils.hashcompat import sha_hmac class MessageEncoder(json.JSON...
bsd-3-clause
7,941,769,059,129,905,000
37.565789
86
0.604913
false
peiyuwang/pants
src/python/pants/help/build_dictionary_info_extracter.py
12
10702
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import inspect impor...
apache-2.0
-7,526,773,937,292,238,000
40.320463
99
0.667726
false
manisandro/QGIS
python/plugins/processing/core/ProcessingResults.py
17
1679
# -*- coding: utf-8 -*- """ *************************************************************************** ProcessingResults.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *********************...
gpl-2.0
-318,752,450,800,860,800
30.092593
75
0.468136
false
HaebinShin/tensorflow
tensorflow/contrib/linear_optimizer/python/kernel_tests/sdca_ops_test.py
1
34924
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
6,891,727,004,781,844,000
40.281324
92
0.596438
false
TNT-Samuel/Coding-Projects
DNS Server/Source/Tools/scripts/linktree.py
67
2440
#! /usr/bin/env python3 # linktree # # Make a copy of a directory tree with symbolic links to all files in the # original tree. # All symbolic links go to a special symbolic link at the top, so you # can easily fix things if the original source tree moves. # See also "mkreal". # # usage: mklinks oldtree newtree impor...
gpl-3.0
1,013,135,144,430,530,300
29.5
73
0.531967
false
labordoc/labordoc-next
modules/websearch/web/admin/websearchadmin.py
25
45852
## This file is part of Invenio. ## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## Lic...
gpl-2.0
-2,658,941,872,685,090,300
43.344294
189
0.496423
false
mrquim/repository.mrquim
script.module.youtube.dl/lib/youtube_dl/extractor/addanime.py
48
3315
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, ) from ..utils import ( ExtractorError, qualities, ) class AddAnimeIE(InfoExtractor): _VAL...
gpl-2.0
-488,338,083,020,833,300
33.894737
106
0.501961
false
crowdhackathon-transport/optimizers
crowdstance-api/venv/lib/python2.7/site-packages/werkzeug/script.py
116
11365
# -*- coding: utf-8 -*- r''' werkzeug.script ~~~~~~~~~~~~~~~ .. admonition:: Deprecated Functionality ``werkzeug.script`` is deprecated without replacement functionality. Python's command line support improved greatly with :mod:`argparse` and a bunch of alternative modules. Most ...
mit
2,239,184,599,651,637,800
34.851735
85
0.605015
false
patrickhartling/maestro
playpen/win_pageant.py
2
4475
# Copyright (C) 2005 John Arbash-Meinel <john@arbash-meinel.com> # Modified up by: Todd Whiteman <ToddW@ActiveState.com> # # This file is part of paramiko. # # Paramiko 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 # Softwa...
gpl-2.0
-4,973,033,975,475,372,000
31.664234
101
0.667933
false
santidediego/LearningDjango
lib/python3.5/site-packages/django/apps/config.py
121
8077
import os from importlib import import_module from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils._os import upath from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django ap...
mit
6,470,860,800,662,757,000
38.788177
81
0.601709
false
jeffreyliu3230/osf.io
website/conferences/utils.py
20
3066
# -*- coding: utf-8 -*- import uuid import requests from modularodm import Q from modularodm.exceptions import ModularOdmException from framework.auth import Auth from framework.auth.core import get_user from website import util from website import security from website import settings from website.project import n...
apache-2.0
-8,525,774,538,697,087,000
25.66087
94
0.649054
false
omprakasha/odoo
addons/l10n_de/__openerp__.py
260
7736
# -*- encoding: 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 G...
agpl-3.0
-2,680,961,347,045,611,500
49.287582
84
0.754744
false
acsone/sale-workflow
sale_service_project/models/hr_timesheet_invoice.py
9
5715
# -*- coding: utf-8 -*- # © 2015 Antiun Ingeniería S.L. - Sergio Teruel # © 2015 Antiun Ingeniería S.L. - Carlos Dauden # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, api, _ from openerp.exceptions import except_orm class HrAnalyticTimesheet(models.Model): _inherit =...
agpl-3.0
-3,745,916,666,009,208,300
44.688
78
0.566801
false
polyaxon/polyaxon
platform/coredb/tests/test_runs/test_run_model.py
1
3332
#!/usr/bin/python # # Copyright 2018-2021 Polyaxon, 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 ...
apache-2.0
2,837,865,378,792,411,000
34.827957
76
0.689676
false
jorsea/odoo-addons
account_bank_voucher/wizard/bank_statement_populate.py
4
3057
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, models, api class ac...
agpl-3.0
8,833,077,351,139,633,000
43.941176
150
0.565445
false
Storyyeller/Krakatau
Krakatau/classfileformat/reader.py
1
1221
import struct class TruncatedStreamError(EOFError): pass class Reader(object): __slots__ = ['d', 'off'] def __init__(self, data, off=0): self.d = data self.off = off def done(self): return self.off >= len(self.d) def copy(self): return Reader(self.d, self.off) def u8(self):...
gpl-3.0
3,590,982,375,892,833,300
24.978723
55
0.563473
false
GreenRecycleBin/servo
tests/wpt/web-platform-tests/webdriver/cookie/cookie_test.py
58
1987
import os import sys import unittest sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../.."))) import base_test from webdriver import exceptions class CookieTest(base_test.WebDriverBaseTest): def setUp(self): self.driver.get(self.webserver.where_is("cookie/res/cookie_container.html")) def...
mpl-2.0
-5,413,442,360,156,581,000
28.656716
91
0.56769
false
nzavagli/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/lib-tk/test/widget_tests.py
24
19643
# Common tests for test_tkinter/test_widgets.py and test_ttk/test_widgets.py import unittest import sys import Tkinter as tkinter from ttk import Scale from test_ttk.support import (AbstractTkTest, tcl_version, requires_tcl, get_tk_patchlevel, pixels_conv, tcl_obj_eq) import test.test_sup...
mit
9,086,876,649,498,813,000
35.375926
81
0.577763
false
yarikoptic/pystatsmodels
statsmodels/sandbox/examples/example_gam.py
4
2337
'''original example for checking how far GAM works Note: uncomment plt.show() to display graphs ''' example = 2 # 1,2 or 3 import numpy as np import numpy.random as R import matplotlib.pyplot as plt from statsmodels.sandbox.gam import AdditiveModel from statsmodels.sandbox.gam import Model as GAM #? from statsmode...
bsd-3-clause
-3,780,273,031,857,218,000
22.37
82
0.619598
false
zerkh/theano_lstm
theano_lstm/__init__.py
9
21559
""" Small Theano LSTM recurrent network module. @author: Jonathan Raiman @date: December 10th 2014 Implements most of the great things that came out in 2014 concerning recurrent neural networks, and some good optimizers for these types of networks. Note (from 5 January 2015): Dropout api is a bit sophisticated due t...
bsd-3-clause
1,589,981,776,022,137,600
31.566465
153
0.589638
false
ezequielpereira/Time-Line
autopilot/autopilotlib/manuscript/instructionpopup.py
3
1635
# Copyright (C) 2009, 2010, 2011 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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...
gpl-3.0
-5,149,986,688,238,690,000
33.787234
77
0.650153
false
shujaatak/UAV_MissionPlanner
Lib/site-packages/numpy/distutils/npy_pkg_config.py
53
13468
import sys if sys.version_info[0] < 3: from ConfigParser import SafeConfigParser, NoOptionError else: from configparser import SafeConfigParser, NoOptionError import re import os import shlex __all__ = ['FormatError', 'PkgNotFound', 'LibraryInfo', 'VariableSet', 'read_config', 'parse_flags'] _VAR = re...
gpl-2.0
4,212,069,194,366,731,000
28.535088
82
0.576106
false
slightlymadphoenix/activityPointsApp
activitypoints/lib/python3.5/site-packages/django/db/backends/utils.py
39
7380
from __future__ import unicode_literals import datetime import decimal import hashlib import logging import re from time import time from django.conf import settings from django.utils.encoding import force_bytes from django.utils.timezone import utc logger = logging.getLogger('django.db.backends') class CursorWrap...
mit
-8,981,677,660,546,136,000
31.368421
100
0.571545
false
edudobay/mingus
scripts/generate_wiki_docs.py
1
7140
#!/usr/bin/python # -*- coding: utf-8 -*- """ ================================================================================ Music theory Python package Copyright (C) 2008, 2009, Bart Spaans This program is free software: you can redistribute it and/or modify it under the terms of the GNU General P...
gpl-3.0
-2,136,940,086,449,805,600
27.790323
81
0.514566
false
HaroldMills/Vesper
scripts/compare_recording_file_csv_files.py
1
3968
from collections import namedtuple from pathlib import Path import csv DATA_DIR_PATH = Path( '/Users/harold/Desktop/NFC/Data/MPG Ranch/' '2016 MPG Ranch Recording Files Comparison') DEBBIE_FILE_PATH = DATA_DIR_PATH / 'Recording Files Debbie.csv' HAROLD_FILE_PATH = DATA_DIR_PATH / 'Recording Files Harold.csv'...
mit
1,180,394,441,916,778,200
26.943662
77
0.594758
false
mrocklin/unification
unification/tests/test_more.py
1
2685
from collections import namedtuple from unification.more import (unify_object, reify_object, unifiable) from unification import var, variables from unification.core import unify, reify, _unify, _reify class Foo(object): def __init__(self, a, b): self.a = a self.b = b de...
bsd-3-clause
-6,479,545,335,556,963,000
23.633028
79
0.515829
false
stiandre/sdhash-integration
external/tools/build/v2/test/inherit_toolset.py
20
1175
#!/usr/bin/python # Copyright 2003 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) import BoostBuild import string t = BoostBuild.Tester(pass_toolset=0) t.write("a.cpp", """ """) t.write("yfc1.jam", """ imp...
apache-2.0
2,621,126,972,556,640,000
18.915254
81
0.664681
false
Bredgren/GenericGameEngine
python/gge/Button.py
1
2790
from gge.GameObject import GameObject from gge.InputAttribute import InputAttribute from gge.Attribute import SingletonAttribute import gge.Types as T import gge.DisplayTypes as DT class MouseWithin(SingletonAttribute): pass class MouseDown(SingletonAttribute): pass class ShapeButton(GameObject): def ...
gpl-3.0
-2,072,886,078,870,360,300
30.068966
70
0.575269
false
mjtamlyn/django
tests/model_fields/test_genericipaddressfield.py
171
1475
from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase from .models import GenericIPAddress class GenericIPAddressFieldTests(TestCase): def test_genericipaddressfield_formfield_protocol(self): """ GenericIPAddressField with a specified pr...
bsd-3-clause
5,076,864,475,476,898,000
33.302326
75
0.659661
false
salguarnieri/intellij-community
python/lib/Lib/xmllib.py
160
34848
"""A parser for XML, using the derived class as static DTD.""" # Author: Sjoerd Mullender. import re import string import warnings warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) del warnings version = '0.3' class Error(RuntimeError): pass # Regular expressions used f...
apache-2.0
3,061,496,553,857,210,000
36.511302
109
0.484102
false
orhanf/fuel
tests/test_schemes.py
21
7676
import numpy from numpy.testing import assert_raises from fuel.schemes import (ConstantScheme, SequentialExampleScheme, SequentialScheme, ShuffledExampleScheme, ShuffledScheme, ConcatenatedScheme, cross_validation) def iterator_requester(s...
mit
-5,520,791,127,392,814,000
38.163265
79
0.644216
false
keen99/SickRage
lib/pyasn1/type/tagmap.py
200
1772
from pyasn1 import error class TagMap: def __init__(self, posMap={}, negMap={}, defType=None): self.__posMap = posMap.copy() self.__negMap = negMap.copy() self.__defType = defType def __contains__(self, tagSet): return tagSet in self.__posMap or \ self.__...
gpl-3.0
-6,908,435,045,783,992,000
33.076923
78
0.54684
false
dydek/django
django/views/decorators/vary.py
586
1200
from functools import wraps from django.utils.cache import patch_vary_headers from django.utils.decorators import available_attrs def vary_on_headers(*headers): """ A view decorator that adds the specified headers to the Vary header of the response. Usage: @vary_on_headers('Cookie', 'Accept-langu...
bsd-3-clause
-3,946,777,377,661,886,000
27.571429
78
0.630833
false
albertomurillo/ansible
test/units/modules/network/nso/test_nso_action.py
40
7714
# # Copyright (c) 2017 Cisco and/or its affiliates. # # 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...
gpl-3.0
1,738,627,188,335,041,300
45.46988
150
0.562613
false
ramanajee/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/efl.py
117
5906
# Copyright (C) 2011 ProFUSION Embedded Systems. All rights reserved. # Copyright (C) 2011 Samsung Electronics. All rights reserved. # Copyright (C) 2012 Intel Corporation # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # me...
bsd-3-clause
-1,699,679,181,358,253,600
42.426471
139
0.689976
false
mm1ke/portage
pym/portage/data.py
6
9785
# data.py -- Calculated/Discovered Data Values # Copyright 1998-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import os, pwd, grp, platform, sys import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.output:colorize', 'portage.util:writemsg', 'portage.uti...
gpl-2.0
-5,304,261,836,985,000,000
29.388199
80
0.678385
false
zhouzhenghui/python-for-android
python3-alpha/python3-src/Lib/idlelib/FileList.py
55
3814
import os from tkinter import * import tkinter.messagebox as tkMessageBox class FileList: # N.B. this import overridden in PyShellFileList. from idlelib.EditorWindow import EditorWindow def __init__(self, root): self.root = root self.dict = {} self.inversedict = {} self.v...
apache-2.0
5,760,654,562,850,763,000
28.565891
79
0.538804
false
ddico/server-tools
base_module_doc_rst/wizard/tech_rst_guide.py
23
17280
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-1,784,632,290,427,178,800
32.618677
79
0.428125
false
steventimberman/masterDebater
venv/lib/python2.7/site-packages/pbr/hooks/files.py
98
3681
# Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 # # Unles...
mit
-8,393,436,964,799,538,000
34.737864
78
0.597664
false
imaculate/scikit-learn
benchmarks/bench_mnist.py
38
6799
""" ======================= MNIST dataset benchmark ======================= Benchmark on the MNIST dataset. The dataset comprises 70,000 samples and 784 features. Here, we consider the task of predicting 10 classes - digits from 0 to 9 from their raw images. By contrast to the covertype dataset, the feature space is...
bsd-3-clause
2,704,299,408,074,346,500
37.412429
78
0.571702
false
kennethlyn/parallella-lcd-linux
tools/perf/scripts/python/netdev-times.py
1544
15191
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
341,127,936,393,271,040
31.739224
89
0.646962
false
nightflyer73/plugin.video.3bmeteo
default.py
1
1616
# -*- coding: utf-8 -*- import os import sys import xbmc import xbmcgui import xbmcplugin import xbmcaddon import urllib import urllib2 import urlparse from xml.dom import minidom # plugin constants __plugin__ = "plugin.video.3bmeteo" __author__ = "Nightflyer" Addon = xbmcaddon.Addon(id=__plugin__) # plugin handle ...
gpl-3.0
7,585,082,120,221,480,000
29.45283
86
0.706939
false
dharmabumstead/ansible
lib/ansible/modules/web_infrastructure/apache2_module.py
16
8135
#!/usr/bin/python # coding: utf-8 -*- # (c) 2013-2014, Christian Berendt <berendt@b1-systems.de> # 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
-8,788,638,956,482,632,000
29.698113
133
0.606761
false
tiefpunkt/thingstore
thingstore/views.py
1
7148
from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render, get_object_or_404, render_to_response from django.utils.timezone import now from datetime import timedelta from django.contrib.auth.models import User from django.contrib.auth import authenticate, login, logout from django.c...
mit
4,462,088,869,471,214,600
32.246512
119
0.719082
false
staudt/everest-legacy
lib/deps/httplib2/multipart.py
1
4134
# #!/usr/bin/env python # -*- coding: utf-8 -*- # <bolacha - http library for python, with cookies and upload support> # Copyright (C) <2010> Gabriel Falcão <gabriel@nacaolivre.org> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files ...
mit
-3,358,804,826,870,134,000
32.064
78
0.616985
false
igurrutxaga/tvalacarta
python/main-classic/channels/fpt.py
3
4035
# -*- coding: utf-8 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Fútbol Para Todos # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ # # Autor: Juan Pablo Candioti (@JPCandioti) # Desarrollo basado sobre otros canales de tvalacarta #---------------------------------...
gpl-3.0
8,070,506,336,787,366,000
39.09
226
0.619855
false
kubernetes-client/python
kubernetes/client/models/v1_limit_range.py
1
6534
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
apache-2.0
-975,621,222,794,540,900
31.346535
312
0.604836
false
johan--/asteroids
game/load.py
2
2097
# -*- coding: utf-8 *-* import pyglet from . import util from . import resources from . import physicalobject from . import ship as ship_ import random def asteroid(player_pos=(-1000,-1000), screensize=(800,600), score=0, *args, **kwargs): """spawns an asteroid at random position""" pos = util.random_pos(sc...
bsd-3-clause
698,947,401,137,223,600
28.957143
119
0.621841
false
alishakiba/kaggle-ndsb
configurations/bagging_17_cr4_ds.py
6
7849
import numpy as np import theano import theano.tensor as T import lasagne as nn import data import load import nn_plankton import dihedral import dihedral_fast import tmp_dnn import tta validation_split_path = "splits/bagging_split_17.pkl" patch_sizes = [(95, 95), (47, 47)] augmentation_params = { 'zoom_ran...
mit
4,062,108,724,544,541,000
48.36478
201
0.704294
false