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
tewk/parrot-select
examples/mops/mops.py
9
2525
""" # Copyright (C) 2001-2003, Parrot Foundation. =head1 NAME examples/mops/mops.c - Calculate M ops/s =head1 SYNOPSIS % python examples/mops/mops.py =head1 DESCRIPTION A Python implementation of the F<examples/mops/mops.pasm> example program, for speed comparisons. Calculates a value for M ops/s (million op...
artistic-2.0
443,661,630,502,173,440
24.765306
68
0.404356
false
googleapis/python-video-transcoder
google/cloud/video/transcoder_v1beta1/services/transcoder_service/async_client.py
1
32688
# -*- 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
-2,859,815,335,272,846,300
40.429658
146
0.617199
false
valentin-krasontovitsch/ansible
lib/ansible/errors/__init__.py
37
12694
# (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
3,019,381,786,434,937,000
39.685897
151
0.594375
false
gauravbose/digital-menu
build/lib.linux-x86_64-2.7/django/contrib/gis/geos/coordseq.py
83
5462
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import byref, c_double, c_uint from django.contrib.gis.geos import prototypes as capi from django.contrib.gis.geos.base import...
bsd-3-clause
-2,113,521,774,114,134,300
32.509202
97
0.606188
false
troismph/matasano-challenges
src/challenge52.py
1
3268
import sys from md_hash import find_collision, make_combines, HARD_BLOCK_LEN_BYTES, hash_easy, hash_hard EASY_KEY = bytearray(b'\x9es') HARD_KEY = bytearray(b'\xbc\x78\x2f\xa2') def collisions_for_debug(): return [['4Ku0N1Q7V2', 'XO'], ['5uo9TBlOdEff', 'Oh6jCq'], ['AHJ2s4', 'NXuj5lEkBds...
gpl-3.0
-6,170,543,486,832,880,000
31.039216
93
0.546818
false
pravisankar/origin
vendor/github.com/google/certificate-transparency/python/ct/cert_analysis/ip_addresses.py
24
2399
from ct.crypto import cert from observation import Observation class IpAddressObservation(Observation): def __init__(self, description, *args, **kwargs): super(IpAddressObservation, self).__init__( "IPAddres: " + description, *args, **kwargs) class IPv6(IpAddressObservation): def __in...
apache-2.0
-3,347,809,391,771,122,000
31.863014
72
0.543143
false
Debian/firewoes
firewoes/bin/generate_fake_base.py
1
3324
# Copyright (C) 2013 Matthieu Caneill <matthieu.caneill@gmail.com> # # This file is part of Firewoes. # # Firewoes is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, either version 3 of the License, or (a...
agpl-3.0
3,977,611,899,732,231,000
36.348315
80
0.574007
false
jaheba/flask-rst
flaskrst/cli.py
1
1500
# -*- coding: utf-8 -*- """ flask-rst.cli ~~~~~~~~~~~~~ :copyright: (c) 2011 by Christoph Heer. :license: BSD, see LICENSE for more details. """ import os import yaml from flaskext.script import Manager from flaskrst import app from flaskrst.modules import load_modules def load_yaml_config(app): ...
bsd-3-clause
-1,624,129,637,892,226,800
28.431373
78
0.624
false
manastech/de-bee
gdata/youtube/service.py
8
58042
#!/usr/bin/python # # Copyright (C) 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 ...
mit
5,541,142,627,877,509,000
36.134997
94
0.671462
false
google-code/android-scripting
python/src/Tools/scripts/fixcid.py
53
9985
#! /usr/bin/env python # Perform massive identifier substitution on C source files. # This actually tokenizes the files (to some extent) so it can # avoid making substitutions inside strings or comments. # Inside strings, substitutions are never made; inside comments, # it is a user option (off by default). # # The su...
apache-2.0
-2,797,010,714,827,300,000
30.799363
88
0.550826
false
voc/voctomix
voctogui/lib/queues.py
1
2030
#!/usr/bin/env python3 import logging import os import json from gi.repository import Gtk, Gst, GLib from lib.config import Config from lib.uibuilder import UiBuilder import lib.connection as Connection # time interval to re-fetch queue timings TIMER_RESOLUTION = 1.0 class QueuesWindowController(): def __init__...
mit
-2,762,310,754,222,357,500
32.833333
85
0.630049
false
boredzo/hashvis
hashvis.py
1
12085
#!/usr/bin/python # -*- coding: utf-8 -*- """hashvis by Peter Hosey Reads from standard input or files, and prints what it reads, along with colorized versions of any hashes or signatures found in each line. The goal here is visual comparability. You should be able to tell whether two hashes are the same at a glance...
bsd-3-clause
-2,467,170,053,600,306,700
45.264368
319
0.707246
false
cdmbi/FPD
source/fpdapp.py
2
11114
#!/usr/bin/env python '''Description''' import sys import os import logging logging.basicConfig(level=logging.DEBUG) import pandas as pd import numpy as np from collections import OrderedDict from bokeh.plotting import figure, curdoc from bokeh.models import Plot, ColumnDataSource, Range1d, HoverTool from bokeh.prop...
bsd-3-clause
2,718,132,477,887,672,300
33.949686
78
0.542469
false
shubhamdhama/zulip
zerver/tests/test_hotspots.py
3
2797
import ujson from zerver.lib.actions import do_create_user, do_mark_hotspot_as_read from zerver.lib.hotspots import ALL_HOTSPOTS, get_next_hotspots from zerver.lib.test_classes import ZulipTestCase from zerver.models import UserHotspot, UserProfile, get_realm # Splitting this out, since I imagine this will eventuall...
apache-2.0
-7,276,871,988,053,455,000
45.616667
85
0.641402
false
flavio-casacurta/SQLCOB
Sql.py
1
8303
from HOFs import * dicval = {'CHAR' : "' '" ,'DATE' : "'01.01.0001'" ,'DECIMAL' : '0' ,'SMALLINT' : '0' ,'INTEGER' : '0' ,'TIME' : "'00:00:00'" ,'TIMESTAMP': "'0001-01-01-01.01.01.000001'" ,'VARCHAR' : "' '"} dicpte = {'INCLUDE' : '.' ...
mit
1,407,651,594,129,955,300
29.413919
112
0.421534
false
ftrader-bitcoinabc/bitcoin-abc
test/functional/interface_zmq.py
1
4164
#!/usr/bin/env python3 # Copyright (c) 2015-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the ZMQ notification interface.""" import struct from io import BytesIO from test_framework.test_...
mit
-1,796,557,537,182,483,700
32.580645
80
0.60951
false
keedio/hue
desktop/core/ext-py/guppy-0.1.10/guppy/etc/RE_Rect.py
37
8672
#._cv_part guppy.etc.RE_Rect """ Support functions for RE simplification. This module is intended for use by the RE module. It is in a separate module to keep RE itself cleaner since the algorithm, 'rectangle selection', is a quite separate part that depends on some tricky heuristics. The primary entry function is ch...
apache-2.0
-6,044,861,337,614,040,000
18.664399
85
0.584756
false
caseresearch/code-review
code-review/2015--2016/multinest_demo.py
1
4355
import json import math import os import random import getdist import getdist.plots import matplotlib.pyplot as pyplot import numpy import pymultinest # # Model parameter information # params_min = [ 0, 0, 50, 0 ] params_max = [ 1000, 1000, 1000, 1000 ] params_count = len(params...
mit
1,410,340,135,060,498,700
23.885714
89
0.53938
false
SnoringFrog/MechanicalPoet
Mechanical_Poet.py
1
10696
# MechanicalPoet, a program which generates poetry in varying meters based on a source text. # Copyright (C) 2014 Catherine Moresco # 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...
gpl-2.0
1,120,945,096,558,884,200
35.882759
230
0.625093
false
luc-demeyer/account-financial-tools
account_credit_control/policy.py
24
17319
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi, Guewen Baconnier # Copyright 2012-2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publi...
agpl-3.0
4,907,024,130,938,088,000
41.657635
79
0.564813
false
hetajen/vnpy161
vn.api/vn.qdp/pyscript/generate_struct.py
15
1411
# encoding: UTF-8 __author__ = 'CHENXY' from qdp_data_type import * def main(): """主函数""" fcpp = open('QdpFtdcUserApiStruct.h', 'r') fpy = open('qdp_struct.py', 'w') fpy.write('# encoding: UTF-8\n') fpy.write('\n') fpy.write('structDict = {}\n') fpy.write('\n') for no, line in enume...
mit
-5,807,837,844,942,263,000
22.385965
67
0.434359
false
chrisidefix/devide
modules/filters/ShepardMethod.py
7
2233
from module_base import ModuleBase from module_mixins import ScriptedConfigModuleMixin import module_utils import vtk class ShephardMethod(ScriptedConfigModuleMixin, ModuleBase): """Apply Shepard Method to input. """ def __init__(self, module_manager): # initialise our base class ...
bsd-3-clause
-8,176,617,431,155,808,000
29.589041
73
0.576803
false
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/backend/test/case/node/hardmax.py
2
2435
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class Hardmax(Base): @staticmethod def export(): # type: () -> No...
apache-2.0
7,589,112,520,098,821,000
30.623377
109
0.498563
false
dkushner/zipline
tests/test_blotter.py
18
7036
# # Copyright 2014 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
apache-2.0
3,791,707,410,352,312,000
39.436782
78
0.648806
false
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.2/Lib/pdb.py
5
30179
#! /usr/bin/env python """A Python debugger.""" # (See pdb.doc for documentation.) import sys import linecache import cmd import bdb from repr import repr as _saferepr import os import re __all__ = ["run", "pm", "Pdb", "runeval", "runctx", "runcall", "set_trace", "post_mortem", "help"] def find_function...
mit
1,192,506,677,166,030,800
30.834388
75
0.532655
false
fbradyirl/home-assistant
tests/components/canary/test_init.py
4
2509
"""The tests for the Canary component.""" import unittest from unittest.mock import patch, MagicMock, PropertyMock import homeassistant.components.canary as canary from homeassistant import setup from tests.common import get_test_home_assistant def mock_device(device_id, name, is_online=True, device_type_name=None):...
apache-2.0
8,132,074,245,326,621,000
34.338028
75
0.680749
false
cafecivet/django_girls_tutorial
Lib/site-packages/django/views/defaults.py
52
3239
import warnings from django import http from django.template import (Context, RequestContext, loader, Template, TemplateDoesNotExist) from django.utils.deprecation import RemovedInDjango18Warning from django.views.decorators.csrf import requires_csrf_token # This can be called when CsrfV...
gpl-2.0
-7,610,438,820,661,889,000
34.206522
100
0.692498
false
MontpellierRessourcesImagerie/openmicroscopy
components/tools/OmeroPy/test/integration/gatewaytest/test_permissions.py
7
2505
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017 University of Dundee & Open Microscopy Environment. # All rights reserved. # # 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; e...
gpl-2.0
-7,181,973,210,011,236,000
38.140625
77
0.678244
false
MXWXZ/DuiMini
thirdpart/googletest/googletest/test/googletest-json-output-unittest.py
27
21170
#!/usr/bin/env python # Copyright 2018, 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 o...
mit
879,472,954,465,873,700
33.255663
80
0.47487
false
vz-risk/Verum
plugins/cymru.py
1
10134
# TODO: Refactor as plugin #!/usr/bin/env python """ AUTHOR: Gabriel Bassett DATE: 12-17-2013 DEPENDENCIES: a list of modules requiring installation Copyright 2014 Gabriel Bassett LICENSE: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distr...
apache-2.0
3,726,669,109,713,659,000
35.453237
163
0.570456
false
mirador/nhanes
mergemeta.py
1
16024
''' Merges the common variables in the supplied metadata files into the corresponding merged metadata. @copyright: Fathom Information Design 2014 ''' import sys, os, csv, math, codecs import xml.etree.ElementTree as ET from xml.dom.minidom import parseString def load_components(): ifile = open('components', 'r') ...
gpl-2.0
-38,030,169,153,787,710
36.178654
326
0.544121
false
disqus/nydus-django
src/djnydus/db/base.py
1
1809
""" djnydus.db.base ~~~~~~~~~~~~~~~ :copyright: (c) 2012 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ from __future__ import absolute_import from nydus import conf from nydus.db.backends import BaseConnection from nydus.utils import import_string from django.conf import settings __all__ ...
apache-2.0
-8,097,737,516,962,528,000
28.177419
131
0.594251
false
OpenCode/l10n-italy
__unported__/account_vat_period_end_statement/__openerp__.py
3
2726
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011-2012 Domsense s.r.l. (<http://www.domsense.com>). # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C)...
agpl-3.0
6,016,893,489,639,906,000
43.688525
158
0.660675
false
bnaul/scikit-learn
sklearn/decomposition/_lda.py
1
31619
""" ============================================================= Online Latent Dirichlet Allocation with variational inference ============================================================= This implementation is modified from Matthew D. Hoffman's onlineldavb code Link: https://github.com/blei-lab/onlineldavb """ # ...
bsd-3-clause
-6,508,341,615,732,291,000
36.731504
79
0.573389
false
hlieberman/debian-ansible
lib/ansible/runner/connection_plugins/local.py
16
5051
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
gpl-3.0
4,529,713,912,491,899,400
41.805085
133
0.603841
false
pnasrat/yum-utils
repoclosure.py
4
11699
#!/usr/bin/python -t # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that i...
gpl-2.0
-6,143,655,719,600,932,000
36.860841
192
0.55945
false
slohse/ansible
lib/ansible/modules/packaging/language/gem.py
29
9019
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Johan Wiren <johan.wiren.se@gmail.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
-7,777,578,765,280,521,000
28.667763
111
0.620468
false
a10networks/a10sdk-python
a10sdk/core/system/system_big_buff_pool.py
2
1026
from a10sdk.common.A10BaseClass import A10BaseClass class SystemBigBuffPool(A10BaseClass): """ :param big_buff_pool: {"default": 0, "optional": true, "type": "number", "description": "Configure big I/O buffer pool", "format": "flag"} :param DeviceProxy: The device proxy for REST operations and session...
apache-2.0
2,283,882,188,594,614,800
28.314286
149
0.636452
false
metrospark/bitcoin-bounties.com
apps/common/middleware/profiler.py
2
3757
# Source : https://gun.io/blog/fast-as-fuck-django-part-1-using-a-profiler/ # Orignal version taken from http://www.djangosnippets.org/snippets/186/ # Original author: udfalkso # Modified by: Shwagroo Team and Gun.io import sys import os import re import hotshot, hotshot.stats import tempfile import StringIO from d...
mit
-7,045,322,327,243,324,000
31.95614
98
0.561352
false
crossbario/autobahn-testsuite
autobahntestsuite/autobahntestsuite/case/case6_4_4.py
2
2670
# coding=utf-8 ############################################################################### ## ## Copyright (c) Crossbar.io Technologies GmbH ## ## 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
-5,330,413,701,830,613,000
39.71875
276
0.609363
false
szopu/django
django/contrib/gis/db/models/fields.py
13
12785
from django.db.models.fields import Field from django.db.models.expressions import ExpressionNode from django.utils.translation import ugettext_lazy as _ from django.contrib.gis import forms from django.contrib.gis.db.models.lookups import gis_lookups from django.contrib.gis.db.models.proxy import GeometryProxy from dj...
bsd-3-clause
-4,963,673,674,044,707,000
35.950867
117
0.632147
false
pombredanne/numba
numba/cgutils.py
2
31311
""" Generic helpers for LLVM code generation. """ from __future__ import print_function, division, absolute_import import collections from contextlib import contextmanager import functools import re from llvmlite import ir from llvmlite.llvmpy.core import Constant, Type import llvmlite.llvmpy.core as lc from . impo...
bsd-2-clause
2,760,139,775,085,554,700
30.563508
81
0.600907
false
MechanicalSoup/MechanicalSoup
mechanicalsoup/browser.py
1
14821
import os import tempfile import urllib import weakref import webbrowser import bs4 import bs4.dammit import requests from .__version__ import __title__, __version__ from .form import Form from .utils import LinkNotFoundError class Browser: """Builds a low-level Browser. It is recommended to use :class:`St...
mit
-8,465,671,216,220,290,000
41.58908
116
0.589569
false
rickerc/neutron_audit
neutron/db/l3_agentschedulers_db.py
4
10540
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www....
apache-2.0
-430,603,472,237,784,000
40.992032
78
0.590323
false
gallifrey17/eden
modules/templates/setup/config.py
12
1692
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage def config(settings): """ Template settings for the Setup co-applica...
mit
-3,458,100,897,583,770,000
33.55102
123
0.54669
false
rs2/pandas
pandas/tests/frame/methods/test_isin.py
1
6999
import numpy as np import pytest import pandas as pd from pandas import DataFrame, MultiIndex, Series import pandas._testing as tm class TestDataFrameIsIn: def test_isin(self): # GH#4211 df = DataFrame( { "vals": [1, 2, 3, 4], "ids": ["a", "b", "f", "n"...
bsd-3-clause
-7,448,584,669,468,601,000
32.975728
83
0.471639
false
harikvpy/django-popupcrud
popupcrud/views.py
1
54717
# -*- coding: utf-8 -*- # pylint: disable=too-many-lines """ Popupcrud views """ from collections import OrderedDict import copy from django import forms from django.db import transaction from django.conf import settings from django.conf.urls import include, url from django.core.exceptions import ( FieldDoesNotEx...
bsd-3-clause
-185,203,015,024,173,220
39.085714
155
0.621306
false
tomkralidis/inasafe
safe/impact_functions/volcanic/volcano_point_building/parameter_definitions.py
8
1206
# coding=utf-8 """InaSAFE Disaster risk tool by Australian Aid - Parameter definition for Flood Vector on Building QGIS IF Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by ...
gpl-3.0
4,773,939,338,993,215,000
35.545455
78
0.719735
false
lm2-poly/peridynamics_1D
peripydic/materials/elastic.py
1
11845
# -*- coding: utf-8 -*- #@author: ilyass.tabiai@polymtl.ca #@author: rolland.delorme@polymtl.ca #@author: patrick.diehl@polymtl.ca import numpy as np from scipy import linalg from multiprocessing import Process, Lock import sharedmem from ..util import linalgebra from ..util import functions ## Class to compute the g...
mit
3,581,757,386,847,070,700
44.557692
235
0.543183
false
mjabri/holoviews
holoviews/interface/collector.py
1
22351
""" AttributeTree, Collector and related classes offer optional functionality for holding and collecting DataView objects. """ import uuid import numpy as np import param from ..core import Dimension, ViewableElement, UniformNdMapping,\ GridSpace, AttrTree, Layout, HoloMap from ..core.util import ProgressIndicator ...
bsd-3-clause
9,088,335,813,216,308,000
33.978091
99
0.569057
false
klusark/android_external_chromium_org
chrome/test/functional/chromeos_oobe.py
39
2526
#!/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 os import subprocess import sys import pyauto_functional # Must be imported before pyauto import pyauto sys.path.append(...
bsd-3-clause
-8,459,557,858,797,688,000
33.135135
79
0.693587
false
fgaudin/helpmequit
src/quitter/migrations/0003_auto__add_field_beneficiary_banner.py
1
5793
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Beneficiary.banner' db.add_column(u'quitter_beneficiary',...
agpl-3.0
-8,255,642,594,962,563,000
67.164706
195
0.558778
false
anatol/namcap
Namcap/tests/package/test_infodirectory.py
4
2400
# -*- coding: utf-8 -*- # # namcap tests - infodirectory # Copyright (C) 2011 Rémy Oudompheng <remy@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 th...
gpl-2.0
8,805,665,136,327,257,000
29.75641
88
0.692372
false
brian-rose/climlab
climlab/radiation/cam3/cam3.py
1
10780
''' climlab wrappers for the NCAR CAM3 radiation code Input arguments and diagnostics follow specifications in :class:`~climlab.radiation._Radiation` :Example: Here is a quick example of setting up a single-column Radiative-Convective model with fixed relative humdity:: import climla...
mit
7,210,003,960,777,364,000
43.36214
113
0.606308
false
silentsokolov/django-treasuremap
setup.py
1
2382
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re from os.path import join, dirname from setuptools import setup def get_version(package): init_py = open(os.path.join(package, '__init__.py')).read() return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py).group(1) def get_packages(pac...
mit
1,483,964,124,511,655,200
34.552239
86
0.607893
false
ewdurbin/sentry
src/sentry/utils/samples.py
10
2312
""" sentry.utils.samples ~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2013 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import os.path from sentry.constants import DATA_ROOT, PLATFORM_ROOTS, PLATFORM_TITLES from sentry.event_manager...
bsd-3-clause
1,266,009,601,217,655,000
23.860215
136
0.557093
false
guorendong/iridium-browser-ubuntu
tools/perf/benchmarks/maps.py
7
2429
# Copyright 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. """Runs a Google Maps performance test. Rerforms several common navigation actions on the map (pan, zoom, rotate)""" import os import re from telemetry imp...
bsd-3-clause
470,973,273,236,085,900
31.824324
76
0.708522
false
raymestalez/django-react-blog
backend/core/models.py
1
1208
from django.db import models from django.conf import settings class Settings(models.Model): title = models.CharField(max_length=64, default="", null=True, blank=True,) author = models.CharField(max_length=64, default="", null=True, blank=True,) about = models.TextField(default="", null=True, blank=Tru...
mit
2,066,398,815,457,749,800
35.606061
108
0.637417
false
heytcass/homeassistant-config
deps/paho/mqtt/client.py
10
112087
# Copyright (c) 2012-2014 Roger Light <roger@atchoo.org> # # All rights reserved. This program and the accompanying materials # are made available under the terms of the Eclipse Public License v1.0 # and Eclipse Distribution License v1.0 which accompany this distribution. # # The Eclipse Public License is available at ...
mit
7,813,658,933,046,389,000
37.333447
175
0.5673
false
agustin-prats/edenred-ranking
edenred_ranking/http.py
1
5362
# The MIT License (MIT) # # Copyright (c) 2015 Agustin Prats # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mod...
mit
5,119,888,119,930,768,000
38.718519
112
0.625513
false
hellock/labman
app/db.py
1
1431
from datetime import datetime from flask import g from pymongo import ASCENDING, MongoClient, TEXT from app import CONFIG def init_db(): db = connect_db() # create counter collection and add uid counter db.counters.insert_one({'_id': 'uid', 'next_uid': 1000}) # add an admin account from app.auth...
mit
3,803,801,423,836,033,500
30.108696
66
0.645702
false
kaustubhhiware/coala-bears
tests/csv/CSVLintBearTest.py
24
2799
import unittest from queue import Queue from bears.csv.CSVLintBear import CSVLintBear from coalib.testing.BearTestHelper import generate_skip_decorator from coalib.testing.LocalBearTestHelper import verify_local_bear, execute_bear from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.settings.Section ...
agpl-3.0
4,575,174,417,368,448,000
43.428571
78
0.649518
false
wvdemeer/docker-am
gcf_docker_plugin/testbed.py
2
61260
#---------------------------------------------------------------------- # Copyright (c) 2016 Inria/iMinds by Arthur Garnier # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, including ...
mit
-7,888,554,330,639,252,000
49.711921
311
0.583937
false
andsor/pyfssa
setup.py
1
7973
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup file for pyfssa. This file was generated with PyScaffold 2.2.1, a tool that easily puts up a scaffold for your new Python project. Learn more under: http://pyscaffold.readthedocs.org/ """ import inspect import os import sys from distutils.cmd imp...
isc
-1,152,563,295,592,973,200
31.542857
79
0.598896
false
ulif/pulp
server/pulp/server/webservices/views/consumers.py
1
41833
from django.core.urlresolvers import reverse from django.http import HttpResponseBadRequest from django.views.generic import View from pulp.common import tags from pulp.server.async.tasks import TaskResult from pulp.server.auth import authorization from pulp.server.controllers import consumer as consumer_controller fr...
gpl-2.0
-2,526,078,763,358,737,400
34.511885
99
0.641001
false
youhong316/docker-py
docker/api/service.py
1
18549
from .. import auth, errors, utils from ..types import ServiceMode def _check_api_features(version, task_template, update_config, endpoint_spec, rollback_config): def raise_version_error(param, min_version): raise errors.InvalidVersion( '{} is not supported in API vers...
apache-2.0
2,250,476,638,994,140,200
38.050526
79
0.552968
false
tony-joseph/livre
items/migrations/0001_initial.py
1
8082
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-21 12:22 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations....
bsd-3-clause
-5,554,609,195,007,370,000
56.319149
191
0.594284
false
zzragida/PythonExamples
Twisted/EchoVariants/echoclient.py
19
1086
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.internet.protocol import ClientFactory from twisted.protocols.basic import LineReceiver from twisted.internet import reactor import sys class EchoClient(LineReceiver): end="Bye-bye!" def connectionMade...
mit
2,616,832,743,645,295,000
25.487805
60
0.6814
false
kumar303/olympia
src/olympia/ratings/tests/test_utils_.py
2
2357
# -*- coding: utf-8 -*- from django.test import RequestFactory from unittest import mock import pytest from waffle.testutils import override_switch from olympia.amo.tests import addon_factory, user_factory from olympia.lib.akismet.models import AkismetReport from olympia.ratings.models import Rating from olympia.rati...
bsd-3-clause
7,999,753,365,168,509,000
38.949153
78
0.593551
false
KEHANG/RMG-Py
rmgpy/species.py
2
22316
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2009-2011 by the RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of thi...
mit
3,729,922,137,949,721,600
41.587786
228
0.605619
false
diagonalwalnut/Experience
oauth_provider/decorators.py
4
3746
import oauth2 as oauth from django.utils.translation import ugettext as _ from responses import INVALID_PARAMS_RESPONSE, INVALID_CONSUMER_RESPONSE, COULD_NOT_VERIFY_OAUTH_REQUEST_RESPONSE, INVALID_SCOPE_RESPONSE from utils import send_oauth_error, get_oauth_request, verify_oauth_request from store import store, Inval...
apache-2.0
7,505,111,762,087,350,000
39.728261
137
0.628938
false
ezequielpereira/Time-Line
specs/CategoryTreeFunction.py
2
1650
# 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
-2,328,654,738,372,166,000
38.285714
77
0.686667
false
yasserglez/pytiger2c
packages/pytiger2c/ast/functiondeclarationgroupnode.py
1
3977
# -*- coding: utf-8 -*- """ Clase C{FunctionDeclarationGroupNode} del árbol de sintáxis abstracta. """ from pytiger2c.ast.declarationgroupnode import DeclarationGroupNode class FunctionDeclarationGroupNode(DeclarationGroupNode): """ Clase C{FunctionDeclarationGroupNode} del árbol de sintáxis abstracta. ...
mit
-7,282,861,653,442,596,000
40.463158
83
0.638233
false
ActiveState/code
recipes/Python/580675_Makes_html_javascript_animate_sequence/recipe-580675.py
1
7749
#!/usr/bin/env python from __future__ import print_function '''makes html with javascript to animate a sequence of images''' __author__ = 'Brian Fiedler' # This module can be imported to access the function makeanim. # Or it can be run independently as a script from the command line. # Suppose the command "ls mydir/*...
mit
-1,903,219,126,599,259,400
40.66129
122
0.644083
false
aakashsinha19/Aspectus
Image Classification/models/slim/train_image_classifier.py
4
20545
# 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 applicable ...
apache-2.0
-2,687,077,500,225,219,600
34.119658
80
0.634656
false
Smarsh/django
django/db/backends/postgresql/creation.py
1
3727
from django.db.backends.creation import BaseDatabaseCreation from django.db.backends.util import truncate_name class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated PostgreSQL column # types, as strings. Column-type strings can contain format strings; they'll ...
bsd-3-clause
1,927,641,930,373,364,500
48.039474
146
0.545479
false
rookuu/AdventOfCode-2015
Day 4/Puzzle 2.py
1
1074
#!/usr/bin/env python """ Solution to Day 4 - Puzzle 2 of the Advent Of Code 2015 series of challenges. --- Day 4: The Ideal Stocking Stuffer --- Solution must generate sequences of MD5 Hashes in Hex, using the conjugation of a secret key (given in the puzzle) and a number. The goal is to find the lowest number than...
mit
-6,707,640,052,416,669,000
25.195122
118
0.659218
false
ds-hwang/chromium-crosswalk
third_party/typ/typ/tests/arg_parser_test.py
58
1627
# Copyright 2014 Dirk Pranke. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
bsd-3-clause
3,695,148,361,755,583,500
35.155556
74
0.602336
false
luwei0917/awsemmd_script
chimera.py
1
1066
#!/usr/bin/env python3 import os import sys import random import time from random import seed, randint import argparse import platform from datetime import datetime import imp from myPersonalFunctions import * import glob # Useful codes # os.system("awk '{print $NF}' all_wham.dat > e_total") # tr " " "\n" # sed 1d # so...
mit
-4,413,861,466,126,098,000
24.380952
89
0.685741
false
anneline/Bika-LIMS
bika/lims/controlpanel/bika_labcontacts.py
5
4567
from AccessControl.SecurityInfo import ClassSecurityInfo from Products.ATContentTypes.content import schemata from Products.Archetypes import atapi from Products.Archetypes.ArchetypeTool import registerType from Products.CMFCore import permissions from Products.CMFCore.utils import getToolByName from bika.lims.browser....
agpl-3.0
-8,579,776,847,073,460,000
41.287037
89
0.539085
false
alexissmirnov/donomo
donomo_archive/lib/reportlab/pdfbase/pdfmetrics.py
2
28534
#Copyright ReportLab Europe Ltd. 2000-2004 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/pdfbase/pdfmetrics.py #$Header $ __version__=''' $Id: pdfmetrics.py 3052 2007-03-07 14:04:49Z rgbecker $ ''' __doc__=""" This provides a database of fo...
bsd-3-clause
-1,635,095,850,231,698,200
34.183724
155
0.59932
false
gemrb/gemrb
gemrb/GUIScripts/bg2/Game.py
1
7237
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003-2005 The GemRB Project # # 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 opt...
gpl-2.0
2,914,906,223,145,969,000
34.302439
124
0.726821
false
maxwell-demon/grpc
src/python/grpcio/tests/interop/methods.py
4
12275
# Copyright 2015, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
4,613,391,533,402,137,000
34.997067
78
0.694094
false
hoenirvili/distributions
distributions/distribution.py
1
1881
#!/usr/bin/env python3 import abc __all__ = ['Distribution'] class Distribution(metaclass=abc.ABCMeta): """ In probability theory and statistics, a probability distribution is a mathematical function that, stated in simple terms, can be thought of as providing the probabilities of occurrence of ...
mit
-8,329,148,254,012,557,000
33.833333
91
0.688995
false
poo12138/gem5-stable
src/python/m5/util/region.py
64
9563
# Copyright (c) 2006 Nathan Binkert <nate@binkert.org> # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of condi...
bsd-3-clause
1,130,216,682,134,131,700
33.275986
79
0.561748
false
tscheepers/hred-qs
baselines/main.py
3
3213
#!/usr/bin/python from NGRAM import ngram_builder, ngram_suggest, ngram_rerank from VMM import vmm_builder, vmm_suggest, vmm_rerank from FREQ import freq_builder, freq_suggest from CACB import cacb_builder, cacb_suggest, cacb_rerank from ADJ import adj_builder, adj_suggest, adj_rerank from QF import qf_builder, qf_rer...
bsd-3-clause
3,181,788,655,620,785,700
40.727273
130
0.620604
false
GRArmstrong/invenio-inspire-ops
modules/bibfield/lib/bibfield_regression_tests.py
2
6534
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of t...
gpl-2.0
8,404,397,862,364,703,000
39.08589
128
0.647383
false
shahbazn/neutron
neutron/agent/l2/extensions/manager.py
22
3230
# Copyright (c) 2015 Mellanox Technologies, Ltd # 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 # # U...
apache-2.0
1,355,629,155,262,817,000
37
78
0.611765
false
kieranjol/IFIscripts
mergecsv.py
1
1892
#!/usr/bin/env python3 ''' Just a helper script that collates CSV files within a folder ''' import argparse import os import ififuncs import time def gather_metadata(source): ''' Loops through all subfolders that contain pbcore_csv and then harvests the metadata and store in a single file for the purposes ...
mit
-5,391,472,523,463,767,000
31.637931
101
0.584567
false
davidjb/sqlalchemy
test/orm/test_mapper.py
14
103398
"""General mapper operations with an emphasis on selecting/loading.""" from sqlalchemy.testing import assert_raises, assert_raises_message import sqlalchemy as sa from sqlalchemy import testing from sqlalchemy import MetaData, Integer, String, ForeignKey, func, util from sqlalchemy.testing.schema import Table, Column ...
mit
5,637,173,447,404,282,000
32.300483
85
0.512766
false
SeldonIO/seldon-server
python/seldon/shell/import_items_utils.py
3
7366
import time import datetime import sys import getopt, argparse from collections import defaultdict import json import MySQLdb import unicodecsv import pprint ITEM_MAP_VARCHAR_INSERT = "insert into item_map_varchar (item_id, attr_id, value) values ((select item_id from items where client_item_id = %(id)s),(select attr_...
apache-2.0
-6,201,056,281,746,713,000
35.83
346
0.676487
false
uclouvain/osis_louvain
attribution/tests/business/test_perms.py
1
5364
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
-6,115,036,054,923,122,000
51.067961
117
0.65523
false
anagno/EyeTab
EyeTab_Python/main.py
2
3743
import cv2 import numpy as np import os import socket import gaze_system as gaze_system import device_constants from datetime import datetime host = '192.168.137.195' camera_stream_port = 8080 device_control_port = 9999 # Dummy parameter '?dummy=video.mjpg' is used to trick OpenCV into opening stream # see: http://s...
mit
-5,612,912,012,324,685,000
35.339806
113
0.563185
false
stephanehenry27/Sickbeard-anime
sickbeard/showUpdater.py
6
2437
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
gpl-3.0
-2,561,743,385,138,690,000
35.924242
126
0.679524
false
goldeneye-source/ges-python
lib/test/test_http_cookies.py
39
9388
# Simple test suite for http/cookies.py from test.support import run_unittest, run_doctest, check_warnings import unittest from http import cookies import warnings class CookieTests(unittest.TestCase): def setUp(self): self._warnings_manager = check_warnings() self._warnings_manager.__enter__() ...
gpl-3.0
207,741,219,957,606,300
39.119658
83
0.551768
false
rogegg/iOrg2
datareader/views.py
1
3556
from django.shortcuts import render from django.contrib.auth.models import Permission,User, Group from django.http import HttpResponse from .models import * from django.contrib.auth.decorators import login_required from django.db import models, migrations from django.shortcuts import redirect import gspread import h...
gpl-3.0
-5,303,695,745,559,270,000
28.38843
118
0.655231
false
rubikloud/scikit-learn
sklearn/mixture/gmm.py
6
31222
""" Gaussian Mixture Models. This implementation corresponds to frequentist (non-Bayesian) formulation of Gaussian Mixture Models. """ # Author: Ron Weiss <ronweiss@gmail.com> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Bertrand Thirion <bertrand.thirion@inria.fr> import warnings import numpy as...
bsd-3-clause
-934,808,231,973,274,600
36.844848
85
0.56505
false
vlukes/sfepy
sfepy/base/log_plotter.py
4
7081
""" Plotting class to be used by Log. """ import time import numpy as nm from sfepy.base.base import Output, Struct def draw_data(ax, xdata, ydata, label, plot_kwargs, swap_axes=False): """ Draw log data to a given axes, obeying `swap_axes`. """ def _update_plot_kwargs(lines): plot_kwargs['co...
bsd-3-clause
-5,908,704,051,888,270,000
28.877637
79
0.493716
false
entoo/portage-src
pym/portage/elog/messages.py
16
5177
# elog/messages.py - elog core functions # Copyright 2006-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import portage portage.proxy.lazyimport.lazyimport(globals(), 'portage.output:colorize', 'portage.util:writemsg', ) from portage.const import EBUILD_PHASES from portage...
gpl-2.0
4,602,611,348,375,474,000
26.247368
89
0.685725
false
enormandeau/Scripts
fasta_number_sequences.py
1
1121
#!/usr/bin/env python3 """Change the names of fasta sequences in a file and number them. Usage: %program <input> <output> [<stub> <spaces> <first_num>] Parameters between brackets '[]' are optional: <input> path to input file <output> path to output file <stub> common part of name for all sequence...
gpl-3.0
1,076,755,157,123,668,900
19.759259
75
0.608385
false