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
feigames/Odoo
openerp/models.py
3
277182
# -*- 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
-8,451,201,501,197,821,000
45.592705
247
0.551519
false
pahans/nototools
third_party/spiro/curves/polymat-bad.py
15
1664
from Numeric import * import LinearAlgebra as la import sys n = 15 m = zeros(((n + 1) * 4, (n + 1) * 4), Float) for i in range(n): m[4 * i + 2][4 * i + 0] = .5 m[4 * i + 2][4 * i + 1] = -1./12 m[4 * i + 2][4 * i + 2] = 1./48 m[4 * i + 2][4 * i + 3] = -1./480 m[4 * i + 2][4 * i + 4] = .5 m[4 * i...
apache-2.0
-7,583,907,392,730,143,000
25
55
0.340144
false
janusnic/dj-21v
unit_10/mysite/userprofiles/utils.py
6
2613
from django.core.exceptions import ImproperlyConfigured # -*- coding: utf-8 -*- import functools try: import urlparse except ImportError: from urllib import parse as urlparse # python3 support from django.core.exceptions import SuspiciousOperation def default_redirect(request, fallback_url, **kwargs): """ E...
mit
-6,078,964,194,875,679,000
36.869565
101
0.67279
false
varunarya10/python-glanceclient
glanceclient/common/https.py
3
11205
# Copyright 2014 Red Hat, 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 ...
apache-2.0
552,029,750,450,214,300
36.600671
79
0.596609
false
amenonsen/ansible
lib/ansible/modules/network/fortios/fortios_vpn_certificate_ocsp_server.py
14
11082
#!/usr/bin/python from __future__ import (absolute_import, division, print_function) # Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lic...
gpl-3.0
-4,706,880,943,874,238,000
30.57265
116
0.593575
false
remh/dd-agent
checks.d/vsphere.py
27
33304
# stdlib from copy import deepcopy from datetime import datetime, timedelta from hashlib import md5 from Queue import Empty, Queue import re import time import traceback # 3p from pyVim import connect from pyVmomi import vim # project from checks import AgentCheck from checks.libs.thread_pool import Pool from checks....
bsd-3-clause
8,482,297,408,791,674,000
38.694875
137
0.57996
false
openstack/ironic
ironic/objects/port.py
1
23131
# coding=utf-8 # # # 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 writi...
apache-2.0
-1,894,613,625,406,385,700
43.397313
79
0.610869
false
pforret/python-for-android
python-build/python-libs/gdata/build/lib/gdata/apps/service.py
136
16595
#!/usr/bin/python # # Copyright (C) 2007 SIOS Technology, 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 appli...
apache-2.0
7,247,474,686,710,491,000
33.572917
78
0.68599
false
talbarda/kaggle_predict_house_prices
Build Model.py
1
2629
import matplotlib.pyplot as plt import matplotlib.animation as animation import numpy as np import pandas as pd import sklearn.linear_model as lm from sklearn.model_selection import learning_curve from sklearn.metrics import accuracy_score from sklearn.metrics import make_scorer from sklearn.model_selection import Grid...
mit
3,213,995,162,590,570,000
38.848485
110
0.669456
false
XueqingLin/tensorflow
tensorflow/python/training/proximal_gradient_descent.py
33
3580
# 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
4,214,806,769,283,929,600
40.627907
109
0.695531
false
tanium/pytan
lib/libs_external/any/urllib3/filepost.py
292
2321
from __future__ import absolute_import import codecs from uuid import uuid4 from io import BytesIO from .packages import six from .packages.six import b from .fields import RequestField writer = codecs.lookup('utf-8')[3] def choose_boundary(): """ Our embarrassingly-simple replacement for mimetools.choose_...
mit
-6,916,278,960,011,971,000
23.691489
85
0.629039
false
Danielhiversen/home-assistant
homeassistant/components/switch/anel_pwrctrl.py
8
3373
""" Support for ANEL PwrCtrl switches. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.pwrctrl/ """ import logging import socket from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from hom...
mit
2,931,940,410,848,232,400
27.108333
75
0.647791
false
oopy/micropython
docs/sphinx_selective_exclude/search_auto_exclude.py
40
1397
# # This is a Sphinx documentation tool extension which allows to # automatically exclude from full-text search index document # which are not referenced via toctree::. It's intended to be # used with toctrees conditional on only:: directive, with the # idea being that if you didn't include it in the ToC, you don't # w...
mit
-5,560,494,608,797,927,000
40.088235
100
0.761632
false
Workday/OpenFrame
tools/json_schema_compiler/highlighters/pygments_highlighter.py
179
1273
# Copyright (c) 2012 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. import sys try: import pygments from pygments.lexers import CppLexer from pygments.formatters import HtmlFormatter PYGMENTS_IMPORTED = True excep...
bsd-3-clause
-8,326,520,500,126,395,000
33.405405
80
0.727416
false
Poles/Poles
platforms/windows/JsonCpp/scons-local-2.3.0/SCons/Tool/BitKeeper.py
11
2498
"""SCons.Tool.BitKeeper.py Tool-specific initialization for the BitKeeper source code control system. 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, 2002, 2003, 2004, 2005, 2006, 200...
gpl-3.0
1,522,447,516,660,714,500
36.283582
119
0.730985
false
SaschaMester/delicium
tools/perf/page_sets/mse_cases.py
1
2010
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import page as page_module from telemetry import story class MseCasesPage(page_module.Page): def __init__(self, url, page_set): s...
bsd-3-clause
-7,264,405,073,782,115,000
40.875
104
0.71592
false
RPGOne/scikit-learn
sklearn/externals/funcsigs.py
118
29982
# Copyright 2001-2013 Python Software Foundation; All Rights Reserved """Function signature objects for callables Back port of Python 3.3's function signature tools from the inspect module, modified to be compatible with Python 2.6, 2.7 and 3.2+. """ from __future__ import absolute_import, division, print_function imp...
bsd-3-clause
8,684,818,752,545,959,000
35.652812
84
0.534421
false
RNAcentral/rnacentral-import-pipeline
rnacentral_pipeline/cli/rfam.py
1
2267
# -*- coding: utf-8 -*- """ Copyright [2009-2018] EMBL-European Bioinformatics Institute 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...
apache-2.0
-7,114,810,845,567,693,000
27.696203
76
0.701367
false
Maikflow/django_test
lib/python2.7/site-packages/Django-1.7.1-py2.7.egg/django/utils/dates.py
115
2296
"Commonly-used date structures" from django.utils.translation import ugettext_lazy as _, pgettext_lazy WEEKDAYS = { 0: _('Monday'), 1: _('Tuesday'), 2: _('Wednesday'), 3: _('Thursday'), 4: _('Friday'), 5: _('Saturday'), 6: _('Sunday') } WEEKDAYS_ABBR = { 0: _('Mon'), 1: _('Tue'), 2: _('Wed'), 3: _('Thu'),...
gpl-2.0
-5,251,873,346,484,593,000
39.280702
95
0.535279
false
Mistobaan/tensorflow
tensorflow/contrib/py2tf/pyct/parser.py
4
1152
# 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
-7,603,796,458,607,800,000
29.315789
80
0.696181
false
andreaso/ansible
lib/ansible/plugins/connection/lxd.py
133
4283
# (c) 2016 Matt Clay <matt@mystile.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 later version. # ...
gpl-3.0
118,347,690,421,008,590
37.241071
103
0.65258
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/registry/browser/personproduct.py
1
2189
# Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """Views, menus and traversal related to PersonProducts.""" __metaclass__ = type __all__ = [ 'PersonProductBreadcrumb', 'PersonProductFacets', 'PersonProductNavigation...
agpl-3.0
5,386,008,516,877,667,000
27.802632
78
0.677478
false
Vogeltak/pauselan
lib/python3.4/site-packages/flask/testsuite/basic.py
406
43777
# -*- coding: utf-8 -*- """ flask.testsuite.basic ~~~~~~~~~~~~~~~~~~~~~ The basic functionality. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import re import uuid import flask import pickle import unittest from datetime import datetime from threading i...
gpl-2.0
-2,334,631,854,668,619,300
33.892344
111
0.542704
false
victronenergy/dbus-fronius
test/src/fronius_sim/fronius_sim.py
1
1241
import random import time class PowerInfo: def __init__(self): self._lastEnergy = 0 self._prevPower = 0 # Use time.perf_counter() instead of time.clock() when using python 3 self._lastTimeStamp = time.perf_counter() @property def current(self): return random.gauss(14, 0.5) @property def voltage(self)...
mit
1,034,318,083,225,044,400
21.160714
103
0.676873
false
tsdmgz/ansible
lib/ansible/modules/system/pamd.py
3
23321
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Kenneth D. Evensen <kevensen@redhat.com> # 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
9,031,450,999,728,111,000
33.60089
92
0.54779
false
ntruchsess/Arduino-1
arduino-core/src/processing/app/i18n/python/requests/models.py
151
21105
# -*- coding: utf-8 -*- """ requests.models ~~~~~~~~~~~~~~~ This module contains the primary objects that power Requests. """ import collections import logging import datetime from io import BytesIO from .hooks import default_hooks from .structures import CaseInsensitiveDict from .auth import HTTPBasicAuth from .c...
lgpl-2.1
8,549,009,283,892,214,000
30.832579
108
0.5638
false
Dandandan/wikiprogramming
jsrepl/extern/python/reloop-closured/lib/python2.7/ntpath.py
81
18082
# Module 'ntpath' -- common operations on WinNT/Win95 pathnames """Common pathname manipulations, WindowsNT/95 version. Instead of importing this module directly, import os and refer to this module as os.path. """ import os import sys import stat import genericpath import warnings from genericpath import * __all__ ...
mit
5,943,260,352,307,369,000
33.573614
80
0.549276
false
gustavo-guimaraes/siga
backend/appengine/lib/pip/_vendor/six.py
322
22857
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 Benjamin Peterson # # 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 with...
mit
-5,375,496,060,216,665,000
35.166139
183
0.633416
false
tareqalayan/ansible
test/units/modules/network/onyx/test_onyx_lldp_interface.py
50
3151
# # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type from ansible.compat.tests.mock import patch from ansible.modules.network.on...
gpl-3.0
8,036,928,914,720,705,000
40.460526
92
0.652174
false
sgraf812/Celero
test/gtest-1.7.0/test/gtest_help_test.py
2968
5856
#!/usr/bin/env python # # Copyright 2009, 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...
apache-2.0
3,875,183,899,412,054,500
33.046512
75
0.702527
false
openstack/keystone
keystone/common/sql/migrate_repo/versions/108_add_failed_auth_columns.py
5
1065
# 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 # distributed under t...
apache-2.0
-7,074,200,702,754,783,000
39.961538
75
0.693897
false
platinhom/ManualHom
Coding/Python/scipy-html-0.16.1/generated/scipy-stats-probplot-1.py
1
1101
from scipy import stats import matplotlib.pyplot as plt nsample = 100 np.random.seed(7654321) # A t distribution with small degrees of freedom: ax1 = plt.subplot(221) x = stats.t.rvs(3, size=nsample) res = stats.probplot(x, plot=plt) # A t distribution with larger degrees of freedom: ax2 = plt.subplot(222) x = stat...
gpl-2.0
-1,036,773,950,203,792,900
25.214286
75
0.704814
false
joebowen/movement_validation_cloud
djangodev/lib/python2.7/site-packages/boto/beanstalk/__init__.py
145
1680
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
-4,939,778,460,407,346,000
37.181818
74
0.733333
false
danieluct/ntv2generator
ntv2generator/ntv2writer.py
1
15705
""" This file is part of ntv2generator. ntv2generator 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. ntv2generato...
gpl-2.0
-3,519,281,597,956,345,000
40.768617
94
0.492709
false
sunlightlabs/django-meetup
meetup/models.py
1
3123
from django.conf import settings from django.db import models from meetup.api import MeetupClient import datetime STATUSES = [(s, s) for s in ('past','pending','upcoming')] API_KEY = getattr(settings, 'MEETUP_KEY', None) class Account(models.Model): key = models.CharField(max_length=128) description = models....
bsd-3-clause
-4,450,050,897,407,959,600
33.711111
74
0.642011
false
Creworker/FreeCAD
src/Mod/Path/PathScripts/PathSelection.py
15
8856
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2015 Dan Falck <ddfalck@gmail.com> * #* ...
lgpl-2.1
-3,113,815,746,999,385,600
38.185841
121
0.541215
false
Huskerboy/startbootstrap-freelancer
freelancer_env/Lib/site-packages/pip/utils/__init__.py
323
27187
from __future__ import absolute_import from collections import deque import contextlib import errno import io import locale # we have a submodule named 'logging' which would shadow this if we used the # regular name: import logging as std_logging import re import os import posixpath import shutil import stat import su...
mit
-3,087,673,230,438,494,000
30.909624
79
0.586788
false
djhenderson/ctypesgen
test/testsuite.py
12
9617
#!/usr/bin/env python # -*- coding: ascii -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # """Simple test suite using unittest. By clach04 (Chris Clark). Calling: python test/testsuite.py or cd test ./testsuite.py Could use any unitest compatible test runner (nose, etc.) Aims to test for regres...
bsd-3-clause
-790,871,012,187,811,000
28.5
114
0.595092
false
lnielsen/zenodo
zenodo/factory.py
2
4550
# -*- coding: utf-8 -*- # # This file is part of Zenodo. # Copyright (C) 2015 CERN. # # Zenodo 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 v...
gpl-2.0
-4,008,428,632,355,924,000
32.455882
78
0.707473
false
dproc/trex_odp_porting_integration
scripts/automation/trex_control_plane/client_utils/general_utils.py
2
2206
#!/router/bin/python import sys import site import string import random import os try: import pwd except ImportError: import getpass pwd = None using_python_3 = True if sys.version_info.major == 3 else False def user_input(): if using_python_3: return input() else: # using pytho...
apache-2.0
-1,639,415,128,092,664,000
21.979167
97
0.616047
false
david-ragazzi/nupic
tests/integration/nupic/opf/opf_checkpoint_test/experiments/temporal_multi_step/a/description.py
42
1569
# ---------------------------------------------------------------------- # Copyright (C) 2011 Numenta Inc. All rights reserved. # # The information and source code contained herein is the # exclusive property of Numenta Inc. No part of this software # may be used, reproduced, stored or distributed in any form, # ...
gpl-3.0
-8,460,187,602,168,246,000
48.03125
411
0.573614
false
yfried/ansible
lib/ansible/modules/cloud/vmware/vcenter_license.py
27
5353
#!/usr/bin/python # Copyright: (c) 2017, Dag Wieers (@dagwieers) <dag@wieers.com> # 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': '1.1', ...
gpl-3.0
8,008,593,862,721,674,000
27.77957
106
0.624323
false
y-asano/primecloud-controller
iaas-gw/src/iaasgw/controller/cloudStack/cloudStackInstanceController.py
5
14487
# coding: UTF-8 # # Copyright 2014 by SCSK Corporation. # # This file is part of PrimeCloud Controller(TM). # # PrimeCloud Controller(TM) 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 versi...
gpl-2.0
-8,598,702,698,478,667,000
36.459834
162
0.608667
false
rasa/scoops
makeindex.py
1
13169
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @todo add docstring """ # ### imports ### from __future__ import ( absolute_import, division, print_function # , # unicode_literals ) import fnmatch import io import json import re import os # import pprint import subprocess import sys OSIS = [ ...
mit
-3,599,315,138,253,931,500
20.206119
104
0.4787
false
deepakbane28/nixysa
nixysa/pod_binding.py
9
31775
#!/usr/bin/python2.4 # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
8,047,745,173,312,595,000
35.607143
81
0.652746
false
kittiu/odoo
addons/mrp/wizard/mrp_price.py
381
2132
# -*- 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
-658,135,798,220,431,000
37.071429
182
0.588649
false
tjgillies/distributed-draw
entangled/kademlia/kbucket.py
2
4999
#!/usr/bin/env python # # This library is free software, distributed under the terms of # the GNU Lesser General Public License Version 3, or any later version. # See the COPYING file included in this archive # # The docstrings in this module contain epytext markup; API documentation # may be created by processing this...
lgpl-3.0
8,384,391,428,333,225,000
36.30597
115
0.585317
false
mogoweb/chromium-crosswalk
native_client_sdk/src/tools/httpd.py
41
10125
#!/usr/bin/env python # Copyright (c) 2012 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. import BaseHTTPServer import imp import logging import multiprocessing import optparse import os import SimpleHTTPServer # pylint:...
bsd-3-clause
5,751,467,446,014,391,000
31.76699
80
0.664198
false
TeamExodus/external_chromium_org
tools/telemetry/telemetry/util/path.py
45
1284
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os from telemetry.core import util # TODO(dtu): Move these functions from core.util to here. GetBaseDir = util.GetBaseDir GetTelemetryDir = util.Ge...
bsd-3-clause
8,411,957,422,125,236,000
28.860465
78
0.737539
false
kzampog/sisyphus
docs/conf.py
2
4917
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
mit
-7,410,876,533,731,000,000
29.7375
79
0.644905
false
ikoula/cloudstack
plugins/hypervisors/ovm/scripts/vm/hypervisor/ovm/OvmVmModule.py
8
22802
# 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...
gpl-2.0
-7,053,745,002,862,057,000
41.149723
163
0.540917
false
tayebzaidi/PPLL_Spr_16
finalPractica/2_2_ciclos_mejor.py
1
4345
from mrjob.job import MRJob from mrjob.step import MRStep import string import sys class MRGrados(MRJob): SORT_VALUES = True def mapper(self, _, line): line_stripped = line.translate(string.maketrans("",""), '"') line_split = line_stripped.split(',') #split by the comma sorted...
gpl-3.0
-3,768,544,177,289,435,000
32.689922
94
0.509551
false
rbdavid/DNA_stacking_analysis
angles_binary.py
1
9052
#!/Library/Frameworks/Python.framework/Versions/2.7/bin/python # USAGE: # PREAMBLE: import numpy as np import MDAnalysis import sys import os import matplotlib.pyplot as plt traj_file ='%s' %(sys.argv[1]) # ---------------------------------------- # VARIABLE DECLARATION base1 = 1 nbases = 15 #nbases = 3 #Nsteps ...
mit
704,029,633,018,578,400
30.761404
188
0.619532
false
TribeMedia/sky_engine
testing/scripts/get_compile_targets.py
76
1285
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import argparse import json import os import sys import common def main(argv): parser = argparse.ArgumentParser() parser.add_arg...
bsd-3-clause
5,233,897,076,529,113,000
22.363636
72
0.629572
false
JeffAMcGee/friendloc
friendloc/explore/sprawl.py
1
13724
#!/usr/bin/env python import numpy import random import logging import itertools import collections from friendloc.base import gob from friendloc.base.models import Edges, User, Tweets from friendloc.base import gisgraphy, twitter, utils NEBR_KEYS = ['rfriends','just_followers','just_friends','just_mentioned'] @go...
bsd-2-clause
-7,170,094,799,280,597,000
30.477064
83
0.616293
false
runiq/modeling-clustering
find-correct-cluster-number/plot_clustering_metrics.py
1
10092
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Performs a clustering run with a number of clusters and a given mask, and creates graphs of the corresponding DBI, pSF, SSR/SST, and RMSD values. These faciliate the choice of cluster numbers and improve the clustering process by allowing to pick the number of cluste...
bsd-2-clause
-8,508,664,488,436,508,000
39.850202
97
0.623389
false
trishnaguha/ansible
lib/ansible/modules/cloud/openstack/os_ironic_node.py
41
12663
#!/usr/bin/python # coding: utf-8 -*- # (c) 2015, Hewlett-Packard Development Company, L.P. # 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': '1.1'...
gpl-3.0
967,439,140,081,208,700
35.598266
125
0.577667
false
PaulEnglert/ML
deep_architectures/deep_belief_network.py
1
2528
# -*- coding: utf-8 -*- from neural_networks.boltzmann_machines.generative_rbm import GenRBM from neural_networks.perceptrons.mlp import MLP from utilities.data_utils import make_batches class DBN(): ''' Deep belief network aka stacked boltzmann machines''' def __init__(self, layer_definitions): se...
bsd-2-clause
7,862,436,048,049,449,000
37.30303
78
0.566456
false
ApolloAuto/apollo
modules/tools/mobileye_viewer/planning_data.py
3
2223
#!/usr/bin/env python3 ############################################################################### # Copyright 2017 The Apollo 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...
apache-2.0
8,863,216,880,750,548,000
31.217391
79
0.566352
false
suncycheng/intellij-community
python/lib/Lib/site-packages/django/contrib/admin/widgets.py
73
11754
""" Form Widget classes specific to the Django admin site. """ import django.utils.copycompat as copy from django import forms from django.forms.widgets import RadioFieldRenderer from django.forms.util import flatatt from django.utils.html import escape from django.utils.text import truncate_words from django.utils.t...
apache-2.0
-1,535,620,658,020,655,000
39.954704
157
0.618428
false
raywill/crawl_smth
rent_crawl.py
1
3770
#!/usr/bin/python # coding:utf-8 from bs4 import BeautifulSoup import re import os import sys import urllib import time import random import time #################### 配置开始################# # 版面配置 # 支持爬多个版面,取消下面的注释即可 # 二手房 # board = 'OurHouse' # 二手市场主版 # board = 'SecondMarket' # 租房 boards = ['OurEstate', 'PolicyEst...
mit
-2,995,266,385,997,871,000
22.842857
239
0.62133
false
cobalys/django
django/contrib/localflavor/es/es_provinces.py
110
1482
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ PROVINCE_CHOICES = ( ('01', _('Araba')), ('02', _('Albacete')), ('03', _('Alacant')), ('04', _('Almeria')), ('05', _('Avila')), ('06', _('Badajoz')), ('07', _('Illes Balears')), ('08', _('Barcelona')), (...
bsd-3-clause
-9,222,741,432,160,857,000
24.551724
55
0.375169
false
openaire/iis
iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/dateutil/easter.py
291
2633
""" Copyright (c) 2003-2007 Gustavo Niemeyer <gustavo@niemeyer.net> This module offers extensions to the standard python 2.3+ datetime module. """ __author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>" __license__ = "PSF License" import datetime __all__ = ["easter", "EASTER_JULIAN", "EASTER_ORTHODOX", "EASTER_WESTE...
apache-2.0
3,271,246,482,586,912,300
27.619565
76
0.600836
false
svn2github/vbox
src/VBox/HostServices/SharedOpenGL/crserverlib/server_dispatch.py
12
4596
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. import sys, string, re import apiutil apiutil.CopyrightC() print """ /* DO NOT EDIT - THIS FILE AUTOMATICALLY GENERATED BY server_dispatch.py SCRIPT */ #include "cr_spu.h"...
gpl-2.0
-7,610,757,505,432,118,000
32.794118
125
0.577241
false
geoffkilpin/pombola
pombola/feedback/forms.py
4
1293
import time import datetime from django import forms from django.forms.util import ErrorDict from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.utils.crypto import salted_hmac, constant_time_compare from django.utils.encoding import force_unicode from django.utils.t...
agpl-3.0
-3,014,483,108,086,517,000
27.733333
79
0.672854
false
heplesser/nest-simulator
pynest/nest/tests/test_connect_arrays.py
12
13340
# -*- coding: utf-8 -*- # # test_connect_arrays.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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
1,055,305,746,826,928,100
37.223496
113
0.60075
false
malkavi/lutris
lutris/runners/o2em.py
1
3325
# -*- coding: utf-8 -*- import os from lutris import settings from lutris.runners.runner import Runner class o2em(Runner): """Magnavox Oyssey² Emulator""" human_name = "O2EM" package = "o2em" executable = "o2em" platform = "Magnavox Odyssey 2, Phillips Videopac+" tarballs = { 'i386': ...
gpl-3.0
-75,744,864,725,442,660
30.065421
75
0.521961
false
mbodenhamer/syn
syn/type/a/tests/test_type.py
1
9511
import six from syn.five import xrange from nose.tools import assert_raises from syn.type.a import (Type, ValuesType, MultiType, TypeType, AnyType, TypeExtension, Set, Schema) from syn.base_utils import is_hashable, feq from syn.base_utils import ngzwarn, on_error, elog from syn.globals import ...
mit
461,501,653,899,558,140
26.568116
80
0.561981
false
dermoth/gramps
data/man/pt_BR/conf.py
12
7714
# -*- coding: utf-8 -*- # # Gramps documentation build configuration file, created by # sphinx-quickstart on Sat Dec 1 14:38:29 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
gpl-2.0
6,465,518,265,717,107,000
30.744856
80
0.701582
false
belmiromoreira/nova
nova/image/download/__init__.py
61
1636
# Copyright 2013 Red Hat, 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...
apache-2.0
-3,804,272,018,555,422,000
33.083333
78
0.645477
false
benthomasson/cumulus-linux-ansible-modules
tests/test_cl_license.py
6
2493
import mock from mock import MagicMock from nose.tools import set_trace from library import cl_license from asserts import assert_equals from datetime import date, datetime def mod_args_generator(values, *args): def mod_args(args): return values[args] return mod_args @mock.patch('library.cl_license.A...
gpl-3.0
-7,002,144,874,640,396,000
35.661765
79
0.708383
false
popazerty/gui-test
lib/python/Components/Renderer/DMCHDMaxTemp.py
11
2083
# -*- coding: utf-8 -*- # # Maximum Temperature Renderer for Dreambox/Enigma-2 # Coded by Vali (c)2010 # Support: www.dreambox-tools.info # # # This plugin is licensed under the Creative Commons # Attribution-NonCommercial-ShareAlike 3.0 Unported License. # To view a copy of this license, visit http://crea...
gpl-2.0
-1,574,369,708,248,655,000
28.757143
140
0.675948
false
openstack/sqlalchemy-migrate
migrate/changeset/constraint.py
140
7318
""" This module defines standalone schema constraint classes. """ from sqlalchemy import schema from migrate.exceptions import * class ConstraintChangeset(object): """Base class for Constraint classes.""" def _normalize_columns(self, cols, table_name=False): """Given: column objects or names; retu...
mit
784,172,165,800,105,000
35.773869
80
0.618202
false
benoitsteiner/tensorflow-opencl
tensorflow/contrib/learn/python/learn/utils/export.py
48
13721
# 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,981,926,323,205,534,000
37.759887
82
0.674732
false
caseyrollins/osf.io
addons/base/generic_views.py
9
4519
"""Generic add-on view factories""" # -*- coding: utf-8 -*- import httplib as http from flask import request from framework.exceptions import HTTPError, PermissionsError from framework.auth.decorators import must_be_logged_in from osf.models import ExternalAccount from osf.utils import permissions from website.proj...
apache-2.0
-6,626,591,843,576,257,000
36.347107
100
0.634211
false
nemesisdesign/django
django/contrib/sessions/backends/base.py
27
12374
from __future__ import unicode_literals import base64 import logging import string from datetime import datetime, timedelta from django.conf import settings from django.contrib.sessions.exceptions import SuspiciousSession from django.core.exceptions import SuspiciousOperation from django.utils import timezone from dj...
bsd-3-clause
8,310,941,662,121,159,000
32.808743
94
0.61306
false
SebasSBM/django
django/template/smartif.py
275
6643
""" Parser and utilities for the smart 'if' tag """ import warnings from django.utils.deprecation import RemovedInDjango110Warning # Using a simple top down parser, as described here: # http://effbot.org/zone/simple-top-down-parsing.htm. # 'led' = left denotation # 'nud' = null denotation # 'bp' = binding power (...
bsd-3-clause
5,249,933,136,682,386,000
29.897674
103
0.578052
false
Benoss/elastic_admin
elastic_utils/utils.py
1
1080
import time def singleton(cls): instances = {} def getinstance(): if cls not in instances: instances[cls] = cls() return instances[cls] return getinstance class Timer(object): def __init__(self, name='elapsed time', logger=None, print_result=False): self.verbose =...
mit
-3,953,802,851,662,279,700
24.714286
77
0.57963
false
quantum13/hgh
hgh/urls.py
1
1675
# coding: utf-8 from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'hgh.views.home', name='home'), # url(r'^hgh/', include('hgh.foo.u...
gpl-2.0
-332,445,657,382,245,000
38.853659
101
0.614925
false
SophieBartmann/Faust-Bot
FaustBot/Modules/CustomUserModules/ICDObserver.py
1
1273
import csv import re from FaustBot.Communication.Connection import Connection from FaustBot.Modules.PrivMsgObserverPrototype import PrivMsgObserverPrototype class ICDObserver(PrivMsgObserverPrototype): @staticmethod def cmd(): return None @staticmethod def help(): return None de...
gpl-3.0
80,123,927,861,853,950
29.309524
78
0.527101
false
F1000Research/khmer
sandbox/count-kmers-single.py
1
3273
#! /usr/bin/env python2 # # This file is part of khmer, http://github.com/ged-lab/khmer/, and is # Copyright (C) University of California, Davis, 2015. It is licensed under # the three-clause BSD license; see doc/LICENSE.txt. # Contact: khmer-project@idyll.org # # pylint: disable=missing-docstring,invalid-name """ Prod...
bsd-3-clause
-2,723,526,189,707,450,000
30.776699
77
0.617782
false
Ken69267/config-stuff
.vim/eclim/autoload/eclim/python/rope/refactor/occurrences.py
91
10704
import re import rope.base.pynames from rope.base import pynames, pyobjects, codeanalyze, evaluate, exceptions, utils, worder class Finder(object): """For finding occurrences of a name The constructor takes a `filters` argument. It should be a list of functions that take a single argument. For each po...
mit
8,509,640,756,635,954,000
31.047904
93
0.60426
false
Pexego/odoo
addons/hw_scanner/controllers/main.py
51
7441
# -*- coding: utf-8 -*- import logging import os import time from os import listdir from os.path import join from threading import Thread, Lock from select import select from Queue import Queue, Empty import openerp import openerp.addons.hw_proxy.controllers.main as hw_proxy from openerp import http from openerp.http ...
agpl-3.0
9,023,831,003,358,163,000
33.449074
121
0.436097
false
Hodorable/0602
openstack_dashboard/dashboards/project/databases/tables.py
30
13199
# Copyright 2012 Nebula, 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
5,125,708,908,031,542,000
31.192683
78
0.587014
false
louyihua/edx-platform
lms/djangoapps/branding/models.py
63
1687
""" Model used by Video module for Branding configuration. Includes: BrandingInfoConfig: A ConfigurationModel for managing how Video Module will use Branding. """ import json from django.db.models import TextField from django.core.exceptions import ValidationError from config_models.models import Configura...
agpl-3.0
-5,193,001,282,957,235,000
26.655738
81
0.631298
false
MRigal/django
tests/queryset_pickle/tests.py
209
6081
from __future__ import unicode_literals import datetime import pickle import unittest import warnings from django.test import TestCase from django.utils import six from django.utils.encoding import force_text from django.utils.version import get_version from .models import Container, Event, Group, Happening, M2MMode...
bsd-3-clause
8,018,006,163,063,547,000
37.487342
103
0.6494
false
marcusramberg/dotfiles
bin/.venv-ansible-venv/lib/python2.6/site-packages/ansible/modules/extras/system/at.py
28
6404
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014, Richard Isaacson <richard.c.isaacson@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 versi...
mit
-1,881,615,504,702,092,300
31.02
113
0.623204
false
gorakhargosh/mom
mom/os/path.py
1
5970
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com> # Copyright 2012 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 ...
apache-2.0
-7,895,896,464,503,193,000
28.264706
80
0.673199
false
UnicornButter/external_chromium
chrome/common/extensions/docs/server/chromeextensionsdocs.py
64
15204
#!/usr/bin/python # Copyright (c) 2010 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. import cgi import logging import re import os from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run...
bsd-3-clause
204,547,551,515,499,780
53.3
197
0.680084
false
dhuppenkothen/stingray
stingray/conftest.py
31
1240
# this contains imports plugins that configure py.test for astropy tests. # by importing them here in conftest.py they are discoverable by py.test # no matter how it is invoked within the source tree. from astropy.tests.pytest_plugins import * ## Uncomment the following line to treat all DeprecationWarnings as ## exc...
mit
3,487,190,192,756,946,000
35.470588
73
0.734677
false
dongjoon-hyun/DIGITS
digits/scheduler.py
3
19330
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import from collections import OrderedDict import os import re import shutil import signal import time import traceback import flask import gevent import gevent.event import gevent.queue from . import utils from .con...
bsd-3-clause
-5,483,175,396,097,687,000
35.749049
145
0.482825
false
dreadsci/forget-me-not
test_structures.py
2
13775
import unittest from datasets import * class TestSimplest(Structure): _fields = [Parsable('base', required=True, positional=True, keyword=False), Parsable('myParam', required=True, positional=False, keyword=True)] def test_simplest(): t = TestSimplest(base='a', myParam='b') assert t.get_di...
unlicense
5,840,510,150,390,994,000
34.596899
107
0.582287
false
40223143/2015_0505
static/Brython3.1.1-20150328-091302/Lib/ui/slider.py
603
2394
from . import widget from browser import doc,html class Slider(widget.Widget): def __init__(self, id=None, label=False): self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all") widget.Widget.__init__(self, self._div_shell, 'slider', id) self._h...
agpl-3.0
4,770,960,762,299,990,000
30.92
112
0.59858
false
reversefold/mysql-connector-python
lib/mysql/connector/catch23.py
26
3574
# MySQL Connector/Python - MySQL driver written in Python. # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. # MySQL Connector/Python is licensed under the terms of the GPLv2 # <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most # MySQL Connectors. There are special exceptions to ...
gpl-2.0
5,147,846,902,702,296,000
30.350877
79
0.671237
false
Shekharrajak/password-alert
server/admin.py
5
3396
# 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 ...
apache-2.0
-179,779,346,076,768,960
31.037736
80
0.709658
false
samthetechie/pyFolia
venv/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/bdist_rpm.py
470
2025
# This is just a kludge so that bdist_rpm doesn't guess wrong about the # distribution name and version, if the egg_info command is going to alter # them, another kludge to allow you to build old-style non-egg RPMs, and # finally, a kludge to track .rpm files for uploading when run on Python <2.5. from distutils.comma...
gpl-3.0
-2,203,616,605,688,565,200
23.695122
79
0.561481
false
fengjiang96/tushare
tushare/stock/cons.py
10
8788
# -*- coding:utf-8 -*- """ Created on 2014/07/31 @author: Jimmy Liu @group : waditu @contact: jimmysoa@sina.cn """ VERSION = '0.3.6' K_LABELS = ['D', 'W', 'M'] K_MIN_LABELS = ['5', '15', '30', '60'] K_TYPE = {'D': 'akdaily', 'W': 'akweekly', 'M': 'akmonthly'} INDEX_LABELS = ['sh', 'sz', 'hs300', 'sz50', 'c...
bsd-3-clause
5,674,159,537,183,000,000
57.819444
258
0.58941
false
f3r/scikit-learn
benchmarks/bench_plot_randomized_svd.py
38
17557
""" Benchmarks on the power iterations phase in randomized SVD. We test on various synthetic and real datasets the effect of increasing the number of power iterations in terms of quality of approximation and running time. A number greater than 0 should help with noisy matrices, which are characterized by a slow spectr...
bsd-3-clause
-7,443,027,630,697,702,000
37.586813
79
0.586319
false
Serag8/Bachelor
google_appengine/google/appengine/ext/ndb/django_middleware.py
20
2158
#!/usr/bin/env python # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwar...
mit
-5,888,150,266,021,499,000
32.2
74
0.722428
false
achang97/YouTunes
lib/python2.7/site-packages/youtube_dl/extractor/ard.py
8
12072
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from .generic import GenericIE from ..utils import ( determine_ext, ExtractorError, qualities, int_or_none, parse_duration, unified_strdate, xpath_text, update_url_query, ) from ..compat...
mit
9,169,110,217,642,017,000
38.302932
160
0.490966
false