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
dezede/dezede
libretto/api/rest/serializers.py
1
6967
from collections import OrderedDict from django.template.defaultfilters import filesizeformat from rest_framework.fields import ReadOnlyField, Field, SerializerMethodField from rest_framework.relations import ( HyperlinkedIdentityField, StringRelatedField, PrimaryKeyRelatedField ) from rest_framework.reverse impor...
bsd-3-clause
-6,222,309,248,963,132,000
30.668182
79
0.616334
false
adamvduke/thrift-adamd
lib/py/setup.py
6
3405
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "L...
apache-2.0
6,929,761,598,889,673,000
29.954545
87
0.63025
false
SevInf/IEDriver
py/selenium/webdriver/remote/errorhandler.py
19
7739
# Copyright 2010 WebDriver committers # 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 by ap...
apache-2.0
-3,229,968,248,950,638,600
44.792899
90
0.680837
false
manahl/pytest-plugins
pytest-server-fixtures/pytest_server_fixtures/s3.py
1
3205
# coding: utf-8 """ Pytest fixtures to launch a minio S3 server and get a bucket for it. """ from __future__ import absolute_import, division, print_function, unicode_literals import uuid from collections import namedtuple import logging import os import pytest from future.utils import text_type from pytest_fixture_...
mit
6,468,175,324,941,757,000
30.732673
124
0.656162
false
mixturemodel-flow/tensorflow
tensorflow/contrib/keras/python/keras/layers/lstm_test.py
11
11737
# 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,139,353,636,591,519,000
34.246246
80
0.63253
false
scieloorg/elixir
setup.py
1
1133
#!/usr/bin/env python import sys import re from setuptools import setup, Extension from elixir import elixir version = elixir.__version__ install_requires = [ 'requests', 'xylose', 'lxml' ] tests_require = install_requires[:] setup( name="elixir", version=version, description="Library to bri...
bsd-2-clause
-692,444,426,146,494,200
28.051282
90
0.658429
false
ANGGAIBNUSAPUTRA/git-repo
manifest_xml.py
13
32194
# # Copyright (C) 2008 The Android Open Source Project # # 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 la...
apache-2.0
7,072,113,741,945,294,000
32.087359
94
0.616668
false
vene/AD3
examples/python/example_binary_multinomial.py
2
3386
import numpy as np from ad3 import simple_grid, general_graph def example_binary(plot=True): # generate trivial data x = np.ones((10, 10)) x[:, 5:] = -1 x_noisy = x + np.random.normal(0, 0.8, size=x.shape) x_thresh = x_noisy > .0 # create unaries unaries = x_noisy # as we convert to i...
lgpl-3.0
271,750,891,009,953,440
32.524752
77
0.600118
false
asttra/pysces
pysces/lib/pyparsing.py
6
155429
# module pyparsing.py # # Copyright (c) 2003-2011 Paul T. McGuire # # 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 u...
bsd-3-clause
-8,982,969,325,968,208,000
39.458789
196
0.565017
false
the-metaverse/metaverse
test/test-rpc/utils/cryptojs.py
3
1274
#!/usr/bin/python # -*- coding: utf-8 -*- from Crypto.Hash import MD5 from Crypto.Cipher import AES from Crypto import Random import base64 def toString(s): return ''.join(['%02x' % ord(i) for i in s]) def toBase64(s): return base64.b64encode(s) def derive_key(passphrase, salt): key_size = 32 iv_siz...
agpl-3.0
-8,707,886,375,918,535,000
22.163636
57
0.635008
false
ondrejmular/pcs
pcs/lib/commands/cluster.py
3
76808
# pylint: disable=too-many-lines import math import os.path import time from typing import ( Any, Container, Mapping, Optional, Sequence, ) from pcs import settings from pcs.common import ( file_type_codes, reports, ssl, ) from pcs.common.corosync_conf import ( CorosyncConfDto, ...
gpl-2.0
5,267,389,758,631,492,000
34.200733
80
0.611421
false
hbhzwj/imalse
tools/ns-allinone-3.14.1/pybindgen-0.15.0.809/pybindgen/typehandlers/inttype.py
2
29713
# docstrings not needed here (the type handler interfaces are fully # documented in base.py) # pylint: disable-msg=C0111 import struct assert struct.calcsize('i') == 4 # assumption is made that sizeof(int) == 4 for all platforms pybindgen runs on from base import ReturnValue, Parameter, PointerParameter, PointerRetu...
gpl-3.0
8,115,015,865,077,106,000
41.205966
131
0.638912
false
useher/geowork
tools/addresslocator/addresslocator.py
1
1871
#! /usr/bin/python3 import json import requests import psycopg2 from psycopg2.extras import RealDictCursor baseurl = 'https://nominatim.openstreetmap.org/search?q=' options = '&format=json&polygon=1&addressdetails=1&accept-language=de_DE' sql_in = '''select id, adresse as address, plz as zip, city from verknet2.dst_...
agpl-3.0
-6,187,216,106,307,920,000
37.183673
151
0.589524
false
jmckaskill/subversion
tools/examples/blame.py
3
3066
#!/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 #...
apache-2.0
4,808,622,163,557,248,000
26.132743
73
0.607306
false
davidsanfal/bii-ide
bii-ide/bii_ide/common/style/biigui_stylesheet.py
2
1159
button_style = '''QPushButton { border: 1px solid #C4C4C4; border-radius: 8px; padding: 2px; } QPushButton:hover { background: #C4C4C4; }''' editor_style = '''QTextEdit{ border: 1px solid #C4C4C4; border-radius: 4px; padding: 2px; }''' shell_style = '''QTextEdit{ min-width:...
mit
1,786,208,888,203,158,500
20.462963
63
0.601381
false
sony/nnabla
python/src/nnabla/utils/converter/commands.py
1
18172
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 #...
apache-2.0
1,649,019,417,689,159,000
39.11479
124
0.534008
false
karrtikr/ete
ete3/tools/ete_ncbiquery.py
1
8047
# #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the...
gpl-3.0
1,931,690,131,779,926,800
42.263441
146
0.568038
false
charactory/namcap
Namcap/gnomemime.py
4
1682
# # namcap rules - gnomemime # Copyright (C) 2003-2007 Jason Chu <jason@archlinux.org> # # 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 ...
gpl-2.0
-5,388,698,177,727,171,000
35.565217
87
0.627824
false
oarriaga/spatial_transformer_networks
src/models/STN.py
1
1242
from keras.layers import Input from keras.models import Model from keras.layers import Activation from keras.layers import MaxPool2D from keras.layers import Flatten from keras.layers import Conv2D from keras.layers import Dense from .utils import get_initial_weights from .layers import BilinearInterpolation def STN...
mit
-1,956,776,745,206,133,800
33.5
73
0.65942
false
jdugge/QGIS
tests/src/python/test_qgsdelimitedtextprovider_wanted.py
33
73028
# -*- coding: utf-8 -*- """ *************************************************************************** test_qgsdelimitedtextprovider_wanted.py --------------------- Date : May 2013 Copyright : (C) 2013 by Chris Crook Email : ccrook at linz dot govt dot nz ...
gpl-2.0
7,868,254,456,550,130,000
27.20703
139
0.376431
false
deepmind/acme
acme/agents/jax/dqn/losses.py
1
9923
# python3 # Copyright 2018 DeepMind Technologies Limited. 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 re...
apache-2.0
4,293,536,317,619,817,500
35.616236
80
0.675904
false
not-na/peng3d
peng3d/version.py
1
1567
#!/usr/bin/env python # -*- coding: utf-8 -*- # # version.py # # Copyright 2016 notna <notna@apparat.org> # # 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 Licen...
gpl-2.0
-3,167,285,708,186,949,600
33.822222
175
0.72559
false
Ryanglambert/pybrain
pybrain/tests/runtests.py
25
4375
#! /usr/bin/env python # -*- coding: utf-8 -*- """Script to run the pybrain testsuite.""" __author__ = 'Justin Bayer, bayerj@in.tum.de' __version__ = '$Id$' import doctest import logging import os import sys from copy import copy from unittest import TestLoader, TestSuite, TextTestRunner def setUpLogging(): ...
bsd-3-clause
4,843,262,056,212,950,000
33.179688
99
0.626057
false
couchbaselabs/couchbase-cli
xdcr.py
1
11327
""" Implementation for xdcr management """ import time import os import sys import socket import urllib from usage import usage import restclient import listservers import util_cli as util # Map of HTTP success code, success message and error message for # handling HTTP response properly class XDCR: def __ini...
apache-2.0
468,932,708,434,218,200
34.731861
102
0.491745
false
EdPassos/fofix
src/core/Audio.py
3
6990
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire # # Copyright (C) 2006 Sami Kyöstilä ...
gpl-2.0
-8,926,700,898,826,511,000
29.25974
87
0.558941
false
formiano/enigma2
lib/python/Components/SelectionList.py
1
2700
from MenuList import MenuList from Tools.Directories import resolveFilename, SCOPE_ACTIVE_SKIN from enigma import eListboxPythonMultiContent, eListbox, gFont, RT_HALIGN_LEFT, RT_VALIGN_CENTER from Tools.LoadPixmap import LoadPixmap import skin selectionpng = LoadPixmap(cached=True, path=resolveFilename(SCOPE_ACTIVE_SK...
gpl-2.0
-658,971,469,564,425,500
43.262295
113
0.722593
false
Alternhuman/marcopolo
marcopolo/marco/marcobinding.py
1
3335
from __future__ import absolute_import from twisted.internet.protocol import DatagramProtocol from twisted.internet import reactor import socket, sys, json, logging, os from os import path from copy import copy import six from marcopolo.marco_conf import utils from marcopolo.marco import conf from marcopolo.marco.ma...
mpl-2.0
7,090,213,677,321,602,000
36.897727
125
0.551724
false
jcnelson/syndicatemail
common/message.py
1
46039
#!/usr/bin/env python """ Copyright 2013 The Trustees of Princeton University 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
-7,225,676,625,747,135,000
36.644317
224
0.67786
false
sarvex/tensorflow
tensorflow/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py
23
5330
# Copyright 2018 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
7,204,958,978,835,760,000
44.948276
85
0.669606
false
pitunti/alfaPitunti
plugin.video.alfa/servers/vimeo.py
1
1163
# -*- coding: utf-8 -*- from core import httptools from core import scrapertools from platformcode import logger def get_video_url(page_url, premium=False, user="", password="", video_password=""): logger.info("(page_url='%s')" % page_url) video_urls = [] headers = [['User-Agent', 'Mozilla/5.0']] if ...
gpl-3.0
7,060,998,366,256,293,000
35.34375
84
0.587274
false
solashirai/edx-platform
common/djangoapps/student/models.py
3
78980
""" Models for User Information (students, staff, etc) Migration Notes If you make changes to this model, be sure to create an appropriate migration file and check it in at the same time as your model changes. To do that, 1. Go to the edx-platform dir 2. ./manage.py lms schemamigration student --auto description_of_...
agpl-3.0
-1,044,764,249,354,505,000
36.307511
142
0.63806
false
matthew-humphrey/treater
Lib/treater/__main__.py
1
1400
#!/usr/bin/python # treater/__main__.py """Main (module) entry point for Treater, a Raspberry Pi-based remotely accessible pet feeder""" from datetime import datetime from twisted.internet import reactor from website import TreatWeb, TreatWebConfig from machine import TreatMachine, TreatMachineConfig from camera imp...
mit
-5,590,136,520,256,911,000
27.571429
96
0.727857
false
mganeva/mantid
scripts/test/TOFTOF/TOFTOFScriptElementTest.py
1
11288
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
gpl-3.0
-3,606,713,197,239,949,300
39.314286
118
0.594171
false
Usherwood/usherwood_ds
usherwood_ds/nlp/distinctive_words.py
1
8319
#!/usr/bin/env python """Finds distinctive word between two corpuses""" import numpy as np import pandas as pd from sklearn.feature_extraction.text import CountVectorizer __author__ = "Peter J Usherwood" __python_version__ = "3.5" class DistinctiveWords: """Parent class for finding the distinctive words betwe...
bsd-2-clause
2,659,791,577,478,884,000
43.486631
119
0.638298
false
ishay2b/tensorflow
tensorflow/python/ops/variable_scope.py
1
76088
# 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
18,105,685,319,570,604
41.914834
113
0.643741
false
mastizada/kuma
vendor/packages/nose/functional_tests/test_collector.py
10
1333
import os import sys import unittest import warnings from cStringIO import StringIO from nose.result import _TextTestResult here = os.path.dirname(__file__) support = os.path.join(here, 'support') class TestRunner(unittest.TextTestRunner): def _makeResult(self): self.result = _TextTestResult( ...
mpl-2.0
-7,553,539,612,129,511,000
27.978261
64
0.596399
false
bsipocz/bokeh
examples/glyphs/maps.py
31
2533
from __future__ import print_function from bokeh.browserlib import view from bokeh.document import Document from bokeh.embed import file_html from bokeh.models.glyphs import Circle from bokeh.models import ( GMapPlot, Range1d, ColumnDataSource, LinearAxis, PanTool, WheelZoomTool, BoxSelectTool, BoxSelectio...
bsd-3-clause
4,539,470,508,957,857,300
39.206349
797
0.683774
false
utkarsh-goswami/erpnext
erpnext/projects/doctype/timesheet/test_timesheet.py
13
5355
# -*- coding: utf-8 -*- # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals import frappe import unittest import datetime from frappe.utils.make_random import get_random from frappe.utils import now_datetime, nowdate, add_days, add_months from ...
gpl-3.0
-9,052,740,640,349,281,000
36.447552
135
0.743231
false
Alpistinho/FreeCAD
src/Mod/Import/App/config_control_design.py
56
401336
# This file was generated by fedex_python. You probably don't want to edit # it since your modifications will be lost if fedex_plus is used to # regenerate it. import sys from SCL.SCLBase import * from SCL.SimpleDataTypes import * from SCL.ConstructedDataTypes import * from SCL.AggregationDataTypes import * from SCL....
lgpl-2.1
-7,461,532,435,308,213,000
28.23059
582
0.667368
false
jasonwbw/JustAPlaceholder
feature/ngram.py
1
3229
# -*- coding: utf-8 -*- """ __file__ ngram.py __description__ This file provides functions to compute n-gram & n-term. __author__ Chenglong Chen < c.chenglong@gmail.com > __append__ Copy from project: Kaggle_CrowdFlower """ def getUnigram(words): """ Input: a list of words, e.g., ['I...
apache-2.0
5,809,933,177,496,598,000
25.916667
103
0.534841
false
prarthitm/edxplatform
openedx/tests/xblock_integration/test_recommender.py
11
30576
""" This test file will run through some XBlock test scenarios regarding the recommender system """ from copy import deepcopy import json import itertools import StringIO import unittest from ddt import ddt, data from nose.plugins.attrib import attr from django.conf import settings from django.core.urlresolvers impo...
agpl-3.0
5,832,969,663,170,268,000
36.982609
120
0.581927
false
aam-at/tensorflow
tensorflow/python/ops/distributions/normal.py
23
9823
# 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
-7,849,228,935,168,344,000
32.298305
80
0.657742
false
AlexCatarino/Lean
Algorithm.Python/BrokerageModelAlgorithm.py
3
3724
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen...
apache-2.0
8,779,866,055,156,949,000
50.722222
225
0.698174
false
apache/bloodhound
bloodhound_multiproduct/multiproduct/ticket/query.py
2
16071
# -*- coding: UTF-8 -*- # # 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 (...
apache-2.0
3,705,360,368,367,781,400
40.851563
84
0.510111
false
samwisehawkins/wrftools
util/generate_job_scripts.py
1
2032
""" Generate inital job scripts from a configuration file Config comes from a file, specified as --config argument. Some configuration options (listed below) can also be given at the command line, where they will override the configuration file. Usage: generate_job_scripts.py [--config=<file>] [option...
mit
-7,365,955,544,928,536,000
34.321429
137
0.641732
false
arkem/pyflag
src/pyflag/DB.py
1
43125
#!/usr/bin/env python # ****************************************************** # Copyright 2004: Commonwealth of Australia. # # Developed by the Computer Network Vulnerability Team, # Information Security Group. # Department of Defence. # # Michael Cohen <scudette@users.sourceforge.net> # # ****************************...
gpl-2.0
-8,212,436,472,952,405,000
37.029101
250
0.565751
false
mitchellzen/pops
satchmo/apps/satchmo_store/shop/templatetags/satchmo_category.py
8
10996
from django.core.cache import cache from django.contrib.sites.models import Site from django.template import Library, Node, Variable from django.template import TemplateSyntaxError, VariableDoesNotExist from product.models import Category, CategoryAttribute from satchmo_utils.templatetags import get_filter_args from dj...
bsd-3-clause
8,595,469,009,251,158,000
29.974648
100
0.603583
false
Sharecare/cyclops
app/objects.py
1
1631
import json import time import logging import pprint pp = pprint.PrettyPrinter(indent=4) logger = logging.getLogger(__name__) # a monitor object defines a particular unit of work. it is # made up of the following: # name: the name for the monitor # check: the worker to perform the check against # interval: how ofte...
apache-2.0
3,837,949,277,895,527,000
27.12069
84
0.659105
false
acsone/partner-contact
partner_relations/tests/test_partner_relation_common.py
5
4380
# -*- coding: utf-8 -*- # Copyright 2016 Therp BV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp.tests import common class TestPartnerRelationCommon(common.TransactionCase): def setUp(self): super(TestPartnerRelationCommon, self).setUp() self.partner_model = se...
agpl-3.0
-3,033,887,098,215,274,000
37.761062
78
0.550685
false
gencer/sentry
tests/sentry/api/endpoints/test_group_tags.py
1
1657
from __future__ import absolute_import from sentry import tagstore from sentry.testutils import APITestCase class GroupTagsTest(APITestCase): def test_simple(self): this_group = self.create_group() this_group.data['tags'] = (['foo', 'bar'], ['biz', 'baz']) this_group.save() other...
bsd-3-clause
-457,494,111,673,794,560
32.816327
66
0.483404
false
mitocw/edx-platform
common/djangoapps/util/models.py
3
2042
"""Models for the util app. """ import gzip import logging from io import BytesIO import six from config_models.models import ConfigurationModel from django.db import models from django.utils.text import compress_string from opaque_keys.edx.django.models import CreatorMixin logger = logging.getLogger(__name__) # p...
agpl-3.0
2,082,657,584,972,630,500
26.594595
103
0.65573
false
msimacek/samba
third_party/waf/wafadmin/Tools/cs.py
32
1802
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006 (ita) "C# support" import TaskGen, Utils, Task, Options from Logs import error from TaskGen import before, after, taskgen, feature flag_vars= ['FLAGS', 'ASSEMBLIES'] @feature('cs') def init_cs(self): Utils.def_attrs(self, flags = '', assemblies = '', ...
gpl-3.0
182,834,629,318,395,940
25.895522
129
0.677026
false
ssmruthi/mycroft-core
mycroft/skills/main.py
1
2371
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 versio...
gpl-3.0
7,545,943,746,307,939,000
25.054945
73
0.664698
false
christophmeissner/volunteer_planner
organizations/migrations/0008_add_slug_field.py
5
1608
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys from django.db import models, migrations from django.utils.text import slugify from common.migrations import skip def add_slugs(apps, schema_editor): organization_model = apps.get_model('organizations', 'Organization') facility_model...
agpl-3.0
8,913,463,082,941,898,000
30.529412
94
0.605721
false
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/Cython-0.22.1/Cython/Compiler/UtilityCode.py
4
8067
from __future__ import absolute_import from .TreeFragment import parse_from_strings, StringParseContext from . import Symtab from . import Naming from . import Code class NonManglingModuleScope(Symtab.ModuleScope): cpp = False def __init__(self, prefix, *args, **kw): self.prefix = prefix se...
mit
458,207,164,308,549,000
37.783654
110
0.61671
false
kohoumas/ns-3-click-mac-dev
src/wimax/bindings/modulegen__gcc_LP64.py
1
732891
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
-860,766,160,695,467,900
63.299965
748
0.607314
false
aterrel/dynd-python
dynd/tests/test_python_scalar.py
1
3627
import sys import unittest from dynd import nd, ndt from datetime import date if sys.version_info >= (3, 0): unicode = str class TestPythonScalar(unittest.TestCase): def test_bool(self): # Boolean true/false a = nd.array(True) self.assertEqual(nd.type_of(a), ndt.bool) self.asse...
bsd-2-clause
3,345,892,055,432,648,700
34.558824
74
0.584505
false
XiaosongWei/crosswalk-test-suite
webapi/tct-package-tizen-tests/inst.wgt.py
4
6752
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
1,754,156,531,313,168,100
28.229437
101
0.540581
false
kawasaki2013/python-for-android-x86
python-modules/twisted/twisted/trial/test/suppression.py
61
1357
# -*- test-case-name: twisted.trial.test.test_tests -*- # Copyright (c) 2008 Twisted Matrix Laboratories. # See LICENSE for details. """ Test cases used to make sure that warning supression works at the module, method, and class levels. """ import warnings from twisted.trial import unittest, util METHOD_WARNING_M...
apache-2.0
1,610,576,381,281,320,700
22.807018
77
0.725866
false
chugunovyar/factoryForBuild
env/lib/python2.7/site-packages/scipy/sparse/linalg/_expm_multiply.py
82
20126
"""Compute the action of the matrix exponential. """ from __future__ import division, print_function, absolute_import import numpy as np import scipy.linalg import scipy.sparse.linalg from scipy.sparse.linalg import LinearOperator, aslinearoperator __all__ = ['expm_multiply'] def _exact_inf_norm(A): # A compa...
gpl-3.0
-675,685,019,988,497,700
29.310241
80
0.560519
false
talus-framework/talus-master
git_repo/template/talus/job.py
1
10393
#!/usr/bin/env python # encoding: utf-8 import ast import docutils import docutils.examples import inspect import logging import os import re import sys logging.basicConfig(level=logging.DEBUG) from talus.fileset import FileSet class TalusError(Exception): pass class PyFuncTypeComponent(object): def _...
bsd-3-clause
-8,976,641,196,884,589,000
31.993651
109
0.536611
false
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v3_6_0/device_wireless_broker.py
16
73313
from ..broker import Broker class DeviceWirelessBroker(Broker): controller = "device_wirelesses" def index(self, **kwargs): """Lists the available device wirelesses. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists, using thi...
apache-2.0
-4,136,499,881,669,812,700
52.709158
758
0.612538
false
googleapis/googleapis-gen
google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/google_ads_field.py
1
5848
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
-6,471,146,014,584,337,000
33.4
106
0.625342
false
kbaseapps/GenomeFileUtil
test/core/fasta_download_test.py
1
5208
import os import time import unittest import json import shutil from configparser import ConfigParser from GenomeFileUtil.GenomeFileUtilImpl import GenomeFileUtil from GenomeFileUtil.GenomeFileUtilServer import MethodContext from installed_clients.AssemblyUtilClient import AssemblyUtil from installed_clients.Workspace...
mit
4,013,379,416,274,280,400
43.512821
119
0.598502
false
saurabh6790/pow-app
selling/doctype/user/user.py
2
2140
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import webnotes from webnotes.utils import cint,cstr class DocType: def __init__(self, d, dl): self.doc, self.doclist = d...
agpl-3.0
3,038,121,087,767,596,000
56.837838
507
0.703271
false
srjoglekar246/sympy
sympy/physics/quantum/tests/test_operator.py
2
5503
from sympy import (Derivative, diff, Function, Integer, Mul, pi, sin, Symbol, symbols) from sympy.physics.quantum.qexpr import QExpr from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.hilbert import HilbertSpace from sympy.physics.quantum.operator import (Operator, UnitaryOper...
bsd-3-clause
4,518,610,432,724,588,000
29.572222
79
0.582955
false
nathania/pysal
pysal/weights/util.py
3
31930
import pysal from pysal.common import * import pysal.weights import numpy as np from scipy import sparse, float32 import scipy.spatial import os import operator import scipy __all__ = ['lat2W', 'block_weights', 'comb', 'order', 'higher_order', 'shimbel', 'remap_ids', 'full2W', 'full', 'WSP2W', 'i...
bsd-3-clause
3,801,147,828,704,531,500
25.652755
114
0.496304
false
benjmarshall/hls_scratchpad
python_automation/run_hls.py
1
7359
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ A Vivado HLS Command Line Helper tool Copyright (c) 2017 Ben Marshall """ ### Imports ### import os import sys import shutil import argparse from glob import glob import contextlib ### Class definitions ### class Error(Exception): """Base class for exceptions in...
mit
8,336,447,695,265,548,000
39.434066
367
0.612855
false
lis-epfl/mavlink
pymavlink/mavutil.py
3
59548
#!/usr/bin/env python ''' mavlink python utility functions Copyright Andrew Tridgell 2011 Released under GNU GPL version 3 or later ''' import socket, math, struct, time, os, fnmatch, array, sys, errno import select, mavexpression # adding these extra imports allows pymavlink to be used directly with pyinstaller # w...
lgpl-3.0
-1,812,975,357,580,576,300
36.078456
142
0.536878
false
bgalehouse/grr
client/client_utils_linux.py
9
7736
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- # Copyright 2011 Google Inc. All Rights Reserved. """Linux specific utils.""" import locale import os import subprocess import sys import threading import time from google.protobuf import message import logging from grr.lib import config_lib from grr.li...
apache-2.0
7,020,517,690,146,524,000
25.675862
77
0.670889
false
MarsRobotics/Experiments
UI/RobotData.py
1
3418
__author__ = 'Matt' class RobotData: def __init__(self): self.frontLeftWheel = wheel(0, 0.5, 0) self.frontRightWheel = wheel(0, 0.5, 0) self.midLeftWheel = wheel(0, 0.5, 0) self.midRightWheel = wheel(0, 0.5, 0) self.rearLeftWheel = wheel(0, 0.5, 0) self.rearRightW...
bsd-3-clause
-8,114,020,577,965,434,000
26.572581
108
0.588941
false
Vagab0nd/SiCKRAGE
lib3/guessit/rules/common/formatters.py
5
3637
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Formatters """ from rebulk.formatters import formatters from rebulk.remodule import re from . import seps _excluded_clean_chars = ',:;-/\\' clean_chars = "" for sep in seps: if sep not in _excluded_clean_chars: clean_chars += sep def _potential_before(i, ...
gpl-3.0
-3,686,810,875,147,249,000
25.742647
117
0.613968
false
VaysseB/PySimpleMazeGenerator
maze/ortho/ortho_maze.py
1
1613
# -*- coding: utf-8 -*- import numpy as np from .ortho_point import OrthoPoint from .ortho_maze_cell import OrthoMazeCellStatus, OrthoMazeCell __all__ = ("OrthoMaze",) class OrthoMaze: """A simplified class builder for orthogonal based maze.""" def __init__(self, width, height): """Build an empty m...
mit
1,127,908,839,063,675,100
28.888889
78
0.584005
false
MusculoskeletalAtlasProject/mapclient
src/mapclient/view/managers/plugins/ui/ui_pluginmanagerdialog.py
2
5644
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qt/pluginmanagerdialog.ui' # # Created: Wed Jan 28 16:54:28 2015 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_PluginManagerDialog(ob...
gpl-3.0
4,194,251,262,441,179,600
63.136364
185
0.750354
false
bootphon/zerospeech2017
track2/baseline/baseline_mandarin/scripts/build_graph.py
6
3446
#!/usr/bin/python # # Copyright 2011-2012 Johns Hopkins University (Author: Aren Jansen) # from __future__ import division import sys import os import re import string from optparse import OptionParser parser = OptionParser() parser.add_option("--input", help="matches input file", dest="infile") parser.add_opti...
gpl-3.0
6,627,459,577,708,773,000
25.305344
108
0.584736
false
anryko/ansible
lib/ansible/modules/cloud/google/gcp_kms_crypto_key.py
13
14214
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
gpl-3.0
-7,609,309,285,686,532,000
32.288056
152
0.63747
false
jj4jj/awolmsg
pydemo/server.py
1
3088
import redis import json class MsgSvr(): def __init__(self): self.r=redis.Redis(host='localhost',port=6379, db=0) self.peers=[] #connect to redis server def set(self, actor, type, qid, msg): #hset hset=self.mergekey(actor, type) if self.r.hlen(hset) > 100: ...
mit
-1,263,875,015,260,058,000
24.105691
105
0.588407
false
chinakr/jiaxiao
jiaxiao/jiaxiao/wsgi.py
1
1422
""" WSGI config for jiaxiao project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` ...
gpl-2.0
-1,596,401,843,799,118,000
43.4375
79
0.793249
false
virtuNat/hemopicker
hemopicker.py
1
3420
#!/usr/bin/env python import pygame as pg from colorset import ColorSet from boilerplate import load_image from boilerplate import AppExit, AppState, FreeSprite from boilerplate import Appli, Window class Gamzee(FreeSprite): """Gamzee Makara's display sprite. Does nothing.""" def __init__(self...
gpl-3.0
-8,802,998,533,534,245,000
35.173913
96
0.494444
false
frankvdp/django
django/db/models/functions/text.py
8
8244
from django.db.models import Func, IntegerField, Transform, Value, fields from django.db.models.functions import Coalesce class BytesToCharFieldConversionMixin: """ Convert CharField results from bytes to str. MySQL returns long data types (bytes) instead of chars when it can't determine the length o...
bsd-3-clause
2,305,287,747,617,468,700
32.376518
97
0.639131
false
bbiiggppiigg/PokemonGo-Bot
pokemongo_bot/test/plugin_loader_test.py
19
6875
import imp import sys import pkgutil import importlib import unittest import os import shutil import mock from datetime import timedelta, datetime from mock import patch, MagicMock from pokemongo_bot.plugin_loader import PluginLoader, GithubPlugin from pokemongo_bot.test.resources.plugin_fixture import FakeTask PLUGIN...
mit
-2,005,949,108,382,772,000
45.452703
147
0.672436
false
boland1992/SeisSuite
bin/xcorr_multiplot.py
2
4620
# -*- coding: utf-8 -*- """ Created on Mon Mar 28 12:28:15 2016 @author: boland """ # -*- coding: utf-8 -*- """ Created on Mon Mar 28 08:35:56 2016 @author: boland """ # -*- coding: utf-8 -*- """ Created on Fri Oct 16 23:34:00 2015 @author: boland """ from seissuite.ant import (pscrosscorr) import matplotlib.pyplo...
gpl-3.0
4,845,144,260,295,143,000
30.650685
135
0.62619
false
atagar/ReviewBoard
reviewboard/hostingsvcs/service.py
1
8490
import base64 import logging import mimetools import urllib2 from pkg_resources import iter_entry_points from django.utils import simplejson from django.utils.translation import ugettext_lazy as _ class HostingService(object): """An interface to a hosting service for repositories and bug trackers. HostingSe...
mit
-7,944,290,956,411,547,000
32.557312
79
0.571143
false
arpho/mmasgis5
mmasgis/sessionClasses.py
1
27075
#!/usr/bin/python # -*- coding: latin-1 -*- import re from constants import * from mmasgisDb_sqlalchemy import * from sqlalchemy import func class Relations(): """ esprime le relazioni n:m esistenti tra utenti e funzioni, utenti e dbs utenti e UTB trasformando la base dati offerta da Qsettings in una base dati ...
mit
-2,327,181,510,416,719,400
23.748629
188
0.682622
false
alanjw/GreenOpenERP-Win-X86
python/Lib/distutils/tests/test_archive_util.py
3
11399
# -*- coding: utf-8 -*- """Tests for distutils.archive_util.""" __revision__ = "$Id$" import unittest import os import sys import tarfile from os.path import splitdrive import warnings from distutils.archive_util import (check_archive_formats, make_tarball, make_zipfile...
agpl-3.0
-7,016,192,764,976,045,000
32.67378
78
0.562209
false
drawks/ansible
lib/ansible/plugins/lookup/_redis_kv.py
31
3050
# (c) 2012, Jan-Piet Mens <jpmens(at)gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ lookup: redis_kv author: Jan-Piet M...
gpl-3.0
-7,896,204,507,531,317,000
31.795699
145
0.568525
false
sunny-wyb/xen-4.1.2
tools/python/build/lib.linux-x86_64-2.7/xen/xend/XendOptions.py
19
21030
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
1,331,049,694,321,367,000
36.089947
102
0.595625
false
Z2Y/CUIT-ACM-Website
config.py
1
3878
# coding=utf-8 #The database URI that should be used for the connection. #fomate: dialect+driver://username:password@host:port/database #mysql format : mysql://scott:tiger@localhost/database_name SQLALCHEMY_DATABASE_URI = 'mysql://root:63005610@localhost/cuit_acm' #A dictionary that maps bind keys to SQLAlchemy connec...
mit
811,916,324,765,602,000
21.637681
97
0.615557
false
benwu232/train_hard
train.py
1
4904
''' https://drive.google.com/file/d/0B3zSzVUgsG-FNTliNFl2a2t5dzQ/view?usp=sharing ''' import pickle import keras from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten, TimeDistributed from keras.layers.convolutional import Convolution2D, Convolution1D, AveragePooling2D, Avera...
mit
7,173,574,711,716,224,000
32.82069
161
0.597675
false
watchdogpolska/poradnia.siecobywatelska.pl
poradnia/cases/forms.py
3
3813
from atom.ext.crispy_forms.forms import ( FormHorizontalMixin, HelperMixin, SingleButtonMixin, ) from braces.forms import UserKwargModelFormMixin from crispy_forms.layout import Submit from dal import autocomplete from django import forms from django.contrib.auth import get_user_model from django.utils.tran...
bsd-3-clause
-5,255,106,025,743,283,000
32.447368
84
0.594807
false
YeEmrick/learning
PCI/PCI_Code/chapter9/advancedclassify.py
3
4403
class matchrow: def __init__(self,row,allnum=False): if allnum: self.data=[float(row[i]) for i in range(len(row)-1)] else: self.data=row[0:len(row)-1] self.match=int(row[len(row)-1]) def loadmatch(f,allnum=False): rows=[] for line in file(f): rows.append(matchrow(line.split...
apache-2.0
6,678,705,473,298,663,000
24.208333
70
0.601408
false
batxes/4c2vhic
src/HiC_comp.py
2
5352
#!/usr/bin/python # script to compare virtual and original Hi-c's import re import os import sys import subprocess from multiprocessing import Pool from itertools import combinations, chain import time import ConfigParser import numpy as np import matplotlib matplotlib.use('agg') import matplotlib.pyplot as plt #plt....
gpl-3.0
-108,518,024,398,423,920
32.660377
124
0.581465
false
patrickwestphal/owlapy
tests/model/owlnamedindividual_tests.py
1
9342
import unittest from owlapy.model import IRI from owlapy.model import OWLAnnotationProperty from owlapy.model import OWLClass from owlapy.model import OWLDataProperty from owlapy.model import OWLDatatype from owlapy.model import OWLNamedIndividual from owlapy.model import OWLObject from owlapy.model import OWLObjectVi...
gpl-3.0
-1,929,371,452,084,963,800
37.925
79
0.639049
false
proxysh/Safejumper-for-Mac
buildlinux/env32/lib/python2.7/site-packages/twisted/words/service.py
13
38173
# -*- test-case-name: twisted.words.test.test_service -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ A module that needs a better name. Implements new cred things for words. How does this thing work? - Network connection on some port expecting to speak some protocol - Protocol-...
gpl-2.0
-4,616,086,217,281,156,000
29.081166
111
0.561208
false
sunjeammy/tornado
demos/benchmark/chunk_benchmark.py
31
1572
#!/usr/bin/env python # # Downloads a large file in chunked encoding with both curl and simple clients import logging from tornado.curl_httpclient import CurlAsyncHTTPClient from tornado.simple_httpclient import SimpleAsyncHTTPClient from tornado.ioloop import IOLoop from tornado.options import define, options, parse_...
apache-2.0
8,332,642,254,566,516,000
32.446809
79
0.678117
false
MooglyGuy/mame
scripts/minimaws/lib/htmltmpl.py
29
19706
#!/usr/bin/python ## ## license:BSD-3-Clause ## copyright-holders:Vas Crabb import string ERROR_PAGE = string.Template( '<!DOCTYPE html>\n' \ '<html>\n' \ '<head>\n' \ ' <meta http-equiv="Content-Type" content="text/html; charset=utf-8">\n' \ ' <title>${code} ${message}<...
gpl-2.0
5,022,746,982,623,831,000
43.085011
180
0.453415
false
Clinical-Genomics/scout
tests/server/test_links.py
1
2106
"""Tests for scout server links""" from scout.server.links import add_gene_links, cbioportal, mycancergenome, snp_links def test_add_gene_links(): """Test to add gene links to a gene object""" # GIVEN a minimal gene and a genome build gene_obj = {"hgnc_id": 257} build = 37 # WHEN adding the gene ...
bsd-3-clause
-3,427,942,437,221,359,600
28.661972
88
0.647198
false
MaxHalford/Prince
prince/one_hot.py
1
1092
"""This module contains a custom one-hot encoder. It inherits from sklearn's OneHotEncoder and returns a pandas.SparseDataFrame with appropriate column names and index values. """ import itertools import numpy as np import pandas as pd from sklearn import preprocessing class OneHotEncoder(preprocessing.OneHotEncoder...
mit
-2,456,115,523,759,489,000
27
76
0.604396
false
stvstnfrd/edx-platform
lms/djangoapps/instructor_task/management/commands/fail_old_tasks.py
5
3684
""" Commands to fail old tasks """ from datetime import datetime from textwrap import dedent from celery.states import FAILURE from django.core.management.base import BaseCommand, CommandError from pytz import utc from lms.djangoapps.instructor_task.models import PROGRESS, QUEUING, InstructorTask class Command(Ba...
agpl-3.0
7,202,504,289,924,054,000
29.7
178
0.546145
false
dmlc/tvm
python/tvm/contrib/nnpack.py
5
7835
# 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,966,758,172,275,899,100
32.340426
100
0.632546
false