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
joelouismarino/iterative_inference
cfg/cifar10/hierarchical/standard/config.py
1
1559
# training set-up train_config = { 'dataset': 'CIFAR_10', 'output_distribution': 'gaussian', 'batch_size': 128, 'n_samples': 10, 'n_iterations': 1, 'encoder_optimizer': 'adam', 'decoder_optimizer': 'adam', 'encoder_learning_rate': 0.0001, 'decoder_learning_rate': 0.0001, 'average...
mit
-5,584,336,289,122,220,000
22.984615
72
0.572162
false
meganbkratz/acq4
acq4/LogWindow.py
3
39978
import time import traceback import sys, os if __name__ == "__main__": #import os.path as osp d = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path = [os.path.join(d,'lib','util')] + sys.path + [d] from PyQt4 import QtGui, QtCore import LogWidgetTemplate from acq4.pyqtgraph import Feedb...
mit
-3,876,842,853,771,468,000
39.464575
401
0.561234
false
OptiPop/external_chromium_org
tools/telemetry/examples/measure_trace.py
41
3169
#!/usr/bin/env python # 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 collections import json import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.appen...
bsd-3-clause
-1,768,523,650,092,833,800
35.848837
77
0.723572
false
TheCoSMoCompany/biopredyn
Prototype/src/libsbml-5.10.0/src/bindings/swig/swigdoc.py
1
61185
#!/usr/bin/env python # # @file swigdoc.py # @brief Creates documentation for C#, Java, Python, and Perl. # @author Ben Bornstein # @author Christoph Flamm # @author Akiya Jouraku # @author Michael Hucka # @author Frank Bergmann # #<!--------------------------------------------------------------------------- # This ...
bsd-3-clause
-7,094,538,123,545,906,000
35.247038
266
0.63509
false
mandrav/bCNC
lib/tkExtra.py
2
142446
#!/bin/env python # $Id: tkExtra.py 3493 2015-04-08 08:52:01Z bnv $ # # Copyright and User License # ~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright Vasilis.Vlachoudis@cern.ch for the # European Organization for Nuclear Research (CERN) # # All rights not expressly granted under this license are reserved. # # Installation, use, ...
gpl-2.0
1,673,235,192,395,705,000
30.584479
91
0.517866
false
natefoo/ansible-modules-extras
cloud/vmware/vmware_maintenancemode.py
30
5856
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, VMware, Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your o...
gpl-3.0
-8,286,113,376,052,002,000
26.622642
75
0.610997
false
sukwon0709/byterun
byterun/pyvm2.py
1
37105
"""A pure-Python Python bytecode interpreter.""" # Based on: # pyvm2 by Paul Swartz (z3p), from http://www.twistedmatrix.com/users/z3p/ from __future__ import print_function, division import dis import inspect import linecache import logging import operator import sys import six from six.moves import reprlib PY3, PY...
mit
-8,876,592,344,558,702,000
30.180672
90
0.507479
false
jonboiser/content-curation
contentcuration/contentcuration/migrations/0059_auto_20170402_1504.py
2
1570
# -*- coding: utf-8 -*- # Generated by Django 1.9.12 on 2017-04-02 22:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contentcuration', '0058_auto_20170223_1636'), ] operations = [ migrations.C...
mit
-990,422,165,474,454,700
48.0625
674
0.603822
false
JianyuWang/neutron
neutron/tests/unit/agent/linux/test_async_process.py
8
10752
# 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
-7,487,848,878,019,811,000
38.97026
79
0.624442
false
rickerc/cinder_audit
cinder/tests/db/fakes.py
3
1434
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 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 obt...
apache-2.0
7,077,990,607,924,352,000
30.173913
78
0.654114
false
aljim/deploymentmanager-samples
community/hierarchical_configuration/Organization_with_departments/systems/System_with_project_creation_and_helper_function/templates/simple_frontend.py
4
2226
from helper import config_merger COMPUTE_URL_BASE = 'https://www.googleapis.com/compute/v1/' def GlobalComputeUrl(project, collection, name): return ''.join([ COMPUTE_URL_BASE, 'projects/', project, '/global/', collection, '/', name ]) def ZonalComputeUrl(project, zone, collection...
apache-2.0
4,018,374,107,771,386,000
30.735294
129
0.493711
false
agua/aguadev
bin/scripts/resources/starcluster/plugins/sge.py
1
27762
#!/usr/bin/env python import os import re import string import sys import time import posixpath import subprocess etchosts_template = """127.0.0.1 localhost # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6...
mit
-5,973,548,482,161,168,000
38.587719
134
0.57431
false
webmasterraj/GaSiProMo
flask/lib/python2.7/site-packages/pandas/core/nanops.py
2
21735
import sys import itertools import functools import numpy as np try: import bottleneck as bn _USE_BOTTLENECK = True except ImportError: # pragma: no cover _USE_BOTTLENECK = False import pandas.core.common as com import pandas.hashtable as _hash from pandas import compat, lib, algos, tslib from pandas.co...
gpl-2.0
7,385,500,466,185,315,000
28.53125
86
0.553577
false
cloudn/cf-php-build-pack
tests/common/base.py
9
1024
import os from build_pack_utils import BuildPack from common.integration import DirectoryHelper from common.integration import OptionsHelper class BaseCompileApp(object): def setUp(self): self.dh = DirectoryHelper() (self.build_dir, self.cache_dir, self.temp_dir) = self.dh.create...
apache-2.0
-6,366,385,937,548,542,000
34.310345
63
0.552734
false
evidation-health/pymc3
pymc3/examples/disaster_model_missing.py
3
2197
""" A model for coal mining disasters data with a changepoint switchpoint ~ U(0, 110) early_mean ~ Exp(1.) late_mean ~ Exp(1.) disasters[t] ~ Po(early_mean if t <= switchpoint, late_mean otherwise) """ from pymc3 import * import theano.tensor as t from numpy import arange, array, ones, concatenate from numpy.random...
apache-2.0
-7,075,218,614,544,722,000
32.287879
78
0.563496
false
citrix-openstack/build-swift
test/unit/obj/test_diskfile.py
2
35609
#-*- coding:utf-8 -*- # Copyright (c) 2010-2012 OpenStack, 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 applic...
apache-2.0
8,313,879,566,718,320,000
41.240807
79
0.54402
false
mitocw/edx-platform
common/test/acceptance/pages/studio/video/video.py
4
25115
""" CMS Video """ import os import os.path import time import requests from bok_choy.javascript import js_defined, wait_for_js from bok_choy.promise import EmptyPromise, Promise from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.common.keys import Keys from six.moves import rang...
agpl-3.0
-491,777,324,564,979,600
34.17507
117
0.605256
false
googleapis/python-compute
google/cloud/compute_v1/services/backend_buckets/pagers.py
1
3115
# -*- 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
-921,425,963,638,989,400
34
81
0.655538
false
Morgan-Stanley/treadmill
lib/python/treadmill/api/authz/group.py
2
3537
"""Implementation of group based authorization API. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import fnmatch import grp # pylint: disable=import-error import logging import pwd # pylint: disable=im...
apache-2.0
6,978,785,796,970,534,000
30.026316
78
0.45745
false
a10networks/a10sdk-python
a10sdk/core/interface/interface_ethernet_ipv6_stateful_firewall.py
2
1821
from a10sdk.common.A10BaseClass import A10BaseClass class StatefulFirewall(A10BaseClass): """Class Description:: Configure Stateful Firewall direction. Class stateful-firewall supports CRUD Operations and inherits from `common/A10BaseClass`. This class is the `"PARENT"` class for this module.` ...
apache-2.0
8,242,613,466,896,749,000
41.348837
168
0.639758
false
davismathew/netbot-django
bootcamp/feeds/models.py
1
2224
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.contrib.auth.models import User from bootcamp.activities.models import Activity from django.utils.html import escape import bleach class Feed(models.Model): user = models.ForeignKey(User) date = models.DateTimeFie...
mit
7,168,111,471,717,333,000
29.465753
71
0.617806
false
KTanaka101/MazeShortestPath
MazeShortestPath/Components.py
1
2187
import pygame from pygame.locals import * COLOR_PUSH_BUTTON = (255, 140, 0) COLOR_FREE_BUTTON = (70, 70, 200) COLOR_TEXT = (255, 255, 255) COLOR_PUSH_BUTTON_OUTLINE = (205, 90, 0) COLOR_FREE_BUTTON_OUTLINE = (30, 30, 150) COLOR_PUSH_BUTTON_MOUSE_OVER = (150, 70, 0) COLOR_FREE_BUTTON_MOUSE_OVER = (0, 0, 100) SIZE_BUT...
lgpl-3.0
1,841,675,205,124,004,600
34.868852
118
0.572474
false
formiano/enigma2-4.4
lib/python/Screens/Menu.py
8
7905
from Screens.Screen import Screen from Components.Sources.List import List from Components.ActionMap import NumberActionMap from Components.Sources.StaticText import StaticText from Components.config import configfile from Components.PluginComponent import plugins from Components.config import config from Components.Sy...
gpl-2.0
-4,069,299,481,772,822,500
26.071918
109
0.658444
false
carlosrojas/halfedge_mesh
tests/halfedge_mesh_test.py
1
11956
import halfedge_mesh import pytest import math import numpy as np class TestHalfedgeMesh: @pytest.fixture(scope="module") def cube_off_mesh(self): return halfedge_mesh.HalfedgeMesh("tests/data/cube.off") @pytest.fixture(scope="module") def cube_large_off_mesh(self): return halfedge_me...
mit
-364,929,722,410,441,540
40.227586
120
0.571763
false
linickx/crassh
crassh.py
1
20578
#!/usr/bin/env python # coding=utf-8 """Python script to automate running commands on switches. Cisco Remote Automation via Secure Shell... or C.R.A.SSH for short! .. currentmodule:: crassh .. moduleauthor:: Nick Bettison - www.linickx.com """ # Import libs import getpass # Hide Password Entry impor...
gpl-2.0
1,161,227,159,513,577,200
27.337466
168
0.556555
false
localprojects/Change-By-Us
tests/unittests/controller_tests.py
4
1275
""" :copyright: (c) 2011 Local Projects, all rights reserved :license: Affero GNU GPL v3, see LICENSE for more details. """ from unittest2 import TestCase from paste.fixture import TestApp from lib import web import main from framework.controller import Controller class I18nTests (TestCase): def setUp(...
agpl-3.0
-8,502,794,825,892,325,000
29.357143
98
0.618039
false
AnyBody-Research-Group/AnyPyTools
tests/test_hdf5.py
1
1551
# -*- coding: utf-8 -*- """ Created on Thu Dec 10 13:38:15 2015 @author: kpr """ import os import shutil import pytest from anypytools import AnyPyProcess demo_model_path = os.path.join(os.path.dirname(__file__), "Demo.Arm2D.any") def setup_simple_model(tmpdir): shutil.copyfile(demo_model_path, str(tmpdir.join(...
mit
-2,937,127,854,847,000,600
23.234375
80
0.622824
false
3dconv/keras
keras/utils/test_utils.py
85
1091
import numpy as np def get_test_data(nb_train=1000, nb_test=500, input_shape=(10,), output_shape=(2,), classification=True, nb_class=2): ''' classification=True overrides output_shape (i.e. output_shape is set to (1,)) and the output consists in integers in [0, nb_class-1...
mit
8,835,985,632,777,276,000
39.407407
83
0.578368
false
DeBortoliWines/Bika-LIMS
bika/lims/upgrade/to3013.py
2
1067
from Acquisition import aq_inner from Acquisition import aq_parent from bika.lims.permissions import * from Products.Archetypes.BaseContent import BaseContent from bika.lims.upgrade import stub def upgrade(tool): portal = aq_parent(aq_inner(tool)) setup = portal.portal_setup setup.runImportStepFromProfil...
agpl-3.0
-3,494,125,199,020,480,000
35.793103
75
0.626054
false
pchaigno/grreat
parsers/binplist.py
7
30023
#!/usr/bin/env python """Parser for Apple's binary plist (Property List) files. Based on the specification at: http://opensource.apple.com/source/CF/CF-550/CFBinaryPList.c To parse a plist from a file you can use the readPlist(fileOrObj) function with a file name or a file-like object. It returns the top level obje...
apache-2.0
1,525,739,950,228,577
33.272831
80
0.664357
false
barbour-em/osf.io
website/project/views/tag.py
4
1517
import httplib as http from modularodm.exceptions import ValidationError from framework.auth.decorators import collect_auth from website.util.sanitize import clean_tag from website.project.model import Tag from website.project.decorators import ( must_be_valid_project, must_have_permission, must_not_be_registrati...
apache-2.0
786,518,497,924,917,900
26.581818
78
0.641397
false
WadeBarnes/TheOrgBook
tob-api/api_v2/serializers/search.py
2
12005
# TODO: migrate most of these serializers to a UI specific serializer module import logging from collections import OrderedDict from datetime import datetime, timedelta from api_v2 import utils from api_v2.models.Address import Address from api_v2.models.Attribute import Attribute from api_v2.models.Credential import...
apache-2.0
1,242,521,563,465,730,800
32.347222
89
0.592003
false
adambrenecki/django
django/db/models/sql/compiler.py
2
49329
import datetime from django.conf import settings from django.core.exceptions import FieldError from django.db.backends.util import truncate_name from django.db.models.constants import LOOKUP_SEP from django.db.models.query_utils import select_related_descend, QueryWrapper from django.db.models.sql.constants import (SI...
bsd-3-clause
-8,292,894,387,023,872,000
43.440541
136
0.559772
false
aashish24/VTK-old
Examples/VisualizationAlgorithms/Python/SubsampleGrid.py
27
2314
#!/usr/bin/env python # This example demonstrates the subsampling of a structured grid. import vtk from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Read some structured data. pl3d = vtk.vtkMultiBlockPLOT3DReader() pl3d.SetXYZFileName(VTK_DATA_ROOT + "/Data/combxyz.bin") pl3d.SetQFileName(V...
bsd-3-clause
-8,708,941,193,275,408,000
33.029412
70
0.782195
false
plotly/plotly.py
packages/python/plotly/plotly/validators/scatter/marker/colorbar/title/_font.py
2
1542
import _plotly_utils.basevalidators class FontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__( self, plotly_name="font", parent_name="scatter.marker.colorbar.title", **kwargs ): super(FontValidator, self).__init__( plotly_name=plotly_name, parent...
mit
-3,696,497,924,585,237,500
38.538462
87
0.538911
false
cgimenop/Excel2Testlink
ExcelParser/lib/openpyxl/chart/error_bar.py
8
1796
from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Float, Set, Alias ) from openpyxl.descriptors.excel import ExtensionList from openpyxl.descriptors.nested import ( NestedNoneSet, NestedSet, NestedBool, NestedFloat, ) from .data_source...
mit
-7,321,727,335,167,226,000
28.933333
99
0.615813
false
kdani3/searx
searx/engines/openstreetmap.py
7
3113
""" OpenStreetMap (Map) @website https://openstreetmap.org/ @provide-api yes (http://wiki.openstreetmap.org/wiki/Nominatim) @using-api yes @results JSON @stable yes @parse url, title """ from json import loads from searx.utils import searx_useragent # engine dependent config categories =...
agpl-3.0
5,360,120,528,442,398,000
30.444444
79
0.499839
false
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/twisted/conch/manhole_tap.py
8
4221
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ TAP plugin for creating telnet- and ssh-accessible manhole servers. @author: Jp Calderone """ from zope.interface import implementer from twisted.internet import protocol from twisted.application import service, strports from twisted.cred i...
mit
-176,357,809,138,955,780
33.317073
115
0.641317
false
ai-ku/langvis
dependencies/jython-2.1/Lib/xdrlib.py
4
7540
"""Implements (a subset of) Sun XDR -- eXternal Data Representation. See: RFC 1014 """ import struct __all__ = ["Error", "Packer", "Unpacker", "ConversionError"] # exceptions class Error: """Exception class for this module. Use: except xdrlib.Error, var: # var has the Error instance...
mit
-8,896,721,062,047,478,000
24.83274
78
0.495491
false
back-to/streamlink
tests/plugins/test_tvrby.py
8
1397
import unittest from streamlink.plugins.tvrby import TVRBy class TestPluginTVRBy(unittest.TestCase): def test_can_handle_url(self): # should match self.assertTrue(TVRBy.can_handle_url("http://www.tvr.by/televidenie/belarus-1/")) self.assertTrue(TVRBy.can_handle_url("http://www.tvr.by/tele...
bsd-2-clause
-8,068,501,491,426,433,000
44.064516
90
0.637079
false
sparkslabs/kamaelia_
Sketches/RJL/Util/Chunkifier.py
3
5392
#!/usr/bin/env python2.3 # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache Lice...
apache-2.0
-7,018,564,507,208,332,000
32.079755
90
0.580304
false
addition-it-solutions/project-all
addons/hw_escpos/__openerp__.py
8
1713
# -*- 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
3,878,338,141,428,329,500
34.6875
78
0.603619
false
apdjustino/DRCOG_Urbansim
src/opus_gui/results_manager/controllers/xml_configuration/xml_controller_results.py
1
11688
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE from lxml.etree import Element import time from PyQt4.QtGui import QMenu, QCursor, QDialog from opus_gui.main.controllers.dialogs.message_box import Messag...
agpl-3.0
-8,745,276,135,714,334,000
48.73617
150
0.633641
false
CarlosCorreiaM16e/bismarck
bismarck_cli/servers/srv_factory.py
1
1254
''' Created on 16/10/2014 @author: carlos ''' import ast import os from bismarck_cli.servers.server_context import ServerContext from bismarck_cli.utils import term from bismarck_cli.utils.storage import storagize #------------------------------------------------------------------ def get_server_def( server_name )...
gpl-3.0
8,485,425,901,192,145,000
29.585366
71
0.398724
false
nikhilprathapani/python-for-android
python3-alpha/extra_modules/gdata/photos/service.py
44
24305
#!/usr/bin/env python # -*-*- encoding: utf-8 -*-*- # # This is the service file for the Google Photo python client. # It is used for higher level operations. # # $Id: service.py 144 2007-10-25 21:03:34Z havard.gulldahl $ # # Copyright 2007 Håvard Gulldahl # # Licensed under the Apache License, Version 2.0 (the "Licen...
apache-2.0
-1,827,701,711,872,862,000
34.687225
105
0.676542
false
bhdouglass/clickable
setup.py
1
2014
#!/usr/bin/env python # -*- coding: utf-8 -*- import ast import re try: from setuptools import setup except ImportError: from distutils.core import setup readme = open('README.md').read() _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('clickable/__init__.py', 'rb') as f: version = str(as...
gpl-3.0
3,972,962,737,197,527,600
29.515152
100
0.610228
false
amol9/redcmd
redcmd/api.py
1
1144
'''from redlib.api.misc import make_api, Move moves = [] exclude = ['test', 'version', 'main', '__main__', '__init__'] make_api(__name__, __file__, exclude=exclude, moves=moves) __path__ = [] __package__ = __name__ # see PEP 366 @ReservedAssignment if globals().get("__spec__") is not None: __spec__.submodule_se...
mit
-5,819,277,296,388,335,000
19.428571
72
0.649476
false
Akson/RemoteConsolePlus3
RemoteConsolePlus3/RCP3/Backends/Processors/DataParsers/DefaultParser.py
1
1320
#Created by Dmytro Konobrytskyi, 2013 (github.com/Akson) from RCP3 import DefaultParser class Backend(object): def __init__(self, parentNode): self._parentNode = parentNode def Delete(self): """ This method is called when a parent node is deleted. """ pass def ...
lgpl-3.0
-2,688,199,538,316,170,000
29.022727
79
0.608333
false
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/assemblme_v1-4-0/functions/common/wrappers.py
1
2181
# Copyright (C) 2019 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
gpl-3.0
2,026,987,312,266,655,200
30.608696
126
0.638698
false
ronaldahmed/SLAM-for-ugv
neural-navigation-with-lstm/MARCO/Senses.py
2
18327
Senses = { '1' : {'N':[2], 'ADJ':[1],}, '1st' : {'ADJ':[1]}, '2' : {'N':[2], 'ADJ':[1]}, '3' : {'N':[2], 'ADJ':[1]}, '4' : {'N':[2], 'ADJ':[1]}, '5' : {'N':[2], 'ADJ':[1]}, '6' : {'N':[2], 'ADJ':[1]}, '7' : {'N':[2], 'ADJ':[1]}, '90' : {'ADJ':[1],}, 'able' : {'ADJ':[1],}, 'ab...
mit
2,418,539,608,148,175,400
31.209139
63
0.371692
false
HMSBeagle1831/rapidscience
rlp/documents/forms.py
1
1288
from django import forms from taggit.models import Tag from .models import Document, File, Image, Link, Video class BaseDocumentForm(forms.ModelForm): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) if Tag.objects.count(): self.fields['tags'] = forms.ModelMulti...
mit
-1,312,781,363,678,341,600
22.851852
88
0.543478
false
henryr/Impala
tests/custom_cluster/test_admission_controller.py
6
25728
#!/usr/bin/env python # Copyright (c) 2014 Cloudera, Inc. All rights reserved. # Tests admission control import pytest import threading import re from time import sleep, time from tests.beeswax.impala_beeswax import ImpalaBeeswaxException from tests.common.custom_cluster_test_suite import CustomClusterTestSuite from ...
apache-2.0
8,781,226,377,336,120,000
46.207339
90
0.688277
false
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/en/m4ufree.py
3
4591
# -*- coding: UTF-8 -*- ####################################################################### # ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want wit...
gpl-2.0
-357,584,317,202,120,700
43.582524
156
0.507515
false
korylprince/pyLibraryTracker
controllers/check.py
1
2704
# coding: utf8 #Fix authentication paths auth.settings.controller = 'check' auth.settings.login_url = URL('check','user') auth.settings.login_next = URL('check','index') auth.settings.logout_next = URL('check','user') #Only let staff log in auth.settings.login_methods = [ldap_auth(mode='ad', allowed_groups = ['Dom...
gpl-3.0
-4,228,872,156,147,075,000
36.041096
141
0.579142
false
yongtang/tensorflow
tensorflow/python/tools/api/generator/create_python_api_test.py
9
5959
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-5,926,330,587,379,672,000
34.260355
80
0.613526
false
calebfoss/tensorflow
tensorflow/contrib/training/python/training/feeder.py
58
14416
# 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,258,930,024,841,397,000
36.83727
80
0.655452
false
Edgar324/GeoVis
weathervis/views.py
1
22041
from django.shortcuts import render from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponseRedirect, HttpResponse from netCDF4 import Dataset from django.http.response import JsonResponse import numpy as np import json from overlayprocessor import...
apache-2.0
4,298,894,791,917,222,000
36.296108
126
0.561635
false
zombiecollin/MySQLdatagen
MySQLdatagen/__init__.py
1
3423
import os import sys import MySQLdb import pprint from globals import MYSQL_CONFIG_PATH from commonIO import commonIO from configparser import ConfigParser from faker import Faker def joke(): return (u'Wenn ist das Nunstck git und Slotermeyer? Ja! ... ' u'Beiherhund das Oder die Flipperwaldt gersput.'...
mit
4,190,857,089,743,426,000
28.508621
108
0.570844
false
SRI-CSL/radler
radler/exports.py
1
1984
# This file is part of Radler. # # Radler 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. # # Radler is distributed in the hope that it...
gpl-3.0
2,242,103,763,710,334,700
28.58209
79
0.638244
false
dethos/cloudroutes-service
src/web/domains.py
6
3058
###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Domains Class ###################################################################### import rethinkdb as r class Domain(object): def __ini...
agpl-3.0
-1,138,986,112,556,459,500
29.888889
79
0.482668
false
eduNEXT/edunext-platform
lms/djangoapps/courseware/rules.py
3
6254
""" django-rules and Bridgekeeper rules for courseware related features """ import logging import traceback import laboratory import rules import six from bridgekeeper.rules import EMPTY, Rule from django.conf import settings from django.db.models import Q from opaque_keys.edx.django.models import CourseKeyField fro...
agpl-3.0
-2,321,258,058,686,820,400
33.938547
110
0.654781
false
pshen/ansible
contrib/inventory/gce.py
32
18024
#!/usr/bin/env python # Copyright 2013 Google Inc. # # 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 ...
gpl-3.0
-4,572,851,495,682,398,000
35.33871
100
0.585996
false
oxc/Flexget
flexget/plugins/modify/path_by_ext.py
4
1722
from __future__ import unicode_literals, division, absolute_import from builtins import * # pylint: disable=unused-import, redefined-builtin import logging import mimetypes from flexget import plugin from flexget.event import event log = logging.getLogger('path_by_ext') class PluginPathByExt(object): """ ...
mit
5,651,375,410,693,585,000
30.309091
74
0.566202
false
joshuamckenty/yolo-octo-wookie
nova/volume/__init__.py
1
1251
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
-743,769,945,700,646,000
39.354839
78
0.706635
false
PwnArt1st/searx
searx/engines/xpath.py
1
3626
from lxml import html from urllib import urlencode, unquote from urlparse import urlparse, urljoin from lxml.etree import _ElementStringResult, _ElementUnicodeResult from searx.utils import html_to_text search_url = None url_xpath = None content_xpath = None title_xpath = None suggestion_xpath = '' results_xpath = '' ...
agpl-3.0
8,834,177,589,919,687,000
29.216667
79
0.630171
false
ingenioustechie/zamboni
mkt/api/tests/test_base.py
6
4752
import urllib from django import forms from django.core.urlresolvers import reverse from django.test.client import RequestFactory from mock import patch from nose.tools import eq_ from rest_framework.decorators import (authentication_classes, permission_classes) from rest_framew...
bsd-3-clause
2,908,792,441,982,307,300
35.553846
77
0.561237
false
odtvince/APITaxi
APITaxi/descriptors/hail.py
1
1415
# -*- coding: utf-8 -*- from ..models.hail import Hail as HailModel from ..utils.make_model import make_model from ..api import api from ..utils import fields hail_model = make_model('hail', 'Hail') puttable_arguments = ['status', 'incident_taxi_reason', 'reporting_customer', 'reporting_customer_reason', 'cust...
agpl-3.0
2,132,293,936,183,458,600
46.166667
83
0.696113
false
littleweaver/django-daguerre
daguerre/widgets.py
1
1317
from django.contrib.admin.widgets import AdminFileWidget from django.utils.safestring import mark_safe from django.urls import reverse class AreaWidget(AdminFileWidget): class Media: css = { 'all': ('imgareaselect/css/imgareaselect-animated.css', 'daguerre/css/areawidget.cs...
bsd-3-clause
1,678,550,584,569,059,300
37.735294
77
0.510251
false
pidah/st2contrib
packs/slack/slack_api_gen.py
7
3003
import yaml import re import urllib2 from bs4 import BeautifulSoup method_dict = {} base_url = 'https://api.slack.com/methods' api_doc_main = urllib2.urlopen('%s/channels.invite' % base_url) soup = BeautifulSoup(api_doc_main) api_methods = soup.find('select', id='api_method') for method in api_methods.stripped_str...
apache-2.0
8,225,473,968,011,166,000
39.04
74
0.541792
false
qsnake/abinit
util/maintainers/check-forbidden-flags.py
1
2797
#!/usr/bin/env python # # Copyright (C) 2010-2012 ABINIT Group (Yann Pouillon) # # This file is part of the ABINIT software package. For license information, # please see the COPYING file in the top-level directory of the ABINIT source # distribution. # from ConfigParser import ConfigParser from time import gmtime,str...
gpl-3.0
656,815,018,838,858,200
25.638095
80
0.600644
false
dongweiming/code
vilya/models/actions/pull.py
3
1985
# -*- coding: utf-8 -*- from vilya.models.actions.base import Action, ActionScope # TODO # 'date': self.now(), # 'url': pullreq_url, # 'description': description, # 'from_proj': from_proj_str, # 'to_proj': to_proj_str, # 'commiter': commiter, # ...
bsd-3-clause
-3,281,742,474,262,547,500
26.208333
75
0.54926
false
lzp819739483/dpkt
dpkt/crc32c.py
17
4094
# $Id$ import array # CRC-32C Checksum # http://tools.ietf.org/html/rfc3309 crc32c_table = ( 0x00000000L, 0xF26B8303L, 0xE13B70F7L, 0x1350F3F4L, 0xC79A971FL, 0x35F1141CL, 0x26A1E7E8L, 0xD4CA64EBL, 0x8AD958CFL, 0x78B2DBCCL, 0x6BE22838L, 0x9989AB3BL, 0x4D43CFD0L, 0xBF284CD3L, 0xAC78BF27L, 0x5E133C24L, ...
bsd-3-clause
6,837,719,413,612,497,000
50.175
68
0.760381
false
tboyce021/home-assistant
homeassistant/components/sonos/media_player.py
1
55157
"""Support to interface with Sonos players.""" import asyncio import datetime import functools as ft import logging import socket import urllib.parse import async_timeout import pysonos from pysonos import alarms from pysonos.core import ( PLAY_MODE_BY_MEANING, PLAY_MODES, PLAYING_LINE_IN, PLAYING_RADI...
apache-2.0
3,008,322,014,613,312,000
31.675948
97
0.593977
false
MediffRobotics/DeepRobotics
Experiments/ImitationDetection/retrain.py
8
42455
# 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...
gpl-3.0
-3,726,489,025,901,537,000
39.356464
129
0.665293
false
iguzu/gae-django
tests/modeltests/ordering/models.py
17
3537
""" 6. Specifying ordering Specify default ordering for a model using the ``ordering`` attribute, which should be a list or tuple of field names. This tells Django how to order ``QuerySet`` results. If a field name in ``ordering`` starts with a hyphen, that field will be ordered in descending order. Otherwise, it'll ...
bsd-3-clause
-2,977,372,771,957,931,500
38.741573
88
0.690698
false
Acidburn0zzz/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
1
20423
import os import subprocess import sys from six.moves.urllib.parse import urljoin from collections import defaultdict from six import iteritems, string_types from .wptmanifest.parser import atoms atom_reset = atoms["Reset"] enabled_tests = {"testharness", "reftest", "wdspec", "crashtest"} class Result(object): ...
mpl-2.0
3,108,549,741,736,874,500
32.154221
117
0.554424
false
andmarios/ansible-modules-core
packaging/os/apt.py
10
27073
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Flowroute LLC # Written by Matthew Williams <matthew@flowroute.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
gpl-3.0
-3,446,414,351,826,634,000
38.010086
578
0.606582
false
opfeifle/SU2
SU2_PY/SU2/run/geometry.py
3
3841
#!/usr/bin/env python ## \file geometry.py # \brief python package for running geometry analyses # \author T. Lukaczyk, F. Palacios # \version 5.0.0 "Raven" # # SU2 Lead Developers: Dr. Francisco Palacios (Francisco.D.Palacios@boeing.com). # Dr. Thomas D. Economon (economon@stanford.edu). # # S...
lgpl-2.1
751,786,724,826,876,000
33.294643
101
0.576152
false
trbngr/beets
beetsplug/embedart.py
9
6666
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
mit
-4,384,050,846,492,064,000
32.837563
79
0.59721
false
vied12/photoautomat-circus
sources/webassets/test.py
19
4687
"""Helpers for testing webassets. This is included in the webassets package because it is useful for testing external libraries that use webassets (like the flask-assets wrapper). """ from __future__ import print_function import tempfile import shutil import os from os import path import time from webassets import E...
gpl-3.0
-4,954,814,504,524,542,000
29.435065
79
0.597397
false
google/eclipse2017
system-test-container/app/tests/site_test.py
1
4431
# # Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
apache-2.0
1,497,879,265,293,816,600
35.619835
173
0.627624
false
jor-/scipy
scipy/signal/tests/test_signaltools.py
2
103529
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import import sys from decimal import Decimal from itertools import product import warnings import pytest from pytest import raises as assert_raises from numpy.testing import ( assert_equal, assert_almost_equal, assert_array_eq...
bsd-3-clause
-3,161,383,540,988,734,500
37.089404
98
0.508061
false
jacobmorzinski/mailusage
gssapisasl.py
1
5798
#!/usr/bin/env python # https://tools.ietf.org/html/rfc4752 import base64 import kerberos AUTH_GSS_CONTINUE = kerberos.AUTH_GSS_CONTINUE # 0 AUTH_GSS_COMPLETE = kerberos.AUTH_GSS_COMPLETE # 1 # Bit-masks for SASL security layers GSS_AUTH_P_NONE = 1 GSS_AUTH_P_INTEGRITY = 2 GSS_AUTH_P_PRIVACY = 4 STATE_ONE =...
mit
-6,011,563,831,559,920,000
35.465409
75
0.593825
false
TomBaxter/waterbutler
tests/core/test_metadata.py
3
4228
import hashlib from tests import utils class TestBaseMetadata: def test_file_metadata(self): file_metadata = utils.MockFileMetadata() assert file_metadata.is_file is True assert file_metadata.is_folder is False def test_folder_metadata(self): folder_metadata = utils.MockFol...
apache-2.0
2,801,363,890,221,615,000
37.788991
98
0.567408
false
briancoutinho0905/2dsampling
src/arch/x86/isa/insts/x87/data_transfer_and_conversion/convert_and_load_or_store_integer.py
29
2493
# Copyright (c) 2007 The Hewlett-Packard Development Company # Copyright (c) 2015 Advanced Micro Devices, Inc. # # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to int...
bsd-3-clause
-2,986,842,188,052,121,600
41.982759
72
0.771761
false
jeremyfix/pylearn2
pylearn2/datasets/preprocessing.py
5
58496
""" Functionality for preprocessing Datasets. """ __authors__ = "Ian Goodfellow, David Warde-Farley, Guillaume Desjardins, " \ "and Mehdi Mirza" __copyright__ = "Copyright 2010-2012, Universite de Montreal" __credits__ = ["Ian Goodfellow", "David Warde-Farley", "Guillaume Desjardins", "Meh...
bsd-3-clause
-3,315,863,821,247,924,000
30.114894
79
0.520736
false
priya-pp/Tacker
tacker/db/migration/alembic_migrations/versions/22f5385a3d3f_add_status_to_vims.py
3
1072
# Copyright 2016 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 ...
apache-2.0
6,872,407,668,500,319,000
29.628571
78
0.702425
false
OpenInternet/copilot
copilot/utils/file_sys.py
2
2343
import os import subprocess #stat logging import logging log = logging.getLogger(__name__) #Adapted from https://stackoverflow.com/questions/6840711/writing-a-file-to-a-usb-stick-in-linux-with-python # Feel like a https://www.eff.org/files/images_insert/defcon20-script-kitty-detail.jpg def get_usb_dirs(): """ Ge...
lgpl-3.0
-962,323,521,009,656,300
33.970149
108
0.608195
false
scotwk/cloud-custodian
c7n/resources/rdsparamgroup.py
3
11149
# Copyright 2017 Capital One Services, 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 agreed to in...
apache-2.0
7,214,040,491,534,772,000
30.583569
99
0.58938
false
heytcass/homeassistant-config
deps/sqlalchemy/dialects/mssql/mxodbc.py
36
3856
# mssql/mxodbc.py # Copyright (C) 2005-2016 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+mxodbc :name: mxODBC :dbapi: mxodbc :connectstrin...
mit
3,314,913,829,221,668,000
33.428571
78
0.703838
false
JieweiWei/blog_crawler
project/blog/rotate_useragent.py
1
3014
# -*-coding:utf-8-*- from scrapy import log import random from scrapy.contrib.downloadermiddleware.useragent import UserAgentMiddleware class RotateUserAgentMiddleware(UserAgentMiddleware): def __init__(self, user_agent=''): self.user_agent = user_agent def process_request(self, request, spider): ...
mit
-5,324,676,225,037,087,000
51.807018
108
0.62691
false
OakNinja/svtplay-dl
lib/svtplay_dl/service/lemonwhale.py
1
1998
# ex:ts=4:sw=4:sts=4:et # -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- from __future__ import absolute_import import re import copy import xml.etree.ElementTree as ET from svtplay_dl.utils.urllib import unquote_plus from svtplay_dl.service import Service from svtplay_dl.utils import get_http_data fro...
mit
-3,046,201,685,899,543,000
34.678571
82
0.578579
false
hstau/covar-cryo
covariance/distribute3Sphere.py
1
1630
""" function [results, iter] = distribute3Sphere(numPts) % [results, iter] = distribute3Sphere(numPts) % distributes numPts points roughly uniformly on a unit 3-sphere and % returns the coordinates in results. Number of iterations required is % returned in iter. % % Algorithm adapted from L. Lovisolo and E.A.B. da Sil...
gpl-2.0
421,824,531,617,861,100
31.6
80
0.560736
false
rjw57/cubbie
cubbie/fixture.py
1
2649
""" Generate fake data for the database. These functions all require that app.debug==True. """ from functools import wraps from datetime import datetime, timedelta from faker import Faker from flask import current_app from mixer.backend.flask import mixer from cubbie.model import User, Production, Performance, Sale...
mit
-15,517,915,106,571,602
27.180851
81
0.679124
false
stankovski/AutoRest
AutoRest/Generators/Python/Python.Tests/Expected/AcceptanceTests/ParameterFlattening/setup.py
2
1109
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-6,639,381,496,791,292,000
26.725
76
0.620379
false
jonfoster/pyxb2
pyxb/utils/templates.py
5
4046
# -*- coding: utf-8 -*- # Copyright 2009-2013, Peter A. Bigot # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain a # copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
apache-2.0
2,848,421,639,949,725,700
35.125
125
0.661641
false
paweljasinski/ironpython3
Tests/modules/type_related/_struct_test.py
3
10431
##################################################################################### # # Copyright (c) Microsoft Corporation. All rights reserved. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of th...
apache-2.0
-3,611,325,586,160,018,400
41.060484
126
0.417218
false
joansmith/openmicroscopy
components/tools/OmeroPy/test/unit/clitest/test_admin.py
2
10383
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test of the omero admin control. Copyright 2008 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt """ import os import re import pytest from path import path from glob import glob import omero import omero...
gpl-2.0
6,743,931,801,898,122,000
32.066879
79
0.603486
false
outshines/opendcp
octans/octans/config.py
5
1519
#!/usr/bin/env python # # Copyright (C) 2016 Weibo Inc. # # This file is part of Opendcp. # # Opendcp 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 of the License. # # Opendcp is ...
gpl-2.0
-768,751,680,258,237,400
27.660377
78
0.61817
false
rosmo/ansible
lib/ansible/modules/network/meraki/meraki_mr_l3_firewall.py
5
9579
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Kevin Breit (@kbreit) <kevin.breit@kevinbreit.net> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { ...
gpl-3.0
6,731,177,552,439,459,000
31.917526
112
0.584821
false