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
2013Commons/hue
desktop/core/ext-py/guppy-0.1.10/guppy/heapy/test/test_ER.py
37
9414
#._cv_part guppy.heapy.test.test_ER # Tests of equivalence relations. # These are also tested by test_Classifiers. # This is some more tests, tailored esp. to the user view. # (test_Classifiers was so slow already, so I start over) # o Intended to be exhaustive wrt all ER's defined # # o Intersection of ER's fro...
apache-2.0
7,436,025,212,766,090,000
19.92
92
0.488103
false
gautam1858/tensorflow
tensorflow/contrib/tpu/python/tpu/tpu_sharding.py
42
9554
# 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,061,569,037,642,996,000
36.762846
80
0.657735
false
Kussie/HTPC-Manager
libs/sqlobject/constraints.py
10
1868
""" Constraints """ class BadValue(ValueError): def __init__(self, desc, obj, col, value, *args): self.desc = desc self.col = col # I want these objects to be garbage-collectable, so # I just keep their repr: self.obj = repr(obj) self.value = repr(value) fu...
mit
-98,339,858,472,114,750
28.650794
77
0.558351
false
jsirois/commons
src/python/twitter/common/metrics/rate.py
16
2824
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
-3,644,793,311,744,688,000
38.222222
100
0.590652
false
hxddh/youtube-dl
youtube_dl/extractor/mofosex.py
87
1686
from __future__ import unicode_literals import os import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_urlparse, compat_urllib_request, ) class MofosexIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?(?P<url>mofosex\.com/videos/(?P<i...
unlicense
2,566,813,040,023,743,500
30.811321
131
0.551008
false
714168586/Test
ops-docs/python/dbuser.py
1
2974
#!/usr/bin/env python #coding=utf-8 import json import yaml from aliyunsdkcore import client from aliyunsdkrds.request.v20140815 import CreateAccountRequest,GrantAccountPrivilegeRequest,DeleteAccountRequest,DescribeAccountsRequest # 添加用户 def AddUser(DBInstanceId,username,passwd): accessKeyId, accessKeySecret = ""...
lgpl-2.1
-5,614,617,662,496,829,000
30.758242
137
0.686505
false
bkahlert/seqan-research
raw/workshop11/seqan-trunk/misc/trac_plugins/DocLinks/doc_links.py
2
4362
"""Seqan Doc Links for Trac. Version 0.1. Copyright (C) 2010 Manuel Holtgrewe Install by copying this file into the plugins directory of your trac work directory. In your trac.ini, you can use something like this (the following also shows the defaults). [seqan_doc_links] prefix = seqan base_url = http://www....
mit
6,089,659,766,521,040,000
28.08
76
0.578863
false
paolodedios/tensorflow
tensorflow/python/distribute/cross_device_ops_test.py
8
49240
# 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 applica...
apache-2.0
6,714,008,746,494,707,000
39.294599
81
0.610845
false
mlq/python-taiga
tests/test_tasks.py
2
2039
from taiga.requestmaker import RequestMaker from taiga.models import Task, Tasks import unittest from mock import patch import six if six.PY2: import_open = '__builtin__.open' else: import_open = 'builtins.open' class TestTasks(unittest.TestCase): @patch('taiga.requestmaker.RequestMaker.get') def tes...
mit
-6,348,101,550,097,243,000
36.759259
90
0.576753
false
pigshell/nhnick
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_finder.py
123
7521
# Copyright (C) 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 of conditions and the ...
bsd-3-clause
584,586,672,344,144,300
41.977143
134
0.626778
false
thp44/delphin_6_automation
data_process/2d_1d/simon/example_sim.py
1
7655
__author__ = "Christian Kongsgaard" __license__ = 'MIT' # -------------------------------------------------------------------------------------------------------------------- # # IMPORTS # Modules import os import json import pandas as pd import xmltodict import shutil # RiBuild Modules from delphin_6_automation.dat...
mit
-3,079,666,736,781,081,000
43.505814
125
0.523841
false
axinging/chromium-crosswalk
ppapi/generators/idl_lint.py
180
4046
# 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. """ Lint for IDL """ import os import sys from idl_log import ErrOut, InfoOut, WarnOut from idl_node import IDLAttribute, IDLNode from idl_ast import I...
bsd-3-clause
-1,390,467,772,255,754,800
32.163934
80
0.649778
false
AQuadroTeam/CellsCycle
firstLaunchAWS.py
1
5427
# manually build and launch your instances # remember that the ip field deals with a private ip def _get_parameter(node_id, private_ip, min_key, max_key): p = {"id": node_id, "ip": private_ip, "min_key": min_key, "max_key": max_key} return p def create_instances_parameters(): """ first = _get_param...
mit
-7,016,561,542,101,582,000
34.703947
116
0.566243
false
yuyuyu101/VirtualBox-NetBSD
src/libs/libxml2-2.6.31/python/tests/validate.py
87
1710
#!/usr/bin/python -u import sys import libxml2 # Memory debug specific libxml2.debugMemory(1) ctxt = libxml2.createFileParserCtxt("valid.xml") ctxt.validate(1) ctxt.parseDocument() doc = ctxt.doc() valid = ctxt.isValid() if doc.name != "valid.xml": print "doc.name failed" sys.exit(1) root = doc.children if r...
gpl-2.0
3,839,277,314,929,236,000
19.853659
59
0.651462
false
ahharu/plugin-manager
plugin_manager/core/mixins/tables.py
1
6129
from __future__ import absolute_import, unicode_literals from django.core.paginator import Paginator from django.core import urlresolvers from django.utils.html import mark_safe, escape import django_tables2 as tables from django_tables2.tables import Table from django_tables2.utils import Accessor as A, AttributeDic...
mit
2,728,300,248,846,607,000
34.633721
105
0.577745
false
macks22/scikit-learn
examples/semi_supervised/plot_label_propagation_structure.py
247
2432
""" ============================================== Label Propagation learning a complex structure ============================================== Example of LabelPropagation learning a complex internal structure to demonstrate "manifold learning". The outer circle should be labeled "red" and the inner circle "blue". Be...
bsd-3-clause
4,311,436,500,876,449,300
38.225806
79
0.617599
false
dobbymoodge/origin
vendor/k8s.io/kubernetes/cluster/juju/layers/kubernetes-master/reactive/kubernetes_master.py
24
47731
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 appli...
apache-2.0
-5,692,883,639,161,156,000
35.352628
79
0.654836
false
harayz/raspberry_pwn
src/pentest/sqlmap/lib/core/session.py
7
1913
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.common import hashDBWrite from lib.core.data import kb from lib.core.data impor...
gpl-3.0
-698,861,386,747,189,600
23.844156
86
0.620491
false
rysson/filmkodi
plugin.video.mrknow/lib/utils/pyDes.py
2
32243
############################################################################# # Documentation # ############################################################################# # Author: Todd Whiteman # Date: 16th March, 2009 # Verion: 2.0.0 # License: Public Domain - free to d...
apache-2.0
5,527,490,423,028,265,000
36.799531
164
0.526719
false
Talanor/findmyhash
findmyhash/services/MD5Decryption.py
1
1145
from bs4 import BeautifulSoup import requests from findmyhash.algo import Algo from findmyhash.errors import * from .Service import Service class MD5DECRYPTION(Service): NAME = "md5decryption" HOST = "http://md5decryption.com" ALGO_SUPPORTED = [Algo.MD5] @classmethod def algo_supported(cls,...
gpl-3.0
-4,836,506,783,230,636,000
25.045455
67
0.551965
false
sajeeshcs/nested_quota_latest
nova/api/openstack/compute/contrib/flavor_rxtx.py
79
2175
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-1,045,542,845,519,476,400
32.984375
79
0.65977
false
andmos/ansible
lib/ansible/modules/cloud/amazon/ec2_scaling_policy.py
46
6822
#!/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
6,513,407,901,141,586,000
34.905263
156
0.658898
false
smasala/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/filter_unittest.py
124
9830
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com) # # 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 list of conditions...
bsd-3-clause
5,322,118,931,330,562,000
37.398438
80
0.612411
false
jolth/websiteDevMicrosystem
web/wsgiserver/ssl_builtin.py
79
2589
"""A library for integrating Python's builtin ``ssl`` library with CherryPy. The ssl module must be importable for SSL functionality. To use this module, set ``CherryPyWSGIServer.ssl_adapter`` to an instance of ``BuiltinSSLAdapter``. """ try: import ssl except ImportError: ssl = None from cherrypy import ws...
apache-2.0
-7,540,007,263,591,561,000
34.958333
78
0.599846
false
GheRivero/ansible
lib/ansible/modules/cloud/cloudstack/cs_instance_facts.py
37
8632
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2016, René Moser <mail@renemoser.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
5,068,647,328,051,567,000
27.862876
126
0.629896
false
ebar0n/django
django/urls/conf.py
90
2946
"""Functions for use in URLsconfs.""" from functools import partial from importlib import import_module from django.core.exceptions import ImproperlyConfigured from .resolvers import ( LocalePrefixPattern, RegexPattern, RoutePattern, URLPattern, URLResolver, ) def include(arg, namespace=None): app_name = No...
bsd-3-clause
-2,431,681,168,064,921,600
37.25974
92
0.624915
false
poulpito/Flexget
flexget/api/plugins/tvmaze_lookup.py
4
6090
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from flask import jsonify from flask_restplus import inputs from flexget.api import api, APIResource from flexget.api.app import NotFoundError, BadRequest, etag from flexg...
mit
208,084,740,349,788,400
39.065789
118
0.546798
false
Poles/Poles
platforms/windows/JsonCpp/scons-local-2.3.0/SCons/Options/__init__.py
11
2679
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # 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, incl...
gpl-3.0
8,733,869,453,094,611,000
38.985075
113
0.729003
false
TelekomCloud/aptexport
aptexport/__init__.py
1
2923
# -*- coding: utf-8 -*- # Copyright 2013 Thomas Bechtold <thomasbechtold@jpberlin.de> # Copyright 2013 Deutsche Telekom AG # # 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.a...
apache-2.0
4,680,683,016,800,820,000
38.5
86
0.6182
false
henryfjordan/django
django/contrib/postgres/forms/hstore.py
313
1484
import json from django import forms from django.core.exceptions import ValidationError from django.utils import six from django.utils.translation import ugettext_lazy as _ __all__ = ['HStoreField'] class HStoreField(forms.CharField): """A field for HStore data which accepts JSON input.""" widget = forms.Te...
bsd-3-clause
-6,580,583,502,507,640,000
30.574468
72
0.593666
false
ingenieroariel/geonode
geonode/base/management/commands/updategeoip.py
3
2478
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2017 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
9,002,786,486,742,212,000
38.967742
117
0.613801
false
xin3liang/platform_external_chromium_org
chrome/test/ispy/common/cloud_bucket.py
124
2185
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Abstract injector class for GS requests.""" class FileNotFoundError(Exception): """Thrown by a subclass of CloudBucket when a file is not found.""" ...
bsd-3-clause
6,522,325,679,659,914,000
23.010989
72
0.663158
false
goshow-jp/Kraken
tests/ComponentTests/tentacle_build.py
2
1650
from kraken import plugins from kraken.core.maths import Vec3 from kraken_components.generic.tentacle_component import TentacleComponentGuide, TentacleComponentRig from kraken.core.profiler import Profiler from kraken.helpers.utility_methods import logHierarchy Profiler.getInstance().push("tentacle_build") tentacl...
bsd-3-clause
6,119,032,252,521,689,000
31.352941
101
0.594545
false
PoundPay/wtforms
docs/conf.py
4
6200
# -*- coding: utf-8 -*- # # WTForms documentation build configuration file, created by # sphinx-quickstart on Fri Aug 01 15:29:36 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...
bsd-3-clause
-4,541,721,910,906,658,000
30.291667
100
0.684355
false
wri/gfw-api
lib/oauth2client/locked_file.py
144
11379
# Copyright 2011 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,...
gpl-2.0
-4,348,401,927,123,820,000
29.506702
77
0.615696
false
Frodox/buildbot
master/buildbot/test/unit/test_data_forceschedulers.py
1
7282
# 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
-8,218,860,624,813,654,000
39.455556
79
0.40813
false
msopentechcn/open-hackathon
open-hackathon-client/src/client/log.py
2
2041
# -*- coding: utf-8 -*- """ This file is covered by the LICENSING file in the root of this project. """ import logging from os.path import realpath, dirname, join from logging import config, DEBUG, INFO __all__ = ["log"] class Log(object): """Wrapper of Python logging module for easier usage :Example: ...
mit
1,412,838,218,007,144,700
26.958904
113
0.624204
false
trnewman/VT-USRP-daughterboard-drivers
gnuradio-core/src/lib/filter/generate_gr_freq_xlating_fir_filter_XXX.py
17
1498
#!/bin/env python # -*- python -*- # # Copyright 2003,2004 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or...
gpl-3.0
6,673,921,086,226,694,000
27.264151
70
0.658211
false
shacknetisp/vepybot
plugins/core/list.py
1
1340
# -*- coding: utf-8 -*- import bot class M_List(bot.Module): index = "list" def register(self): self.addcommand( self.list, "list", "List modules or, if <module> is specified, commands in a module, " "<module> can be * for all commands.", ...
mit
-2,722,776,577,327,463,400
30.162791
79
0.436567
false
jupierce/openshift-tools
scripts/monitoring/cron-send-elb-status.py
11
4395
#!/usr/bin/env python # vim: expandtab:tabstop=4:shiftwidth=4 ''' Collect information about node within ELB ''' # # Copyright 2015 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 ...
apache-2.0
-786,151,733,788,392,800
32.549618
111
0.67008
false
jhaux/tensorflow
tensorflow/python/training/saver_test_utils.py
25
3105
# 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
-2,012,425,366,591,154,200
35.104651
80
0.656683
false
HenryHu/pybbs
PostEntry.py
1
5083
#!/usr/bin/env python # vim: set fileencoding=utf-8 : import struct import Config import time from Util import Util from cstruct import CStruct # PostEntry.accessed[0] FILE_SIGN = 0x1 #/* In article mode, Sign , Bigman 2000.8.12 ,in accessed[0] */ # not used FILE_OWND = 0x2 #/* accessed array */ #...
bsd-2-clause
-3,583,318,180,514,345,000
31.741935
162
0.581478
false
SorX14/playbulbcandle
playbulbcandle/playbulbcandle.py
1
4940
# MIT License # Copyright (c) 2016 Steve Parker import subprocess import shlex from subprocess import call class PlayBulbCandle: commands = { 'setName': '0x001C', # writeReq needed get/set 'setEffect': '0x0014', # get/set 'setColor': '0x0016', # get/set 'getType': '0x0023', 'getFamily': '0x0025', 'getFi...
mit
2,557,605,885,988,404,000
24.86911
191
0.64332
false
openstack/tempest
tempest/api/volume/admin/test_volume_services_negative.py
1
3274
# Copyright 2018 FiberHome Telecommunication 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/LI...
apache-2.0
7,304,404,735,367,229,000
45.771429
79
0.668601
false
mtdewulf/incubator-airflow
airflow/contrib/operators/mysql_to_gcs.py
44
9126
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
apache-2.0
-262,116,739,518,235,070
39.741071
101
0.61922
false
ecologylab/BigSemanticsService
Scripts/main/bs_service_tester.py
1
2051
#!/usr/bin/python import urllib2 import urllib from simple_config import load_config tester_config = load_config("tester.conf") class ServiceTester: def __init__(self, config=None): if config is None: config = tester_config self.config = config self.timeout_seconds = config["timeout_...
apache-2.0
-2,235,816,616,534,470,400
26.09589
79
0.56509
false
ubgarbage/gae-blog
django/contrib/sessions/backends/cache.py
55
1979
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import cache KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ def __init__(self, session_key=None): self._cache = cache su...
bsd-3-clause
8,399,615,209,777,623,000
33.12069
92
0.593734
false
ooici/marine-integrations
mi/instrument/harvard/massp/rga/test/test_driver.py
1
29215
""" @package mi.instrument.harvard.massp.rga.test.test_driver @file marine-integrations/mi/instrument/harvard/massp/rga/driver.py @author Peter Cable @brief Test cases for rga driver USAGE: Make tests verbose and provide stdout * From the IDK $ bin/test_driver $ bin/test_driver -u [-t testname] ...
bsd-2-clause
-1,572,916,429,620,256,500
43.603053
115
0.604313
false
ddong8/ihasy
lib/sendmail.py
1
1171
#!/usr/bin/env python # coding=utf-8 # # Copyright 2017 ihasy.com # Do have a faith in what you're doing. # Make your life a story worth telling. import smtplib import sys import email from email.mime.text import MIMEText send_mail_host = 'smtp_host' send_mail_user = 'smtp_user' send_mail_user_name = u'send_mail_user...
bsd-3-clause
4,690,865,384,309,086,000
28.275
98
0.663535
false
NMGRL/pychron
pychron/processing/analyses/analysis_group.py
1
34170
# =============================================================================== # Copyright 2012 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/licens...
apache-2.0
-6,850,001,143,041,851,000
29.923077
115
0.523354
false
code-sauce/tensorflow
tensorflow/python/ops/gradients_impl.py
1
37128
# 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
-1,326,089,417,103,896,800
37.675
86
0.647732
false
gena701/Seleniun_php4dvd_lesson2_Rovinsky
php4dvd/php4dvd_negative.py
1
2371
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import NoAlertPresentException...
apache-2.0
-3,795,401,780,178,088,000
37.868852
87
0.639814
false
ntddk/pemu
roms/seabios/scripts/checkrom.py
17
3347
#!/usr/bin/env python # Script to check a bios image and report info on it. # # Copyright (C) 2008 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys, struct import layoutrom, buildrom from python23compat import as_bytes def subst(data, offset, ...
gpl-2.0
3,845,735,010,519,052,000
34.231579
90
0.617867
false
dorapanda/qemu-2.0.0-with-fm3
roms/seabios/scripts/buildrom.py
16
1215
#!/usr/bin/env python # Fill in checksum/size of an option rom, and pad it to proper length. # # Copyright (C) 2009 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys def alignpos(pos, alignbytes): mask = alignbytes - 1 return (pos + mask...
gpl-2.0
-7,472,691,905,652,102,000
23.3
82
0.583539
false
v-iam/azure-sdk-for-python
azure-mgmt-authorization/azure/mgmt/authorization/models/resource_type.py
2
1278
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
991,610,272,054,192,900
34.5
76
0.591549
false
irvingprog/pilas
pilas/camara.py
6
3475
# -*- encoding: utf-8 -*- # Pilas engine - A video game framework. # # Copyright 2010 - Hugo Ruscitti # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar import pilas class Camara(object): """Representa el punto de vista de la ventana. Los atributos ``x...
lgpl-3.0
5,689,999,541,757,785,000
31.5
85
0.594194
false
barnsnake351/nova
nova/db/sqlalchemy/migrate_repo/versions/250_remove_instance_groups_metadata.py
81
1198
# Copyright 2014 Red Hat, Inc. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ...
apache-2.0
-422,589,223,119,459,840
37.645161
78
0.693656
false
ybrs/terminator-forked
build/lib.linux-x86_64-2.7/terminatorlib/titlebar.py
3
10522
#!/usr/bin/python # Terminator by Chris Jones <cmsj@tenshu.net> # GPL v2 only """titlebar.py - classes necessary to provide a terminal title bar""" import gtk import gobject from version import APP_NAME from util import dbg from terminator import Terminator from editablelabel import EditableLabel # pylint: disable-m...
gpl-2.0
-3,598,565,055,309,124,600
36.44484
80
0.573465
false
kernelmilowill/PDMQBACKTEST
vn.ksgold/pyscript/generate_data_type.py
36
2369
# encoding: UTF-8 __author__ = 'CHENXY' # C++和python类型的映射字典 type_dict = { 'int': 'int', 'char': 'string', 'double': 'float', 'short': 'int', 'unsigned': 'string' } def process_line(line): """处理每行""" if '///' in line: # 注释 py_line = process_comment(line) elif 'typede...
mit
-1,662,868,652,153,844,700
20
64
0.488652
false
wolverineav/neutron
neutron/tests/unit/plugins/ml2/drivers/macvtap/test_macvtap_common.py
9
2462
# Copyright (c) 2016 IBM Corp. # # 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 ...
apache-2.0
7,914,396,332,615,137,000
40.033333
78
0.60723
false
gqwest-erp/server
openerp/addons/report_webkit/report_helper.py
42
3183
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Nicolas Bessi (Camptocamp) # # WARNING: This program as such is intended to be used by professional # programmers who...
agpl-3.0
-5,188,245,272,848,504,000
36.892857
80
0.570217
false
cchurch/ansible
test/units/modules/storage/netapp/test_na_ontap_command.py
17
5689
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test for ONTAP Command Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ansi...
gpl-3.0
2,356,692,688,492,965,400
32.662722
92
0.602039
false
BdEINSALyon/resa
bookings/views/bookings.py
1
6910
import datetime as dt import logging import dateutil.parser from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.core.paginator import Paginator, EmptyPage from django.shortcuts import get_object_or_404, redirect from django.urls import reverse,...
gpl-3.0
8,385,060,456,491,568,000
34.96875
106
0.66044
false
kchodorow/tensorflow
tensorflow/tools/graph_transforms/python/transform_graph_test.py
170
3295
# 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 applicable ...
apache-2.0
8,465,957,494,656,100,000
37.764706
80
0.676176
false
gchaimovitz/CouchPotatoServer
couchpotato/core/plugins/base.py
11
15483
import threading from urllib import quote, getproxies from urlparse import urlparse import os.path import time import traceback from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.encoding import ss, toSafeString, \ toUnicode, sp from couchpotato.core.helpers.variable import md5, i...
gpl-3.0
7,182,638,869,135,260,000
33.560268
136
0.542337
false
jeremysanders/veusz
veusz/utils/feedback.py
3
6020
# Copyright (C) 2018 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # 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 # ...
gpl-2.0
8,184,528,813,620,718,000
32.076923
79
0.604983
false
waltharius/NewsBlur
vendor/tweepy/utils.py
32
1355
# Tweepy # Copyright 2010 Joshua Roesslein # See LICENSE for details. from datetime import datetime import time import htmlentitydefs import re import locale from urllib import quote from email.utils import parsedate def parse_datetime(string): return datetime(*(parsedate(string)[:6])) def parse_html_value(htm...
mit
8,848,843,691,041,695,000
21.583333
80
0.620664
false
damdam-s/OpenUpgrade
addons/l10n_ve/__openerp__.py
260
2960
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved ############################################################################## # Modu...
agpl-3.0
-9,216,028,413,622,194,000
37.947368
84
0.631081
false
ennoborg/gramps
gramps/gui/glade/catalog/grampswidgets.py
11
1186
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # # 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 you...
gpl-2.0
8,875,095,909,280,215,000
32.885714
79
0.751265
false
Kismuz/btgym
btgym/research/model_based/model/bivariate.py
1
29118
import numpy as np from collections import namedtuple from btgym.research.model_based.model.rec import Zscore, ZscoreState, Covariance, CovarianceState from btgym.research.model_based.model.rec import OUEstimatorState from btgym.research.model_based.model.univariate import OUProcess, TimeSeriesModel BivariateTSMode...
lgpl-3.0
8,580,367,377,898,408,000
40.182461
122
0.58813
false
donjordano/skype4py
unittests/skypetest.py
17
26067
import unittest import skype4pytest from Skype4Py.skype import * class SkypeTest(skype4pytest.TestCase): def setUpObject(self): self.obj = self.skype # Methods # ======= def testApiSecurityContextEnabled(self): # Returned type: bool def test(): self.obj.ApiSecuri...
bsd-3-clause
-4,160,989,439,882,215,400
35.204167
78
0.593279
false
jhutar/spacewalk
client/rhel/rhn-client-tools/src/up2date_client/gui.py
4
13579
# # GUI for Update Agent # Copyright (c) 1999--2016 Red Hat, Inc. Distributed under GPLv2. # # Authors: # Preston Brown <pbrown@redhat.com> # Adrian Likins <alikins@redhat.com> # Daniel Benamy <dbenamy@redhat.com> import os import sys import gtk import gtk.glade gtk.glade.bindtextdomain("rhn-client-tools",...
gpl-2.0
5,942,793,527,331,354,000
36.824513
87
0.655056
false
stevegood/filesync-server
lib/ubuntuone/storage/rzlib.py
6
18704
# Copyright 2008-2015 Canonical # # 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 distributed...
agpl-3.0
-1,096,422,801,738,369,800
38.965812
79
0.582228
false
robovm/robovm-studio
python/lib/Lib/site-packages/django/contrib/gis/gdal/tests/test_envelope.py
332
3742
from django.contrib.gis.gdal import Envelope, OGRException from django.utils import unittest class TestPoint(object): def __init__(self, x, y): self.x = x self.y = y class EnvelopeTest(unittest.TestCase): def setUp(self): self.e = Envelope(0, 0, 5, 5) def test01_init(self): ...
apache-2.0
-3,063,919,043,058,236,000
38.389474
90
0.601015
false
jkarnows/scikit-learn
benchmarks/bench_glm.py
297
1493
""" A comparison of different methods in GLM Data comes from a random square matrix. """ from datetime import datetime import numpy as np from sklearn import linear_model from sklearn.utils.bench import total_seconds if __name__ == '__main__': import pylab as pl n_iter = 40 time_ridge = np.empty(n_it...
bsd-3-clause
2,730,777,487,060,854,000
24.741379
62
0.600804
false
D3f0/AutobahnPython
examples/wamp/rpc/profile/client.py
26
2975
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## Licensed under the Apache License, Version 2.0 (the "License"); ## you may not use this file except in compliance with the License. ## You may obtain a copy of the License at ## ## http://www...
apache-2.0
-2,050,565,982,252,551,000
30.989247
91
0.587563
false
fkie/rosrepo
src/rosrepo/cmd_bash.py
1
2161
# coding=utf-8 # # ROSREPO # Manage ROS workspaces with multiple Gitlab repositories # # Author: Timo Röhling # # Copyright 2016 Fraunhofer FKIE # # 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 a...
apache-2.0
7,318,476,151,282,463,000
34.409836
106
0.608333
false
hsheep/limon_vbox
statan.py
2
4061
# Limon # Copyright (C) 2015 Monnappa # # This file is part of Limon. # # Limon 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. # Limo...
gpl-3.0
-8,080,967,079,609,413,000
28.642336
89
0.59345
false
bjohare/cloughjordan.ie
wp-content/themes/executive-pro/api/OpenLayers-2.13.1/tools/minimize.py
297
2088
# Minimal Python Minimizer # Copyright 2008, Christopher Schmidt # Released under the MIT License # # Taken from: http://svn.crschmidt.net/personal/python/minimize.py # $Id: minimize.py 6 2008-01-03 06:33:35Z crschmidt $ # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software...
cc0-1.0
7,518,979,838,242,824,000
43.425532
79
0.713123
false
confluentinc/examples
clients/cloud/python/producer_ccsr.py
1
3189
#!/usr/bin/env python # # Copyright 2020 Confluent 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...
apache-2.0
-5,537,956,176,325,862,000
37.890244
95
0.640326
false
PaulBrownMagic/LED_Arcade
constants.py
1
1687
import numpy as np from games.constants import * k = BLACK g = GREEN w = WHITE r = RED b = BLUE m = DARK_RED n = DARK_BLUE p = PURPLE o = ORANGE y = YELLOW NAV_SCREENS = { "Snake": np.array( [ [m, w, m, m, m, m, w, m], [w, m, m, m, m, m, m, w], [m, w, m, m, m, m, w...
gpl-3.0
5,019,395,558,668,937,000
22.760563
37
0.275637
false
russel1237/scikit-learn
examples/svm/plot_weighted_samples.py
188
1943
""" ===================== SVM: Weighted samples ===================== Plot decision function of a weighted dataset, where the size of points is proportional to its weight. The sample weighting rescales the C parameter, which means that the classifier puts more emphasis on getting these points right. The effect might ...
bsd-3-clause
3,849,041,128,792,661,000
29.84127
78
0.669583
false
thwindbell/pox
pox/proto/dns_spy.py
45
4072
# Copyright 2011-2012 James McCauley # # 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 ...
apache-2.0
2,496,770,750,653,394,400
26.890411
75
0.647102
false
michaelkirk/QGIS
python/plugins/processing/algs/lidar/fusion/CanopyModel.py
1
5453
# -*- coding: utf-8 -*- """ *************************************************************************** CanopyModel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com --------------------- ...
gpl-2.0
-8,131,902,818,092,337,000
41.601563
88
0.579864
false
yuvipanda/nbresuse
jupyter_resource_usage/config.py
1
3739
import os from traitlets import Bool from traitlets import default from traitlets import Dict from traitlets import Float from traitlets import Int from traitlets import List from traitlets import TraitType from traitlets import Union from traitlets.config import Configurable try: # Traitlets >= 4.3.3 from tr...
bsd-2-clause
5,189,088,166,958,866,000
29.153226
169
0.622359
false
krieger-od/nwjs_chromium.src
build/android/pylib/local/device/local_device_environment.py
15
1536
# 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 pylib.base import environment from pylib.device import adb_wrapper from pylib.device import device_errors from pylib.device import device_utils from pyl...
bsd-3-clause
8,907,183,995,380,310,000
26.428571
72
0.699219
false
PepperPD/edx-pepper-platform
common/djangoapps/track/tests.py
13
2915
"""Tests for student tracking""" import mock from django.test import TestCase from django.core.urlresolvers import reverse, NoReverseMatch from track.models import TrackingLog from track.views import user_track from nose.plugins.skip import SkipTest class TrackingTest(TestCase): """ Tests that tracking logs ...
agpl-3.0
4,216,444,625,121,535,000
47.583333
116
0.601715
false
Basis/pip
pip/backwardcompat/__init__.py
3
2814
"""Stuff that differs in different Python versions""" import os import imp import sys import site __all__ = ['WindowsError'] uses_pycache = hasattr(imp, 'cache_from_source') class NeverUsedException(Exception): """this exception should never be raised""" try: WindowsError = WindowsError except NameError: ...
mit
-7,101,435,583,464,615,000
24.125
69
0.665601
false
varunarya10/nova_test_latest
nova/api/openstack/compute/contrib/fixed_ips.py
72
3685
# Copyright 2012 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 agreed t...
apache-2.0
4,144,579,086,615,899,600
36.222222
78
0.61791
false
anas-taji/sale-workflow
__unported__/sale_fiscal_position_update/sale.py
37
3620
# -*- coding: utf-8 -*- # # # Sale Fiscal Position Update module for OpenERP # Copyright (C) 2011-2014 Julius Network Solutions SARL <contact@julius.fr> # Copyright (C) 2014 Akretion (http://www.akretion.com) # @author Mathieu Vatel <mathieu _at_ julius.fr> # @author Alexis de Lattre <alexis.delattre@akr...
agpl-3.0
-6,561,602,966,098,915,000
42.095238
78
0.575691
false
xzturn/tensorflow
tensorflow/compiler/tests/gather_test.py
25
9047
# 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
8,877,263,278,294,215,000
39.936652
80
0.636344
false
mackjoner/peewee
setup.py
1
2733
import os import sys from distutils.core import setup from distutils.extension import Extension f = open(os.path.join(os.path.dirname(__file__), 'README.rst')) readme = f.read() f.close() setup_kwargs = {} try: from Cython.Distutils import build_ext except ImportError: cython_installed = False else: cytho...
mit
7,474,014,866,984,116,000
26.059406
67
0.634834
false
lbartoletti/QGIS
tests/src/python/test_qgssearchwidgetwrapper.py
25
21843
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsSearchWidgetWrapper. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version...
gpl-2.0
-7,183,082,521,320,770,000
53.335821
131
0.686444
false
cakeboss893/volatility
volatility/plugins/procdump.py
44
9643
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2008 Brendan Dolan-Gavitt <bdolangavitt@wesleyan.edu> # # Additional Authors: # Mike Auty <mike.auty@gmail.com> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of...
gpl-2.0
-398,268,075,228,094,660
42.436937
157
0.586332
false
pytorch/vision
test/common_utils.py
1
12886
import os import shutil import tempfile import contextlib import unittest import argparse import sys import torch import __main__ import random import inspect from numbers import Number from torch._six import string_classes from collections import OrderedDict import numpy as np from PIL import Image from _assert_uti...
bsd-3-clause
-8,803,150,722,910,903,000
40.301282
112
0.568602
false
cherylyli/stress-aid
env/lib/python3.5/site-packages/pip/_vendor/html5lib/treebuilders/etree_lxml.py
353
14161
"""Module for supporting the lxml.etree library. The idea here is to use as much of the native library as possible, without using fragile hacks like custom element names that break between releases. The downside of this is that we cannot represent all possible trees; specifically the following are known to cause proble...
mit
6,003,815,002,988,796,000
37.585831
121
0.557305
false
elemel/tics
lib/tics/image.py
1
3627
# Copyright (c) 2009 Mikael Lind # # 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, publish, distr...
mit
7,257,524,811,728,129,000
33.875
73
0.624483
false
yxwzaxns/cowry
server/core/utils.py
1
4227
"""functions helper.""" from ast import literal_eval import base64 import os import hashlib import random import uuid import time import shutil import re import socket import _thread import OpenSSL import redis def addAppPath(path): """Add a path to sys path.""" os.sys.path.append(path) def getCwd(): ""...
mit
-8,886,317,746,345,027,000
22.098361
77
0.616513
false
xorpaul/check_mk
web/plugins/userdb/user_attributes.py
6
3483
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
-5,502,059,362,757,719,000
44.233766
97
0.530864
false
quarkslab/irma
probe/modules/antivirus/bitdefender/bitdefender.py
1
2967
# # Copyright (c) 2013-2018 Quarkslab. # This file is part of IRMA 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 in the top-level directory # of this distribution and at: # # http:...
apache-2.0
4,776,286,396,992,539,000
31.966667
75
0.568588
false