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
danakj/chromium
third_party/closure_compiler/compiler_test.py
6
11550
#!/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. from ast import literal_eval import os import tempfile import unittest from compile import Checker from processor import FileCache, Pr...
bsd-3-clause
-6,339,864,761,027,056,000
29.718085
80
0.643983
false
gfneto/bitcoin-abe
build/lib.linux-x86_64-2.7/Abe/Chain/Bitcoin.py
29
1035
# Copyright(C) 2014 by Abe developers. # This program 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 (at your option) any later version. # # This program is dist...
agpl-3.0
984,796,107,448,070,500
38.807692
70
0.710145
false
pk400/catering
myvenv/lib/python3.4/site-packages/django/utils/timesince.py
409
2671
from __future__ import unicode_literals import calendar import datetime from django.utils.html import avoid_wrapping from django.utils.timezone import is_aware, utc from django.utils.translation import ugettext, ungettext_lazy TIMESINCE_CHUNKS = ( (60 * 60 * 24 * 365, ungettext_lazy('%d year', '%d years')), ...
mit
-1,481,947,376,974,790,100
36.097222
101
0.64283
false
happycube/ld-decode
lddecode/utils.py
1
29033
# A collection of helper functions used in dev notebooks and lddecode_core.py import atexit from base64 import b64encode from collections import namedtuple import copy import getopt import io from io import BytesIO import json import math import os import sys import subprocess from multiprocessing import Process, Poo...
gpl-3.0
-2,989,863,375,725,879,300
27.127907
116
0.588397
false
lcy-seso/models
fluid/icnet/icnet.py
1
9220
import paddle.fluid as fluid import numpy as np import sys def conv(input, k_h, k_w, c_o, s_h, s_w, relu=False, padding="VALID", biased=False, name=None): act = None tmp = input if relu: act = "relu" if padding ==...
apache-2.0
-9,064,851,738,379,780,000
29.631229
83
0.559111
false
simpeg/discretize
tests/base/test_tensor.py
1
7915
import numpy as np import unittest import discretize from pymatsolver import Solver TOL = 1e-10 class BasicTensorMeshTests(unittest.TestCase): def setUp(self): a = np.array([1, 1, 1]) b = np.array([1, 2]) c = np.array([1, 4]) self.mesh2 = discretize.TensorMesh([a, b], [3, 5]) ...
mit
-1,959,192,687,067,684,600
26.106164
88
0.385218
false
abhaysac/cuda-convnet2
python_util/util.py
181
2825
# 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
-5,502,906,908,635,373,000
29.053191
119
0.606372
false
gitromand/phantomjs
src/breakpad/src/tools/gyp/pylib/gyp/generator/gypd.py
151
3320
#!/usr/bin/python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """gypd output module This module produces gyp input as its output. Output files are given the .gypd extension to avoid overwriting the .gyp f...
bsd-3-clause
6,334,542,444,522,743,000
36.727273
78
0.741265
false
austindlawless/cudas
lambda/signup/passlib/tests/test_context.py
6
64739
"""tests for passlib.context""" #============================================================================= # imports #============================================================================= # core from __future__ import with_statement from passlib.utils.compat import PY3 if PY3: from configparser import N...
mit
-4,838,616,539,473,882,000
38.814883
125
0.558381
false
ikreymer/pywb
pywb/warcserver/index/query.py
1
3663
from six.moves.urllib.parse import urlencode from pywb.warcserver.index.cdxobject import CDXException from pywb.utils.canonicalize import calc_search_range from pywb.utils.format import to_bool #================================================================= class CDXQuery(object): def __init__(self, params): ...
gpl-3.0
-5,957,986,356,385,747,000
25.737226
79
0.553918
false
kotnik/nikola
nikola/plugins/task_copy_files.py
3
2203
# -*- coding: utf-8 -*- # Copyright © 2012-2013 Roberto Alsina and others. # 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 t...
mit
-5,399,628,070,904,518,000
35.098361
72
0.652134
false
yashdsaraf/scancode-toolkit
tests/extractcode/test_patch.py
1
72541
# # Copyright (c) 2017 nexB Inc. and others. All rights reserved. # http://nexb.com and https://github.com/nexB/scancode-toolkit/ # The ScanCode software is licensed under the Apache License version 2.0. # Data generated with ScanCode require an acknowledgment. # ScanCode is a trademark of nexB Inc. # # You may not use...
apache-2.0
-8,871,056,846,175,783,000
67.049719
156
0.727713
false
hairmare/php-buildpack
lib/yaml/emitter.py
387
43298
# Emitter expects events obeying the following grammar: # stream ::= STREAM-START document* STREAM-END # document ::= DOCUMENT-START node DOCUMENT-END # node ::= SCALAR | sequence | mapping # sequence ::= SEQUENCE-START node* SEQUENCE-END # mapping ::= MAPPING-START (node node)* MAPPING-END __all__ = ['Emitter', 'Emi...
apache-2.0
2,143,272,718,466,414,000
36.980702
85
0.511894
false
ononeor12/python-social-auth
social/tests/backends/test_nationbuilder.py
77
8489
import json from social.tests.backends.oauth import OAuth2Test class NationBuilderOAuth2Test(OAuth2Test): backend_path = 'social.backends.nationbuilder.NationBuilderOAuth2' user_data_url = 'https://foobar.nationbuilder.com/api/v1/people/me' expected_username = 'foobar' access_token_body = json.dumps(...
bsd-3-clause
-423,054,029,518,414,800
35.590517
76
0.489693
false
xl7dev/WebShell
reGeorg-master/reGeorgSocksProxy.py
1
16189
#!/usr/bin/env python # -*- coding: utf-8 -*- import logging import argparse import signal import sys import atexit import httplib import urllib3 from threading import Thread from urlparse import urlparse from socket import * from threading import Thread from time import sleep #import struct # Constants SOCKTIMEOUT =...
gpl-2.0
-5,065,256,714,825,216,000
36.824766
175
0.544197
false
NocFlame/MifareClassicTool
tools/dump-file-converter/mct2eml.py
7
1685
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ######################################################################## # # Copyright 2015 Gerhard Klostermeier # # 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 Sof...
gpl-3.0
5,935,565,142,354,777,000
30.203704
75
0.613056
false
Edraak/edraak-platform
common/lib/xmodule/xmodule/tests/test_randomize_module.py
13
3955
""" Test cases covering workflows and behaviors for the Randomize XModule """ import unittest from datetime import datetime, timedelta from pytz import UTC from opaque_keys.edx.locator import BlockUsageLocator from xblock.fields import ScopeIds from xmodule.randomize_module import RandomizeModule from .test_course_mo...
agpl-3.0
7,162,018,349,210,179,000
35.62037
115
0.631353
false
sesuncedu/sdhash
sdhash-ui/cherrypy/wsgiserver/wsgiserver3.py
82
78074
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('...
apache-2.0
734,800,033,835,933,000
37.271569
135
0.541448
false
allenp/odoo
addons/website_forum/tests/common.py
13
3559
# -*- coding: utf-8 -*- from openerp.tests import common KARMA = { 'ask': 5, 'ans': 10, 'com_own': 5, 'com_all': 10, 'com_conv_all': 50, 'upv': 5, 'dwv': 10, 'edit_own': 10, 'edit_all': 20, 'close_own': 10, 'close_all': 20, 'unlink_own': 10, 'unlink_all': 20, 'post': 100, 'flag': 500, ...
gpl-3.0
-1,383,656,748,331,628,500
36.072917
85
0.506041
false
labordoc/labordoc-next
modules/miscutil/lib/web_api_key.py
2
4341
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013 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 ## ...
gpl-2.0
8,211,217,163,126,494,000
34.292683
81
0.69454
false
a-nai/django-wiki
wiki/plugins/images/wiki_plugin.py
2
3205
# -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from django.conf.urls import patterns, url from django.utils.translation import ugettext as _ from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.images import views...
gpl-3.0
6,092,645,724,688,866,000
41.171053
98
0.481747
false
xorstream/unicorn
bindings/python/sample_network_auditing.py
7
12371
#!/usr/bin/env python # Unicorn sample for auditing network connection and file handling in shellcode. # Nguyen Tan Cong <shenlongbk@gmail.com> from __future__ import print_function from unicorn import * from unicorn.x86_const import * import struct import uuid SIZE_REG = 4 SOCKETCALL_MAX_ARGS = 3 SOCKET_TYPES = { ...
gpl-2.0
-5,206,834,751,819,508,000
29.321078
468
0.550643
false
andyh616/mne-python
mne/io/egi/egi.py
5
13219
# Authors: Denis A. Engemann <denis.engemann@gmail.com> # Teon Brooks <teon.brooks@gmail.com> # # simplified BSD-3 license import datetime import time import warnings import numpy as np from ..base import _BaseRaw, _check_update_montage from ..meas_info import _empty_info from ..constants import F...
bsd-3-clause
-3,506,713,166,610,495,000
38.936556
79
0.529541
false
asgard-lab/neutron
neutron/common/exceptions.py
12
15936
# Copyright 2011 VMware, 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 a...
apache-2.0
-1,930,096,014,746,119,000
29.011299
79
0.672628
false
axbaretto/beam
sdks/python/.tox/py27gcp/lib/python2.7/site-packages/google/api/httpbody_pb2.py
17
2535
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/api/httpbody.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflecti...
apache-2.0
-3,977,749,978,709,142,500
31.5
249
0.718738
false
Tigerwhit4/taiga-back
taiga/projects/custom_attributes/migrations/0005_auto_20150505_1639.py
23
1088
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_pgjson.fields class Migration(migrations.Migration): dependencies = [ ('custom_attributes', '0004_create_empty_customattributesvalues_for_existen_object'), ] operations = [ ...
agpl-3.0
8,213,238,564,576,443,000
31.969697
93
0.624081
false
Metronote/metronotesd-alpha
lib/burn.py
1
3750
#! /usr/bin/python3 import struct import decimal D = decimal.Decimal from fractions import Fraction from . import (util, config, exceptions, bitcoin, util) """Burn {} to earn {} during a special period of time.""".format(config.BTC, config.XMN) ID = 60 def validate (db, source, destination, quantity, block_index,...
mit
-1,033,224,548,275,674,500
34.695238
117
0.626201
false
ufosky-server/zulip
analytics/management/commands/client_activity.py
114
2830
from __future__ import absolute_import from django.core.management.base import BaseCommand from django.db.models import Count from zerver.models import UserActivity, UserProfile, Realm, \ get_realm, get_user_profile_by_email import datetime class Command(BaseCommand): help = """Report rough client activity ...
apache-2.0
3,175,835,966,113,949,000
37.243243
86
0.601413
false
moreati/uwsgi
tests/websockets.py
13
2254
#!./uwsgi --https :8443,foobar.crt,foobar.key --http-websockets --gevent 100 --module tests.websocket import uwsgi import gevent from gevent.queue import JoinableQueue from gevent.socket import wait_read queue = JoinableQueue() def application(env, sr): ws_scheme = 'ws' if 'HTTPS' in env or env['wsgi.url_sc...
gpl-2.0
-3,354,433,772,221,508,600
30.305556
133
0.483141
false
franosincic/edx-platform
lms/djangoapps/discussion_api/tests/test_permissions.py
34
4986
""" Tests for discussion API permission logic """ import itertools import ddt from discussion_api.permissions import ( can_delete, get_editable_fields, get_initializable_comment_fields, get_initializable_thread_fields, ) from lms.lib.comment_client.comment import Comment from lms.lib.comment_client.th...
agpl-3.0
4,189,358,750,800,376,000
39.209677
111
0.635178
false
norayr/unisubs
libs/bulkops.py
6
3083
# TODO: Remove this once the new data model lands. # This is from http://www.caktusgroup.com/blog/2011/09/20/bulk-inserts-django/ # Bulk insert/update DB operations for the Django ORM. Useful when # inserting/updating lots of objects where the bottleneck is overhead # in talking to the database. Instead of doing this ...
agpl-3.0
3,360,933,281,649,887,700
34.034091
121
0.659423
false
onyxfish/stovetop
gdata/webmastertools/data.py
126
5504
#!/usr/bin/python # # Copyright (C) 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 ...
mit
5,839,769,950,914,154,000
24.364055
75
0.722929
false
benjaminsoellner/2015_Data_Analyst_Project_3
Lesson_5_Analyzing_Data/16-Same_Operator/population.py
3
2354
#!/usr/bin/env python """ In an earlier exercise we looked at the cities dataset and asked which region in India contains the most cities. In this exercise, we'd like you to answer a related question regarding regions in India. What is the average city population for a region in India? Calculate your answer by first ...
agpl-3.0
5,971,405,826,961,697,000
43.415094
101
0.706457
false
askeing/servo
tests/wpt/web-platform-tests/webdriver/tests/actions/mouse.py
3
4720
import pytest from tests.actions.support.mouse import get_center from tests.actions.support.refine import get_events, filter_dict from tests.support.asserts import assert_move_to_coordinates from tests.support.inline import inline from tests.support.wait import wait def link_doc(dest): content = "<a href=\"{}\" ...
mpl-2.0
6,403,562,718,915,635,000
34.488722
82
0.604873
false
piMoll/SEILAPLAN
tool/peakdetect.py
1
27677
# -*- coding: utf-8 -*- import numpy as np from math import pi, log try: from scipy import fft, ifft from scipy.optimize import curve_fit except ModuleNotFoundError: # Import error is handled in seilaplanPlugin.py run() function pass i = 10000 x = np.linspace(0, 3.5 * pi, i) y = (0.3*np.sin(x) + np.s...
gpl-2.0
-2,994,201,552,351,383,600
36.655782
91
0.605412
false
caisq/tensorflow
tensorflow/python/ops/distributions/dirichlet_multinomial.py
17
13343
# 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
-2,337,203,361,664,329,700
37.563584
80
0.662819
false
josrolgil/exjobbCalvin
calvin/utilities/confsort.py
3
3435
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2015 Ericsson AB # # 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
6,274,872,234,931,863,000
26.926829
74
0.588355
false
CEG-FYP-OpenStack/scheduler
nova/servicegroup/drivers/mc.py
7
3516
# Service heartbeat driver using Memcached # Copyright (c) 2013 Akira Yoshiyama <akirayoshiyama at gmail dot com> # # This is derived from nova/servicegroup/drivers/db.py. # Copyright 2012 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
apache-2.0
1,284,531,248,449,251,800
36.806452
72
0.614903
false
jkburges/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/model/warninglog.py
122
2147
# Copyright (C) 2013 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,725,211,244,258,733,000
44.680851
117
0.759665
false
pyqt/python-qt5
PyQt5/uic/port_v2/as_string.py
2
1435
############################################################################# ## ## Copyright (c) 2016 Riverbank Computing Limited <info@riverbankcomputing.com> ## ## This file is part of PyQt5. ## ## This file may be used under the terms of the GNU General Public License ## version 3.0 as published by the Free Softw...
gpl-3.0
737,264,618,624,944,500
34.875
79
0.6223
false
rabipanda/tensorflow
tensorflow/contrib/timeseries/python/timeseries/state_space_models/filtering_postprocessor_test.py
67
3176
# 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
5,450,042,606,735,406,000
43.732394
102
0.62437
false
miniconfig/home-assistant
homeassistant/components/homematic.py
5
28822
""" Support for Homematic devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/homematic/ """ import os import time import logging from datetime import timedelta from functools import partial import voluptuous as vol import homeassistant.helpers.co...
mit
-3,986,501,105,974,606,300
32.78898
79
0.594268
false
DrMeers/django
tests/one_to_one/models.py
26
1605
""" 10. One-to-one relationships To define a one-to-one relationship, use ``OneToOneField()``. In this example, a ``Place`` optionally can be a ``Restaurant``. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_co...
bsd-3-clause
-3,768,575,668,123,157,000
26.20339
67
0.709034
false
Nitrate/Nitrate
src/tcms/testruns/migrations/0006_set_assignee_and_tested_by_to_null_if_user_is_deleted.py
2
1101
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2018-11-18 14:51 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("testruns", "0005_set_run_default_tester_to_null_if_user_is_deleted...
gpl-2.0
4,044,324,735,206,229,500
28.756757
79
0.538601
false
Clinical-Genomics/scout
tests/server/blueprints/login/test_views.py
1
2083
# -*- coding: utf-8 -*- from flask import url_for from flask_ldap3_login.forms import LDAPLoginForm from flask_login import current_user from scout.server.extensions import store def test_unathorized_login(app, institute_obj, case_obj): """Test failed authentication against scout database""" # GIVEN an init...
bsd-3-clause
-568,476,739,340,299,840
34.913793
80
0.694191
false
ol-loginov/intellij-community
python/helpers/docutils/parsers/rst/languages/eo.py
57
3722
# $Id: eo.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Marcelo Huerta San Martin <richieadler@users.sourceforge.net> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two...
apache-2.0
817,068,682,235,830,500
31.649123
80
0.612574
false
qedsoftware/commcare-hq
corehq/apps/smsbillables/migrations/0005_update_http_backend_criteria.py
1
1081
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from corehq.apps.smsbillables.models import SmsGatewayFeeCriteria from corehq.messaging.smsbackends.sislog.models import SQLSislogBackend from corehq.messaging.smsbackends.yo.models import SQLYoBackend from corehq.sql_db.o...
bsd-3-clause
-7,105,229,759,616,556,000
28.216216
71
0.714154
false
indashnet/InDashNet.Open.UN2000
android/external/chromium-trace/trace-viewer/third_party/pywebsocket/src/test/mux_client_for_testing.py
29
27698
#!/usr/bin/env python # # Copyright 2012, 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
5,138,244,792,282,142,000
36.2786
79
0.589682
false
Javiercerna/MissionPlanner
Lib/site-packages/scipy/optimize/tests/test_minpack.py
55
9863
""" Unit tests for optimization routines from minpack.py. """ from numpy.testing import assert_, assert_almost_equal, assert_array_equal, \ assert_array_almost_equal, TestCase, run_module_suite, assert_raises import numpy as np from numpy import array, float64 from scipy import optimize from scipy.optimize.mi...
gpl-3.0
8,954,934,488,909,405,000
33.85159
91
0.554395
false
NationalSecurityAgency/ghidra
Ghidra/Features/Python/ghidra_scripts/AskScriptPy.py
1
4185
## ### # IP: GHIDRA # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
-3,033,926,653,179,964,400
38.857143
115
0.67957
false
derekjchow/models
research/cvt_text/task_specific/task_definitions.py
5
2961
# Copyright 2018 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-8,087,058,624,237,257,000
31.538462
80
0.695373
false
openstack/blazar
blazar/tests/__init__.py
3
2729
# Copyright (c) 2013 Bull. # # 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, sof...
apache-2.0
-4,486,646,624,762,853,400
30.011364
76
0.683034
false
playm2mboy/edx-platform
openedx/core/djangoapps/user_api/preferences/api.py
3
16995
""" API for managing user preferences. """ import logging import analytics from eventtracking import tracker from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import IntegrityError from django.utils.translation import ugettext as _ from django.utils.translation impor...
agpl-3.0
-7,124,242,593,238,388,000
42.025316
120
0.684437
false
perlygatekeeper/glowing-robot
Little_Alchemy_2/Scraper_python/env/lib/python3.7/site-packages/pip/_vendor/requests/adapters.py
54
21548
# -*- coding: utf-8 -*- """ requests.adapters ~~~~~~~~~~~~~~~~~ This module contains the transport adapters that Requests uses to define and maintain connections. """ import os.path import socket from pip._vendor.urllib3.poolmanager import PoolManager, proxy_from_url from pip._vendor.urllib3.response import HTTPRes...
artistic-2.0
-2,621,863,826,733,095,400
39.427767
108
0.604696
false
pniedzielski/fb-hackathon-2013-11-21
src/repl.it/jsrepl/extern/python/unclosured/lib/python2.7/cgitb.py
113
12073
"""More comprehensive traceback formatting for Python scripts. To enable this module, do: import cgitb; cgitb.enable() at the top of your script. The optional arguments to enable() are: display - if true, tracebacks are displayed in the web browser logdir - if set, tracebacks are written to fi...
agpl-3.0
3,715,695,268,096,965,000
36.965409
90
0.551313
false
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gcutil/lib/google_compute_engine/gcutil_lib/http_health_check_cmds.py
4
13283
# 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 the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
gpl-3.0
-3,659,592,239,247,988,000
39.620795
79
0.617255
false
Inspq/ansible
lib/ansible/modules/network/eos/eos_user.py
1
11534
#!/usr/bin/python # # 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 distribut...
gpl-3.0
-2,268,347,326,517,509,000
31.767045
82
0.629443
false
swiftstack/swift
test/probe/test_object_conditional_requests.py
3
2859
# Copyright (c) 2017 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
2,077,735,531,925,646,300
35.189873
79
0.659671
false
yask123/scikit-learn
sklearn/cross_decomposition/pls_.py
187
28507
""" The :mod:`sklearn.pls` module implements Partial Least Squares (PLS). """ # Author: Edouard Duchesnay <edouard.duchesnay@cea.fr> # License: BSD 3 clause from ..base import BaseEstimator, RegressorMixin, TransformerMixin from ..utils import check_array, check_consistent_length from ..externals import six import w...
bsd-3-clause
-1,253,078,942,775,897,300
35.130545
79
0.580314
false
hurricanerix/swift
test/unit/common/test_constraints.py
2
25596
# Copyright (c) 2010-2012 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 agree...
apache-2.0
5,265,736,012,500,756,000
43.592334
79
0.589194
false
objarni/splinter
splinter/driver/webdriver/firefox.py
7
1689
# -*- coding: utf-8 -*- # Copyright 2012 splinter 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 selenium.webdriver import Firefox from selenium.webdriver.firefox.firefox_profile import FirefoxProfile from splinter.driver.webdri...
bsd-3-clause
-7,536,110,620,435,806,000
34.1875
75
0.698046
false
kaiweifan/horizon
openstack_dashboard/openstack/common/rpc/impl_zmq.py
19
27330
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Cloudscaling Group, 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/LI...
apache-2.0
1,413,085,630,923,204,400
31.228774
78
0.564544
false
refnode/django-material
tests/urls.py
10
2701
from django.conf import settings from django.conf.urls import include, url from django.contrib import admin from django.views import generic from django.shortcuts import render from formtools.wizard.views import SessionWizardView from material.frontend import urls as frontend_urls from . import forms def index_view(...
bsd-3-clause
5,570,869,630,953,741,000
39.924242
114
0.672714
false
baloo/shinken
shinken/modules/nagios_retention_file_scheduler.py
1
14015
#!/usr/bin/python #Copyright (C) 2009 Gabes Jean, naparuba@gmail.com # #This file is part of Shinken. # #Shinken 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 #(at yo...
agpl-3.0
6,549,750,163,472,803,000
37.084239
223
0.520371
false
hspencer77/calyptos
calyptos/plugins/validator/storage.py
3
2489
from calyptos.plugins.validator.validatorplugin import ValidatorPlugin class Storage(ValidatorPlugin): def validate(self): self.topology = self.environment['default_attributes']['eucalyptus']['topology'] if 'system-properties' in self.environment['default_attributes']['eucalyptus']: sel...
bsd-2-clause
802,853,045,652,788,500
72.205882
120
0.516272
false
lantz/nox-tutorial
src/nox/netapps/data/datacache_impl.py
10
1317
# # Copyright 2009 (C) Nicira, Inc. # import logging from nox.lib.core import Component from nox.netapps.data.pydatacache import PyData_cache, Principal_delete_event lg = logging.getLogger('nox.netapps.data.datacache') class DataCache(Component): def __init__(self, ctxt): Component.__init__(self, ctxt)...
gpl-3.0
-6,605,678,839,174,617,000
24.823529
77
0.67426
false
pleaseproject/python-for-android
python-modules/zope/zope/interface/tests/test_verify.py
50
4612
############################################################################## # # Copyright (c) 2001, 2002 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # TH...
apache-2.0
-1,877,555,404,548,287,000
21.831683
78
0.578925
false
leighpauls/k2cro4
v8/tools/testrunner/objects/context.py
9
2331
# Copyright 2012 the V8 project authors. 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 conditi...
bsd-3-clause
-4,111,014,026,997,314,000
45.62
79
0.723724
false
job/pdns
pdns/dnsdistdist/docs/conf.py
4
5977
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # dnsdist documentation build configuration file, created by # sphinx-quickstart on Thu Feb 9 00:08:08 2017. # # 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 # au...
gpl-2.0
-1,673,553,259,749,378,600
29.809278
91
0.670236
false
GerritCodeReview/git-repo
subcmds/prune.py
5
1970
# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
apache-2.0
6,384,002,972,408,990,000
28.402985
74
0.632995
false
petricm/DIRAC
FrameworkSystem/Client/UserProfileClient.py
7
4566
import re from DIRAC import S_OK, S_ERROR from DIRAC.Core.DISET.RPCClient import RPCClient from DIRAC.Core.Utilities import DEncode, Time class UserProfileClient: def __init__( self, profile, rpcClientFunctor = False ): if rpcClientFunctor: self.rpcClientFunctor = rpcClientFunctor else: self.rp...
gpl-3.0
8,489,922,081,879,806,000
34.123077
109
0.653964
false
larrybradley/astropy
astropy/table/tests/test_row.py
8
12241
# Licensed under a 3-clause BSD style license - see LICENSE.rst import sys import pytest import numpy as np from astropy import table from astropy.table import Row from astropy import units as u from .conftest import MaskedTable def test_masked_row_with_object_col(): """ Numpy < 1.8 has a bug in masked arr...
bsd-3-clause
1,862,032,966,493,428,200
33.48169
90
0.506495
false
Mako-kun/mangaki
mangaki/irl/migrations/0004_event_attendees.py
3
1151
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-01-24 18:50 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): dependencies = [ ('irl', '0003_auto_20160124_1...
agpl-3.0
-6,232,436,630,778,113,000
34.96875
118
0.619461
false
ruiaylin/percona-xtrabackup
storage/innobase/xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/ib_basic_test.py
24
4748
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
gpl-2.0
5,441,105,691,830,345,000
40.649123
102
0.592039
false
charleszheng44/cctools
prune/examples/hep/hep.py
4
2059
#!/usr/bin/env cctools_python # CCTOOLS_PYTHON_VERSION 2.7 2.6 # Copyright (c) 2010- The University of Notre Dame. # This software is distributed under the GNU General Public License. # See the file COPYING for details. from prune import client from os.path import expanduser HOME = expanduser("~") prune = client.Co...
gpl-2.0
1,123,455,234,210,677,000
37.849057
97
0.652258
false
meteorfox/PerfKitBenchmarker
tests/windows_packages/ntttcp_test.py
7
2436
# Copyright 2015 PerfKitBenchmarker 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 appli...
apache-2.0
-6,251,217,222,727,145,000
37.0625
77
0.650246
false
stephane-martin/salt-debian-packaging
salt-2016.3.3/salt/cloud/clouds/scaleway.py
1
12629
# -*- coding: utf-8 -*- ''' Scaleway Cloud Module ===================== .. versionadded:: 2015.8.0 The Scaleway cloud module is used to interact with your Scaleway BareMetal Servers. Use of this module only requires the ``api_key`` parameter to be set. Set up the cloud configuration at ``/etc/salt/cloud.providers`` ...
apache-2.0
2,425,591,580,086,018,600
26.15914
102
0.556655
false
savoirfairelinux/shinken
shinken/contactdowntime.py
9
4255
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
agpl-3.0
5,746,675,258,624,689,000
33.593496
78
0.619271
false
rwanyoike/time2relax
tests/test_utils.py
1
2826
import pytest from time2relax import exceptions, utils def test_encode_uri_component(): assert utils.encode_uri_component('escaped%2F1') == 'escaped%252F1' assert utils.encode_uri_component('a/b/c') == 'a%2Fb%2Fc' assert utils.encode_uri_component('az09_$()+-') == 'az09_%24()%2B-' def test_encode_attac...
mit
-4,816,474,937,638,533,000
35.701299
102
0.62385
false
sabas/openaddresses
scripts/at/split.py
38
1591
# -*- coding: utf-8 -*- import __future__ import csv, sys, json, copy, datetime, time def main(address_filename, street_filename): timestamp = datetime.datetime.now().strftime('%Y%m%d') streets = {} with open(street_filename) as f: reader = csv.reader(f, delimiter=';') next(reader) ...
bsd-3-clause
-275,663,616,278,367,040
36
138
0.567925
false
valkyriesavage/invenio
modules/webbasket/lib/webbasket_templates.py
1
179905
## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 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 the ## License, or (at your ...
gpl-2.0
-8,744,590,208,691,014,000
44.464999
307
0.435391
false
izakp/hokusai
hokusai/commands/push.py
1
1727
import os from hokusai.lib.command import command from hokusai.lib.config import config from hokusai.services.ecr import ECR from hokusai.lib.common import print_green, shout from hokusai.lib.exceptions import HokusaiError from hokusai.services.docker import Docker @command() def push(tag, local_tag, build, filename,...
mit
5,132,531,018,474,399,000
40.119048
123
0.686161
false
mburakergenc/Malware-Detection-using-Machine-Learning
cuckoo/modules/processing/suricata.py
1
10407
# Copyright (C) 2010-2013 Claudio Guarnieri. # Copyright (C) 2014-2016 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. import json import logging import os import shutil import subprocess import time from lib.cuckoo.common.a...
mit
-6,520,089,907,699,541,000
34.640411
112
0.521668
false
motmot/libcamiface
prosilica_help.py
1
1097
"""check the installed Prosilica GigE SDK version number""" import ctypes, sys global _libprosilica _libprosilica = None ULong = ctypes.c_long # XXX should be unsigned long def _load_libprosilica(): """load the prosilica shared library""" global _libprosilica if _libprosilica is None: if sys.pla...
bsd-2-clause
1,491,051,727,023,577,900
30.342857
74
0.675479
false
openstack/cinder
tools/config/generate_cinder_opts.py
2
10022
#!/usr/bin/env python3 # 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 ...
apache-2.0
-4,283,805,054,564,391,000
36.676692
78
0.50459
false
lebedov/hide_my_python
ez_setup.py
18
10476
#!/usr/bin/env python """Bootstrap setuptools installation To use setuptools in your package's setup.py, include this file in the same directory and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() To require a specific version of setuptools, set a download mirror, ...
gpl-3.0
687,184,536,479,439,500
30.554217
82
0.642134
false
newerthcom/savagerebirth
libs/python-2.72/Lib/profile.py
84
23466
#! /usr/bin/env python # # Class for profiling python code. rev 1.0 6/2/94 # # Based on prior profile module by Sjoerd Mullender... # which was hacked somewhat by: Guido van Rossum """Class for profiling Python code.""" # Copyright 1994, by InfoSeek Corporation, all rights reserved. # Written by James Roskind # # ...
gpl-2.0
1,428,525,812,623,751,400
36.909532
80
0.595457
false
RaspberryPiFi/PiCode
lib/eyed3/plugins/statistics.py
3
16127
# -*- coding: utf-8 -*- ################################################################################ # Copyright (C) 2009 Travis Shirk <travis@pobox.com> # # 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 So...
gpl-2.0
477,443,273,647,408,830
31.845214
80
0.527686
false
codrut3/tensorflow
tensorflow/contrib/tensor_forest/hybrid/python/models/nn.py
190
1567
# 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
-8,713,946,380,509,174,000
38.175
81
0.682195
false
hiepthai/django-activity-stream
actstream/migrations/0002_auto__chg_field_action_timestamp.py
8
5778
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from actstream.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Action.timestamp' db.alter_column('actstream_act...
bsd-3-clause
5,921,809,438,092,080,000
67.785714
204
0.57217
false
80vs90/libsaas
libsaas/services/basecamp/calendars.py
4
1639
from libsaas import http, parsers from libsaas.services import base from .resource import BasecampResource from .comments import Comments from . import accesses as acc class CalendarEventResource(BasecampResource): path = 'calendar_events' class CalendarEvents(CalendarEventResource): @base.apimethod d...
mit
6,108,411,051,588,087,000
22.753623
69
0.660769
false
rahul67/hue
desktop/core/ext-py/requests-2.6.0/setup.py
40
2124
#!/usr/bin/env python import os import re import sys from codecs import open try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() packages = [ 'requests', 'requests.packages'...
apache-2.0
-472,987,646,894,176,960
26.230769
68
0.609228
false
joakim-hove/opm-common
python/pybind11/docs/conf.py
9
10659
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # pybind11 documentation build configuration file, created by # sphinx-quickstart on Sun Oct 11 19:23:48 2015. # # 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 # a...
gpl-3.0
7,199,990,814,751,698,000
31.105422
79
0.694812
false
mbaijal/incubator-mxnet
example/memcost/inception_memcost.py
44
5758
# 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
-37,715,476,947,024,430
52.813084
141
0.647621
false
Microsoft/Tocino
src/visualizer/bindings/modulegen__gcc_LP64.py
82
361459
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
-6,258,655,800,459,854,000
63.316548
934
0.608719
false
thomazs/geraldo
site/newsite/django_1_0/django/db/backends/__init__.py
9
9142
try: # Only exists in Python 2.4+ from threading import local except ImportError: # Import copy of _thread_local.py from Python 2.4 from django.utils._threading_local import local class BaseDatabaseWrapper(local): """ Represents a database connection. """ ops = None def __init__(sel...
lgpl-3.0
-8,961,274,831,834,308,000
33.498113
98
0.627434
false
joxer/Baka-No-Voltron
tmp/android.dist/private/renpy/dump.py
1
6422
# Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us> # # 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, modify, m...
gpl-2.0
-3,012,946,460,475,334,700
25.53719
90
0.575366
false
h4ck3rm1k3/MapNickAutotools
scons/scons-local-1.2.0/SCons/Tool/rpm.py
12
4426
"""SCons.Tool.rpm Tool-specific initialization for rpm. 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. The rpm tool calls the rpmbuild command. The first and only argument should a tar.gz consisting of the sourc...
lgpl-2.1
-7,671,723,697,918,241,000
34.126984
92
0.654089
false
ram8647/gcb-mobilecsp
modules/analytics/page_event_aggregator.py
1
14112
# 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
7,271,064,020,658,182,000
37.876033
80
0.622591
false
flyher/pymo
symbian/PythonForS60/module-repo/standard-modules/xml/sax/xmlreader.py
28
12656
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReader is the...
mit
790,682,987,084,253,300
32.217848
78
0.661583
false