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
yunxliu/crosswalk-test-suite
webapi/tct-csp-w3c-tests/csp-py/csp_media-src_corss-origin_audio_blocked_ext.py
30
3126
def main(request, response): import simplejson as json f = file('config.json') source = f.read() s = json.JSONDecoder().decode(source) url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1]) url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0]) _CSP = "media-src http://www....
bsd-3-clause
3,516,255,804,027,830,000
43.028169
98
0.684261
false
royc1/gpdb
gpMgmt/bin/ext/figleaf/annotate_cover.py
35
3696
import figleaf import os import re from annotate import read_exclude_patterns, filter_files, logger def report_as_cover(coverage, exclude_patterns=[], ): ### now, output. keys = coverage.keys() info_dict = {} for k in filter_files(keys): try: pyfile = open(k, 'rU') ...
apache-2.0
1,517,335,854,399,543,300
24.846154
79
0.538149
false
burzillibus/RobHome
venv/lib/python2.7/site-packages/docutils/__init__.py
6
8968
# $Id: __init__.py 8147 2017-08-03 09:01:16Z grubert $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This is the Docutils (Python Documentation Utilities) package. Package Structure ================= Modules: - __init__.py: Contains component base cl...
mit
6,584,559,247,334,019,000
33.229008
78
0.689451
false
krishnabangalore/Webinos-Platform
experiments/windowsInstaller/CreateDis.py
3
2228
import os import sys import shutil import js2c def GetSourceFiles(webinos_root): jsFiles = [] jsonFiles = [] packageFiles = [] nodeFiles = [] nodeModuleDirs = [] for root, dirs, files in os.walk(webinos_root): if not 'node_modules' in root.lower() and not "wrt" in root.lower() and not "test" in root.lo...
apache-2.0
-2,389,168,773,531,733,500
41.056604
136
0.671903
false
JuniorJPDJ/pyChomikBox
ChomikBox/utils/FileTransferProgressBar.py
1
3099
import time import sys def sizeof_fmt(num, unit='B'): # source: http://stackoverflow.com/questions/1094841/reusable-library-to-get-human-readable-version-of-file-size for uprexif in ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi']: if abs(num) < 1024.0: return "{:3.2f} {}{}".format(num, upre...
lgpl-3.0
2,277,270,958,108,844,000
45.253731
120
0.558567
false
alfa-addon/addon
plugin.video.alfa/core/scrapertoolsV2.py
1
11697
# -*- coding: utf-8 -*- # -------------------------------------------------------------------------------- # Scraper tools v2 for reading and processing web elements # -------------------------------------------------------------------------------- #from future import standard_library #standard_library.install_a...
gpl-3.0
-8,660,735,414,594,733,000
31.127841
122
0.537775
false
lanfker/tdma_imac
.waf-1.6.7-0a94702c61504c487a251b8d0a04ca9a/waflib/Tools/cxx.py
3
1250
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/svn/docs/wafbook/single.html#_obtaining_the_waf_file from waflib import TaskGen,Task,Utils from waflib.Tools import c_preproc from waflib.Tools.ccroot import link_task,stlink_task def cxx_hook(self,node): return self.create_com...
gpl-2.0
-8,412,443,015,879,089,000
45.296296
298
0.7016
false
GenericStudent/home-assistant
tests/components/alert/test_init.py
8
11457
"""The tests for the Alert component.""" # pylint: disable=protected-access from copy import deepcopy import unittest import homeassistant.components.alert as alert from homeassistant.components.alert import DOMAIN import homeassistant.components.notify as notify from homeassistant.const import ( ATTR_ENTITY_ID, ...
apache-2.0
-1,266,166,287,685,687,000
31.273239
84
0.628
false
Cinntax/home-assistant
tests/components/config/test_area_registry.py
4
4008
"""Test area_registry API.""" import pytest from homeassistant.components.config import area_registry from tests.common import mock_area_registry @pytest.fixture def client(hass, hass_ws_client): """Fixture that can interact with the config manager API.""" hass.loop.run_until_complete(area_registry.async_set...
apache-2.0
-2,389,402,687,643,168,300
25.72
76
0.606038
false
shenqicang/openmc
tests/test_tally_assumesep/results.py
1
1251
#!/usr/bin/env python import sys import numpy as np # import statepoint sys.path.append('../../src/utils') import statepoint # read in statepoint file if len(sys.argv) > 1: sp = statepoint.StatePoint(sys.argv[1]) else: sp = statepoint.StatePoint('statepoint.10.binary') sp.read_results() # extract tally resu...
mit
-766,772,619,525,675,100
23.529412
76
0.693845
false
DataBassDroppers/291ProjectOne
Patient_Info_Update.py
1
18073
import cx_Oracle import getpass #gets password without echoing import random import datetime class Patient_Info_Update(): def __init__(self): pass def main(self, credentials): self.con = cx_Oracle.connect(credentials[0] + '/' + \ credentials[...
apache-2.0
-2,980,646,853,998,649,300
35.73374
214
0.409893
false
EmreAtes/spack
lib/spack/spack/hooks/__init__.py
1
2945
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
7,265,135,582,644,949,000
33.647059
78
0.662479
false
yk5/beam
sdks/python/apache_beam/runners/pipeline_context.py
3
3550
# # 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
4,571,554,364,851,259,400
33.466019
75
0.693803
false
rahimnathwani/django-countries
django_countries/data.py
4
17825
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This is a self-generating script that contains all of the iso3166-1 data. To regenerate, a CSV file must be created that contains the latest data. Here's how to do that: 1. Visit https://www.iso.org/obp 2. Click the "Country Codes" radio option and click the search bu...
mit
1,678,677,305,274,229,000
26.542504
79
0.441134
false
inercia/candelabra
candelabra/scheduler/rad_util.py
1
26012
# Copyright (c) 2007 RADLogic # # 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, distribut...
bsd-2-clause
977,809,573,443,822,300
27.647577
178
0.558012
false
derekstavis/bluntly
vendor/github.com/youtube/vitess/py/vttest/run_local_database.py
1
7646
#!/usr/bin/env python r"""Command-line tool for starting a local Vitess database for testing. USAGE: $ run_local_database --port 12345 \ --proto_topo <vttest proto as string> \ --schema_dir /path/to/schema/dir It will run the tool, logging to stderr. On stdout, a small json structure can be waited on and ...
mit
3,395,204,098,319,261,700
37.812183
79
0.66937
false
kiwicopple/MyMDb
venv/Lib/site-packages/sphinx/util/smartypants.py
35
11142
r""" This is based on SmartyPants.py by `Chad Miller`_ <smartypantspy@chad.org>, version 1.5_1.6. Copyright and License ===================== SmartyPants_ license:: Copyright (c) 2003 John Gruber (http://daringfireball.net/) All rights reserved. Redistribution and use in source and binary forms, wit...
mit
1,064,108,085,081,027,300
36.264214
79
0.599174
false
Beeblio/django
tests/swappable_models/tests.py
59
2156
from __future__ import unicode_literals from django.utils.six import StringIO from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.core import management from django.test import TestCase, override_settings from swappable_models.models import Article...
bsd-3-clause
5,159,018,456,522,786,000
39.679245
101
0.688776
false
sunqm/pyscf
pyscf/gto/basis/faegre_dz.py
2
2441
Br = [[0, -1, [1852191.95,1]], [0, -1, [277468.432,1]], [0, -1, [63146.2222,1]], [0, -1, [17882.2426,1]], [0, -1, [5831.1276,1]], [0, -1, [2102.97002,1]], [0, -1, [818.081869,1]], [0, -1, [337.178276,1]], [0, -1, [144.372116,1]], [0, -1, [59.4416183,1]], [0, -1, [27.8399271,1]], [0, -1, [12.7957627,1]...
apache-2.0
3,826,817,444,269,580,300
70.794118
83
0.45637
false
DavidNorman/tensorflow
tensorflow/python/data/experimental/kernel_tests/optimization/map_and_filter_fusion_test.py
4
4273
# 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
-9,201,176,295,065,049,000
37.151786
80
0.689679
false
vyrus/wubi
src/openpgp/sap/pkt/CompressedData.py
9
3968
"""Compressed Data RFC 2440.2.3, 2440.5.6 A compressed data packet simply contains OpenPGP message data in a single packet. In other words, a signature, public key, signed message or any other valid message type (see rfc2440 10.2) can be encapsulated in a single compressed data packet. Normally, all this data is, um, ...
gpl-2.0
-3,095,134,076,281,938,400
32.066667
99
0.613155
false
EarthSystemCoG/COG
filebrowser/settings.py
2
7031
# coding: utf-8 # imports import os # django imports from django.conf import settings from django.utils.translation import ugettext_lazy as _ # settings for django-tinymce #FIXME: remove the tinymce content, we no longer use it. try: import tinymce.settings DEFAULT_URL_TINYMCE = tinymce.settings.JS_BASE_URL ...
bsd-3-clause
-6,834,304,391,566,928,000
51.864662
117
0.696914
false
hogarthj/ansible
test/units/modules/network/f5/test_bigip_snmp_trap.py
23
6579
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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 import os import json import sys from nose.plugins.skip import SkipTest i...
gpl-3.0
5,188,336,974,116,207,000
31.895
91
0.612555
false
gopal1cloud/neutron
neutron/agent/linux/ovsdb_monitor.py
5
3670
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
8,525,257,399,254,136,000
33.952381
78
0.622071
false
gurumaia/dynatrace-slack-bot
dynabot.py
1
2339
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time import requests import requests from requests.auth import HTTPBasicAuth from slackclient import SlackClient import dynatrace import dashboards # Dynatrace Bot's ID as an environment variable BOT_ID = os.environ.get("BOT_ID") # constants AT_BOT = "<@"...
gpl-3.0
-7,732,812,770,964,779,000
34.984615
142
0.63959
false
demonchild2112/travis-test
grr/core/grr_response_core/version.py
2
1239
#!/usr/bin/env python """GRR Rapid Response Framework.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os import configparser from grr_response_core.lib import package def VersionPath(): """Returns a path to version.ini.""" # Try to get...
apache-2.0
-3,116,742,367,454,153,700
27.813953
78
0.694108
false
avneesh91/django
django/db/transaction.py
10
11230
from contextlib import ContextDecorator from django.db import ( DEFAULT_DB_ALIAS, DatabaseError, Error, ProgrammingError, connections, ) class TransactionManagementError(ProgrammingError): """Transaction management is used improperly.""" pass def get_connection(using=None): """ Get a database c...
bsd-3-clause
5,562,153,189,974,124,000
37.858131
97
0.589938
false
Suwmlee/XX-Net
Python3/lib/contextlib.py
8
12261
"""Utilities for with-statement contexts. See PEP 343.""" import sys from collections import deque from functools import wraps __all__ = ["contextmanager", "closing", "ContextDecorator", "ExitStack", "redirect_stdout", "redirect_stderr", "suppress"] class ContextDecorator(object): "A base class or m...
bsd-2-clause
-1,798,120,594,885,289,700
32.963989
80
0.580621
false
thatch45/svt
setup.py
1
1490
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Import python libs import os import sys import shutil if 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules: from setuptools import setup from setuptools import Command else: from distutils.core import setup from distutils.core import Command...
apache-2.0
-1,472,699,939,748,658,200
24.689655
94
0.589262
false
dracos/QGIS
python/plugins/processing/algs/taudem/dinfdistup_multi.py
7
4893
# -*- coding: utf-8 -*- """ *************************************************************************** dinfdistup_multi.py --------------------- Date : March 2015 Copyright : (C) 2015 by Alexander Bruy Email : alexander dot bruy at gmail dot com **********...
gpl-2.0
7,269,949,606,276,485,000
38.459677
86
0.601471
false
igboyes/virtool
virtool/history/utils.py
2
6175
import arrow from typing import Tuple, Union, List import datetime import os import json import dictdiffer import aiofiles def calculate_diff(old: dict, new: dict) -> list: """ Calculate the diff for a joined otu document before and after modification. :param old: the joined otu document before modificat...
mit
-5,658,471,045,765,186,000
26.444444
116
0.639676
false
trabacus-softapps/openerp-8.0-cc
openerp/addons/project_timesheet/__openerp__.py
6
2283
# -*- 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
-7,332,601,086,707,830,000
42.075472
129
0.61717
false
liangtianyou/ST
stserver/libcommon/web/utils.py
2
40122
#!/usr/bin/env python """ General Utilities (part of web.py) """ __all__ = [ "Storage", "storage", "storify", "Counter", "counter", "iters", "rstrips", "lstrips", "strips", "safeunicode", "safestr", "utf8", "TimeoutError", "timelimit", "Memoize", "memoize", "re_compile", "re_subm", "group", "uniq"...
gpl-3.0
-1,845,256,980,992,193,000
27.096639
101
0.513534
false
ciena/afkak
afkak/test/test_protocol.py
1
6085
# -*- coding: utf-8 -*- # Copyright 2015 Cyan, Inc. # Copyright 2018 Ciena Corporation # # 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 # # U...
apache-2.0
-532,360,292,095,834,600
35.005917
92
0.677732
false
megarcia/GT16_JGRA
source/process_NCEI_01.py
2
6625
""" Python script 'process_NCEI_01.py' by Matthew Garcia, PhD student Dept. of Forest and Wildlife Ecology University of Wisconsin - Madison matt.e.garcia@gmail.com Copyright (C) 2015-2016 by Matthew Garcia Licensed Gnu GPL v3; see 'LICENSE_GnuGPLv3.txt' for complete terms Send questions, bug reports, any related requ...
gpl-3.0
-8,631,419,957,783,528,000
38.670659
79
0.621736
false
rbaindourov/v8-inspector
Source/chrome/tools/cygprofile/check_orderfile_unittest.py
49
1769
#!/usr/bin/python # 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. import unittest import check_orderfile import symbol_extractor class TestCheckOrderFile(unittest.TestCase): _SYMBOL_INFOS = [symbol_ex...
bsd-3-clause
6,746,830,056,616,794,000
37.456522
77
0.66987
false
ChantyTaguan/zds-site
zds/member/urls.py
1
2339
# coding: utf-8 from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', 'zds.member.views.index'), url(r'^voir/(?P<user_name>.+)/$', 'zds.member.views.details'), url(r'^profil...
gpl-3.0
-7,926,029,447,301,832,000
44.882353
74
0.398461
false
tchx84/sugar
src/jarabe/model/telepathyclient.py
12
4950
# Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/> # # 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
-8,686,728,246,314,015,000
37.671875
79
0.636768
false
jbalogh/zamboni
apps/market/models.py
1
7069
# -*- coding: utf-8 -*- import time from django.conf import settings from django.db import models from django.dispatch import receiver from django.utils import translation from django.utils.http import urlencode from translations.fields import TranslatedField import amo import amo.models from amo.urlresolvers import...
bsd-3-clause
4,980,549,534,146,986,000
33.315534
77
0.621021
false
shurihell/testasia
lms/djangoapps/certificates/tests/test_views.py
11
15721
"""Tests for certificates views. """ import json import ddt from uuid import uuid4 from nose.plugins.attrib import attr from mock import patch from django.conf import settings from django.core.cache import cache from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client impo...
agpl-3.0
-8,328,641,508,367,647,000
39.310256
117
0.603842
false
ergoregion/Rota-Program
Rota_System/UI/Roles/widget_role.py
1
2190
__author__ = 'Neil Butcher' import sys from PyQt4 import QtCore, QtGui from Rota_System.UI.Roles.commands_role import CommandChangeRole class SingleRoleWidget(QtGui.QWidget): commandIssued = QtCore.pyqtSignal(QtGui.QUndoCommand) def __init__(self, parent): QtGui.QWidget.__init__(self, parent) ...
mit
-201,966,647,692,224,100
31.220588
83
0.638356
false
citrix-openstack-build/oslo.reports
oslo_reports/views/text/threading.py
3
2424
# Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
apache-2.0
-9,103,680,364,283,972,000
29.3
78
0.59901
false
Python-Tools/pmfp
pmfp/scripts/_new_cmd.py
1
2358
import argparse import json from pmfp.new import new, new_component, new_pb from pmfp.config import load_rc def new_cmd(args: argparse.Namespace): config = load_rc() if config is False: kwargs_o = _parser_args(args) c_language = kwargs_o.get("language").capitalize() spl_name = kwargs_o...
mit
-1,921,588,049,715,524,900
31.027397
116
0.485458
false
effigies/mne-python
mne/forward/tests/test_forward.py
1
13130
import os import os.path as op import warnings import gc from nose.tools import assert_true, assert_raises import numpy as np from numpy.testing import (assert_array_almost_equal, assert_equal, assert_array_equal, assert_allclose) from mne.datasets import testing from mne.io import Raw from...
bsd-3-clause
870,074,566,463,039,500
39.152905
79
0.630084
false
CYBAI/servo
tests/wpt/web-platform-tests/css/css-fonts/support/fonts/makegsubfonts.py
30
14166
from __future__ import print_function import os import textwrap from xml.etree import ElementTree from fontTools.ttLib import TTFont, newTable from fontTools.misc.psCharStrings import T2CharString from fontTools.ttLib.tables.otTables import GSUB,\ ScriptList, ScriptRecord, Script, DefaultLangSys,\ FeatureList,...
mpl-2.0
8,045,101,316,494,257,000
28.088296
135
0.649795
false
c7zero/chipsec
tests/hardware/test_generic.py
6
2384
#!/usr/bin/python #CHIPSEC: Platform Security Assessment Framework # #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; Version 2. # #This program is distributed in the hope that it will be useful, #b...
gpl-2.0
-7,955,920,053,545,327,000
35.676923
80
0.652265
false
Vagab0nd/SiCKRAGE
lib3/sqlalchemy/dialects/sqlite/pysqlcipher.py
4
4692
# sqlite/pysqlcipher.py # Copyright (C) 2005-2020 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 """ .. dialect:: sqlite+pysqlcipher :name: pysqlcipher :dbapi: pysqlci...
gpl-3.0
2,216,975,753,478,482,200
33
96
0.692882
false
rwl/PyCIM
CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/VoltageCompensator/__init__.py
1
1504
# Copyright (C) 2010-2011 Richard Lincoln # # 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...
mit
110,888,129,193,843,500
54.703704
128
0.803191
false
feend78/evennia
evennia/scripts/migrations/0009_scriptdb_db_account.py
2
1174
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-05 17:27 from __future__ import unicode_literals from django.db import migrations, models, connection import django.db.models.deletion def _table_exists(db_cursor, tablename): "Returns bool if table exists or not" return tablename in connection....
bsd-3-clause
-1,930,541,814,525,931,500
35.6875
254
0.650767
false
ekasitk/sahara
sahara/service/edp/job_manager.py
1
7750
# Copyright (c) 2013 Mirantis 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 writ...
apache-2.0
1,219,834,692,894,380,300
35.904762
79
0.612258
false
nunpa/configuration
playbooks/library/ec2_ami_2_0_0_1.py
6
14232
#!/usr/bin/env 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 distrib...
agpl-3.0
-2,800,102,396,749,594,000
34.140741
266
0.651138
false
macarthur-lab/exac_readviz_scripts
test/test_check_gvcf.py
1
3230
import os import vcf import unittest from utils.check_gvcf import convert_genotype_to_alleles, check_gvcf class TestCheckGVCF(unittest.TestCase): def setUp(self): self.sample1_path = os.path.join(os.path.dirname(__file__), "data/sample1.gvcf.gz") self.sample2a_path = os.path.join(os.path.dirname...
mit
2,087,855,657,812,924,000
50.269841
141
0.517647
false
beardypig/streamlink
tests/plugins/test_playtv.py
7
1264
import unittest from streamlink.plugins.playtv import PlayTV class TestPluginPlayTV(unittest.TestCase): def test_can_handle_url(self): # should match self.assertTrue(PlayTV.can_handle_url("http://playtv.fr/television/arte")) self.assertTrue(PlayTV.can_handle_url("http://playtv.fr/televisi...
bsd-2-clause
-3,497,835,095,500,838,400
53.956522
96
0.685127
false
pazeshun/jsk_apc
demos/grasp_fusion/examples/grasp_fusion/affordance_segmentation/train.py
2
8130
#!/usr/bin/env python import argparse import datetime import functools import os import os.path as osp import socket os.environ['MPLBACKEND'] = 'agg' # NOQA import chainer from chainer.training import extensions import fcn import grasp_fusion_lib from grasp_fusion_lib.contrib import grasp_fusion here = osp.dirna...
bsd-3-clause
7,043,566,435,338,421,000
26.938144
79
0.611931
false
NaturalGIS/naturalgis_qgis
python/plugins/processing/algs/qgis/RasterLayerHistogram.py
15
4036
# -*- coding: utf-8 -*- """ *************************************************************************** RasterLayerHistogram.py --------------------- Date : January 2013 Copyright : (C) 2013 by Victor Olaya Email : volayaf at gmail dot com *****************...
gpl-2.0
3,791,158,812,569,785,300
39.32
191
0.536706
false
teknick/eve-wspace
evewspace/POS/utils.py
11
1757
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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...
gpl-3.0
-4,808,814,160,905,557,000
37.195652
74
0.698349
false
connoranderson/Speechables
mechanize-0.2.5/test-tools/unittest/result.py
22
3847
"""Test result object""" import traceback from unittest import util class TestResult(object): """Holder for test result information. Test results are automatically managed by the TestCase and TestSuite classes, and do not need to be explicitly manipulated by writers of tests. Each instance holds t...
apache-2.0
1,196,534,753,680,754,200
33.044248
82
0.616584
false
bertucho/epic-movie-quotes-quiz
dialogos/build/scrapy/scrapy/downloadermiddlewares/cookies.py
23
3134
import os import six import logging from collections import defaultdict from scrapy.exceptions import NotConfigured from scrapy.http import Response from scrapy.http.cookies import CookieJar logger = logging.getLogger(__name__) class CookiesMiddleware(object): """This middleware enables working with sites that ...
mit
3,833,325,556,357,626,400
33.43956
74
0.605935
false
overtherain/scriptfile
software/googleAppEngine/google/appengine/api/logservice/logservice_stub.py
2
15875
#!/usr/bin/env python # # Copyright 2007 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 o...
mit
5,645,606,425,958,882,000
30.75
80
0.675339
false
agx/git-buildpackage
gbp/git/fastimport.py
1
4709
# vim: set fileencoding=utf-8 : # # (C) 2011 Guido Günther <agx@sigxcpu.org> # 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) a...
gpl-2.0
8,218,491,110,797,956,000
31.694444
80
0.558411
false
kumar303/zamboni
mkt/comm/authorization.py
19
2879
from django.conf import settings from django.shortcuts import get_object_or_404 from rest_framework.permissions import BasePermission from rest_framework.exceptions import PermissionDenied from mkt.comm.models import (CommunicationNote, CommunicationThread, user_has_perm_note, user_has_pe...
bsd-3-clause
8,662,823,910,853,650,000
35.443038
78
0.674192
false
miguelinux/vbox
src/libs/xpcom18a4/python/components.py
4
9813
# ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License Version # 1.1 (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.mozilla.org/MPL/ # # Softwa...
gpl-2.0
-1,621,872,366,042,716,200
39.217213
141
0.654438
false
lsaffre/lino-faggio
lino_voga/lib/courses/fixtures/demo.py
2
3254
# -*- coding: UTF-8 -*- # Copyright 2012-2016 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import unicode_literals from builtins import range import datetime from lino.api import dd, rt from lino.utils import mti, Cycler from django.utils.translation import ugettext_lazy as _ from dja...
bsd-2-clause
-7,735,009,765,770,809,000
32.895833
88
0.579902
false
RaumZeit/gdesklets-core
shell2/control/local/__init__.py
2
6608
''' Handles the local desklets and controls ''' import dircache import os from unpack import unpack # untar the files import file_operations # remove, etc. import core_interface_035 as core_interface def get_desklets(directory): ''' Gets the local desklets from the given directory ''' list = {} ...
gpl-2.0
-4,502,939,055,051,956,700
33.596859
102
0.568099
false
grahamgilbert/docker-sal
settings.py
1
7196
# Django settings for sal project. from settings_import import ADMINS, TIME_ZONE, LANGUAGE_CODE, ALLOWED_HOSTS, DISPLAY_NAME, PLUGIN_ORDER import os DEBUG = False TEMPLATE_DEBUG = DEBUG APPEND_SLASH=False PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.path.pardir)) AUTH_PROFI...
apache-2.0
-1,470,711,382,611,792,100
31.269058
121
0.672318
false
mzdaniel/oh-mainline
vendor/packages/twill/twill/other_packages/_mechanize_dist/_mozillacookiejar.py
20
6161
"""Mozilla / Netscape cookie loading / saving. Copyright 2002-2006 John J Lee <jjl@pobox.com> Copyright 1997-1999 Gisle Aas (original libwww-perl code) This code is free software; you can redistribute it and/or modify it under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt included with the distri...
agpl-3.0
-3,639,022,201,207,968,300
37.748428
80
0.540497
false
edxnercel/edx-platform
lms/djangoapps/mobile_api/users/serializers.py
16
3387
""" Serializer for user API """ from rest_framework import serializers from rest_framework.reverse import reverse from courseware.courses import course_image_url from student.models import CourseEnrollment, User from certificates.models import certificate_status_for_student, CertificateStatuses class CourseOverviewF...
agpl-3.0
8,744,006,128,680,315,000
34.28125
86
0.600827
false
daineseh/kodi-plugin.video.ted-talks-chinese
youtube_dl/extractor/ruutu.py
29
4297
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_urllib_parse_urlparse from ..utils import ( determine_ext, int_or_none, xpath_attr, xpath_text, ) class RuutuIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?ruutu\.fi/video/(...
gpl-2.0
-5,128,898,413,219,188,000
41.078431
115
0.466449
false
BiaDarkia/scikit-learn
examples/gaussian_process/plot_gpc_xor.py
34
2170
""" ======================================================================== Illustration of Gaussian process classification (GPC) on the XOR dataset ======================================================================== This example illustrates GPC on XOR data. Compared are a stationary, isotropic kernel (RBF) and ...
bsd-3-clause
-4,375,816,046,593,719,300
36.413793
78
0.602304
false
redhat-openstack/neutron
neutron/plugins/ofagent/agent/flows.py
18
15211
# Copyright (C) 2014 VA Linux Systems Japan K.K. # Copyright (C) 2014 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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...
apache-2.0
2,142,964,280,140,703,700
36.373464
79
0.574321
false
smurn/augast
doc/conf.py
2
8530
# -*- coding: utf-8 -*- # # Lenatu documentation build configuration file, created by # sphinx-quickstart on Thu May 23 13:41:54 2013. # # 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. # # All ...
mit
-5,939,633,539,836,018,000
30.713755
80
0.693435
false
ndardenne/pymatgen
pymatgen/io/xr.py
2
6270
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ This module provides input and output mechanisms for the xr file format, which is a modified CSSR file format and, for example, used in GULP. In particular...
mit
3,129,614,051,673,794,000
37.231707
78
0.533971
false
PaulWay/insights-core
insights/parsers/tests/test_ceph_cmd_json_parsing.py
2
17729
from insights.parsers.ceph_cmd_json_parsing import CephOsdDump, CephOsdDf, CephS, CephECProfileGet, CephCfgInfo, \ CephHealthDetail, CephDfDetail, CephOsdTree from insights.tests import context_wrap CEPH_OSD_DUMP_INFO = """ { "epoch": 210, "fsid": "2734f9b5-2013-48c1-8e96-d31423444717", "created": "201...
apache-2.0
-4,988,048,955,624,086,000
26.701563
114
0.345423
false
andhit-r/account-financial-tools
account_move_line_search_extension/__openerp__.py
10
1376
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2013-2015 Noviat nv/sa (www.noviat.com). # # This program is free software: you can redistribute it and/or modify # it under the terms of th...
agpl-3.0
-3,842,046,906,003,299,300
36.189189
78
0.585756
false
robert-giaquinto/text-analysis
src/topic_model/journal_tokens.py
1
1515
from __future__ import division, print_function, absolute_import import os class JournalTokens(object): """ Iterable: on each iteration, return journal tokens in a list, one list for each journal. Process one cleaned journal at a time using generators, never load the entire corpus into RAM. ...
mit
3,059,249,082,219,789,000
31.234043
116
0.611881
false
gangadhar-kadam/latestchurcherp
erpnext/selling/doctype/sales_order/test_sales_order.py
5
8703
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import flt, add_days import frappe.permissions import unittest from erpnext.selling.doctype.sales_order.sales_order \ im...
agpl-3.0
238,892,535,877,050,530
31.969697
105
0.708721
false
nojhan/weboob-devel
weboob/tools/application/results.py
7
6048
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Christophe Benz # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at yo...
agpl-3.0
6,004,166,350,627,672,000
38.789474
214
0.535714
false
muraliselva10/designate
contrib/tempest/dns_tests/admin/test_servers.py
8
2840
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
apache-2.0
-4,746,614,242,254,964,000
39
78
0.641549
false
mozilla/moztrap
tests/model/test_mtmodel.py
5
23252
""" Tests for ``MTModel`` and related classes. These tests use the ``Product`` model (and ``Suite`` for cascade-delete tests), as its a simple model inherited from ``MTModel``, and this avoids the need for a test-only model. """ import datetime from mock import patch from tests import case class MTModelTestCase(...
bsd-2-clause
-5,078,902,280,909,319,000
29.434555
84
0.628462
false
SmartInfrastructures/fuel-web-dev
nailgun/nailgun/api/v1/handlers/role.py
1
4984
# -*- coding: utf-8 -*- # Copyright 2015 Mirantis, 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 o...
apache-2.0
3,605,046,063,001,533,400
32.904762
78
0.624599
false
youprofit/kivy
kivy/interactive.py
25
10122
''' Interactive launcher ==================== .. versionadded:: 1.3.0 The :class:`InteractiveLauncher` provides a user-friendly python shell interface to an :class:`App` so that it can be prototyped and debugged interactively. .. note:: The Kivy API intends for some functions to only be run once or before the ...
mit
-4,692,271,078,984,334,000
29.672727
79
0.644141
false
awemulya/fieldsight-kobocat
onadata/apps/fsforms/forms.py
1
13888
from django.db.models import Q from django.forms.extras.widgets import SelectDateWidget from django import forms from django.utils.translation import ugettext_lazy as _ from onadata.apps.fieldsight.models import Site from onadata.apps.fieldsight.utils.forms import HTML5BootstrapModelForm, KOModelForm, HRBSFormField fro...
bsd-2-clause
-5,197,019,126,817,885,000
39.847059
138
0.616791
false
tempbottle/eventlet
tests/greenio_test.py
3
31504
import array import errno import eventlet import fcntl import gc from io import DEFAULT_BUFFER_SIZE import os import shutil import socket as _orig_sock import sys import tempfile from nose.tools import eq_ from eventlet import event, greenio, debug from eventlet.hubs import get_hub from eventlet.green import select, ...
mit
7,905,878,560,932,346,000
31.444902
93
0.563897
false
EmreAtes/spack
var/spack/repos/builtin/packages/opencoarrays/package.py
5
2506
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
1,041,762,001,744,645,600
43.75
116
0.674781
false
kswiat/django
django/test/utils.py
15
19704
from contextlib import contextmanager import logging import re import sys import time from unittest import skipUnless import warnings from functools import wraps from xml.dom.minidom import parseString, Node from django.apps import apps from django.conf import settings, UserSettingsHolder from django.core import mail ...
bsd-3-clause
5,782,281,711,833,257,000
32.797599
87
0.632765
false
ryandougherty/mwa-capstone
MWA_Tools/build/matplotlib/lib/mpl_examples/api/logo2.py
3
2716
""" Thanks to Tony Yu <tsyu80@gmail.com> for the logo design """ import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm import matplotlib.mlab as mlab from pylab import rand mpl.rcParams['xtick.labelsize'] = 10 mpl.rcParams['ytick.labelsize'] = 12 mpl.rcParams['axes.edg...
gpl-2.0
-2,824,182,137,780,392,000
31.722892
300
0.569219
false
larrybradley/astropy
astropy/modeling/mappings.py
3
10835
""" Special models useful for complex compound models where control is needed over which outputs from a source model are mapped to which inputs of a target model. """ # pylint: disable=invalid-name from .core import FittableModel, Model from astropy.units import Quantity __all__ = ['Mapping', 'Identity', 'UnitsMappi...
bsd-3-clause
-1,022,625,556,190,745,300
32.236196
118
0.605261
false
blighj/django
tests/auth_tests/test_hashers.py
21
23087
from unittest import mock, skipUnless from django.conf.global_settings import PASSWORD_HASHERS from django.contrib.auth.hashers import ( UNUSABLE_PASSWORD_PREFIX, UNUSABLE_PASSWORD_SUFFIX_LENGTH, BasePasswordHasher, PBKDF2PasswordHasher, PBKDF2SHA1PasswordHasher, check_password, get_hasher, identify_hasher...
bsd-3-clause
220,952,660,923,163,040
42.804183
111
0.64663
false
Floens/uchan
uchan/lib/plugin_manager.py
1
1058
import importlib modules = [] def load_plugins(plugins, config_parser): for plugin in plugins: loaded_module = importlib.import_module('uchan.plugins.{}'.format(plugin)) add_module(loaded_module, plugin, config_parser) def add_module(module, name, config_parser): configuration = config_pars...
mit
7,098,008,039,008,940,000
32.0625
99
0.673913
false
andelf/pyqqweibo
setup.py
1
1988
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011 andelf <andelf@gmail.com> # Time-stamp: <2011-06-06 16:08:30 andelf> #from distutils.core import setup from setuptools import setup, find_packages import os, sys lib_path = os.path.join(os.path.dirname(__file__)) sys.path.insert(0, lib_path) from qqweibo...
mit
3,269,890,709,477,016,000
33.275862
84
0.596076
false
Torben-D/open62541
tools/pyUANamespace/ua_namespace.py
1
30517
#!/usr/bin/env/python # -*- coding: utf-8 -*- ### ### Author: Chris Iatrou (ichrispa@core-vector.net) ### Version: rev 13 ### ### This program was created for educational purposes and has been ### contributed to the open62541 project by the author. All licensing ### terms for this source is inherited by the terms and...
lgpl-3.0
1,352,593,816,611,357,700
36.582512
171
0.643772
false
zstackio/zstack-woodpecker
integrationtest/vm/monitor/5min_alert_host_all_cpus_idle.py
2
2657
''' Test about monitor trigger on all host cpu free ratio in five minutes @author: Songtao,Haochen ''' import os import test_stub import random import time import zstacklib.utils.ssh as ssh import zstackwoodpecker.test_util as test_util import zstackwoodpecker.operations.resource_operations as res_ops...
apache-2.0
5,195,039,974,565,042,000
37.102941
142
0.694392
false
onshape-public/onshape-clients
python/onshape_client/oas/api/revisions_api.py
1
24839
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 i...
mit
-5,475,035,089,580,236,000
40.056198
115
0.494424
false
2coding/Codec
thirdparty/gtest-1.6.0/test/gtest_test_utils.py
5
10742
#!/usr/bin/env python # # Copyright 2006, 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,...
bsd-3-clause
-5,137,043,881,937,884,000
33.219672
79
0.653696
false
toshywoshy/ansible
lib/ansible/modules/network/cloudengine/ce_sflow.py
11
47224
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
-1,787,498,711,970,452,700
39.431507
119
0.562765
false
saifulazad/myApp
app/views.py
1
7289
from datetime import datetime from flask import render_template, session, request, redirect from flask.helpers import url_for from flask_login import login_user, logout_user, login_required from DropDown import * from ExamQuestions import * from UploadQuestion import * from app import app, login_manager from app.Pho...
bsd-3-clause
8,507,540,077,735,026,000
31.540179
102
0.625051
false
kinverarity1/las-reader
docs/source/conf.py
1
1636
import sys import os import shlex sys.path.insert(0, os.path.abspath(".")) extensions = [ "sphinx.ext.autodoc", "sphinx.ext.doctest", "sphinx.ext.intersphinx", "sphinx.ext.todo", "sphinx.ext.coverage", "sphinx.ext.imgmath", "sphinx.ext.ifconfig", "sphinx.ext.viewcode", "sphinx.ext....
mit
1,104,639,226,589,506,400
18.023256
72
0.618582
false
johnraz/django-rest-framework
tests/test_validation.py
3
8376
from __future__ import unicode_literals import re from django.core.validators import MaxValueValidator, RegexValidator from django.db import models from django.test import TestCase from rest_framework import generics, serializers, status from rest_framework.test import APIRequestFactory factory = APIRequestFactory(...
bsd-2-clause
-5,959,678,454,141,171,000
32.370518
118
0.657116
false
googleapis/gapic-generator-python
tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/__init__.py
2
1194
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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
-88,436,349,026,459,100
35.181818
85
0.777219
false
NeCTAR-RC/ceilometer
ceilometer/tests/alarm/evaluator/test_base.py
1
5673
# -*- encoding: utf-8 -*- # # Copyright © 2013 IBM Corp # # Author: Tong Li <litong01@us.ibm.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
apache-2.0
1,308,871,319,242,010,000
39.805755
79
0.618124
false