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
indashnet/InDashNet.Open.UN2000
android/external/antlr/antlr-3.4/runtime/Python/tests/t005lexer.py
17
2122
import antlr3 import testbase import unittest class t005lexer(testbase.ANTLRTest): def setUp(self): self.compileGrammar() def lexerClass(self, base): class TLexer(base): def emitErrorMessage(self, msg): # report errors to /dev/null p...
apache-2.0
7,837,447,103,462,701,000
27.293333
77
0.578699
false
vijos/vj4
vj4/handler/judge.py
1
8599
import asyncio import calendar import datetime import logging from bson import objectid from vj4 import app from vj4 import constant from vj4 import job from vj4.handler import base from vj4.model import builtin from vj4.model import document from vj4.model import domain from vj4.model import record from vj4.model imp...
agpl-3.0
-6,389,001,022,636,871,000
40.541063
100
0.601814
false
PinkInk/iocp
sensor-bh1750-bme280-hygrometer/main.py
1
3580
""" main.py for esp8266 sensornode with dht11 & bh1750 read temp, humidity & luminosity, publish to mqtt """ try: import time START_MS = time.ticks_ms() import gc import machine import ujson from bh1750 import BH1750 from bme280 import BME280 from umqtt.robust import MQTTClient de...
mit
-6,624,233,586,436,229,000
24.571429
82
0.527654
false
adlai/p2pool
p2pool/main.py
59
29725
from __future__ import division import base64 import gc import json import os import random import sys import time import signal import traceback import urlparse if '--iocp' in sys.argv: from twisted.internet import iocpreactor iocpreactor.install() from twisted.internet import defer, reactor, protocol, tcp f...
gpl-3.0
-8,773,294,606,537,755,000
50.427336
246
0.57709
false
frainfreeze/studying
home/python/microblog/venv/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/base.py
156
7476
from __future__ import absolute_import, division, unicode_literals from xml.dom import Node from ..constants import namespaces, voidElements, spaceCharacters __all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN", "TreeWalker", "NonRecursiveTreeWalker"] DOCUMENT = Node.DOCUMEN...
mit
-1,416,652,260,051,501,800
28.666667
103
0.543339
false
pk-sam/crosswalk-test-suite
misc/webdriver-w3c-tests/cookie/cookie_test.py
5
2084
# -*- mode: python; fill-column: 100; comment-column: 100; -*- import os import sys import unittest sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) import base_test from client.exceptions import InvalidCookieDomainException, UnableToSetCookieException class CookieTest( base...
bsd-3-clause
-6,883,614,520,012,883,000
29.202899
91
0.576775
false
mcgachey/edx-platform
lms/djangoapps/shoppingcart/migrations/0016_auto__del_field_invoice_company_email__del_field_invoice_company_refer.py
114
15822
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Invoice.company_email' db.delete_column('shoppingcart_invoice', 'company_email') ...
agpl-3.0
8,556,129,933,464,373,000
76.180488
182
0.560359
false
XiaosongWei/chromium-crosswalk
tools/telemetry/telemetry/benchmark.py
9
7804
# 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. import optparse from telemetry import decorators from telemetry.internal import story_runner from telemetry.internal.util import command_line from telemetry...
bsd-3-clause
6,368,404,789,367,262,000
32.067797
79
0.711814
false
HWal/paparazzi
sw/supervision/python/ui/set_manager.py
34
7292
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'set_manager.ui' # # Created: Wed Mar 9 08:54:50 2016 # by: PyQt5 UI code generator 5.2.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Dialog(object): def setupUi(sel...
gpl-2.0
-6,611,164,127,010,271,000
52.617647
106
0.700219
false
code4futuredotorg/reeborg_tw
src/libraries/brython_old/Lib/platform.py
102
50499
#!/usr/bin/env python3 """ This module tries to retrieve as much platform-identifying data as possible. It makes this information available via function APIs. If called from the command line, it prints the platform information concatenated as single string to stdout. The output format is useable as pa...
agpl-3.0
-3,359,252,790,165,291,000
31.919817
88
0.58619
false
trondhindenes/ansible
lib/ansible/modules/network/junos/junos_l3_interface.py
27
6006
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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
2,950,062,353,884,633,600
28.880597
121
0.6337
false
josesanch/django-oscar
src/oscar/apps/catalogue/south_migrations/0015_auto__chg_field_product_upc.py
10
13345
# -*- 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): # Changing field 'Product.upc' db.alter_column(u'catalogue_product', 'up...
bsd-3-clause
-3,221,878,237,704,924,700
79.884848
224
0.565905
false
SiCKRAGETV/SickRage
sickrage/notifiers/synoindex.py
2
3331
# Author: Sebastien Erard <sebastien_erard@hotmail.com> # URL: https://sickrage.ca # # This file is part of SickRage. # # SickRage 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 Licens...
gpl-3.0
3,597,842,883,695,099,000
36.852273
101
0.631042
false
gktomar/gaurav
git_remote_helpers/git/repo.py
1
1896
import os import subprocess from git_remote_helpers.util import check_call def sanitize(rev, sep='\t'): """Converts a for-each-ref line to a name/value pair. """ splitrev = rev.split(sep) branchval = splitrev[0] branchname = splitrev[1].strip() if branchname.startswith("refs/heads/"): ...
gpl-2.0
4,122,905,232,486,865,000
23.947368
61
0.563819
false
kiddinn/plaso
plaso/parsers/sqlite_plugins/hangouts_messages.py
3
16274
# -*- coding: utf-8 -*- """SQLite parser plugin for Google Hangouts conversations database files.""" from dfdatetime import posix_time as dfdatetime_posix_time from plaso.containers import events from plaso.containers import time_events from plaso.lib import definitions from plaso.parsers import sqlite from plaso.par...
apache-2.0
2,236,049,749,190,610,400
53.066445
79
0.646921
false
erickt/hue
desktop/core/ext-py/django-extensions-1.5.0/django_extensions/db/fields/encrypted.py
38
6055
import sys import six from django.db import models from django.core.exceptions import ImproperlyConfigured from django import forms from django.conf import settings import warnings try: from keyczar import keyczar except ImportError: raise ImportError('Using an encrypted field requires the Keyczar module. ' ...
apache-2.0
7,923,295,074,955,698,000
39.366667
92
0.624608
false
subramani95/neutron
neutron/tests/unit/vmware/extensions/test_maclearning.py
17
6519
# Copyright (c) 2013 OpenStack Foundation. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
90,212,698,980,450,600
45.899281
79
0.63384
false
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/test/test_asyncio/test_locks.py
3
31432
"""Tests for lock.py""" import unittest from unittest import mock import re import asyncio from test.test_asyncio import utils as test_utils STR_RGX_REPR = ( r'^<(?P<class>.*?) object at (?P<address>.*?)' r'\[(?P<extras>' r'(set|unset|locked|unlocked)(, value:\d)?(, waiters:\d+)?' r')\]>\Z' ) RGX_REP...
gpl-2.0
5,102,632,442,159,973,000
29.194044
76
0.580141
false
LCAS/spqrel_tools
ros_ws/src/naoqi_bridge/naoqi_pose/src/xapparser/xapparser.py
5
3174
# # -*- coding: utf-8 -*- # Copyright 2013 Séverin Lemaignan # http://www.ros.org/wiki/nao # # 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 # ...
mit
8,311,192,636,036,914,000
34.255556
109
0.690514
false
TechWritingWhiz/indy-node
indy_client/test/state_proof/test_asking_one_node.py
1
1666
import pytest from indy_client.test.state_proof.helper import submit_operation_and_get_replies from plenum.common.constants import TARGET_NYM, TXN_TYPE, RAW from indy_common.constants import GET_ATTR from indy_client.test.test_nym_attrib import \ addedRawAttribute, attributeName, attributeValue, attributeData de...
apache-2.0
-2,133,090,893,361,877,800
34.446809
83
0.597239
false
freeworldxbmc/pluging.video.Jurassic.World.Media
resources/lib/resolvers/nowvideo.py
3
1453
# -*- coding: utf-8 -*- ''' Genesis Add-on Copyright (C) 2015 lambda 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 ...
gpl-3.0
-1,609,277,332,440,665,300
29.914894
84
0.620785
false
amirgeva/fastfilefind
fffbuild.py
1
3937
#!/usr/bin/env python3 # ------------------------------------------------------------------------------- # Name: fffbuild # Purpose: # # Author: Amir Geva # # Created: 07/04/2014 # Copyright: (c) Amir Geva 2014 # Licence: GPL V2 #--------------------------------------------------------------------...
gpl-2.0
-7,483,724,703,448,327,000
27.528986
118
0.555245
false
flavour/eden
modules/templates/locations/TM/config.py
5
1109
# -*- coding: utf-8 -*- from gluon import current def config(settings): """ Template settings for Turkmenistan - designed to be used in a Cascade with an application template """ #T = current.T # Pre-Populate settings.base.prepopulate.append("locations/TM") # Uncomment to re...
mit
-7,676,466,239,422,054,000
31.617647
79
0.586114
false
ahoyosid/scikit-learn
sklearn/decomposition/__init__.py
99
1331
""" The :mod:`sklearn.decomposition` module includes matrix decomposition algorithms, including among others PCA, NMF or ICA. Most of the algorithms of this module can be regarded as dimensionality reduction techniques. """ from .nmf import NMF, ProjectedGradientNMF from .pca import PCA, RandomizedPCA from .incrementa...
bsd-3-clause
2,381,205,124,374,796,000
34.026316
79
0.643877
false
emonty/ansible
test/units/plugins/action/test_gather_facts.py
24
2319
# (c) 2016, Saran Ahluwalia <ahlusar.ahluwalia@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any...
gpl-3.0
-4,165,976,721,192,678,000
35.234375
135
0.708064
false
dongjiaqiang/kafka
tests/kafkatest/tests/benchmark_test.py
21
9596
# 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 ...
apache-2.0
8,014,944,897,977,911,000
44.478673
147
0.660171
false
KamalAwasthi/FullContact
myvenv/lib/python3.4/site-packages/django/core/files/base.py
487
5717
from __future__ import unicode_literals import os from io import BytesIO, StringIO, UnsupportedOperation from django.core.files.utils import FileProxyMixin from django.utils import six from django.utils.encoding import ( force_bytes, force_str, python_2_unicode_compatible, smart_text, ) @python_2_unicode_compat...
apache-2.0
-3,199,667,051,148,833,300
28.317949
86
0.546091
false
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/pip/utils/deprecation.py
343
2232
""" A module that implements tooling to enable easy warnings about deprecations. """ from __future__ import absolute_import import logging import warnings class PipDeprecationWarning(Warning): pass class Pending(object): pass class RemovedInPip10Warning(PipDeprecationWarning): pass class RemovedInP...
mit
6,376,868,017,823,166,000
28.368421
77
0.658602
false
pasqualguerrero/django
django/db/models/fields/__init__.py
6
93147
# -*- coding: utf-8 -*- from __future__ import unicode_literals import collections import copy import datetime import decimal import math import uuid import warnings from base64 import b64decode, b64encode from functools import total_ordering from django import forms from django.apps import apps from django.conf impo...
bsd-3-clause
-4,453,847,063,786,015,000
35.31462
101
0.576551
false
jacklicn/webm.libvpx
test/android/scrape_gtest_log.py
83
1563
# Copyright (c) 2014 The WebM project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project auth...
bsd-3-clause
6,807,641,240,387,420,000
26.421053
72
0.642354
false
seecr/weightless-core
test/lib/seecr-test-2.0/seecr/test/io.py
1
2438
## begin license ## # # "Weightless" is a High Performance Asynchronous Networking Library. See http://weightless.io # # Copyright (C) 2012-2013, 2017, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl # # This file is part of "Weightless" # # "Weightless" is free software; you can redistribute it and/or modify # it...
gpl-2.0
-8,897,161,462,364,734,000
31.506667
94
0.705906
false
hynnet/openwrt-mt7620
staging_dir/host/lib/python2.7/test/test_poplib.py
71
10137
"""Test script for poplib module.""" # Modified by Giampaolo Rodola' to give poplib.POP3 and poplib.POP3_SSL # a real test suite import poplib import asyncore import asynchat import socket import os import time import errno from unittest import TestCase from test import test_support from test.test_support import HOS...
gpl-2.0
-5,286,903,400,806,021,000
28.382609
85
0.569399
false
tbinjiayou/Odoo
openerp/addons/base/ir/ir_ui_view.py
7
50898
# -*- 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,203,781,562,211,142,000
44.444643
155
0.543872
false
yati-sagade/incubator-airflow
airflow/operators/hive_to_mysql.py
15
4158
# -*- 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
-1,683,164,395,529,485,300
38.226415
80
0.669072
false
cryptica/japanese-novel-analyser
src/analyser.py
2
3843
#!/usr/bin/env python2 """ This is the Japanese Novel Analyser. It reads in novels from files in aozora formatting, strips this formatting, invokes the mecab morphological analysis and counts word frequencies. Then it stores them in a database for later use. Repeated invokations add to the existing frequencies, unless...
gpl-3.0
5,036,185,417,363,665,000
29.259843
145
0.629716
false
yuruofeifei/mxnet
example/model-parallel/matrix_factorization/train.py
27
4051
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-4,002,106,196,456,312,000
36.165138
98
0.661318
false
vizual54/MissionPlanner
Lib/site-packages/numpy/core/info.py
103
4635
__doc__ = """Defines a multi-dimensional array and useful procedures for Numerical computation. Functions - array - NumPy Array construction - zeros - Return an array of all zeros - empty - Return an unitialized array - shape ...
gpl-3.0
-6,979,752,795,980,436,000
52.895349
95
0.471197
false
RapidApplicationDevelopment/tensorflow
tensorflow/python/client/timeline.py
110
24053
# 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
6,426,422,522,506,566,000
36.87874
80
0.638798
false
repotvsupertuga/tvsupertuga.repository
plugin.video.TVsupertuga/resources/lib/plugins/unidecode/x0cd.py
253
4738
data = ( 'cyess', # 0x00 'cyeng', # 0x01 'cyej', # 0x02 'cyec', # 0x03 'cyek', # 0x04 'cyet', # 0x05 'cyep', # 0x06 'cyeh', # 0x07 'co', # 0x08 'cog', # 0x09 'cogg', # 0x0a 'cogs', # 0x0b 'con', # 0x0c 'conj', # 0x0d 'conh', # 0x0e 'cod', # 0x0f 'col', # 0x10 'colg', ...
gpl-2.0
4,721,044,110,450,944,000
17.364341
19
0.45821
false
chenc10/Spark-PAF
ec2/lib/boto-2.34.0/tests/unit/mws/test_connection.py
10
8035
#!/usr/bin/env python # Copyright (c) 2012 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 ...
apache-2.0
5,901,768,594,756,871,000
39.786802
102
0.616428
false
thomasgilgenast/spqr-nonrel
django/template/loaders/eggs.py
229
1432
# Wrapper for loading templates from eggs via pkg_resources.resource_string. try: from pkg_resources import resource_string except ImportError: resource_string = None from django.template.base import TemplateDoesNotExist from django.template.loader import BaseLoader from django.conf import settings class Loa...
bsd-3-clause
-5,672,459,462,257,873,000
35.717949
128
0.682961
false
endlessm/chromium-browser
tools/swarming_client/third_party/infra_libs/utils.py
6
8204
# Copyright 2015 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. """Miscellaneous utility functions.""" import contextlib import datetime import errno import json import os import shutil import subprocess import sys impo...
bsd-3-clause
6,493,365,286,717,713,000
32.349593
80
0.67394
false
Orochimarufan/youtube-dl
youtube_dl/extractor/srgssr.py
7
7917
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_urllib_parse_urlparse from ..utils import ( ExtractorError, parse_iso8601, qualities, ) class SRGSSRIE(InfoExtractor): _VALID_URL = r'(?:https?://tp\.srgssr\.ch/p(?:/[^/]+)...
unlicense
177,068,038,200,046,240
41.55914
164
0.528171
false
ErasmusMC-Bioinformatics/fuma
tests/test_AcceptorDonorOrderSpecificMatching.py
2
15409
#!/usr/bin/env python """[License: GNU General Public License v3 (GPLv3)] This file is part of FuMa. FuMa 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 opti...
gpl-3.0
1,482,865,477,021,841,700
36.859951
120
0.632617
false
wscullin/spack
var/spack/repos/builtin/packages/py-memory-profiler/package.py
3
1680
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
-4,432,429,991,087,124,000
44.405405
94
0.675
false
grimmjow8/ansible
lib/ansible/plugins/callback/__init__.py
10
13953
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
7,620,497,579,462,804,000
36.710811
147
0.568767
false
ahoyosid/scikit-learn
sklearn/__check_build/__init__.py
345
1671
""" Module to give helpful messages to the user that did not compile the scikit properly. """ import os INPLACE_MSG = """ It appears that you are importing a local scikit-learn source tree. For this, you need to have an inplace install. Maybe you are in the source directory and you need to try from another location.""...
bsd-3-clause
-8,942,190,659,516,546,000
35.326087
75
0.62298
false
jjas0nn/solvem
tensorflow/lib/python2.7/site-packages/tensorflow/python/ops/io_ops.py
7
14634
# 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...
mit
1,478,360,606,751,180,800
31.162637
80
0.666052
false
GaloisInc/hacrypto
src/Tools/FigureOfMerit/FigureOfMerit/StreamCiphers/CiphersInfo/CiphersInfo.py
1
2681
# # University of Luxembourg # Laboratory of Algorithmics, Cryptology and Security (LACS) # # FigureOfMerit (FOM) # # Copyright (C) 2015 University of Luxembourg # # Written in 2015 by Daniel Dinu <dumitru-daniel.dinu@uni.lu> # # This file is part of FigureOfMerit. # # This program is free software: you can redistribut...
bsd-3-clause
-6,137,508,565,883,823,000
31.695122
111
0.636703
false
jolyonb/edx-platform
openedx/features/course_experience/tests/views/test_course_home.py
1
46167
# coding=utf-8 """ Tests for the course home page. """ from __future__ import absolute_import from datetime import datetime, timedelta import ddt import mock import six from django.conf import settings from django.http import QueryDict from django.urls import reverse from django.utils.http import urlquote_plus from d...
agpl-3.0
2,455,058,214,142,502,400
45.000997
119
0.674419
false
josircg/raizcidadanista
raizcidadanista/poweradmin/actions.py
1
4245
import csv from django.http import HttpResponse from django.core.exceptions import PermissionDenied from django.contrib.admin import helpers from django.contrib.admin.util import get_deleted_objects, model_ngettext from django.db import router from django.template.response import TemplateResponse from django.utils.enco...
gpl-3.0
975,355,206,298,069,400
38.672897
111
0.662662
false
mushtaqak/edx-platform
lms/djangoapps/verify_student/management/commands/tests/test_verify_student.py
101
2620
""" Tests for django admin commands in the verify_student module Lots of imports from verify_student's model tests, since they cover similar ground """ from nose.tools import assert_equals from mock import patch from django.test import TestCase from django.conf import settings from student.tests.factories import Use...
agpl-3.0
-4,631,457,373,904,230,000
42.666667
106
0.725954
false
danakj/chromium
content/test/gpu/run_gpu_integration_test.py
6
1527
#!/usr/bin/env python # Copyright 2016 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 argparse import json import sys from gpu_tests import path_util import gpu_project_config path_util.SetupTelemetryPaths() fro...
bsd-3-clause
-2,443,176,425,633,691,000
32.195652
75
0.719712
false
meejah/AutobahnPython
docs/_extensions/txsphinx.py
19
1782
## ## The code in this file is a (slightly modified) version from here: ## https://github.com/twisted/twisted/blob/trunk/docs/_extensions/apilinks.py ## ## It is hence licensed under the Twisted license (essentially BSD less advertising): ## https://github.com/twisted/twisted/blob/trunk/LICENSE ## """ Sphinx/docutils ...
mit
-421,768,419,794,550,340
27.741935
85
0.636925
false
ken-muturi/pombola
pombola/core/management/commands/core_merge_people.py
3
7754
# This admin command is to save having to do a series of manual steps # when merging to people in Pombola. import sys from django.contrib.contenttypes.models import ContentType from django.core.management.base import BaseCommand, CommandError from django.core.urlresolvers import reverse from django.db import transact...
agpl-3.0
-4,390,576,054,384,149,500
42.561798
105
0.572737
false
nharraud/b2share
invenio/legacy/bibrank/selfcites_searcher.py
13
2372
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013, 2014, 2015 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 optio...
gpl-2.0
7,462,539,833,502,219,000
33.376812
74
0.685919
false
ruohoruotsi/Wavelet-Tree-Synth
nnet/keeper_LSTMVRAE-JayHack-RyotaKatoh-chainer/midi/MidiFileParser.py
4
6432
# -*- coding: ISO-8859-1 -*- # std library from struct import unpack # uhh I don't really like this, but there are so many constants to # import otherwise from constants import * from EventDispatcher import EventDispatcher class MidiFileParser: """ The MidiFileParser is the lowest level parser that s...
gpl-2.0
6,528,537,369,063,021,000
32.505208
82
0.551461
false
pjdelport/django
django/utils/feedgenerator.py
73
15643
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title="Poynter E-Media Tidbits", ... link="http://www.poynter.org/column.asp?id=31", ... description="A group Weblog by the sharpes...
bsd-3-clause
-8,601,840,198,407,840,000
39.213368
120
0.599437
false
pczhaoyun/wolf
wolf/spiders/wolves/btpanda.py
1
1186
#!/usr/bin/env python # -*- coding: utf-8 -*- import re import urlparse from scrapy import log from scrapy.http import Request from base.base_wolf import Base_Wolf class Wolf(Base_Wolf): def __init__(self, *args, **kwargs): super(Wolf, self).__init__(*args, **kwargs) self.name = 'btpanda' ...
apache-2.0
-3,278,413,034,446,313,500
34.939394
123
0.599494
false
jvassev/dd-agent
tests/core/test_autorestart.py
38
3219
# stdlib import os import shlex import signal import subprocess import time import unittest # 3p from nose.plugins.attrib import attr @attr(requires='core_integration') class TestAutoRestart(unittest.TestCase): """ Test the auto-restart and forking of the agent """ def setUp(self): self.agent_foregro...
bsd-3-clause
2,939,323,707,385,110,500
31.846939
80
0.627835
false
crazy-cat/incubator-mxnet
python/mxnet/symbol/__init__.py
15
1208
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
4,846,572,411,782,594,000
37.967742
81
0.74255
false
hustlzp/zulip
bots/irc-mirror.py
114
4288
#! /usr/bin/env python # # EXPERIMENTAL # IRC <=> Zulip mirroring bot # # Setup: First, you need to install python-irc version 8.5.3 # (https://bitbucket.org/jaraco/irc) import irc.bot import irc.strings from irc.client import ip_numstr_to_quad, ip_quad_to_numstr import zulip import optparse IRC_DOMAIN = "irc.example...
apache-2.0
3,673,382,039,586,590,700
32.5
108
0.580224
false
andykimpe/chromium-test-npapi
tools/telemetry/telemetry/unittest/gtest_unittest_results_unittest.py
9
3921
# 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. import unittest from telemetry.unittest import gtest_unittest_results from telemetry.unittest import simple_mock class TestFoo(unittest.TestCase): def _...
bsd-3-clause
6,316,674,406,023,023,000
34.008929
80
0.68962
false
shenghaozou/PythonGrader
P6-Student/GraderP6.py
1
10902
#File Name Rules: Student_ID_SIS Login ID_File Name import os import glob import sys import gradeSettings import re import csv import subprocess import inspect from quiet import quiet from gradeParser import gradeParser import signal from contextlib import contextmanager import threading import _thread import time try:...
apache-2.0
1,297,704,599,747,844,900
41.420233
134
0.50798
false
madhuni/AstroBox
src/ext/makerbot_driver/GcodeProcessors/Rep2XDualstrusionPrimeProcessor.py
3
2377
from __future__ import absolute_import import re import makerbot_driver from .LineTransformProcessor import LineTransformProcessor class Rep2XDualstrusionPrimeProcessor(LineTransformProcessor): def __init__(self): super(Rep2XDualstrusionPrimeProcessor, self).__init__() map_addendum = { ...
agpl-3.0
6,828,186,764,207,458,000
40.701754
156
0.603702
false
bluegenes/MakeMyTranscriptome
scripts/manage_database.py
1
12078
from mmt_defaults import PATH_DATABASES,PATH_UNIREF90, PATH_SWISS_PROT,PATH_NR, PATH_PFAM_DATABASE from functions_databases import ( pfam_build_task, build_diamond_task, build_blast_task, db2stitle_task) from time import strftime import gzip import tarfile import os import json import argparse import sys ...
bsd-3-clause
-5,705,034,320,088,848,000
38.530201
136
0.658636
false
hdemers/birdlistn
birdlistn/__init__.py
1
1934
""" This module instantiates the Flask application and declares the main error handling function ``make_json_error``. """ # IMPORTANT: updates to the following must also be done in setup.py. __title__ = "birdlistn" __version__ = "0.1.0" __author__ = "Hugues Demers" __email__ = "hdemers@gmail.com" __copyright__ = "Copy...
mit
6,612,944,819,356,407,000
28.30303
79
0.688211
false
Zhongqilong/mykbengineer
kbe/src/lib/python/Tools/unicode/genwincodec.py
99
1738
"""This script generates a Python codec module from a Windows Code Page. It uses the function MultiByteToWideChar to generate a decoding table. """ import ctypes from ctypes import wintypes from gencodec import codegen import unicodedata def genwinmap(codepage): MultiByteToWideChar = ctypes.windll.kernel32.Multi...
lgpl-3.0
6,419,474,062,020,586,000
27.491803
72
0.593211
false
bettiolo/phantomjs
src/qt/qtwebkit/Source/WebInspectorUI/Scripts/cssmin.py
120
2021
#!/usr/bin/python # Copyright (C) 2013 Apple 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: # 1. Redistributions of source code must retain the above copyright # notice, this list of con...
bsd-3-clause
-6,303,294,823,794,720,000
44.931818
95
0.673429
false
ms-iot/python
cpython/Lib/distutils/dist.py
12
49726
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import sys import os import re from email import message_from_file try: import warnings except ImportError: warnings = None from distutils.errors import * from distutils.fancy_g...
bsd-3-clause
5,443,995,866,678,882,000
39.198868
82
0.582009
false
DedMemez/ODS-August-2017
hood/InteractiveAnimatedProp.py
1
17362
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.hood.InteractiveAnimatedProp from panda3d.core import Filename, TextNode, Vec3 from direct.actor import Actor from direct.fsm import FSM from direct.interval.IntervalGlobal import Sequence, ActorInterval, Wait, Func, SoundInterval, Parallel from d...
apache-2.0
-1,533,511,197,038,408,400
37.917241
164
0.608513
false
ericholscher/django
django/contrib/gis/maps/google/overlays.py
1
11886
from django.contrib.gis.geos import fromstr, Point, LineString, LinearRing, Polygon from django.utils.functional import total_ordering from django.utils.safestring import mark_safe from django.utils import six from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class GEvent(obje...
bsd-3-clause
8,849,141,670,783,519,000
36.14375
119
0.622245
false
Reagankm/KnockKnock
venv/lib/python3.4/site-packages/matplotlib/tri/triplot.py
21
3124
from __future__ import (absolute_import, division, print_function, unicode_literals) import six import numpy as np from matplotlib.tri.triangulation import Triangulation def triplot(ax, *args, **kwargs): """ Draw a unstructured triangular grid as lines and/or markers. The triang...
gpl-2.0
-6,450,849,818,011,706,000
32.956522
79
0.607875
false
BehavioralInsightsTeam/edx-platform
openedx/core/lib/xblock_builtin/xblock_discussion/tests.py
16
7568
""" Tests for DiscussionXBLock""" from collections import namedtuple import ddt import itertools import mock from nose.plugins.attrib import attr import random import string from unittest import TestCase from safe_lxml import etree from openedx.core.lib.xblock_builtin.xblock_discussion.xblock_discussion import Discus...
agpl-3.0
5,044,737,104,406,731,000
38.831579
119
0.666358
false
0xMF/pelican-plugins
random_article/random_article.py
76
2010
# -*- coding: utf-8 -*- """ Random Article Plugin For Pelican ======================== This plugin generates a html file which redirect to a random article using javascript's window.location. The generated html file is saved at SITEURL. """ from __future__ import unicode_literals import os.path from logging import...
agpl-3.0
7,349,703,488,728,708,000
21.58427
75
0.603483
false
TNick/pylearn2
pylearn2/expr/coding.py
44
1214
""" Expressions for encoding features """ import theano.tensor as T def triangle_code(X, centroids): """ Compute the triangle activation function used in Adam Coates' AISTATS 2011 paper. Parameters ---------- X : theano matrix design matrix centroids : theano matrix k-mea...
bsd-3-clause
-6,579,954,595,919,647,000
22.346154
78
0.602142
false
mlcommons/inference
vision/medical_imaging/3d-unet-kits19/unet_onnx_to_tensorflow.py
1
2812
#! /usr/bin/env python3 # coding=utf-8 # Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. # Copyright 2021 The MLPerf 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...
apache-2.0
4,926,496,576,901,853,000
28.913978
83
0.640546
false
OpenPymeMx/OCB
addons/account_analytic_plans/__openerp__.py
55
3049
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
-6,438,480,246,832,559,000
35.297619
172
0.58183
false
hbrunn/OpenUpgrade
addons/stock_landed_costs/stock_landed_costs.py
33
16501
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
5,257,428,846,775,732,000
51.053628
189
0.58245
false
naucoin/VTKSlicerWidgets
Examples/VisualizationAlgorithms/Python/imageWarp.py
15
1735
#!/usr/bin/env python # This example shows how to combine data from both the imaging and # graphics pipelines. The vtkMergeFilter is used to merge the data # from each together. import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Read in an image and compute a luminance value. The ...
bsd-3-clause
-5,582,449,274,891,366,000
28.913793
70
0.790202
false
sssundar/boogie
src/share_and_message_server/test_v0.py
1
1030
from time import sleep import sys import requests, json # Reference: # http://docs.python-requests.org/en/master/user/quickstart/ # http://docs.python-requests.org/en/master/api/?highlight=get#requests.get if __name__ == "__main__": # A few valid RLEs N = 200 rles = [] rles.append("b,%d" % N**2) rles.append("w...
gpl-3.0
-3,523,665,144,886,697,500
29.323529
125
0.666019
false
lqdc/pyew
plugins/shellcode.py
16
1491
#!/usr/bin/env python """ This file is part of Pyew Copyright (C) 2009, 2010 Joxean Koret 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 la...
gpl-2.0
8,199,633,222,907,176,000
27.673077
125
0.669349
false
JaneliaSciComp/serial_device_python
setup.py
3
3708
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path from version import get_git_version here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here,...
bsd-3-clause
1,199,975,546,059,410,400
38.446809
136
0.659385
false
rebstar6/servo
tests/wpt/web-platform-tests/mixed-content/generic/tools/spec_validator.py
202
5824
#!/usr/bin/env python import json, sys from common_paths import * def assert_non_empty_string(obj, field): assert field in obj, 'Missing field "%s"' % field assert isinstance(obj[field], basestring), \ 'Field "%s" must be a string' % field assert len(obj[field]) > 0, 'Field "%s" must not be empty'...
mpl-2.0
-415,893,677,500,178,600
35.628931
78
0.555632
false
priyankarani/trytond-sale-payment-gateway
tests/test_sale.py
2
66422
# -*- coding: utf-8 -*- import os import unittest import datetime from decimal import Decimal from dateutil.relativedelta import relativedelta import pycountry import trytond.tests.test_tryton from trytond.tests.test_tryton import POOL, USER, DB_NAME, CONTEXT from trytond.transaction import Transaction from trytond.e...
bsd-3-clause
-5,269,344,157,617,092,000
41.852903
80
0.551911
false
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/scipy/_lib/_threadsafety.py
71
1530
from __future__ import division, print_function, absolute_import import threading import scipy._lib.decorator __all__ = ['ReentrancyError', 'ReentrancyLock', 'non_reentrant'] class ReentrancyError(RuntimeError): pass class ReentrancyLock(object): """ Threading lock that raises an exception for reent...
gpl-3.0
2,236,254,556,993,908,500
24.5
74
0.615033
false
sauloal/cnidaria
scripts/venv/lib/python2.7/site-packages/pip/_vendor/cachecontrol/serialize.py
317
6189
import base64 import io import json import zlib from pip._vendor.requests.structures import CaseInsensitiveDict from .compat import HTTPResponse, pickle def _b64_encode_bytes(b): return base64.b64encode(b).decode("ascii") def _b64_encode_str(s): return _b64_encode_bytes(s.encode("utf8")) def _b64_decode...
mit
-2,046,879,173,467,281,200
32.63587
78
0.54613
false
v0lk3r/ansible-modules-core
cloud/amazon/cloudformation.py
56
14338
#!/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 distributed...
gpl-3.0
2,834,443,441,950,973,400
35.207071
288
0.624425
false
Thraxis/pymedusa
lib/subliminal/subtitle.py
3
8191
# -*- coding: utf-8 -*- import codecs import logging import os import chardet import pysrt from .video import Episode, Movie from .utils import sanitize, sanitize_release_group logger = logging.getLogger(__name__) #: Subtitle extensions SUBTITLE_EXTENSIONS = ('.srt', '.sub', '.smi', '.txt', '.ssa', '.ass', '.mpl')...
gpl-3.0
7,408,384,815,659,064,000
31.375494
114
0.60774
false
bruceyou/NewsBlur
apps/reader/migrations/0002_features.py
18
10128
from south.db import db from django.db import models from apps.reader.models import * class Migration: def forwards(self, orm): # Adding model 'Feature' db.create_table('reader_feature', ( ('id', orm['reader.feature:id']), ('description', orm['reader.feature:d...
mit
1,572,366,557,433,165,800
69.825175
142
0.538507
false
pjshi23/mcazurerm
examples/listvms.py
1
1461
import json import mcazurerm # Load Azure app defaults try: with open('mcazurermconfig.json') as configFile: configData = json.load(configFile) except FileNotFoundError: print("Error: Expecting vmssConfig.json in current folder") sys.exit() tenant_id = configData['tenantId'] app_id = configData['...
mit
7,357,314,229,997,295,000
37.447368
113
0.66256
false
eayunstack/ceilometer
ceilometer/storage/base.py
6
8946
# # Copyright 2012 New Dream Network, LLC (DreamHost) # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
-9,170,060,027,096,443,000
33.945313
76
0.590096
false
AlphaSheep/ZBLL-Sorter
src/htmlgenerator.py
1
5062
''' Created on 06 Jan 2016 Copyright (c) 2016 Brendan Gray and Sylvermyst Technologies 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 limit...
mit
5,602,232,292,706,677,000
32.746667
149
0.52904
false
gcode-mirror/audacity
lib-src/lv2/lv2/waflib/Tools/ldc2.py
330
1029
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import sys from waflib.Tools import ar,d from waflib.Configure import conf @conf def find_ldc2(conf): conf.find_program(['ldc2'],var='D') out=conf.cmd_and_log([conf.env.D,'-...
gpl-2.0
3,018,529,918,876,131,300
26.810811
102
0.631681
false
pbaesse/Sissens
lib/python2.7/site-packages/sqlalchemy/events.py
26
46787
# sqlalchemy/events.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Core event interfaces.""" from . import event, exc from .pool import Pool f...
gpl-3.0
7,767,974,288,618,027,000
38.886616
86
0.641845
false
psi-rking/psi4
psi4/driver/procrouting/solvent/efp.py
6
6014
# # @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
-8,098,922,694,707,981,000
34.797619
96
0.639342
false
IRI-Research/django
django/contrib/auth/decorators.py
10
3164
from functools import wraps from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import PermissionDenied from django.utils.decorators import available_attrs from django.utils.encoding import force_str from django.utils.six.moves.urllib.parse import urlparse fr...
bsd-3-clause
-979,393,438,263,459,300
40.631579
91
0.663085
false
mekanix/geonode
geonode/layers/utils.py
2
27609
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
gpl-3.0
6,478,071,254,988,417,000
33.992395
118
0.558224
false
xuweiliang/Codelibrary
nova/conf/configdrive.py
10
4097
# 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 agreed to in...
apache-2.0
2,190,969,292,314,034,400
35.90991
78
0.7464
false
juanmont/one
.vscode/extensions/tht13.rst-vscode-2.0.0/src/python/docutils/readers/doctree.py
246
1607
# $Id: doctree.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: Martin Blais <blais@furius.ca> # Copyright: This module has been placed in the public domain. """Reader for existing document trees.""" from docutils import readers, utils, transforms class Reader(readers.ReReader): """ Adapt the Reader API fo...
apache-2.0
-6,472,174,062,464,439,000
33.934783
77
0.672682
false