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
D4wN/brickv
src/build_data/windows/OpenGL/GL/ATI/text_fragment_shader.py
4
3610
'''OpenGL extension ATI.text_fragment_shader This module customises the behaviour of the OpenGL.raw.GL.ATI.text_fragment_shader to provide a more Python-friendly API Overview (from the spec) The ATI_fragment_shader extension exposes a powerful fragment processing model that provides a very general means of expr...
gpl-2.0
142,122,769,263,808,050
46.513158
69
0.789474
false
Diti24/python-ivi
ivi/agilent/agilentDSA90804A.py
1
1686
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2016 Alex Forencich 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...
mit
-3,106,518,787,911,555,000
37.318182
86
0.736655
false
mtekel/libcloud
libcloud/test/compute/test_opennebula.py
46
46927
# Copyright 2002-2009, Distributed Systems Architecture Group, Universidad # Complutense de Madrid (dsa-research.org) # # 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 ...
apache-2.0
-1,800,356,755,161,604,900
35.863315
78
0.580391
false
wangjun/xiaohuangji
tests/test_config.py
7
2111
#-*-coding:utf-8-*- """ Copyright (c) 2012 wgx731 <wgx731@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
mit
-9,189,972,180,593,177,000
33.048387
74
0.732354
false
ArtsiomCh/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/transformed_distribution_test.py
8
16622
# 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
-4,548,337,352,118,971,000
38.76555
80
0.588978
false
niieani/rethinkdb
test/rql_test/connections/http_support/werkzeug/testsuite/compat.py
146
1117
# -*- coding: utf-8 -*- """ werkzeug.testsuite.compat ~~~~~~~~~~~~~~~~~~~~~~~~~ Ensure that old stuff does not break on update. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import warnings from werkzeug.testsuite import WerkzeugTestCase ...
agpl-3.0
3,007,329,730,292,758,000
26.925
75
0.649955
false
bwesterb/mirte
src/threadPool.py
1
5025
from mirte.core import Module from six.moves import range import logging import threading try: import prctl except ImportError: prctl = None class ThreadPool(Module): class Worker(threading.Thread): def __init__(self, pool, l): self._name = None threading.Thread.__init...
agpl-3.0
-2,098,936,524,364,315,100
29.640244
66
0.487363
false
ww9rivers/pysnmp
pysnmp/proto/errind.py
4
5505
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # class ErrorIndication: """SNMPv3 error-indication values""" def __init__(self, descr=None): self.__value = self.__descr = self.__class__.__name__[0].lower() ...
bsd-2-clause
6,112,383,067,007,407,000
23.909502
117
0.769482
false
googlearchive/simian
src/tests/simian/client/client_test.py
1
41740
#!/usr/bin/env python # # Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
apache-2.0
469,666,702,062,268,740
32.770227
80
0.669526
false
alsrgv/tensorflow
tensorflow/contrib/distributions/python/ops/quantized_distribution.py
22
20681
# 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,102,863,444,865,605,000
34.231687
83
0.6138
false
imiolek-ireneusz/eduActiv8
eduactiv82exe.py
1
6732
# -*- coding: utf8 -*- # This will create a dist directory containing the executable file, all the data # directories. All Libraries will be bundled in executable file. # # Run the build process by entering 'pygame2exe.py' or # 'python pygame2exe.py' in a console prompt. # # To build exe, python, pygame, and py2exe ha...
gpl-3.0
4,976,437,304,179,288,000
34.619048
139
0.596257
false
ChinaMassClouds/copenstack-server
openstack/src/nova-2014.2/nova/api/openstack/compute/contrib/createserverext.py
100
1156
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
gpl-2.0
-591,397,606,980,651,900
37.533333
78
0.679066
false
srcLurker/home-assistant
tests/components/test_input_boolean.py
15
3095
"""The tests for the input_boolean component.""" # pylint: disable=protected-access import unittest import logging from tests.common import get_test_home_assistant from homeassistant.bootstrap import setup_component from homeassistant.components.input_boolean import ( DOMAIN, is_on, toggle, turn_off, turn_on) fro...
mit
-5,577,756,883,282,271,000
28.47619
77
0.593215
false
echohenry2006/tvb-library
tvb/tests/library/simulator/noise_test.py
3
2676
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Scientific Package. This package holds all simulators, and # analysers necessary to run brain-simulations. You can use it stand alone or # in conjunction with TheVirtualBrain-Framework Package. See content of the # documentation-folder for more details. See also http://ww...
gpl-2.0
6,864,413,495,467,668,000
33.766234
86
0.71861
false
Fedik/gramps
gramps/plugins/importer/import.gpr.py
4
5381
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # # 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) ...
gpl-2.0
6,795,835,029,941,055,000
29.748571
82
0.550084
false
deklungel/iRulez
src/button/_domain.py
1
29130
from enum import IntEnum import src.irulez.util as util from abc import ABC, abstractmethod import src.irulez.log as log from datetime import time from typing import List, Dict, Optional import src.irulez.constants as constants from threading import Timer logger = log.get_logger('button_domain') class ArduinoPinType...
mit
-6,083,037,248,677,932,000
36.250639
119
0.576141
false
wmvanvliet/mne-python
tutorials/sample-datasets/plot_brainstorm_phantom_elekta.py
10
6588
# -*- coding: utf-8 -*- """ .. _tut-brainstorm-elekta-phantom: ========================================== Brainstorm Elekta phantom dataset tutorial ========================================== Here we compute the evoked from raw for the Brainstorm Elekta phantom tutorial dataset. For comparison, see :footcite:`TadelEt...
bsd-3-clause
1,073,916,227,645,137,800
37.290698
79
0.601731
false
uvbs/the-backdoor-factory
payloadtests.py
13
6022
#!/usr/bin/env python ''' Copyright (c) 2013-2015, Joshua Pitts 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 li...
bsd-3-clause
-685,154,654,474,719,700
39.689189
97
0.57921
false
jaberg/sigops
sigops/operator.py
1
6049
import numpy as np import itertools from collections import defaultdict import numpy as np import networkx as nx def is_op(thing): try: return thing._is_sigops_operator except AttributeError: return False class Operator(object): """Base class for operator instances understood by nengo....
bsd-2-clause
-5,643,363,047,490,116,000
29.862245
75
0.617127
false
javier-ruiz-b/docker-rasppi-images
raspberry-google-home/env/lib/python3.7/site-packages/google/protobuf/descriptor_pool.py
20
46541
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
apache-2.0
-2,547,859,049,443,851,000
35.617624
86
0.677553
false
Ldpe2G/mxnet
example/ssd/tools/visualize_net.py
10
1148
from __future__ import print_function import find_mxnet import mxnet as mx import importlib import argparse import sys parser = argparse.ArgumentParser(description='network visualization') parser.add_argument('--network', type=str, default='vgg16_ssd_300', choices = ['vgg16_ssd_300', 'vgg16_ssd_512...
apache-2.0
-8,409,465,352,750,513,000
40
94
0.655923
false
atupone/xbmc
addons/service.xbmc.versioncheck/lib/aptdeamonhandler.py
177
3661
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Team-XBMC # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later versio...
gpl-2.0
-6,974,354,175,733,703,000
32.59633
100
0.593281
false
slaws/kubernetes
examples/selenium/selenium-test.py
173
1109
#!/usr/bin/env python # Copyright 2015 The Kubernetes 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 # # Unle...
apache-2.0
548,476,315,147,377,340
32.606061
78
0.759243
false
johankaito/fufuka
microblog/flask/venv/lib/python2.7/site-packages/celery/utils/threads.py
9
9636
# -*- coding: utf-8 -*- """ celery.utils.threads ~~~~~~~~~~~~~~~~~~~~ Threading utilities. """ from __future__ import absolute_import, print_function import os import socket import sys import threading import traceback from contextlib import contextmanager from celery.local import Proxy from celery.fiv...
apache-2.0
-7,573,093,522,221,937,000
28.288754
77
0.567663
false
smolix/incubator-mxnet
example/rcnn/rcnn/pycocotools/setup.py
41
1365
# 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
6,590,900,181,042,303,000
35.891892
84
0.734799
false
KasperPRasmussen/bokeh
bokeh/models/tiles.py
8
4095
from __future__ import absolute_import from ..model import Model from ..core.properties import Any, Dict, Float, String, Int, Bool, Override class TileSource(Model): """ A base class for all tile source types. ``TileSource`` is not generally useful to instantiate on its own. In general, tile sources are used ...
bsd-3-clause
-4,465,188,448,142,391,000
38.375
157
0.67619
false
martinohanlon/minecraft-clock
minecraft-clock.py
1
5099
#www.stuffaboutcode.com #Raspberry Pi, Minecraft Analogue Clock #import the minecraft.py module from the minecraft directory import minecraft.minecraft as minecraft #import minecraft block module import minecraft.block as block #import time, so delays can be used import time #import datetime, to get the time! import d...
mit
-9,020,346,614,343,049,000
32.326797
112
0.622867
false
foss-transportationmodeling/rettina-server
flask/local/lib/python2.7/site-packages/sqlalchemy/dialects/mssql/adodbapi.py
80
2493
# mssql/adodbapi.py # Copyright (C) 2005-2015 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:: mssql+adodbapi :name: adodbapi :dbapi: adodbapi :conn...
apache-2.0
-4,131,000,080,868,442,000
30.1625
76
0.632972
false
okanasik/JdeRobot
src/drivers/MAVLinkServer/MAVProxy/modules/mavproxy_smartcamera/sc_config.py
4
5131
""" SmartCameraConfig class : handles config for the smart_camera project smart_camera.cnf file is created in the local directory other classes or files wishing to use this class should add import sc_config """ from os.path import expanduser import ConfigParser class SmartCameraConfig(object): def __init_...
gpl-3.0
1,335,329,736,126,037,500
34.143836
105
0.630481
false
cselis86/edx-platform
lms/envs/devstack.py
6
4593
""" Specific overrides to the base prod settings to make development easier. """ from .aws import * # pylint: disable=wildcard-import, unused-wildcard-import # Don't use S3 in devstack, fall back to filesystem del DEFAULT_FILE_STORAGE MEDIA_ROOT = "/edx/var/edxapp/uploads" DEBUG = True USE_I18N = True TEMPLATE_DEB...
agpl-3.0
-8,045,075,856,478,398,000
32.043165
126
0.599608
false
youprofit/scikit-image
skimage/io/_plugins/fits_plugin.py
28
4735
__all__ = ['imread', 'imread_collection'] import skimage.io as io try: from astropy.io import fits as pyfits except ImportError: try: import pyfits except ImportError: raise ImportError( "PyFITS could not be found. Please refer to\n" "http://www.stsci.edu/resources/...
bsd-3-clause
4,908,009,772,469,554,000
30.357616
78
0.618374
false
nickmoline/feedsanitizer
django/contrib/auth/management/__init__.py
104
2973
""" Creates permissions for all installed apps that need permissions. """ from django.contrib.auth import models as auth_app from django.db.models import get_models, signals def _get_permission_codename(action, opts): return u'%s_%s' % (action, opts.object_name.lower()) def _get_all_permissions(opts): "Retu...
mit
-8,188,956,168,340,695,000
37.61039
110
0.643121
false
iradul/phantomjs-clone
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/suggestnominations_unittest.py
121
4444
# Copyright (C) 2011 Google Inc. All rights reserved. # Copyright (C) 2011 Code Aurora Forum. 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 th...
bsd-3-clause
-3,160,849,053,707,772,000
42.145631
121
0.743474
false
paran0ids0ul/infernal-twin
build/reportlab/tests/test_widgetbase_tpc.py
15
2997
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details """ Tests for TypedPropertyCollection class. """ __version__='''$Id$''' from reportlab.lib.testutils import setOutDir,makeSuiteForClasses, printLocation setOutDir(__name__) import os, sys, copy from os.path import join, basename, splitext i...
gpl-3.0
5,591,823,480,198,696,000
21.036765
85
0.584585
false
ahmedaljazzar/edx-platform
lms/djangoapps/instructor_task/tasks_helper/runner.py
16
5153
import json import logging from time import time from celery import current_task from django.db import reset_queries import dogstats_wrapper as dog_stats_api from lms.djangoapps.instructor_task.models import PROGRESS, InstructorTask from util.db import outer_atomic TASK_LOG = logging.getLogger('edx.celery.task') c...
agpl-3.0
2,378,203,933,158,948,400
37.744361
113
0.659228
false
parksandwildlife/biosys
biosys/apps/main/utils_misc.py
4
2739
from django.db.models.expressions import RawSQL def get_value(keys, dict_, default=None): """ Given a list of keys, search in a dict for the first matching keys (case insensitive) and return the value Note: the search is case insensitive. :param keys: list of possible keys :param dict_: :param...
apache-2.0
-3,675,758,877,846,044,000
34.571429
116
0.636364
false
lovette/flask_signedcookies
setup.py
1
1129
from setuptools import setup setup( name='flask_signedcookies', version='1.0.0', url='https://github.com/lovette/flask_signedcookies', download_url = 'https://github.com/lovette/flask_signedcookies/archive/master.tar.gz', license='BSD', author='Lance Lovette', author_email='lance.lovette@gmail...
bsd-3-clause
-7,898,864,492,778,144,000
36.633333
87
0.638618
false
fegonda/icon_demo
code/external/SdA.py
4
18933
""" This tutorial introduces stacked denoising auto-encoders (SdA) using Theano. Denoising autoencoders are the building blocks for SdA. They are based on auto-encoders as the ones used in Bengio et al. 2007. An autoencoder takes an input x and first maps it to a hidden representation y = f_{\theta}(x) = s(Wx+b),...
mit
-3,914,538,588,230,447,000
37.717791
77
0.567316
false
sebfung/yellowpillowcase
vendor/cache/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/lexers/_phpbuiltins.py
47
154371
# -*- coding: utf-8 -*- """ pygments.lexers._phpbuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file loads the function names and their modules from the php webpage and generates itself. Do not alter the MODULES dict by hand! WARNING: the generation transfers quite much data over your ...
mit
-7,808,615,889,447,388,000
31.437697
94
0.446781
false
walac/servo
python/servo/build_commands.py
3
12824
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
mpl-2.0
-716,463,475,784,871,400
34.134247
102
0.551622
false
Denisolt/Tensorflow_Chat_Bot
local/lib/python2.7/site-packages/numpy/lib/tests/test_format.py
27
34230
from __future__ import division, absolute_import, print_function r''' Test the .npy file format. Set up: >>> import sys >>> from io import BytesIO >>> from numpy.lib import format >>> >>> scalars = [ ... np.uint8, ... np.int8, ... np.uint16, ... np.int16, ... ...
gpl-3.0
71,527,679,412,550,640
39.75
565
0.473298
false
jcpowermac/ansible
lib/ansible/modules/notification/twilio.py
47
5594
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Matt Makai <matthew.makai@gmail.com> # 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
-3,576,716,205,702,385,700
31.149425
93
0.652485
false
superchilli/webapp
venv/lib/python2.7/site-packages/html5lib/tokenizer.py
1710
76929
from __future__ import absolute_import, division, unicode_literals try: chr = unichr # flake8: noqa except NameError: pass from collections import deque from .constants import spaceCharacters from .constants import entities from .constants import asciiLetters, asciiUpper2Lower from .constants import digits, ...
mit
-6,652,863,306,430,962,000
43.441941
109
0.529917
false
ECastleton/Popstop
popsicle/orders/migrations/0007_auto_20170425_2210.py
1
1295
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-26 04:10 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('orders', '0006_auto_20170424_2037'), ] operations ...
gpl-3.0
4,351,846,753,906,317,000
29.116279
121
0.56834
false
OpenClovis/SAFplus-Availability-Scalability-Platform
src/ide/genshi/genshi/filters/html.py
22
22797
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://genshi.edgewall.org/wiki/License. # # This software consist...
gpl-2.0
130,162,049,564,573,860
41.060886
106
0.512787
false
pschmitt/home-assistant
homeassistant/components/jewish_calendar/__init__.py
7
4146
"""The jewish_calendar component.""" import logging import hdate import voluptuous as vol from homeassistant.const import CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.discovery import async_load_platform _LOGGER = logging.getLogger(__name__)...
apache-2.0
-5,895,185,876,142,505,000
35.368421
88
0.616498
false
imply/chuu
tools/find_runtime_symbols/prepare_symbol_info.py
24
8217
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import hashlib import json import logging import os import re import shutil import subprocess import sys import tempfile from proc...
bsd-3-clause
9,000,435,807,857,038,000
35.358407
80
0.653888
false
hbrunn/OpenUpgrade
addons/l10n_syscohada/__openerp__.py
430
1940
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2011 BAAMTU SARL (<http://www.baamtu.sn>). # contact: leadsn@baamtu.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affer...
agpl-3.0
-6,111,508,458,695,258,000
39.416667
78
0.593299
false
alipsgh/tornado
archiver/archiver.py
1
1542
""" The Tornado Framework By Ali Pesaranghader University of Ottawa, Ontario, Canada E-mail: apesaran -at- uottawa -dot- ca / alipsgh -at- gmail -dot- com """ import os import zipfile from os.path import basename class Archiver: """ This class stores results of experiments in .zip files for fut...
mit
1,227,065,012,097,761,300
29.469388
114
0.581712
false
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/sympy/utilities/runtests.py
3
46156
""" This is our testing framework. Goals: * it should be compatible with py.test and operate very similarly (or identically) * doesn't require any external dependencies * preferably all the functionality should be in this file only * no magic, just import the test file and execute the test functions, that's it * port...
agpl-3.0
7,366,864,913,316,608,000
36.926048
95
0.562332
false
tjsavage/sfcsdatabase
django/contrib/gis/tests/test_geoip.py
290
4204
import os, unittest from django.db import settings from django.contrib.gis.geos import GEOSGeometry from django.contrib.gis.utils import GeoIP, GeoIPException # Note: Requires use of both the GeoIP country and city datasets. # The GEOIP_DATA path should be the only setting set (the directory # should contain links or ...
bsd-3-clause
8,780,992,160,874,227,000
39.815534
89
0.595385
false
dparshin/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/models/test_configuration.py
126
13672
# Copyright (C) 2011 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
-7,883,026,823,321,178,000
43.679739
155
0.629608
false
saleemjaveds/https-github.com-openstack-nova
nova/tests/scheduler/fakes.py
19
11486
# Copyright 2011 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 requ...
apache-2.0
3,606,294,047,448,555,500
42.839695
78
0.450113
false
rajanandakumar/DIRAC
Core/Utilities/Distribution.py
3
16784
# $HeadURL$ __RCSID__ = "$Id$" import urllib2, re, tarfile, os, types, sys, subprocess, urlparse, tempfile from DIRAC import gLogger, S_OK, S_ERROR from DIRAC.Core.Utilities import CFG, File, List class Distribution: cernAnonRoot = 'http://svn.cern.ch/guest/dirac' googleAnonRoot = 'http://dirac-grid.googlecode....
gpl-3.0
6,507,806,666,317,573,000
35.172414
115
0.611177
false
gurneyalex/vertical-travel
railway_station/res_partner.py
2
1263
# -*- encoding: utf-8 -*- # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
-326,881,288,099,529,500
34.083333
77
0.691211
false
JianfengXu/crosswalk-test-suite
webapi/tct-navigationtiming-w3c-tests/inst.wgt.py
44
6786
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
bsd-3-clause
-3,068,844,990,641,179,600
28.763158
101
0.537872
false
hgl888/chromium-crosswalk-efl
net/tools/testserver/minica.py
78
10487
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import asn1 import hashlib import os # This file implements very minimal certificate and OCSP generation. It's # designed to test revocation checking. ...
bsd-3-clause
4,328,828,044,025,451,000
29.048711
271
0.663488
false
hernandito/SickRage
lib/hachoir_core/field/fake_array.py
95
2294
import itertools from hachoir_core.field import MissingField class FakeArray: """ Simulate an array for GenericFieldSet.array(): fielset.array("item")[0] is equivalent to fielset.array("item[0]"). It's possible to iterate over the items using:: for element in fieldset.array("item"): ...
gpl-3.0
3,188,231,176,937,157,000
27.320988
78
0.503051
false
ubc/edx-platform
common/djangoapps/util/migrations/0002_default_rate_limit_config.py
102
4097
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): """Ensure that rate limiting is enabled by default. """ orm['util.RateLimitConfiguration'].objects.create(enable...
agpl-3.0
1,078,336,367,434,218,000
63.015625
182
0.559678
false
undoware/neutron-drive
google_appengine/lib/django_1_2/django/core/files/utils.py
901
1230
class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file """ encoding = property(la...
bsd-3-clause
7,891,983,164,018,954,000
41.413793
69
0.688618
false
noroutine/ansible
lib/ansible/modules/remote_management/oneview/oneview_ethernet_network_facts.py
125
4863
#!/usr/bin/python # Copyright (c) 2016-2017 Hewlett Packard Enterprise Development LP # 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
1,764,563,738,703,393,000
31.42
114
0.695455
false
manthansharma/kivy
examples/canvas/mesh_manipulation.py
21
3123
''' Mesh Manipulation Example ========================= This demonstrates creating a mesh and using it to deform the texture (the kivy log). You should see the kivy logo with a five sliders to right. The sliders change the mesh points' x and y offsets, radius, and a 'wobble' deformation's magnitude and speed. This ex...
mit
-1,012,396,234,273,629,200
29.920792
79
0.549792
false
rnikiforova/GuruTubeProject
GuruTube/libraries/django/contrib/gis/tests/geo3d/models.py
222
2064
from django.contrib.gis.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class City3D(models.Model): name = models.CharField(max_length=30) point = models.PointField(dim=3) objects = models.GeoManager() def __str__(self): return self.n...
bsd-3-clause
-8,971,634,107,930,700,000
25.805195
61
0.69719
false
boxed/WCS-Hub
wcs-hub/models.py
1
1177
from google.appengine.ext import db from google.appengine.api import users from json import JSONDecoder class DictModel(db.Model): def to_dict(self): decoder = JSONDecoder() result = dict( [ (p[:-len('_json')], decoder.decode(getattr(self, p))) if p.endswith('_json') el...
mit
-4,628,999,772,867,756,000
33.647059
119
0.660153
false
jmighion/ansible
lib/ansible/modules/windows/win_user.py
40
6163
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Matt Martz <matt@sivel.net>, and others # # 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 t...
gpl-3.0
-4,017,336,175,784,749,600
27.141553
78
0.668019
false
nxppru/zydiy
scripts/dl_cleanup.py
223
6094
#!/usr/bin/env python3 """ # OpenWrt download directory cleanup utility. # Delete all but the very last version of the program tarballs. # # Copyright (C) 2010-2015 Michael Buesch <m@bues.ch> # Copyright (C) 2013-2015 OpenWrt.org """ from __future__ import print_function import sys import os import re import getopt ...
gpl-2.0
-4,524,169,905,885,258,000
24.71308
84
0.614375
false
mindworker/so-bro
watcher.py
1
1650
import os import sys from select import select from subprocess import Popen, PIPE import rpyc err = "" def handleInterpreter(conn, fd, data): global err if fd == p.stderr.fileno(): datastr = str(data, 'utf8') if datastr == '>>> ': return if 'Type "help", "co...
mit
388,884,385,238,412,700
23.626866
95
0.516364
false
pducks32/intergrala
python/sympy/sympy/utilities/tests/test_pytest.py
105
1601
from sympy.utilities.pytest import raises, USE_PYTEST if USE_PYTEST: import py.test pytestmark = py.test.mark.skipif(USE_PYTEST, reason=("using py.test")) # Test callables def test_expected_exception_is_silent_callable(): def f(): raise ValueError() raise...
mit
2,815,751,586,308,831,000
24.412698
62
0.642723
false
pidah/st2contrib
packs/smartthings/sensors/smartthings_sensor.py
10
2071
import eventlet import json from flask import request, json, Flask, Response # noqa from st2reactor.sensor.base import Sensor eventlet.monkey_patch( os=True, select=True, socket=True, thread=True, time=True) class SmartThingsSensor(Sensor): def __init__(self, sensor_service, config=None): ...
apache-2.0
-3,012,116,368,909,634,600
28.585714
93
0.577016
false
jhamman/xray
xarray/tests/test_variable.py
1
54048
from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import namedtuple from copy import copy, deepcopy from datetime import datetime, timedelta from textwrap import dedent import pytest from distutils.version import LooseVersion import numpy as n...
apache-2.0
5,645,038,719,097,120,000
40.735907
95
0.560465
false
maxamillion/ansible-modules-extras
cloud/amazon/lambda_alias.py
25
12180
#!/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
-4,883,299,569,400,926,000
30.71875
130
0.627586
false
westinedu/similarinterest
django/conf/locale/nl/formats.py
329
3056
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' # '20 januari 2009' TIME_FORMAT = 'H:i' ...
bsd-3-clause
3,469,909,092,486,675,000
56.660377
135
0.453207
false
adammaikai/OmicsPipe2.0
omics_pipe/modules/bwa.py
2
6757
#!/usr/bin/env python from omics_pipe.parameters.default_parameters import default_parameters from omics_pipe.utils import * p = Bunch(default_parameters) def bwa1(sample, bwa1_flag): '''BWA aligner for read1 of paired_end reads. input: .fastq output: .sam citation: Li...
mit
-625,956,713,378,143,400
35.327957
472
0.593755
false
Rafiot/botchallenge
client/google/protobuf/internal/cpp_message.py
2
23568
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
mit
-264,181,149,115,612,030
34.493976
80
0.697217
false
spatialaudio/jackclient-python
examples/midi_chords.py
1
1118
#!/usr/bin/env python3 """JACK client that creates minor triads from single MIDI notes. All MIDI events are passed through. Two additional events are created for each NoteOn and NoteOff event. """ import jack import struct # First 4 bits of status byte: NOTEON = 0x9 NOTEOFF = 0x8 INTERVALS = 3, 7 # minor triad c...
mit
-4,470,220,128,332,092,000
26.95
78
0.644902
false
yuanzhao/gpdb
src/test/tinc/tincrepo/mpp/models/regress/sql_related/regress_sql_test_case/regress_sql_test_case.py
12
36052
""" Copyright (c) 2004-Present Pivotal Software, Inc. This program and the accompanying materials are made available under the terms of the 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....
apache-2.0
4,530,284,547,039,419,000
45.51871
161
0.644319
false
Observer-Wu/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/bot/sheriff_unittest.py
122
3783
# Copyright (C) 2010 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 f...
bsd-3-clause
5,880,873,830,981,891,000
41.505618
100
0.708697
false
systers/mailman
src/mailman/bin/mailman.py
3
3848
# Copyright (C) 2009-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
6,947,417,399,102,275,000
37.09901
78
0.671778
false
beeftornado/sentry
src/sentry/migrations/0066_alertrule_manager.py
1
1754
# -*- coding: utf-8 -*- # Generated by Django 1.11.29 on 2020-04-15 23:27 from __future__ import unicode_literals from django.db import migrations import django.db.models.manager class Migration(migrations.Migration): # This flag is used to mark that a migration shouldn't be automatically run in # production...
bsd-3-clause
-6,759,195,421,218,852,000
39.790698
118
0.673318
false
llonchj/sentry
src/sentry/migrations/0085_auto__del_unique_project_slug__add_unique_project_slug_team.py
36
23551
# -*- 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): # Removing unique constraint on 'Project', fields ['slug'] db.delete_unique('sentry_project', ['slug']) ...
bsd-3-clause
6,954,336,949,804,500,000
81.926056
181
0.556367
false
dimtion/jml
outputFiles/statistics/archives/ourIA/improved_closest_v2.py/1.0/9/player1.py
1
11276
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #################################################################################################################################################################################################################################### ############################################...
mit
2,706,744,758,109,684,000
64.184971
228
0.357751
false
swdream/neutron
neutron/agent/linux/iptables_manager.py
17
28571
# Copyright 2012 Locaweb. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
4,434,900,085,659,792,400
36.642951
79
0.543278
false
EricSB/powerline
tests/lib/config_mock.py
3
5302
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os from threading import Lock from copy import deepcopy from time import sleep from functools import wraps from powerline.renderer import Renderer from powerline.lib.config import ConfigLoader fr...
mit
2,095,903,029,881,976,000
22.052174
84
0.687476
false
thomashaw/SecGen
modules/utilities/unix/audit_tools/ghidra/files/release/Ghidra/Features/Python/data/jython-2.7.1/Lib/readline.py
13
5659
import os.path import sys from warnings import warn try: _console = sys._jy_console _reader = _console.reader except AttributeError: raise ImportError("Cannot access JLine2 setup") try: # jarjar-ed version from org.python.jline.console.history import MemoryHistory except ImportError: # dev ver...
gpl-3.0
4,725,312,246,557,732,000
29.755435
95
0.646934
false
gamahead/nupic
tests/swarming/nupic/swarming/experiments/input_predicted_field/description.py
8
14110
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
1,349,712,527,599,715,300
36.229551
117
0.586889
false
VanHulleOne/DogBone
matrixTrans.py
1
2048
# -*- coding: utf-8 -*- """ Created on Thu Jan 07 17:44:20 2016 A module to store operations related to matrix tranformations. @author: Luke """ import Point as p import Line as l import constants as c import numpy import math def translateMatrix(shiftX, shiftY, shiftZ=0): transMatrix = numpy.identity(4) t...
mit
-7,767,282,250,371,348,000
31.015625
90
0.637695
false
csherwood-usgs/landlab
landlab/grid/tests/test_raster_funcs/test_is_on_grid.py
6
1700
import numpy as np from numpy.testing import assert_array_equal from nose import with_setup from nose.tools import (assert_equal, assert_raises) try: from nose.tools import assert_is except ImportError: from landlab.testing.tools import assert_is from landlab.grid import raster_funcs as rfuncs from landlab imp...
mit
-5,533,083,016,274,396,000
35.170213
76
0.634706
false
sfermigier/flask-linktester
docs/conf.py
1
1823
# -*- coding: utf-8 -*- from __future__ import unicode_literals import sys, os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. ...
bsd-3-clause
-4,495,656,542,323,691,500
26.208955
80
0.620954
false
nstockton/barcode-finder
setup.py
1
4474
# -*- coding: utf-8 -*- # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import glob import os import shutil import sys import zlib from distutils.core impo...
mpl-2.0
1,676,056,079,268,492,300
21.170984
134
0.65653
false
mromanoff/schedule-appointment
client/vendor/bower_components/jasmine/lib/jasmine-core/core.py
163
1481
import pkg_resources try: from collections import OrderedDict except ImportError: from ordereddict import OrderedDict class Core(object): @classmethod def js_package(cls): return __package__ @classmethod def css_package(cls): return __package__ @classmethod def image_...
mit
3,760,282,436,255,420,400
23.7
119
0.568535
false
linfuzki/autokey
src/lib/gtkui/settingsdialog.py
46
9114
# -*- coding: utf-8 -*- # Copyright (C) 2011 Chris Dekter # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pr...
gpl-3.0
-165,576,707,201,635,040
42.607656
107
0.651635
false
alsrgv/tensorflow
tensorflow/contrib/slim/python/slim/data/test_utils.py
163
3795
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
8,332,741,381,286,482,000
32.289474
80
0.704348
false
HubbleStack/Hubble
tests/unittests/test_readfile.py
2
23431
from __future__ import absolute_import import json import os import sys import yaml import pytest myPath = os.path.abspath(os.getcwd()) sys.path.insert(0, myPath) import hubblestack.extmods.fdg.readfile class TestReadfile(): ''' Class used to test the functions in ``readfile.py`` ''' def generate_d...
apache-2.0
8,993,810,925,713,265,000
40.915921
100
0.606504
false
toolforger/sympy
sympy/printing/python.py
118
3256
# -*- coding: utf-8 -*- from __future__ import print_function, division import keyword as kw import sympy from .repr import ReprPrinter from .str import StrPrinter # A list of classes that should be printed using StrPrinter STRPRINT = ("Add", "Infinity", "Integer", "Mul", "NegativeInfinity", "Pow", "Zero...
bsd-3-clause
-2,091,131,825,038,743,600
34.391304
80
0.609951
false
MountainWei/nova
nova/tests/unit/compute/test_resources.py
57
11446
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # 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/LICEN...
apache-2.0
6,284,124,628,291,576,000
32.370262
79
0.613489
false
rjw57/videosequence
test/test_simple_seeking.py
1
2242
from __future__ import print_function from contextlib import closing from PIL import ImageChops, ImageStat from videosequence import VideoSequence def assert_images_not_equal(im1, im2): diff = ImageChops.difference(im1, im2) for min_, max_ in ImageStat.Stat(diff).extrema: if max_ > 0: retu...
mit
-1,667,082,780,485,127,700
29.297297
56
0.597681
false
lukeiwanski/tensorflow
tensorflow/contrib/signal/python/ops/util_ops.py
71
2459
# 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
-2,648,607,239,785,765,400
35.701493
80
0.687271
false
sasukeh/neutron
neutron/tests/unit/plugins/oneconvergence/test_security_group.py
28
4681
# Copyright 2014 OneConvergence, 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 requir...
apache-2.0
-780,792,619,808,472,300
43.160377
78
0.590686
false
Kagee/youtube-dl
youtube_dl/extractor/ebaumsworld.py
149
1055
from __future__ import unicode_literals from .common import InfoExtractor class EbaumsWorldIE(InfoExtractor): _VALID_URL = r'https?://www\.ebaumsworld\.com/video/watch/(?P<id>\d+)' _TEST = { 'url': 'http://www.ebaumsworld.com/video/watch/83367677/', 'info_dict': { 'id': '83367677...
unlicense
-5,440,468,343,733,672,000
30.969697
78
0.538389
false
d2emon/gurps-helper
fill_dmg.py
1
2024
def thrustDice(value): if value <= 10: return 1 if value < 40: return (value - 11) // 8 + 1 if value < 60: return (value - 5) // 10 + 1 return (value) // 10 + 1 def thrustModifier(value): if value <= 10: return (value - 11) // 2 - 1 if value < 40: return...
gpl-3.0
4,602,057,884,589,448,700
24.3
120
0.48419
false