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
cfelton/rhea
rhea/build/fpga.py
1
8511
# # Copyright (c) 2014-2015 Christopher Felton # import os import shutil import inspect from random import randint from copy import copy import myhdl from myhdl._block import _Block as Block from .extintf import Port from .extintf import Clock from .extintf import Reset class FPGA(object): """ """ vendor =...
mit
-7,065,893,078,664,873,000
32.116732
82
0.546587
false
h4r5h1t/django-hauthy
django/db/migrations/autodetector.py
87
54478
from __future__ import unicode_literals import datetime import re from itertools import chain from django.conf import settings from django.db import models from django.db.migrations import operations from django.db.migrations.migration import Migration from django.db.migrations.operations.models import AlterModelOpti...
bsd-3-clause
-44,870,453,815,950,104
47.424889
166
0.546753
false
ThreeSixes/airSuck
airSuckClient.py
1
41255
#!/usr/bin/python """ airSuckClient by ThreeSixes (https://github.com/ThreeSixes) This project is licensed under GPLv3. See COPYING for dtails. This file is part of the airSuck project (https://github.com/ThreeSixes/airSUck). """ ########### # Imports # ########### try: import config except: raise IOError(...
gpl-3.0
5,499,725,881,586,714,000
34.382504
193
0.47616
false
bhargav2408/python-for-android
python-build/python-libs/gdata/src/gdata/media/__init__.py
221
12093
# -*-*- encoding: utf-8 -*-*- # # This is gdata.photos.media, implementing parts of the MediaRSS spec in gdata structures # # $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # Portions copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "Lice...
apache-2.0
2,280,272,921,239,872,500
33.059155
104
0.692002
false
mikelalcon/bazel
third_party/py/mock/docs/conf.py
108
6310
# -*- coding: utf-8 -*- # # Mock documentation build configuration file, created by # sphinx-quickstart on Mon Nov 17 18:12:00 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleable...
apache-2.0
4,843,835,784,331,451,000
29.196172
82
0.711094
false
Luxoft/Twister
lib/Ixia/generate.py
2
15483
#!/usr/bin/env python # File: generate.py ; This file is part of Twister. # version: 2.003 # Copyright (C) 2013 , Luxoft # Authors: # Adrian Toader <adtoader@luxoft.com> # Andrei Costachi <acostachi@luxoft.com> # Andrei Toma <atoma@luxoft.com> # Cristi Constantin <crconstantin@luxoft.com> # Daniel Ci...
apache-2.0
7,404,327,283,181,116,000
29.538462
120
0.597042
false
charactory/namcap
Namcap/fhsmanpages.py
2
1594
# # namcap rules - fhsmanpages # Copyright (C) 2008 Aaron Griffin <aaronmgriffin@gmail.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 Software Foundation; either version 2 of the License, or # (at ...
gpl-2.0
9,022,469,419,903,615,000
33.652174
88
0.694479
false
dparlevliet/zelenka-report-storage
server-db/twisted/trial/_dist/test/test_worker.py
33
14642
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Test for distributed trial worker side. """ import os from cStringIO import StringIO from zope.interface.verify import verifyObject from twisted.trial.reporter import TestResult from twisted.trial.unittest import TestCase from twisted.trial...
lgpl-3.0
-8,039,814,673,655,041,000
29.955603
79
0.619246
false
konrado0/vosqa
forum_modules/oauthauth/lib/oauth2/httplib2/socks.py
29
16293
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. 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. Redistributions of source code must retain the above copyright notice, this ...
gpl-3.0
6,213,641,939,644,820,000
41.319481
136
0.609955
false
zachmullen/boto
boto/configservice/exceptions.py
135
2528
# Copyright (c) 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights ...
mit
5,010,268,583,664,105,000
23.543689
77
0.800633
false
sanghinitin/golismero
tools/sqlmap/plugins/dbms/mssqlserver/filesystem.py
8
14284
#!/usr/bin/env python """ Copyright (c) 2006-2013 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import ntpath import os from lib.core.common import getLimitRange from lib.core.common import isNumPosStrValue from lib.core.common import isTechniqueAvailable from lib.core....
gpl-2.0
-8,906,479,215,008,853,000
39.23662
287
0.591291
false
nuagenetworks/vspk-python
vspk/v6/fetchers/nuipfilterprofiles_fetcher.py
2
2156
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
3,555,821,321,365,558,300
39.698113
86
0.730983
false
bols-blue/ansible
plugins/inventory/jail.py
132
1288
#!/usr/bin/env python # (c) 2013, Michael Scherer <misc@zarb.org> # # 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 o...
gpl-3.0
1,940,142,698,944,674,800
33.810811
73
0.696429
false
maikodaraine/EnlightenmentUbuntu
bindings/python/python-efl/examples/elementary/test_segment_control.py
1
2798
#!/usr/bin/env python # encoding: utf-8 import os from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL from efl import elementary from efl.elementary.window import StandardWindow from efl.elementary.box import Box from efl.elementary.icon import Icon from efl.elementary.segment_control import SegmentControl EXPAND_...
unlicense
-3,053,627,461,250,338,000
25.647619
76
0.645461
false
AlexanderKaluzhny/instanotifier
instanotifier/notification/serializers.py
1
1953
from copy import deepcopy import hashlib from bs4 import BeautifulSoup from rest_framework import serializers from instanotifier.notification.models import RssNotification from instanotifier.notification.utils import html def _parse_country(summary): soup = BeautifulSoup(summary, features="html5lib") countr...
mit
517,890,186,136,581,800
34.509091
106
0.678443
false
stgraber/snapcraft
integration_tests/test_make_plugin.py
6
2306
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2015, 2016 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in...
gpl-3.0
-4,563,130,811,681,119,000
32.911765
71
0.648742
false
gustavomazevedo/tbackup-client
client/migrations/0009_auto__add_field_backup_origin__chg_field_backup_remote_id.py
1
4529
# -*- 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 'Backup.origin' db.add_column(u'client_backup', 'origin', ...
mit
-9,024,610,039,972,506,000
55.625
134
0.547141
false
makacodewalker/etsgh
django/utils/datetime_safe.py
496
2685
# Python's datetime strftime doesn't handle dates before 1900. # These classes override date and datetime to support the formatting of a date # through its full "proleptic Gregorian" date range. # # Based on code submitted to comp.lang.python by Andrew Dalke # # >>> datetime_safe.date(1850, 8, 2).strftime("%Y/%m/%d was...
bsd-3-clause
-2,379,734,288,544,815,600
29.168539
111
0.627561
false
j00bar/django-widgy
widgy/contrib/form_builder/views.py
1
1271
from django.views.generic.edit import FormMixin from django.shortcuts import get_object_or_404 from widgy.models import Node class HandleFormMixin(FormMixin): """ An abstract view mixin for handling form_builder.Form submissions. """ def post(self, *args, **kwargs): """ copied from dja...
apache-2.0
-5,065,467,504,449,733,000
31.589744
81
0.636507
false
fighterCui/L4ReFiascoOC
l4/pkg/python/contrib/Lib/tokenize.py
62
16326
"""Tokenization help for Python programs. generate_tokens(readline) is a generator that breaks a stream of text into Python tokens. It accepts a readline-like method which is called repeatedly to get the next line of input (or "" for EOF). It generates 5-tuples with these members: the token type (see token.py) ...
gpl-2.0
-3,449,478,419,062,740,500
38.339759
89
0.506554
false
log2timeline/dfvfs
dfvfs/file_io/compressed_stream_io.py
2
9519
# -*- coding: utf-8 -*- """The compressed stream file-like object implementation.""" import os from dfvfs.compression import manager as compression_manager from dfvfs.file_io import file_io from dfvfs.lib import errors from dfvfs.resolver import resolver class CompressedStream(file_io.FileIO): """File input/outpu...
apache-2.0
-4,738,338,381,616,714,000
29.315287
80
0.668348
false
ppries/tensorflow
tensorflow/python/kernel_tests/softmax_op_test.py
11
6928
# 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
3,633,917,365,880,471,600
35.083333
80
0.573326
false
vipul-sharma20/oh-mainline
vendor/packages/Django/tests/modeltests/model_formsets/tests.py
51
61280
from __future__ import absolute_import, unicode_literals import datetime import re from datetime import date from decimal import Decimal from django import forms from django.db import models from django.forms.models import (_get_foreign_key, inlineformset_factory, modelformset_factory) from django.test import Tes...
agpl-3.0
7,439,276,844,429,428,000
50.409396
381
0.602529
false
hargup/sympy
sympy/integrals/trigonometry.py
83
10631
# -*- coding: utf-8 -*- from __future__ import print_function, division from sympy.core.compatibility import range from sympy.core import cacheit, Dummy, Eq, Integer, Rational, S, Wild from sympy.functions import binomial, sin, cos, Piecewise # TODO sin(a*x)*cos(b*x) -> sin((a+b)x) + sin((a-b)x) ? # creating, each ...
bsd-3-clause
-6,437,232,332,191,155,000
32.642405
80
0.312859
false
buqing2009/MissionPlanner
Lib/email/iterators.py
68
2275
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """Various types of useful iterators and generators.""" __all__ = [ 'body_line_iterator', 'typed_subpart_iterator', 'walk', # Do not include _structure() since it's part of the debuggi...
gpl-3.0
-5,882,983,571,060,583,000
27.973684
75
0.62022
false
maurerpe/FreeCAD
src/Mod/Fem/FemCommands.py
3
6302
#*************************************************************************** #* * #* Copyright (c) 2015 - FreeCAD Developers * #* Author (c) 2015 - Przemo Fiszt < przemo@firszt.eu> * #* ...
lgpl-2.1
502,027,295,243,265,300
50.235772
145
0.515233
false
spjmurray/openstack-sentinel
sentinel/api/controllers/network/v2/floatingips.py
1
1120
# Copyright 2017 DataCentred Ltd # # 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 ag...
apache-2.0
-5,755,952,018,048,773,000
31
78
0.733036
false
xiandiancloud/ji
common/djangoapps/user_api/tests/test_models.py
52
1757
from django.db import IntegrityError from django.test import TestCase from student.tests.factories import UserFactory from user_api.tests.factories import UserPreferenceFactory from user_api.models import UserPreference class UserPreferenceModelTest(TestCase): def test_duplicate_user_key(self): user = Use...
agpl-3.0
6,458,343,760,129,347,000
36.382979
99
0.656801
false
caibo2014/teuthology
teuthology/prune.py
3
4784
import logging import os import shutil import time import teuthology from teuthology.contextutil import safe_while log = logging.getLogger(__name__) # If we see this in any directory, we do not prune it PRESERVE_FILE = '.preserve' def main(args): """ Main function; parses args and calls prune_archive() ...
mit
6,905,389,367,518,952,000
30.267974
79
0.605142
false
lucywyman/slides-ii
v/lib/python2.7/site-packages/pygments/lexers/factor.py
72
17864
# -*- coding: utf-8 -*- """ pygments.lexers.factor ~~~~~~~~~~~~~~~~~~~~~~ Lexers for the Factor language. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups, default, words from ...
apache-2.0
2,164,327,082,958,854,700
50.930233
106
0.508453
false
pawkoz/dyplom
blender/build_files/cmake/project_source_info.py
2
7070
# ***** BEGIN GPL LICENSE BLOCK ***** # # 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 ...
gpl-2.0
-4,033,341,245,711,790,000
27.508065
105
0.569448
false
openhatch/oh-mainline
vendor/packages/django-extensions/django_extensions/utils/uuid.py
44
20400
r"""UUID objects (universally unique identifiers) according to RFC 4122. This module provides immutable UUID objects (class UUID) and the functions uuid1(), uuid3(), uuid4(), uuid5() for generating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122. If all you want is a unique ID, you should probably call uuid1() ...
agpl-3.0
-4,337,568,236,918,039,000
35.170213
79
0.6
false
vjmac15/Lyilis
lib/youtube_dl/extractor/dailymotion.py
13
18180
# coding: utf-8 from __future__ import unicode_literals import re import json import itertools from .common import InfoExtractor from ..utils import ( determine_ext, error_to_compat_str, ExtractorError, int_or_none, parse_iso8601, sanitized_Request, str_to_int, unescapeHTML, mimet...
gpl-3.0
-8,468,256,538,332,842,000
38.174569
197
0.517302
false
chvrga/outdoor-explorer
java/play-1.4.4/python/Lib/site-packages/win32/lib/win32traceutil.py
9
1528
# This is a helper for the win32trace module # If imported from a normal Python program, it sets up sys.stdout and sys.stderr # so output goes to the collector. # If run from the command line, it creates a collector loop. # Eg: # C:>start win32traceutil.py (or python.exe win32traceutil.py) # will start a pr...
mit
2,440,878,280,362,501,000
25.781818
80
0.704188
false
hawken93/mplayerhq
TOOLS/vobshift.py
71
1048
#!/usr/bin/env python #usage: # # vobshift.py in.idx out.idx -8.45 # # this will read in in.idx,shift it by 8.45 seconds back, # and save it as out.idx # # license: i don't care ;) # import datetime import sys def tripletize(line): begin = line[:11] middle = line[11:23] end = line[23:] return (begin,middle,end) ...
gpl-2.0
-4,942,677,992,306,953,000
17.068966
74
0.649809
false
aprefontaine/TMScheduler
tests/regressiontests/forms/localflavor/uy.py
14
2014
# -*- coding: utf-8 -*- # Tests for the contrib/localflavor/ UY form fields. tests = r""" # UYDepartamentSelect ######################################################### >>> from django.contrib.localflavor.uy.forms import UYDepartamentSelect >>> f = UYDepartamentSelect() >>> f.render('departamentos', 'S') u'<select n...
bsd-3-clause
3,891,448,946,487,106,000
42.782609
780
0.653426
false
earshel/PokeyPyManager
POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage_pb2.py
16
4749
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/DownloadRemoteConfigVersionMessage.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 m...
mit
4,457,933,379,265,750,500
46.49
502
0.761845
false
chubbymaggie/CuckooSploit
utils/db_migration/versions/from_0_6_to_1_1.py
6
14422
# Copyright (C) 2010-2015 Cuckoo Foundation. # This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org # See the file 'docs/LICENSE' for copying permission. """Database migration from Cuckoo 0.6 to Cuckoo 1.1. Revision ID: 263a45963c72 Revises: None Create Date: 2014-03-23 23:30:36.756792 """ # Revision ...
gpl-3.0
793,602,748,365,122,200
47.558923
233
0.575163
false
brokenjacobs/ansible
lib/ansible/modules/utilities/logic/include.py
50
2305
#!/usr/bin/python # -*- mode: python -*- # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the...
gpl-3.0
-6,607,312,639,857,545,000
30.575342
150
0.678959
false
gooddata/openstack-nova
nova/tests/unit/virt/vmwareapi/test_volumeops.py
2
33206
# Copyright 2013 IBM Corp. # # 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
-7,208,667,700,467,265,000
47.405248
79
0.575559
false
m4yers/crutch
crutch/core/repl/keys.py
1
2604
# -*- coding: utf-8 -*- # Copyright © 2017 Artyom Goncharov # # 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
6,192,369,523,596,733,000
34.175676
78
0.730695
false
umitanuki/chainer
chainer/functions/negative_sampling.py
4
6735
import numpy import six from chainer import cuda from chainer import function from chainer.utils import type_check from chainer.utils import walker_alias class NegativeSampling(function.Function): """Implementation of negative sampling. In natural language processing, especially language modeling, the numbe...
mit
-330,435,326,638,246,140
30.325581
79
0.493244
false
alexallah/django
django/db/models/fields/files.py
11
18028
import datetime import posixpath from django import forms from django.core import checks from django.core.files.base import File from django.core.files.images import ImageFile from django.core.files.storage import default_storage from django.core.validators import validate_image_file_extension from django.db.models im...
bsd-3-clause
-2,786,124,613,586,705,000
37.769892
100
0.619037
false
Medigate/cutiuta-server
cutiuta-server/env/lib/python3.4/site-packages/django/utils/termcolors.py
87
7302
""" termcolors.py """ from django.utils import six color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white') foreground = {color_names[x]: '3%s' % x for x in range(8)} background = {color_names[x]: '4%s' % x for x in range(8)} RESET = '0' opt_dict = {'bold': '1', 'underscore': '4', 'blink...
gpl-3.0
8,024,579,316,895,611,000
33.121495
89
0.529581
false
javierTerry/odoo
addons/web/doc/_themes/flask_theme_support.py
2228
4875
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "...
agpl-3.0
-7,218,263,949,294,705,000
55.686047
83
0.435897
false
wfxiang08/django178
django/contrib/formtools/tests/wizard/namedwizardtests/forms.py
95
1760
import os import tempfile from django import forms from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.http import HttpResponse from django.template import Template, Context from django.contrib.auth.models import User from django.contrib.formtools.wiz...
bsd-3-clause
-1,027,926,735,189,552,300
29.344828
84
0.723864
false
jjscarafia/server-tools
base_optional_quick_create/model.py
41
2507
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Licen...
agpl-3.0
-2,564,209,502,535,694,300
38.793651
78
0.579976
false
cloudbase/neutron
neutron/services/trunk/drivers/linuxbridge/driver.py
4
1688
# # 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 the Li...
apache-2.0
-9,081,539,082,100,173,000
30.849057
79
0.73519
false
caot/intellij-community
python/lib/Lib/site-packages/django/core/management/base.py
248
16452
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
apache-2.0
5,640,662,413,334,929,000
37.171694
177
0.617372
false
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/youtube.py
1
131830
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import random import re import time import traceback from .common import InfoExtractor, SearchInfoExtractor from ..jsinterp import JSInterpreter from ..swfinterp import SWFInterpreter from ..compat import ( compa...
gpl-3.0
-7,517,958,334,063,962,000
44.275542
348
0.505638
false
michaelkirk/QGIS
python/plugins/processing/algs/qgis/PointsInPolygonWeighted.py
1
5085
# -*- coding: utf-8 -*- """ *************************************************************************** PointsInPolygon.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
gpl-2.0
-7,380,120,518,761,429,000
38.726563
89
0.551426
false
xrg/django-static-gitified
django/core/management/commands/runserver.py
77
5859
from optparse import make_option import os import re import sys import socket from django.core.management.base import BaseCommand, CommandError from django.core.servers.basehttp import AdminMediaHandler, run, WSGIServerException, get_internal_wsgi_application from django.utils import autoreload naiveip_re = re.compil...
bsd-3-clause
7,937,914,613,567,935,000
40.260563
115
0.574501
false
dongpf/hadoop-0.19.1
src/contrib/hod/testing/helper.py
182
1122
#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 use thi...
apache-2.0
-7,826,313,136,662,599,000
33
73
0.73975
false
dstrockis/outlook-autocategories
lib/azure/storage/queue/_encryption.py
1
7544
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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://ww...
apache-2.0
-5,437,619,816,642,808,000
41.618497
132
0.678685
false
olexiim/edx-platform
lms/djangoapps/instructor_task/tests/test_views.py
204
17817
""" Test for LMS instructor background task views. """ import json from celery.states import SUCCESS, FAILURE, REVOKED, PENDING from mock import Mock, patch from django.utils.datastructures import MultiValueDict from instructor_task.models import PROGRESS from instructor_task.tests.test_base import (InstructorTaskT...
agpl-3.0
4,168,649,275,704,459,000
45.398438
118
0.639053
false
yxcoin/yxcoin
src/boost_1_55_0/tools/build/v2/test/library_chain.py
44
3427
#!/usr/bin/python # Copyright 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that a chain of libraries works ok, no matter if we use static or shared # linking. import BoostBuil...
mit
-2,478,502,187,285,547,000
21.546053
81
0.634958
false
brennie/reviewboard
reviewboard/admin/widgets.py
7
17971
from __future__ import unicode_literals import datetime import logging import re import time from django.core.cache import cache from django.contrib.auth.models import User from django.db.models.aggregates import Count from django.db.models.signals import post_save, post_delete from django.template.context import Req...
mit
1,413,664,489,425,819,100
30.363002
79
0.583774
false
eli-schwartz/Sigil
src/Resource_Files/plugin_launchers/python/sigil_bs4/builder/_htmlparser.py
6
9793
from __future__ import unicode_literals, division, absolute_import, print_function import sys PY3 = sys.version_info[0] == 3 if PY3: text_type = str binary_type = bytes unicode = str basestring = str else: range = xrange text_type = unicode binary_type = str chr = unichr """Use the HTM...
gpl-3.0
-4,331,471,542,079,802,000
33.361404
318
0.579291
false
susilehtola/psi4
psi4/driver/procrouting/findif_response_utils/data_collection_helper.py
6
4102
# # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2021 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This file is part of Psi4. # # Psi4 is free software; you can redistribute it and/or modify #...
lgpl-3.0
-7,074,792,179,122,510,000
35.300885
84
0.62823
false
wangjun/odoo
openerp/addons/base/tests/test_menu.py
501
1450
import openerp.tests.common as common class test_menu(common.TransactionCase): def setUp(self): super(test_menu,self).setUp() self.Menus = self.registry('ir.ui.menu') def test_00_menu_deletion(self): """Verify that menu deletion works properly when there are child menus, and those ...
agpl-3.0
6,516,303,362,321,979,000
44.3125
120
0.614483
false
angad/libjingle-mac
scons-2.2.0/engine/SCons/exitfuncs.py
14
2436
"""SCons.exitfuncs Register functions which are executed when SCons exits for any reason. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associate...
bsd-3-clause
5,128,815,614,918,034,000
30.636364
107
0.724548
false
gpoesia/servo
tests/wpt/harness/wptrunner/manifestupdate.py
116
17251
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. import os import urlparse from collections import namedtuple, defaultdict from wptmanifest.node import (DataNode, Condi...
mpl-2.0
2,270,650,863,544,289,500
37.081678
92
0.607385
false
LorneWu/e-Gental-downloader
note tor_try_cloudflare_fail.py
1
1111
import socks import socket from urllib.request import urlopen import requests import header_s import time from bs4 import BeautifulSoup socks.set_default_proxy(socks.SOCKS5, "localhost", 9050) socket.socket = socks.socksocket print(requests.get('http://icanhazip.com').text) print(urlopen('http://icanhazip.com').r...
gpl-3.0
-138,625,734,406,110,530
33.75
184
0.70297
false
aperigault/ansible
lib/ansible/modules/cloud/amazon/ec2_metric_alarm.py
11
12566
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['stableinterf...
gpl-3.0
-1,040,837,811,964,048,900
35.423188
155
0.587617
false
ulnic/weatherSensor
data/ConfigurationReader.py
1
2775
#!/usr/bin/python """ Configuration Handler """ import logging # noinspection PyCompatibility import ConfigParser import data.Constants logger = logging.getLogger(data.Constants.Constant.LOGGER_NAME) class ConfigurationReader(object): """ Class handling the configuration parser from the configuration.ini fil...
mit
3,018,315,172,325,340,700
36
106
0.654054
false
rodrigc/buildbot
master/buildbot/test/unit/util/test_netstrings.py
6
1708
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
1,147,959,568,604,553,000
36.955556
79
0.706089
false
kigawas/shadowsocks
shadowsocks/daemon.py
694
5602
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2014-2015 clowwindy # # 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 requi...
apache-2.0
-997,238,483,029,674,400
25.932692
79
0.582114
false
simartin/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptrunner.py
1
18782
from __future__ import print_function, unicode_literals import json import os import sys from six import iteritems, itervalues import wptserve from wptserve import sslutils from . import environment as env from . import instruments from . import mpcontext from . import products from . import testloader from . impor...
mpl-2.0
9,151,762,934,626,529,000
41.979405
108
0.496007
false
boddmg/dsp-playground
experiment.py
1
2717
from matplotlib import pyplot as plt import numpy as np import math import pickle from scipy import signal from numpy.fft import rfft, irfft from numpy import argmax, sqrt, mean, absolute, arange, log10 from scipy.signal import blackmanharris import thdn def single_frequency_filter(input_signal): y_f_all = np.fft....
mit
7,088,321,069,531,969,000
24.87619
82
0.57085
false
sidzan/netforce
netforce_general/netforce_general/set_module_version.py
2
1178
# Copyright (c) 2012-2015 Netforce Co. Ltd. # # 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, merge, publ...
mit
-5,861,002,526,525,387,000
50.217391
80
0.775042
false
farra/apachecon-consite
public/javascripts/fckeditor/_samples/py/sampleposteddata.py
1
2067
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2007 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
mit
-7,844,805,213,854,063,000
22.317647
76
0.630382
false
Akson/RemoteConsolePlus3
RemoteConsolePlus3/RCP3/Backends/Sources/ZMQ/Tools/UI.py
1
5885
#Created by Dmytro Konobrytskyi, 2013 (github.com/Akson) import wx from RCP3.Backends.Sources.ZMQ.Tools.RoutersListProvider import GetAvailableRoutersList class ServerSelectionDialog(wx.Dialog): def __init__(self, currentServerAddress = None): super(ServerSelectionDialog, self).__init__(parent=None, size=(...
lgpl-3.0
-610,739,986,345,620,500
42.6
123
0.668479
false
imrandomizer/Algorithm-Implementations
Hamming_Code/Python/AlexMathew/HammingCode.py
27
1830
""" AUTHOR : Alex Mathew EMAIL : alexmathew003@gmail.com There is a lot I can do to improve this implementation. """ """For a given binary word, print out its corresponding Hamming Coded word""" import math def FindKeyBits(n): keyBits=[] pad = int(math.ceil(math.log(n)/math.log(2))) for i in xrange(1, n+1):...
mit
3,182,387,992,965,928,400
22.177215
78
0.650273
false
nachandr/cfme_tests
cfme/tests/perf/workloads/test_idle.py
2
2619
"""Runs Idle Workload by resetting appliance and enabling specific roles with no providers.""" import time import pytest from cfme.utils.conf import cfme_performance from cfme.utils.grafana import get_scenario_dashboard_urls from cfme.utils.log import logger from cfme.utils.smem_memory_monitor import add_workload_qua...
gpl-2.0
702,448,374,173,108,000
38.681818
98
0.699504
false
optimizers/nlpy
nlpy/optimize/solvers/nlpy_funnel.py
3
5078
#!/usr/bin/env python from nlpy import __version__ from nlpy.model import AmplModel from nlpy.optimize.solvers.funnel import Funnel, LSTRFunnel, LDFPFunnel, \ StructuredLDFPFunnel from nlpy.tools.timing import cputime from optparse import OptionParser import numpy import nlpy.t...
gpl-3.0
617,298,200,298,347,500
37.180451
83
0.606144
false
MostlyOpen/odoo_addons
myo_document/models/document_seq.py
1
3257
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # 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 #...
agpl-3.0
334,841,388,898,515,650
39.209877
106
0.543138
false
sanghinitin/golismero
tools/theHarvester/discovery/DNS/Base.py
24
11574
""" $Id: Base.py,v 1.12.2.4 2007/05/22 20:28:31 customdesigned Exp $ This file is part of the pydns project. Homepage: http://pydns.sourceforge.net This code is covered by the standard Python License. Base functionality. Request and Response classes, that sort of thing. """ import socket, string, types, time im...
gpl-2.0
-6,877,081,800,795,135,000
33.242604
80
0.574218
false
station7/xbmc
addons/service.xbmc.versioncheck/lib/common.py
82
6948
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # 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 versio...
gpl-2.0
-4,388,351,131,310,801,400
38.482955
155
0.581894
false
sbesson/openmicroscopy
docs/sphinx-api/conf.py
6
4384
# -*- coding: utf-8 -*- # # OMERO.py API documentation build configuration file, created by # sphinx-quickstart on Mon Jul 23 12:22:32 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # ...
gpl-2.0
8,927,459,474,815,943,000
31.962406
103
0.681569
false
mfacorcoran/pycaldb
nustar_caldb/nustar_caldb_patch.py
1
9035
def patch_nustar_caldb(version, nupatchserver = "hassif.caltech.edu", nupatchworkdir = "/pub/nustar/pipeline", caldb = "/FTP/caldb", caldbstage = "/FTP/caldb/staging", ck_file_exists='True'): """ C...
gpl-2.0
-8,444,047,767,977,949,000
39.698198
132
0.622247
false
camptocamp/ngo-addons-backport
addons/resource/resource.py
35
25745
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-6,097,168,510,317,472,000
49.087549
356
0.564614
false
ethereum/solidity
scripts/regressions.py
1
4285
#!/usr/bin/env python3 from argparse import ArgumentParser import sys import os import subprocess import re import glob import threading import time DESCRIPTION = """Regressor is a tool to run regression tests in a CI env.""" class PrintDotsThread(object): """Prints a dot every "interval" (default is 300) second...
gpl-3.0
-8,180,785,861,071,993,000
32.740157
102
0.538156
false
zhjunlang/kbengine
kbe/src/lib/python/Lib/multiprocessing/dummy/__init__.py
79
2881
# # Support for the API of the multiprocessing package using threads # # multiprocessing/dummy/__init__.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = [ 'Process', 'current_process', 'active_children', 'freeze_support', 'Lock', 'RLock', 'Semaphore', 'Boun...
lgpl-3.0
-4,967,700,055,803,868,000
23.210084
79
0.622353
false
2013Commons/HUE-SHARK
desktop/core/ext-py/eventlet-0.9.14/tests/parse_results.py
7
3671
import sys import os import traceback try: import sqlite3 except ImportError: import pysqlite2.dbapi2 as sqlite3 import re import glob def parse_stdout(s): argv = re.search('^===ARGV=(.*?)$', s, re.M).group(1) argv = argv.split() testname = argv[-1] del argv[-1] hub = None reactor = Non...
apache-2.0
1,373,256,941,787,906,300
32.990741
105
0.51076
false
perzizzle/ansible-modules-extras
packaging/os/zypper_repository.py
22
8763
#!/usr/bin/python # encoding: utf-8 # (c) 2013, Matthias Vogelgesang <matthias.vogelgesang@gmail.com> # (c) 2014, Justin Lecher <jlec@gentoo.org> # # 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 #...
gpl-3.0
1,061,772,929,313,967,600
29.427083
154
0.60881
false
lishuai12/onosfw-L3
tools/test/topos/rftesttopo.py
35
1679
#!/usr/bin/env python """ """ from mininet.topo import Topo from mininet.net import Mininet from mininet.node import RemoteController from mininet.node import Node from mininet.node import CPULimitedHost from mininet.link import TCLink from mininet.cli import CLI from mininet.log import setLogLevel from mininet.util i...
apache-2.0
105,193,427,664,448,300
27.457627
59
0.57296
false
pycharmers-hackathon/hackathon-rep
SmartFuel/SmartFuel/aco.py
2
3615
from math import radians, cos, sin, sqrt, atan2 import random import operator def aco(petrol_stations, gas_type, capacity, initial_petrol, overall_dist, consumption, source, target, ants=2, a=1, b=1, iterations=10): pheromone = {station['id']: 4 for station in petrol_stations} probability = lambda sour...
cc0-1.0
8,963,224,348,596,850,000
39.177778
99
0.584786
false
bcarlin/flask-scss
doc/conf.py
1
7157
# -*- coding: utf-8 -*- # # Flask-Scss documentation build configuration file, created by # sphinx-quickstart on Fri Jul 8 17:32:32 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
mit
2,545,251,070,512,069,600
31.680365
80
0.703926
false
tdmsinc/three.js
utils/converters/msgpack/msgpack/fallback.py
641
26403
"""Fallback pure Python implementation of msgpack""" import sys import array import struct if sys.version_info[0] == 3: PY3 = True int_types = int Unicode = str xrange = range def dict_iteritems(d): return d.items() else: PY3 = False int_types = (int, long) Unicode = unicode ...
mit
335,946,032,770,226,560
35.978992
90
0.524069
false
djabber/Dashboard
bottle/dash/local/lib/python2.7/site-packages/setuptools/tests/server.py
452
2651
"""Basic http server for tests to simulate PyPI or custom indexes """ import sys import time import threading from setuptools.compat import BaseHTTPRequestHandler from setuptools.compat import (urllib2, URLError, HTTPServer, SimpleHTTPRequestHandler) class IndexServer(HTTPServer): ""...
mit
-8,197,405,527,002,301,000
31.329268
72
0.607695
false
dexterx17/nodoSocket
clients/Python-2.7.6/Lib/distutils/command/upload.py
176
7002
"""distutils.command.upload Implements the Distutils 'upload' subcommand (upload package to PyPI).""" import os import socket import platform from urllib2 import urlopen, Request, HTTPError from base64 import standard_b64encode import urlparse import cStringIO as StringIO from hashlib import md5 from distutils.errors...
mit
-8,618,214,291,133,476,000
35.092784
84
0.537846
false
baylee/django
tests/template_tests/filter_tests/test_dictsortreversed.py
181
1686
from django.template.defaultfilters import dictsortreversed from django.test import SimpleTestCase class FunctionTests(SimpleTestCase): def test_sort(self): sorted_dicts = dictsortreversed( [{'age': 23, 'name': 'Barbara-Ann'}, {'age': 63, 'name': 'Ra Ra Rasputin'}, {...
bsd-3-clause
-4,918,233,202,347,198,000
34.125
68
0.488138
false
p4datasystems/CarnotKE
jyhton/lib-python/2.7/plat-linux2/DLFCN.py
158
1628
# Generated by h2py from /usr/include/dlfcn.h _DLFCN_H = 1 # Included from features.h _FEATURES_H = 1 __USE_ANSI = 1 __FAVOR_BSD = 1 _ISOC99_SOURCE = 1 _POSIX_SOURCE = 1 _POSIX_C_SOURCE = 199506L _XOPEN_SOURCE = 600 _XOPEN_SOURCE_EXTENDED = 1 _LARGEFILE64_SOURCE = 1 _BSD_SOURCE = 1 _SVID_SOURCE = 1 _BSD_SOURCE = 1 _SV...
apache-2.0
2,696,901,573,539,431,400
18.614458
76
0.652948
false
zcbenz/cefode-chromium
tools/find_runtime_symbols/tests/proc_maps_test.py
38
4611
#!/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 cStringIO import logging import os import sys import unittest ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__...
bsd-3-clause
-4,947,077,876,686,821,000
40.918182
80
0.574279
false
wangyum/spark
sql/gen-sql-config-docs.py
15
4773
# # 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 us...
apache-2.0
-6,565,091,840,375,546,000
34.355556
99
0.586424
false
lybicat/lybica-runner
tst/test_lybica/actions/user_script.py
1
1597
from unittest import TestCase from lybica.actions.user_script import _UserScriptAction from lybica.__main__ import Context import os import shutil class TestUserScriptAction(TestCase): def setUp(self): super(TestUserScriptAction, self).setUp() self.context = Context() os.environ['WORKSPACE...
mit
5,165,583,143,240,525,000
37.02381
115
0.617408
false
kellyaj/pytactoe
pytactoe/test/test_computer.py
1
3921
import unittest from mock import MagicMock from pytactoe.board import Board from pytactoe.computer import Computer class ComputerTests(unittest.TestCase): def setUp(self): self.computer = Computer("O") self.board = Board() def test_computer_initializes_with_a_mark(self): self.assertEq...
mit
-2,769,153,688,733,761,000
36.701923
77
0.616424
false
mrtukkin/svm-street-detector
devkit_kitti/helper.py
1
12022
#!/usr/bin/env python # # THE KITTI VISION BENCHMARK SUITE: ROAD BENCHMARK # # Copyright (C) 2013 # Honda Research Institute Europe GmbH # Carl-Legien-Str. 30 # 63073 Offenbach/Main # Germany # # UNPUBLISHED PROPRIETARY MATERIAL. # ALL RIGHTS RESERVED. # # Authors: Tobias Kuehnl <tkuehnl@cor-lab.uni-bielefeld....
gpl-3.0
2,271,872,404,286,744,000
29.437975
209
0.58551
false
mlperf/training_results_v0.6
Google/benchmarks/transformer/implementations/tpu-v3-256-transformer/dataset_preproc/data_generators/tokenizer.py
7
6150
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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...
apache-2.0
5,644,124,542,219,106,000
30.865285
80
0.68374
false
fishstamp82/loprop
test/h2o_data.py
2
11431
from ..daltools.util.full import init Z = [8., 1., 1.] Rc = init([0.00000000, 0.00000000, 0.48860959]) Dtot = [0, 0, -0.76539388] Daa = init([ [ 0.00000000, 0.00000000, -0.28357300], [ 0.15342658, 0.00000000, 0.12734703], [-0.15342658, 0.00000000, 0.12734703], ]) QUc = init([-7.31176220, 0., 0., -5.432...
gpl-3.0
7,379,008,257,670,152,000
48.484848
191
0.56513
false