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
overtherain/scriptfile
software/googleAppEngine/lib/django_1_4/django/conf/locale/ko/formats.py
313
2016
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y๋…„ n์›” j์ผ' TIME_FORMAT = 'A g:i:s' DATETIME_FORMAT = 'Y๋…„ n์›” j์ผ g:i:s A' YE...
mit
2,451,220,291,385,193,500
38.183673
81
0.494792
false
boundary/plugin-rabbitmq
rabbitmq_monitoring.py
3
5104
#!/usr/bin/env python """ This script extracts metrics from a RabbitMQ instance. The usage of this script is as follows: rabbitmq_monitoring.py """ import json from time import sleep import collections import sys from os.path import basename import urllib2 from base64 import b64encode from string import replace ...
apache-2.0
-656,667,084,273,655,400
35.719424
117
0.666144
false
dimroc/tensorflow-mnist-tutorial
lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py
13
11428
# 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
-1,435,069,848,577,515,500
38.958042
80
0.672734
false
dvliman/jaikuengine
explore/tests.py
30
2261
# Copyright 2009 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 or agreed to in writing, ...
apache-2.0
-7,456,776,371,056,234,000
31.768116
74
0.691729
false
harmy/kbengine
kbe/res/scripts/common/Lib/distutils/command/build_py.py
2
17369
"""distutils.command.build_py Implements the Distutils 'build_py' command.""" import sys, os import sys from glob import glob from distutils.core import Command from distutils.errors import * from distutils.util import convert_path, Mixin2to3 from distutils import log class build_py (Command): d...
lgpl-3.0
-3,697,157,872,223,367,000
40.157767
79
0.559387
false
ericflo/awesomestream
setup.py
1
5909
from setuptools import setup, find_packages version = '0.1' LONG_DESCRIPTION = """ AwesomeStream ============= AwesomeStream is a set of tools for creating a "stream server". That is, a server which can store information about events that happen, and can query back those events in reverse-chronological order, slice...
bsd-3-clause
2,500,645,852,613,568,500
32.01676
116
0.630902
false
adam111316/SickGear
lib/unidecode/x0fc.py
253
3595
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
gpl-3.0
8,332,741,121,207,807,000
12.934109
13
0.285953
false
kjhsdgf/Collin-Neural-Network
Network/dlib-19.7/python_examples/svm_struct.py
10
17274
#!/usr/bin/python # The contents of this file are in the public domain. See LICENSE_FOR_EXAMPLE_PROGRAMS.txt # # This is an example illustrating the use of the structural SVM solver from # the dlib C++ Library. Therefore, this example teaches you the central ideas # needed to setup a structural SVM model for your mach...
gpl-3.0
2,859,830,559,242,764,300
49.361516
90
0.657578
false
WmHHooper/aima-python
submissions/Marszalkowski/myKMeans.py
1
3040
from sklearn import preprocessing import matplotlib.pyplot as plt import numpy as np nbaPGData = [ [ 15.8, 8.2, 8.1, 1.7 ], [ 25.4, 10.3, 10.1, 1.8 ], [ 22.1, 5.6, 3.1, 1.1 ], [ 16.7, 3.4, 3.7, 1.0 ], [ 16.2, 6.9, 5.6, 1.1 ], [ 13.1, 5.3, 4.6, 1.6 ], [ 17.3, 4.8, 4.1, 0.8 ], [ 17.7, 5.0, 3.8, 2.0 ], [ 26.9, 6.6, 4.5, ...
mit
-6,503,456,873,700,804,000
22.392308
52
0.384539
false
firebase/grpc
tools/distrib/python/grpcio_tools/grpc_tools/protoc.py
20
1198
#!/usr/bin/env python # Copyright 2016 gRPC authors. # # 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 ...
apache-2.0
-7,975,615,816,618,679,000
32.277778
79
0.730384
false
sanford1/BulletLua
example/bootstrap.py
1
2966
#!/usr/bin/env python import os import sys import fnmatch import argparse import itertools sys.path.insert(0, '..') import ninja_syntax objdir = 'obj' def flags(*args): return ' '.join(itertools.chain(*args)) def object_file(f): (root, ext) = os.path.splitext(f) return os.path.join(objdir, root + '.o'...
mit
1,265,601,705,102,015,000
27.796117
109
0.649697
false
lokirius/python-for-android
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_filter.py
164
2102
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes filter(F, X) into list(filter(F, X)). We avoid the transformation if the filter() call is directly contained in iter(<>), list(<>), tuple(<>), sorted(<>), ...join(<>), or for V in <>:. NOTE: This...
apache-2.0
6,809,505,026,110,256,000
26.657895
73
0.49001
false
DJTobias/Cherry-Autonomous-Racecar
car/scripts/pyfestival.py
2
10003
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """Python bindings for The Festival Speech Synthesis System. http://code.google.com/p/pyfestival/ http://www...
mit
1,574,230,714,525,591,800
31.796721
105
0.536839
false
Neural-Network/TicTacToe
examples/supervised/test_network_read_write/jpq2layersWriter.py
26
3987
from __future__ import print_function from pybrain.structure import FeedForwardNetwork from pybrain.structure import LinearLayer, SigmoidLayer from pybrain.structure import BiasUnit,TanhLayer from pybrain.structure import FullConnection from pybrain.datasets import SupervisedDa...
bsd-3-clause
-902,034,764,466,269,300
29.204545
77
0.72611
false
lpirl/ansible
contrib/inventory/nova.py
131
7030
#!/usr/bin/env python # (c) 2012, Marco Vito Moscaritolo <marco@agavee.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 # ...
gpl-3.0
6,758,493,661,261,359,000
29.565217
104
0.628592
false
carthach/essentia
test/src/unittests/io/test_audioonsetsmarker_streaming.py
1
3046
#!/usr/bin/env python # Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
agpl-3.0
-7,057,642,653,357,083,000
33.224719
81
0.643467
false
VizGrimoire/GrimoireLib
vizgrimoire/analysis/quarters_data.py
4
3493
#!/usr/bin/env python # Copyright (C) 2014 Bitergia # # 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 License, or # (at your option) any later version. # # This program...
gpl-3.0
-6,108,129,969,790,399,000
39.149425
107
0.669052
false
AVOXI/b2bua
sippy/SipReferTo.py
2
1535
# Copyright (c) 2003-2005 Maxim Sobolev. All rights reserved. # Copyright (c) 2006-2014 Sippy Software, Inc. All rights reserved. # # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistrib...
bsd-2-clause
6,814,826,095,623,114,000
50.166667
82
0.783713
false
apache/incubator-airflow
airflow/api_connexion/schemas/config_schema.py
10
1667
# 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
9,121,589,918,001,587,000
25.460317
62
0.738452
false
borzunov/cpmoptimize
tests/perfomance/arith_sum.py
1
1024
#!/usr/bin/env python # -*- coding: utf-8 -*- import tests_common as common from cpmoptimize import cpmoptimize, xrange start = 32 step = 43 def naive(count): res = 0 for elem in xrange(start, start + step * count, step): res += elem return res def formula(count): return (start * 2 + step...
mit
4,579,568,054,670,876,700
20.333333
61
0.522461
false
berendkleinhaneveld/VTK
ThirdParty/Twisted/twisted/conch/test/test_default.py
42
6363
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.conch.client.default}. """ try: import Crypto.Cipher.DES3 import pyasn1 except ImportError: skip = "PyCrypto and PyASN1 required for twisted.conch.client.default." else: from twisted.conch.client.agent impor...
bsd-3-clause
-8,682,327,872,637,083,000
36.210526
79
0.649065
false
joachimwolff/bioconda-recipes
recipes/mobster/mobster.py
45
3272
#!/usr/bin/env python # # Wrapper script for Java Conda packages that ensures that the java runtime # is invoked with the right options. Adapted from the bash script (http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/246128#246128). # # Program Parameters # import os import s...
mit
-4,182,281,189,985,092,600
31.39604
175
0.640892
false
kr41/ggrc-core
src/ggrc/models/reflection.py
1
13581
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Utilties to deal with introspecting gGRC models for publishing, creation, and update from resource format representations, such as JSON.""" from sqlalchemy.sql.schema import UniqueConstraint from ggrc.u...
apache-2.0
-1,328,787,429,169,831,200
31.490431
79
0.644798
false
adamcandy/QGIS-Meshing
plugins/mesh_surface/scripts/define_boundary_id.py
2
3691
########################################################################## # # QGIS-meshing plugins. # # Copyright (C) 2012-2013 Imperial College London and others. # # Please see the AUTHORS file in the main source directory for a # full list of copyright holders. # # Dr Adam S. Candy, adam.candy@imperia...
lgpl-2.1
2,029,252,504,704,530,000
37.852632
420
0.705229
false
openhatch/oh-mainline
vendor/packages/Django/django/conf/locale/de_CH/formats.py
107
1389
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date from __future__ import unicode_literals DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i:s' DA...
agpl-3.0
3,532,958,440,953,657,000
36.540541
107
0.650108
false
axilleas/ansible-modules-core
packaging/os/rpm_key.py
60
7339
#!/usr/bin/python # -*- coding: utf-8 -*- # Ansible module to import third party repo keys to your rpm db # (c) 2013, Hรฉctor Acosta <hector.acosta@gazzang.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 ...
gpl-3.0
3,850,937,026,753,089,500
34.621359
140
0.591714
false
sebi-hgdata/ansible
lib/ansible/runner/action_plugins/template.py
4
6978
# (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
-3,620,508,114,925,409,000
44.907895
176
0.609917
false
divio/django-shop
shop/admin/delivery.py
1
10294
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import url from django.contrib import admin from django.db.models import Sum from django.forms import models, ValidationError from django.http import HttpResponse from django.template.loader import select_template from django.urls im...
bsd-3-clause
-65,965,361,639,734,110
41.713693
127
0.65271
false
grengojbo/st2
st2common/tests/unit/test_model_base.py
5
6102
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
-361,148,798,304,671,100
30.78125
84
0.597673
false
PaulWay/insights-core
insights/parsers/systemd/unitfiles.py
1
1843
from ... import Parser, parser from .. import get_active_lines @parser('systemctl_list-unit-files') class UnitFiles(Parser): """ A parser for working with data gathered from `systemctl list-unit-files` utility. """ def __init__(self, *args, **kwargs): self.services = {} """dict: Dictio...
apache-2.0
714,487,812,296,348,400
35.86
85
0.593597
false
totallybradical/temp_servo2
tests/wpt/web-platform-tests/WebCryptoAPI/tools/generate.py
49
2532
# script to generate the generateKey tests import os here = os.path.dirname(__file__) successes_html = """<!DOCTYPE html> <meta charset=utf-8> <meta name="timeout" content="long"> <title>WebCryptoAPI: generateKey() Successful Calls</title> <link rel="author" title="Charles Engelke" href="mailto:w3c@engelke.com"> <li...
mpl-2.0
-7,457,361,688,791,933,000
32.315789
96
0.661927
false
CiscoSystems/neutron
neutron/plugins/cisco/extensions/_qos_view.py
50
1662
# Copyright 2011 Cisco Systems, 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 requir...
apache-2.0
1,803,805,649,596,088,300
34.361702
78
0.630566
false
CUCWD/edx-platform
cms/djangoapps/contentstore/views/course.py
4
76075
""" Views related to operations on course objects """ import copy import json import logging import random import re import string # pylint: disable=deprecated-module import django.utils import six from ccx_keys.locator import CCXLocator from django.conf import settings from django.contrib.auth.decorators import logi...
agpl-3.0
4,397,166,577,728,564,700
42.796776
142
0.639566
false
akhmadMizkat/odoo
addons/base_action_rule/base_action_rule.py
10
21424
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from collections import defaultdict from datetime import datetime from dateutil.relativedelta import relativedelta import datetime as DT import dateutil import time import logging import openerp from openerp import SUPE...
gpl-3.0
-3,885,177,869,213,335,600
46.293598
158
0.586819
false
RomainBrault/scikit-learn
examples/decomposition/plot_sparse_coding.py
60
4016
""" =========================================== Sparse coding with a precomputed dictionary =========================================== Transform a signal as a sparse combination of Ricker wavelets. This example visually compares different sparse coding methods using the :class:`sklearn.decomposition.SparseCoder` esti...
bsd-3-clause
-8,258,080,286,241,453,000
39.16
78
0.624751
false
empireryan/director
src/python/ddapp/trackers.py
6
2726
import time from ddapp import segmentationroutines from ddapp import segmentation from ddapp.timercallback import TimerCallback from ddapp.visualization import * class TrackDrillOnTable(object): def __init__(self): self.tableCentroid = None def updateFit(self): # get and display: .1sec ...
bsd-3-clause
7,568,769,243,548,873,000
31.843373
142
0.659208
false
basicthinker/ThyNVM
src/cpu/DummyChecker.py
69
2259
# Copyright (c) 2010-2011 ARM Limited # All rights reserved # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functional...
bsd-3-clause
3,709,587,291,906,696,700
51.534884
72
0.793714
false
joyxu/autotest
frontend/afe/rpc_interface.py
2
48269
""" Functions to expose over the RPC interface. For all modify* and delete* functions that ask for an 'id' parameter to identify the object to operate on, the id may be either * the database row ID * the name of the object (label name, hostname, user login, etc.) * a dictionary containing uniquely identifying field...
gpl-2.0
2,013,981,284,753,935,600
33.209072
108
0.622056
false
bbc/kamaelia
Code/Python/Kamaelia/Kamaelia/Util/LossyConnector.py
9
3299
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
apache-2.0
6,028,621,434,400,617,000
34.473118
90
0.646863
false
CodingVault/LeetCodeInPython
binary_tree_inorder.py
1
1714
#!/usr/bin/env python # encoding: utf-8 """ binary_tree_inorder.py Created by Shengwei on 2014-07-04. """ # https://oj.leetcode.com/problems/binary-tree-inorder-traversal/ # tags: easy, tree, traversal, dfs """ Given a binary tree, return the inorder traversal of its nodes' values. For example: Given binary tree {1...
apache-2.0
6,326,397,164,798,888,000
25.369231
84
0.558343
false
wuxianghou/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/layouttestresultsreader_unittest.py
124
6488
# Copyright (c) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
-8,795,990,702,000,245,000
53.066667
126
0.720561
false
cneill/designate
designate/storage/impl_sqlalchemy/migrate_repo/versions/052_secondary_zones.py
7
3803
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Author: Endre Karlson <endre.karlson@hp.com> # # 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/lice...
apache-2.0
-7,730,507,823,125,063,000
32.069565
78
0.674993
false
mesosphere/dcos-cli
cli/tests/integrations/test_package.py
1
36558
import base64 import contextlib import json import os import sys import pytest import six from dcos import config, constants, subcommand from .helpers.common import (assert_command, assert_lines, base64_to_dict, delete_zk_node, delete_zk_nodes, exec_command, ...
apache-2.0
4,511,920,176,695,828,000
31.380868
80
0.58466
false
Airphrame/mapnik
plugins/input/rasterlite/build.py
3
2236
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your op...
lgpl-2.1
2,075,802,756,173,262,600
30.492958
76
0.652504
false
zorg/zorg-network-camera
zorg_network_camera/ocr.py
2
1620
from zorg.driver import Driver from PIL import Image import pytesseract class OCR(Driver): def __init__(self, options, connection): super(OCR, self).__init__(options, connection) # An attribute to hold the last text item read by the camera self.text_cache = "" self.commands = [ ...
mit
8,208,425,385,817,847,000
28.454545
74
0.57716
false
kennedyshead/home-assistant
tests/components/nexia/test_binary_sensor.py
21
1239
"""The binary_sensor tests for the nexia platform.""" from homeassistant.const import STATE_OFF, STATE_ON from .util import async_init_integration async def test_create_binary_sensors(hass): """Test creation of binary sensors.""" await async_init_integration(hass) state = hass.states.get("binary_senso...
apache-2.0
-8,115,667,303,595,868,000
34.4
88
0.69088
false
gdi2290/django
django/db/migrations/optimizer.py
52
14001
from __future__ import unicode_literals from django.db import migrations from django.utils import six class MigrationOptimizer(object): """ Powers the optimization process, where you provide a list of Operations and you are returned a list of equal or shorter length - operations are merged into one i...
bsd-3-clause
6,218,190,914,472,155,000
37.464286
117
0.528819
false
jperon/musite_old
lib/cherrypy/tutorial/tut04_complex_site.py
22
3075
""" Tutorial - Multiple objects This tutorial shows you how to create a site structure through multiple possibly nested request handler objects. """ import cherrypy class HomePage: def index(self): return ''' <p>Hi, this is the home page! Check out the other fun stuff on this si...
gpl-3.0
383,615,855,440,952,100
28.285714
79
0.571057
false
travislbrundage/geonode
geonode/maps/tests.py
5
23192
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
-2,476,391,610,983,640,600
35.638231
88
0.60495
false
noroutine/ansible
test/units/parsing/yaml/test_objects.py
72
5443
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
1,869,291,898,963,816,000
35.046358
112
0.688958
false
openstack/manila
manila/share/drivers/huawei/constants.py
4
3997
# Copyright (c) 2014 Huawei Technologies Co., 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 # # ...
apache-2.0
-6,448,082,416,007,507,000
26.951049
78
0.654741
false
fperez/cython
Cython/Compiler/Annotate.py
12
12208
# Note: Work in progress from __future__ import absolute_import import os import os.path import re import codecs import textwrap from datetime import datetime from functools import partial from collections import defaultdict from xml.sax.saxutils import escape as html_escape try: from StringIO import StringIO exc...
apache-2.0
4,973,731,205,065,269,000
38.380645
117
0.56463
false
yukuilong/Avplayer-old
libtorrent/parse_utp_log.py
40
8284
import os, sys, time # usage: parse_log.py log-file [socket-index to focus on] socket_filter = None if len(sys.argv) >= 3: socket_filter = sys.argv[2].strip() if socket_filter == None: print "scanning for socket with the most packets" file = open(sys.argv[1], 'rb') sockets = {} for l in file: if not 'our_d...
gpl-3.0
-677,412,512,041,637,500
25.809061
238
0.578585
false
FujiZ/ns-3
src/buildings/bindings/modulegen__gcc_LP64.py
38
318633
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
5,771,081,788,412,021,000
63.422362
444
0.621449
false
dhp-denero/LibrERP
account_due_list_extended/account/account.py
3
3088
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2012 Andrea Cometa All Rights Reserved. # www.andreacometa.it # openerp@andreacometa.it # # This prog...
agpl-3.0
-2,364,215,473,625,491,000
32.934066
136
0.649611
false
allotria/intellij-community
python/helpers/profiler/prof_util.py
22
3567
__author__ = 'traff' import os import sys import tempfile import threading from _prof_imports import pkgutil, Stats, FuncStat, Function try: execfile=execfile #Not in Py3k except NameError: #We must redefine it in Py3k if it's not already there def execfile(file, glob=None, loc=None): if glob is ...
apache-2.0
4,410,724,025,994,211,000
26.229008
115
0.585086
false
enriquecoronadozu/HMPy
src/borrar/modificar/test_demo_v2.py
2
3964
#! /usr/bin/env python import rospy, math import sys, termios, tty, select, os from geometry_msgs.msg import Twist from std_msgs.msg import UInt16 import sys from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3 import signal from GestureModel import* from Creator import* from Classifier import* from nu...
gpl-3.0
1,926,055,531,338,471,000
22.595238
77
0.665489
false
Hodorable/0602
openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py
47
5771
# 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 th...
apache-2.0
5,652,307,212,748,524,000
31.977143
76
0.602149
false
enthought/traitsgui
enthought/pyface/i_python_shell.py
1
2942
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
6,329,410,110,037,974,000
33.611765
79
0.504759
false
konairius/synctool
configurator.py
1
3598
#!/usr/bin/env python3 # coding=utf-8 """ This module is used to configure the host in the database it creates host entry and configures root folders """ import argparse import logging import socket import sys from sqlalchemy import create_engine from sqlalchemy.exc import OperationalError from sqlalchemy.orm import s...
mit
1,955,163,609,780,450,800
31.709091
107
0.640078
false
ntymtsiv/tempest
tempest/api/compute/limits/test_absolute_limits.py
2
2127
# Copyright 2012 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.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
7,622,395,191,740,441,000
41.54
78
0.629055
false
imayhaveborkedit/discord.py
examples/basic_bot.py
4
1818
import discord from discord.ext import commands import random description = '''An example bot to showcase the discord.ext.commands extension module. There are a number of utility commands being showcased here.''' bot = commands.Bot(command_prefix='?', description=description) @bot.event async def on_ready(): pri...
mit
-5,059,369,362,058,851,000
26.969231
78
0.660066
false
mrkm4ntr/incubator-airflow
airflow/contrib/operators/slack_webhook_operator.py
7
1177
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
7,445,368,738,638,091,000
39.586207
95
0.772302
false
RAJSD2610/SDNopenflowSwitchAnalysis
ece671/FinalPlot.py
1
17007
# coding: utf-8 # In[6]: #TCP ftotal import os import pandas as pd import matplotlib.pyplot as plt import seaborn seaborn.set() path= os.path.expanduser("~/Desktop/ece671/ntcp3") num_files = len([f for f in os.listdir(path)if os.path.isfile(os.path.join(path, f))]) print(num_files) t3=[] i=0 def file_len(fname): ...
gpl-3.0
3,822,135,881,770,338,300
22.20191
86
0.604516
false
madjam/mxnet
tests/nightly/mxnet_keras_integration_tests/test_mnist_mlp.py
43
4364
# 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
4,352,055,190,633,356,300
37.280702
188
0.733272
false
anybox/anybox.recipe.odoo
anybox/recipe/odoo/base.py
1
73624
# coding: utf-8 from os.path import join, basename import os import sys import re import tarfile import setuptools import logging import stat import imp import shutil try: from ConfigParser import ConfigParser, RawConfigParser # Python 2 except ImportError: from configparser import ConfigParser, RawConfigParse...
agpl-3.0
8,631,696,303,349,158,000
40.431626
79
0.566283
false
nishad-jobsglobal/odoo-marriot
addons/hr_recruitment/report/hr_recruitment_report.py
325
4836
# -*- 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
-8,236,383,192,502,497,000
45.951456
131
0.550041
false
sillydan1/WhatEverEngine
packages/IronPython.StdLib.2.7.5/content/Lib/multiprocessing/reduction.py
217
6582
# # Module to allow connection and socket objects to be transferred # between processes # # multiprocessing/reduction.py # # Copyright (c) 2006-2008, R Oudkerk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
apache-2.0
-5,491,533,330,906,549,000
29.613953
84
0.680644
false
kntem/webdeposit
modules/bibencode/lib/bibencode_daemon.py
28
5873
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 the ## License, or (at your option) a...
gpl-2.0
6,266,255,354,032,861,000
36.170886
76
0.568193
false
kobejean/tensorflow
tensorflow/python/util/all_util.py
128
4709
# 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
616,998,724,087,798,800
37.917355
80
0.6787
false
bitemyapp/pgcli
pgcli/pgexecute.py
4
11758
import logging import psycopg2 import psycopg2.extras import psycopg2.extensions as ext import sqlparse from .packages import pgspecial as special from .encodingutils import unicode2utf8, PY2 _logger = logging.getLogger(__name__) # Cast all database input to unicode automatically. # See http://initd.org/psycopg/docs/...
bsd-3-clause
2,318,369,468,333,592,600
34.415663
91
0.578585
false
3ll3d00d/vibe
backend/src/core/reactor.py
1
2193
import logging from queue import Queue from threading import Thread logger = logging.getLogger('analyser.reactor') class Reactor(object): """ Kicks off the thread which accepts requests on the queue where each request is a 2 item tuple ( request type, tuple of args ) """ def __init__(self, name=...
mit
-908,131,693,834,398,200
31.25
113
0.5513
false
rogerhil/flaviabernardes
flaviabernardes/flaviabernardes/cms/base.py
1
4130
import importlib from django.conf import settings from django.contrib.sitemaps import ping_google from django.core.mail import send_mail from django.db import models DESCRIPTION_HELP_TEXT = ("Please consider filling this field to provide " "proper information to social media, e.g.: Facebook share. This " "desc...
apache-2.0
-8,957,909,900,054,762,000
29.145985
79
0.569976
false
mnahm5/django-estore
Lib/site-packages/django/contrib/sessions/models.py
82
2229
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ class SessionManager(models.Manager): use_in_migrations = True def encode(self, session_dict): """ Return...
mit
3,882,591,547,106,224,600
34.951613
80
0.683715
false
HKUST-SING/tensorflow
tensorflow/python/ops/state_ops.py
16
9607
# 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
-5,413,695,891,786,139,000
34.450185
80
0.681482
false
stormltf/docker-registry
docker_registry/wsgi.py
30
1316
#!/usr/bin/env python # -*- coding: utf-8 -*- # only needed if not using gunicorn gevent if __name__ == '__main__': import gevent.monkey gevent.monkey.patch_all() # start new relic if instructed to do so from .extensions import factory from .extras import enewrelic from .server import env enewrelic.boot(env.s...
apache-2.0
-8,071,217,124,279,391,000
25.857143
68
0.667933
false
jusdng/odoo
addons/google_drive/__openerp__.py
320
1872
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
3,763,348,727,636,075,500
38.787234
149
0.605348
false
mfherbst/spack
var/spack/repos/builtin/packages/memkind/package.py
4
3019
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-6,519,864,372,651,668,000
43.397059
79
0.677377
false
Onapsis/pytron
lightcycle-backend/lightcycle/arena.py
1
5141
# encoding=utf-8 import time import numpy import logging from .basebot import DIRECTIONS, LightCycleBaseBot from .worker import RemoteInstance logger = logging.getLogger(__name__) class LightCycleArena(object): PLAYING = 0 LOST = 1 WINNER = 2 def __init__(self, players, width=100, height=100): ...
mit
4,853,031,540,068,200,000
36.801471
119
0.526162
false
PolyPasswordHasher/PolyPasswordHasher-Django
django_pph/shamirsecret.py
1
14038
import os import sys PY3 = sys.version_info[0] == 3 class ShamirSecret(object): """ This performs Shamir Secret Sharing operations in an incremental way that is useful for PolyPasswordHasher. It allows checking membership, genering shares one at a time, etc. Creates an object. One must provide...
mit
-6,569,037,812,699,818,000
36.236074
132
0.598874
false
hbhdytf/mac
swift/common/container_sync_realms.py
24
6051
# Copyright (c) 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
apache-2.0
7,210,176,526,431,836,000
36.81875
79
0.525698
false
reyoung/Paddle
python/paddle/fluid/tests/unittests/test_multiplex_op.py
5
2098
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
2,524,388,219,998,222,000
33.393443
75
0.605338
false
varunkamra/kuma
vendor/packages/pytz/tzfile.py
480
4869
#!/usr/bin/env python ''' $Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $ ''' try: from cStringIO import StringIO except ImportError: from io import StringIO from datetime import datetime, timedelta from struct import unpack, calcsize from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo fro...
mpl-2.0
2,406,264,759,962,414,600
34.540146
77
0.554734
false
ncos/lisa
src/lisa_drive/scripts/pose_gt.py
1
9305
#!/usr/bin/python import argparse import rosbag import rospy import cv2 from geometry_msgs.msg import PoseStamped from nav_msgs.msg import Odometry from cv_bridge import CvBridge, CvBridgeError import os # only required for simulated scenes try: import OpenEXR, Imath import numpy as np except ImportError, e: ...
mit
-8,207,365,576,355,037,000
36.520161
103
0.580333
false
USGSDenverPychron/pychron
pychron/image/toupcam/save_image.py
1
1594
# =============================================================================== # Copyright 2015 Jake Ross # # 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...
apache-2.0
5,138,863,538,077,280,000
31.530612
81
0.518821
false
HoracioAlvarado/fwd
venv/Lib/importlib/_bootstrap.py
15
37905
"""Core implementation of import. This module is NOT meant to be directly imported! It has been designed such that it can be bootstrapped into Python as the implementation of import. As such it requires the injection of specific modules and attributes in order to work. One should use importlib as the public-facing ver...
mit
-6,528,344,787,964,753,000
32.191769
80
0.591188
false
raphael-ritz/pcp.cregsync
src/pcp/cregsync/providers.py
1
4156
# # providers.py # # script to be invoked via # # cd <your-buildout-root-dir> # bin/instance run src/pcp.cregsync/src/pcp/cregsync/providers.py # # run with --help to see available options import logging from Products.PlonePAS.utils import cleanId from pcp.cregsync import utils from pcp.cregsync import config def...
gpl-2.0
5,579,048,576,639,069,000
33.633333
94
0.616939
false
eppye-bots/bots
bots/transform.py
1
29630
from __future__ import unicode_literals import sys if sys.version_info[0] > 2: basestring = unicode = str import os import copy import collections import unicodedata try: import cPickle as pickle except ImportError: import pickle from django.utils.translation import ugettext as _ #bots-modules from . import...
gpl-3.0
-8,278,615,643,937,149,000
57.098039
226
0.570469
false
selfcommit/simian
src/simian/mac/munki/handlers/pkgs.py
2
5644
#!/usr/bin/env python # # Copyright 2017 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 require...
apache-2.0
9,175,688,406,130,151,000
33.414634
79
0.682495
false
kleetus/bitcoinxt
qa/rpc-tests/rest.py
128
3258
#!/usr/bin/env python2 # Copyright (c) 2014 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 REST interface # from test_framework import BitcoinTestFramework from util import * import json try...
mit
-5,100,259,359,205,074,000
35.606742
132
0.62523
false
fenginx/django
tests/template_tests/filter_tests/test_timeuntil.py
93
4958
from datetime import datetime, timedelta from django.template.defaultfilters import timeuntil_filter from django.test import SimpleTestCase from django.test.utils import requires_tz_support from ..utils import setup from .timezone_utils import TimezoneTestCase class TimeuntilTests(TimezoneTestCase): # Default ...
bsd-3-clause
-1,111,297,088,701,252,900
40.316667
118
0.630093
false
jbking/python-stdnet
runtests.py
2
1871
#!/usr/bin/env python '''Stdnet asynchronous test suite. Requires pulsar.''' import sys import os from multiprocessing import current_process ## This is for dev environment with pulsar and dynts. ## If not available, some tests won't run p = os.path dir = p.dirname(p.dirname(p.abspath(__file__))) try: import pulsa...
bsd-3-clause
8,140,984,728,676,826,000
26.865672
67
0.599679
false
benesch/pip
setup.py
3
2934
import codecs import os import re import sys from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand here = os.path.abspath(os.path.dirname(__file__)) class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options(self) self.tes...
mit
-7,761,153,617,341,743,000
30.548387
76
0.5985
false
andela-bojengwa/talk
venv/lib/python2.7/site-packages/rest_framework/utils/breadcrumbs.py
46
2004
from __future__ import unicode_literals from django.core.urlresolvers import resolve, get_script_prefix def get_breadcrumbs(url): """ Given a url returns a list of breadcrumbs, which are each a tuple of (name, url). """ from rest_framework.settings import api_settings from rest_framework.view...
mit
2,729,572,122,053,640,000
34.785714
77
0.580838
false
kailIII/emaresa
trunk.pe.bk/npg_account_make_deposit/report/__init__.py
2
1143
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) # Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) # Modified by: # C...
agpl-3.0
-1,484,675,859,972,092,000
44.72
78
0.609799
false
openstack/oslo.reports
oslo_reports/views/jinja_view.py
1
4372
# Copyright 2013 Red Hat, 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 agre...
apache-2.0
-396,830,575,301,646,100
30.912409
79
0.618024
false
HoverHell/mcomix-0
mcomix/histogram.py
2
2900
"""histogram.py - Draw histograms (RGB) from pixbufs.""" import Image import ImageDraw import ImageOps from mcomix import image_tools def draw_histogram(pixbuf, height=170, fill=170, text=True): """Draw a histogram from <pixbuf> and return it as another pixbuf. The returned prixbuf will be 262x<height> px. ...
gpl-2.0
5,780,343,447,112,663,000
43.615385
77
0.524138
false
nzavagli/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/django-1.8.2/django/db/backends/base/creation.py
16
22818
import hashlib import sys import time import warnings from django.apps import apps from django.conf import settings from django.core import serializers from django.db import router from django.db.backends.utils import truncate_name from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encodin...
mit
-5,439,292,761,602,093,000
41.177449
112
0.567052
false
daeilkim/refinery
refinery/fact_classifier/classify_ex.py
1
1262
from sklearn import svm from sklearn.feature_extraction import DictVectorizer from collections import defaultdict import pickle v = DictVectorizer() #TODO : need to tokenize the words before using them as features! def main(): def munge(s): ps = s.split() label = int(ps[0]) ws = defaultdi...
mit
4,812,708,232,924,255,000
21.140351
86
0.588748
false
jayceyxc/hue
desktop/core/ext-py/boto-2.42.0/tests/integration/kms/test_kms.py
99
1669
# Copyright (c) 2014 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 ...
apache-2.0
8,922,538,124,704,535,000
39.707317
77
0.727981
false