repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
license
stringclasses
15 values
hash
int64
-9,223,277,421,539,062,000
9,223,102,107B
line_mean
float64
6.51
99.9
line_max
int64
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
tinloaf/home-assistant
homeassistant/components/sensor/deconz.py
1
8961
""" Support for deCONZ sensor. For more details about this component, please refer to the documentation at https://home-assistant.io/components/sensor.deconz/ """ from homeassistant.components.deconz.const import ( ATTR_DARK, ATTR_ON, CONF_ALLOW_CLIP_SENSOR, DECONZ_REACHABLE, DOMAIN as DECONZ_DOMAIN) from home...
apache-2.0
1,167,693,764,562,202,400
33.333333
79
0.617565
false
phisiart/tvm
topi/python/topi/util.py
1
2941
"""Common topi utilities""" from __future__ import absolute_import as _abs import tvm def get_const_int(expr): """Verifies expr is integer and get the constant value. Parameters ---------- expr : tvm.Expr or int The input expression. Returns ------- out_value : int The out...
apache-2.0
5,666,664,020,984,149,000
21.450382
82
0.573954
false
GaretJax/csat
csat/collectors/pygit/collector.py
1
15128
import os import datetime import git import tempfile import shutil import re from csat.paths import PathWalker from csat.graphml.builder import GraphMLDocument, Attribute from . import parser class ModuleNotFound(KeyError): pass class ModuleAlreadyTracked(KeyError): pass def timestamp_to_iso(timestamp): ...
mit
3,778,153,652,460,693,000
34.679245
79
0.542041
false
foohooboo/graphql-cookiecutter
config/settings/production.py
1
7200
""" Production Configurations - Use Amazon's S3 for storing static files and uploaded media - Use mailgun to send emails - Use Redis for cache """ from boto.s3.connection import OrdinaryCallingFormat from .base import * # noqa # SECRET CONFIGURATION # -------------------------------------------------------------...
mit
-155,756,207,016,246,980
35.923077
117
0.598333
false
EiNSTeiN-/idapython
pywraps/py_ua.py
1
21392
#<pycode(py_ua)> # ----------------------------------------------------------------------- class op_t(py_clinked_object_t): """Class representing operands""" def __init__(self, lnk = None): py_clinked_object_t.__init__(self, lnk) def _create_clink(self): return _idaapi.op_t_create() d...
bsd-3-clause
-5,558,189,570,550,828,000
40.059501
149
0.584237
false
MangoMangoDevelopment/neptune
lib/ros_comm-1.12.0/test/test_rospy/test/unit/test_gensrv_py.py
1
3000
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2008, Willow Garage, 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...
bsd-3-clause
-386,068,232,569,615,000
40.09589
73
0.731667
false
Nrikolo/X8_AutoPilot
fsm/scripts/Utility.py
1
10399
#!/usr/bin/env python# # A set of utility functions for converting msgs to numpy arrays, computing distance metrics import rospy import ros import numpy import math from geometry_msgs.msg import Pose, Point, Quaternion, PoseStamped class switch(object): """ python switch statement adapted from : http://code...
gpl-2.0
8,784,265,833,386,737,000
42.149378
169
0.613232
false
Micronaet/micronaet-mx8
stock_assigned_quantity/__init__.py
1
1035
# -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
-406,757,999,444,096,900
44
79
0.609662
false
HewlettPackard/oneview-ansible
test/test_oneview_ethernet_network.py
1
15111
#!/usr/bin/python # -*- coding: utf-8 -*- ### # Copyright (2016-2020) Hewlett Packard Enterprise Development LP # # 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/licen...
apache-2.0
4,230,456,107,347,667,500
34.723404
110
0.657137
false
chris-statzer/knuckle-python
tests/test_gamepad.py
1
1522
import logging import knuckle import ui logging.basicConfig(level=logging.INFO) UP = 24 DOWN = 25 LEFT = 27 RIGHT = 26 A = ord('A') B = ord('B') class GamepadWindow(ui.Widget): def __init__(self, ui): super(GamepadWindow, self).__init__(ui, 10, 10, 40, 20) self.dirty = True self.butto...
mit
-1,853,857,785,310,061,800
22.060606
70
0.544678
false
paulu/deepfeatinterp
facemodel_worker.py
1
4456
#!/usr/bin/env python2 from __future__ import division from __future__ import with_statement from __future__ import print_function import execnet if __name__=='__channelexec__': import os.path import subprocess if not os.path.exists('models/facemodel/model.t7'): url='https://www.dropbox.com/s/18s63zomyfacj...
gpl-3.0
-2,786,597,772,974,802,000
36.762712
137
0.644075
false
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/example/image-classification/train_imagenet_dali.py
1
2782
# 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
1,596,780,349,057,165,800
37.109589
99
0.635514
false
tingcar/PSEP
src/internalmail/models.py
1
1878
from django.db import models from django.contrib.auth.models import User # Create your models here. class InternalMail(models.Model): user = models.ForeignKey(User) Ticketid = models.CharField(max_length=50, null=True, blank=True) From = models.CharField(max_length=50, null=True, blank=True) FromEma...
apache-2.0
-6,549,464,659,863,502,000
34.45283
88
0.683706
false
luxick/mtg-collector
mtg-collector/mtgsdk/querybuilder.py
1
2831
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of mtgsdk. # https://github.com/MagicTheGathering/mtg-sdk-python # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT-license # Copyright (c) 2016, Andrew Backes <backes.andrew@gmail.com> from mtgsdk.restclient import RestClient f...
gpl-3.0
8,630,459,655,489,021,000
27.31
75
0.533027
false
tomscript/babbage
backend/main.py
1
3720
"""Babbage - Framework for decoding data. Copyright 2014 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 req...
apache-2.0
8,691,036,641,118,674,000
30.794872
88
0.715323
false
qgis/QGIS-Django
qgis-app/settings_local_vagrant.py
1
6701
import os SITE_ROOT = os.path.dirname(os.path.realpath(__file__)) DEBUG = True THUMBNAIL_DEBUG = DEBUG # sorl.thumbnail verbose debug ALLOWED_HOSTS = ['*'] # Local time zone for this installation. Choices can be found here: # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name # although not all choices may be a...
gpl-2.0
8,829,904,462,197,181,000
32.848485
135
0.683629
false
OpenMOOC/moocng
moocng/courses/templatetags/usercourses.py
1
1137
# -*- coding: utf-8 -*- # Copyright 2012-2013 UNED # # 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 a...
apache-2.0
5,496,610,399,589,646,000
34.53125
75
0.739666
false
kilon/sverchok
nodes/generator/plane.py
1
5388
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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. # # This program is distrib...
gpl-3.0
-8,456,322,974,205,679,000
33.948052
112
0.577109
false
josibarns/paparazzi
sw/tools/dfu/stm32_mem.py
1
6679
#!/usr/bin/env python # # stm32_mem.py: STM32 memory access using USB DFU class # Copyright (C) 2011 Black Sphere Technologies # Written by Gareth McMullin <gareth@blacksphere.co.nz> # Modified by Felix Ruess <felix.ruess@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under th...
gpl-2.0
-2,751,029,228,684,061,700
33.076531
98
0.608025
false
TomasTomecek/docker-scripts
docker_scripts/cli.py
1
3534
# -*- coding: utf-8 -*- import argparse import logging import sys from docker_scripts import squash, layers from docker_scripts.version import version class MyParser(argparse.ArgumentParser): def error(self, message): self.print_help() sys.stderr.write('\nError: %s\n' % message) sys.exi...
mit
-4,773,808,093,755,028,000
35.8125
149
0.608376
false
irzaip/chippy
scripts/robot/puma560akb.py
1
2841
''' PUMA560AKB Load kinematic and dynamic data for a Puma 560 manipulator from robot.puma560akb import * Defines the object 'p560m' in current workspace which describes the kinematic and dynamic characterstics of a Unimation Puma 560 manipulator modified DH conventions and using the data and conventions of: Arms...
lgpl-3.0
-6,479,192,714,026,821,000
30.21978
81
0.587117
false
sony/nnabla
python/test/function/test_top_k_grad.py
1
2808
# Copyright 2018,2019,2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 #...
apache-2.0
-341,363,528,885,917,100
39.695652
86
0.643875
false
freakboy3742/django
django/template/base.py
2
39107
""" This is the Django template system. How it works: The Lexer.tokenize() method converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TokenType.TEXT), variables (TokenType.VAR), or block statements (TokenType.BLOCK). The Parser() class ta...
bsd-3-clause
2,586,645,646,692,251,000
35.514472
106
0.557189
false
317070/kaggle-heart
configurations/j2_crps2.py
1
6318
from deep_learning_layers import ConvolutionOver2DAxisLayer, MaxPoolOverAxisLayer, MaxPoolOver2DAxisLayer, \ MaxPoolOver3DAxisLayer, ConvolutionOver3DAxisLayer, ConvolutionOverAxisLayer from default import * import theano.tensor as T from layers import MuLogSigmaErfLayer, CumSumLayer import objectives from lasagne...
mit
-49,661,951,330,978,890
39.5
136
0.549541
false
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_string_format_match_pattern2446.py
1
7539
# 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 im...
mit
-7,783,395,929,129,760,000
35.77561
105
0.593845
false
dan-ionut-fechete/ev3
test/test_ev3_motor.py
1
1650
from ev3.ev3dev import Motor import unittest import time from util import get_input class TestMotor(unittest.TestCase): get_input('Attach a motor on port A then continue') def __init__(self,*args, **kwargs): super(TestMotor, self).__init__(*args, **kwargs) self.d=Motor(port=Motor.PORT.A...
apache-2.0
153,501,545,170,004,000
33.375
96
0.59697
false
rocco8773/bapsflib
bapsflib/_hdf/utils/hdfoverview.py
1
15938
# This file is part of the bapsflib package, a Python toolkit for the # BaPSF group at UCLA. # # http://plasma.physics.ucla.edu/ # # Copyright 2017-2018 Erik T. Everson and contributors # # License: Standard 3-clause BSD; see "LICENSES/LICENSE.txt" for full # license terms and contributor agreement. # import os impor...
bsd-3-clause
6,741,147,430,644,296,000
31.861856
72
0.513051
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/soyuz/model/files.py
1
1945
# Copyright 2009-2013 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'BinaryPackageFile', 'SourceFileMixin', 'SourcePackageReleaseFile', ] from sqlobject import ForeignKey from zope.interface im...
agpl-3.0
-574,169,999,967,642,100
32.534483
76
0.683805
false
qguv/config
weechat/plugins/python/twitch.py
1
27158
# -*- coding: utf-8 -*- # 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 program is distributed in the hope tha...
gpl-3.0
7,246,407,258,245,788,000
42.03962
155
0.588998
false
kubeflow/kfserving
python/lgbserver/lgbserver/test_lightgbm_model_repository.py
1
1383
# Copyright 2020 kubeflow.org. # # 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
-7,050,222,519,797,764,000
34.461538
87
0.731743
false
jiadaizhao/LeetCode
0401-0500/0427-Construct Quad Tree/0427-Construct Quad Tree.py
1
1392
# Definition for a QuadTree node. class Node: def __init__(self, val, isLeaf, topLeft, topRight, bottomLeft, bottomRight): self.val = val self.isLeaf = isLeaf self.topLeft = topLeft self.topRight = topRight self.bottomLeft = bottomLeft self.bottomRight = bottomRight ...
mit
304,539,725,693,062,340
48.714286
100
0.576149
false
matthewzimmer/carnd-behavioral-cloning
zimpy/camera_preprocessor.py
1
1757
import cv2 import numpy as np from scipy import misc def flip_image(image_array, steering_angle): return np.fliplr(image_array), -steering_angle def preprocess_image(image_array, output_shape=None): if output_shape is None: output_shape = (66, 200) image_array = cv2.cvtColor(image_array, cv2.COL...
mit
-4,044,214,751,920,961,500
40.833333
125
0.665908
false
signalw/charliechat
main/utils/queryGoogleForDirectionsv3.py
1
18357
import requests from CharlieChat import settings import re #ticket price variables. assumes no charlie-card #most prices pertain to charlie card zones. '1A' is the price to go between two '1A' stops only #the whole numbers are prices to go between a 1A stop to the listed zone, the keys that end #in .5 are inte...
mit
5,069,368,181,533,234,000
60.658703
134
0.585444
false
huihoo/reader
vendor/paypal/pro/models.py
1
4422
#!/usr/bin/env python # -*- coding: utf-8 -*- from string import split as L from django.db import models from django.utils.http import urlencode from django.forms.models import model_to_dict from django.contrib.auth.models import User class PayPalNVP(models.Model): """Record of a NVP interaction with PayPal.""" ...
mit
-7,428,194,969,463,486,000
42.782178
112
0.65943
false
kmarius/qutebrowser
tests/unit/mainwindow/statusbar/test_backforward.py
2
3211
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
-922,429,027,629,569,500
36.776471
78
0.701962
false
alpenwasser/laborjournal
versuche/skineffect/python/stuetzpunkte_new_lowfreq.py
1
6373
#!/usr/bin/env python3 from sympy import * from mpmath import * from matplotlib.pyplot import * #init_printing() # make things prettier when we print stuff for debugging. # ************************************************************************** # # Magnetic field inside copper coil with hollow copper cylinde...
mit
-9,165,362,577,425,502,000
41.486667
188
0.536482
false
CompassionCH/l10n-switzerland
l10n_ch_fds_upload_dd/__manifest__.py
1
1739
# -*- coding: utf-8 -*- ############################################################################## # # Swiss Postfinance File Delivery Services module for Odoo # Copyright (C) 2015 Compassion CH # @author: Nicolas Tran # # This program is free software: you can redistribute it and/or modify # it unde...
agpl-3.0
-5,115,878,443,708,713,000
36
78
0.585394
false
mkhutornenko/incubator-aurora
src/main/python/apache/thermos/observer/http/file_browser.py
1
4015
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
apache-2.0
431,896,439,114,059,600
28.962687
93
0.661021
false
fkie-cad/FACT_core
src/test/acceptance/rest/test_rest_download.py
1
1656
from base64 import standard_b64encode import time import urllib.parse from storage.db_interface_backend import BackEndDbInterface from test.acceptance.base import TestAcceptanceBase from test.common_helper import create_test_firmware class TestIntegrationRestDownloadFirmware(TestAcceptanceBase): def setUp(self)...
gpl-3.0
-2,252,411,230,025,247,700
42.578947
144
0.689614
false
DOE-NEPA/geonode_2.0_to_2.4_migration
migrate_actstream_follow_modified.py
1
1661
#!/usr/bin/python import os import psycopg2 import sys import django_content_type_mapping file = open("/home/" + os.getlogin() + "/.pgpass", "r") pgpasses = [] for line in file: pgpasses.append(line.rstrip("\n").split(":")) file.close() for pgpass in pgpasses: #print str(pgpass) if pgpass[0] == "54.236.235.110"...
gpl-2.0
6,928,478,910,194,008,000
24.953125
158
0.676099
false
DBeath/flask-feedrsub
feedrsub/utils/security.py
1
4868
import functools from flask import request, current_app as app, make_response from flask_security import Security, current_user from flask_security.decorators import _check_http_auth from flask_security.forms import ForgotPasswordForm, RegisterForm, SendConfirmationForm from flask_wtf import RecaptchaField from werkze...
mit
-2,667,769,390,822,563,300
32.342466
87
0.692071
false
NJHale/chicken-scratch
python-coop-store/coop_routes.py
1
1571
# coop_routes.py import os from flask import Flask from flask import jsonify from flask import request from flask_pymongo import PyMongo app = Flask(__name__) # Get mongodb configurations app.config['MONGO_DBNAME'] = os.getenv('MONGO_DBNAME', 'coopdb') app.config['MONGO_URI'] = ('mongodb://%s:%s/restdb', ...
mit
-3,780,095,503,741,503,500
31.061224
77
0.604074
false
noironetworks/heat
heat/engine/resources/signal_responder.py
1
15471
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
apache-2.0
-8,213,419,679,939,410,000
36.460048
79
0.585159
false
alexanderfefelov/nav
python/nav/web/geomap/coordinates.py
1
10124
# # Copyright (C) 2009, 2010 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under the # terms of the GNU General Public License version 2 as published by the Free # Software Foundation. # # This program is distributed in th...
gpl-2.0
7,722,432,487,132,970,000
36.776119
116
0.610233
false
madmax983/h2o-3
h2o-py/tests/testdir_munging/unop/pyunit_frame_reducers.py
1
1280
import sys sys.path.insert(1,"../../../") import h2o from tests import pyunit_utils import numpy as np import random def frame_reducers(): data = [[random.uniform(-10000,10000) for r in range(10)] for c in range(10)] h2o_data = h2o.H2OFrame(zip(*data)) np_data = np.array(data) h2o_val = h2o_data...
apache-2.0
8,118,912,116,779,420,000
30.219512
115
0.635156
false
RogueFrog/calculator
lexer_calc.py
1
1083
from types_calc import * class Lexer: def setLine(self, line): self.line = line + ' ' self.tokenizes = [] self.tokenNumber = '' def tokenize(self): for i in self.line: Lexer.tokenizeNumber(self, i) Lexer.tokenizeMath(self, i) ...
mit
-868,003,148,590,352,100
28.27027
75
0.526316
false
b1-systems/kiwi
test/unit/utils_rpm_test.py
1
3046
import io import os from .test_helper import patch_open from mock import ( patch, Mock, MagicMock, call ) from kiwi.utils.rpm import Rpm from kiwi.defaults import Defaults class TestRpm(object): def setup(self): self.rpm_host = Rpm() self.rpm_image = Rpm('root_dir') self.macro_file = ...
gpl-3.0
2,126,826,180,413,693,000
32.844444
67
0.569599
false
litong01/python-monasca
kiloeyes/openstack/common/eventlet_backdoor.py
1
4777
# Copyright (c) 2012 OpenStack Foundation. # 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 compliance with the License. You may obtain # a copy of the License a...
apache-2.0
-2,919,167,022,650,740,700
31.944828
78
0.64664
false
southpaw94/MachineLearning
Perceptron/Iris.py
1
1993
import pandas as pd import numpy as np import matplotlib.pyplot as plt from matplotlib.colors import ListedColormap from Perceptron import Perceptron def plotRawData(): plt.scatter(X[:50, 0], X[:50, 1], color='red', marker='o', label='setosa') plt.scatter(X[50:100, 0], X[50:100, 1], color='blue', marker='x', ...
gpl-2.0
6,019,366,131,002,339,000
32.779661
107
0.621174
false
Shenmolu/rosalind
sample.py
1
3913
def LCSBACKTRACK(v, w,u): global score m=len(v)+1 n=len(w)+1 l=len(u)+1 Backtrack=[[[0 for x in range(l)]for y in range(m)]for z in range(n)] s=[[[0 for x in range(l)]for y in range(m)]for z in range(n)] for i in range(n): s[i][0][0]= -i Backtrack[i][0][0] = 0 for i in r...
gpl-3.0
5,583,384,300,676,065,000
35.579439
104
0.30667
false
lcostantino/healing-os
healing/openstack/common/db/sqlalchemy/test_migrations.py
1
11081
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
apache-2.0
8,134,072,555,097,258,000
40.193309
79
0.562494
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/vpn/vpnvserver_authenticationldappolicy_binding.py
1
14377
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
3,985,986,094,343,853,000
39.728045
430
0.741114
false
purduesigbots/pros-cli
pros/common/ui/interactive/components/container.py
1
1157
from typing import * from pros.common.ui.interactive.parameters import BooleanParameter from .component import Component class Container(Component): """ A Container has multiple Components, possibly a title, and possibly a description """ def __init__(self, *elements: Component, tit...
mpl-2.0
2,828,309,912,206,857,000
34.060606
98
0.612792
false
googlevr/tilt-brush-toolkit
tests/test_tilt.py
1
3871
# Copyright 2016 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 required by applicable law or a...
apache-2.0
7,637,196,753,771,037,000
35.17757
85
0.696203
false
sxjscience/tvm
python/tvm/auto_scheduler/cost_model/xgb_model.py
1
20288
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
-4,733,857,599,090,388,000
32.533884
99
0.56738
false
lancelote/banneret
tests/conftest.py
1
1955
import logging import sys import pytest from click.testing import CliRunner from banneret import Banneret, Docker from banneret.cli import LINUX, MACOS only_mac = pytest.mark.skipif(sys.platform not in MACOS, reason='Not macOS') only_linux = pytest.mark.skipif(sys.platform not in LINUX, reason='Not Linux') @pytest...
mit
-5,783,193,328,958,767,000
19.797872
78
0.72532
false
Balannen/LSMASOMM
atom3/Kernel/GraphicEditor/testGraphics.py
1
27361
import unittest import Tkinter import Graphics import Geometry # python2.2 testGraphics.py -v def testOperationsLeafGF(tester, operations): for op in operations: apply(op[1], op[2]) tuples = map(None, op[0].xy, op[3]) for tup in tuples: tester.failIf(tup[0] <= tup[1] - tester.e) ...
gpl-3.0
6,122,743,834,935,670,000
43.299669
119
0.570301
false
nicolashainaux/mathmakerlib
tests/03_calculus/03_unit_test.py
1
3736
# -*- coding: utf-8 -*- # Mathmaker Lib offers lualatex-printable mathematical objects. # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker Lib. # Mathmaker Lib is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
gpl-3.0
-2,259,891,134,775,147,300
36.36
79
0.664882
false
tpoisot/tammy
tests/services.py
1
1229
#! /usr/bin/env python3 import sys, os import unittest import yaml import json sys.path.append(os.path.join(os.path.dirname(__file__), '..')) import tammy class PeerJ(unittest.TestCase): def test_pubtype(self): self.assertRaises(ValueError, tammy.from_peerj, 200, 'paper') def test_argtype(self): ...
bsd-2-clause
-2,297,632,679,412,063,500
30.512821
77
0.641172
false
jahantech/Python
information_system.py
1
9855
#!/usr/bin/python import webbrowser import os import datetime def stringchecker (orig,v1): ret = True x = len(v1) j=0 for j in range(0,x,1): if(len(v1)<=len(orig)): if orig[j].capitalize() == v1[j] or orig[j]==v1[j]: ret = ret and True elif orig[j] != v1[j]: ret = ret and False ...
apache-2.0
-8,020,074,260,038,271,000
24.934211
141
0.433688
false
openstack/octavia
octavia/amphorae/backends/utils/haproxy_query.py
1
4759
# Copyright 2015 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 required by applicable law...
apache-2.0
-4,224,321,231,276,598,300
34.514925
77
0.55726
false
tvotyakov/codeeval
easy/beautiful-strings/code.py
1
1499
#!python3 def max_beauty_of_string(in_str): '''(string) -> int Calculates maximum beauty of the in_str string. The beauty of the string is the sum of the beauty of the letters in it. The beauty of each letter is an integer between 1 and 26, inclusive, and no two letters have the same be...
gpl-2.0
-4,687,147,743,786,513,000
30.586957
79
0.576384
false
shawnrice/alfred-bundler
tests/python/test_wrappers.py
1
7239
#!/usr/bin/env python # encoding: utf-8 # # Copyright © 2014 The Alfred Bundler Team # MIT Licence. See http://opensource.org/licenses/MIT from __future__ import print_function, unicode_literals import os import imp import sys import time import types import inspect import logging import unittest from common import ...
mit
-2,172,900,005,765,959,700
31.168889
79
0.549461
false
Machtan/M3
PyGame/main.py
1
11435
from simplegame import Game, Transform, Axis, Animation, Sprite from simplegame import Loader, MouseListener, Clear, Jukebox, KeyHandler from simplegame import Vector from upgrade import Upgrade from rotation import Rotatable import random import pygame import os import math class DestructibleBlock(Sprite): def...
mit
2,577,402,560,152,300,500
30.160763
91
0.540009
false
Oefenweb/python-untraceables
untraceables/utilities/mysql.py
1
3852
# -*- coding: utf-8 -*- """ MySQL utility functions. """ from __future__ import absolute_import from warnings import filterwarnings import MySQLdb import MySQLdb.cursors from untraceables.utilities import query as query_utility filterwarnings('ignore', category=MySQLdb.Warning) def get_connection(host, user, passw...
mit
6,383,148,519,773,540,000
22.925466
120
0.660955
false
zhengbomo/python_practice
project/ProjectScaner/ImageScanner.py
1
4897
#!/usr/bin/python # -*- coding:utf-8 -*- import os # 扫描资源引用 import re class ImageScanner(object): def __init__(self, path): self.path = path def scan_image_name(self): # 扫描所有图片资源,遇到.imageset结尾的文件夹,则返回 files = self.__class__.__get_all_files(self.path, r'.png|.jpg|.pdf') image_...
mit
1,947,825,948,532,316,000
31.458904
120
0.477949
false
bencer/sd-agent-plugins
Nagios/Nagios.py
1
5559
""" Server Density Nagios plugin """ import sys import re import logging import json import time import subprocess METRICS = [ 'Total Services', 'Services Checked', 'Services Scheduled', 'Services Actively Checked', 'Services Passively Checked', 'Services Flapping', 'Services In Downtime',...
bsd-3-clause
1,777,823,038,956,215,600
34.864516
116
0.545962
false
bwhite/hadoopy
hadoopy/thirdparty/pyinstaller/PyInstaller/lib/macholib/MachOGraph.py
1
3783
""" Utilities for reading and writing Mach-O headers """ from pkg_resources import require require("altgraph") import os import sys from altgraph.Graph import Graph from altgraph.ObjectGraph import ObjectGraph from macholib.mach_o import * from macholib.dyld import dyld_find from macholib.MachO import MachO from ma...
gpl-3.0
-4,795,214,337,535,839,000
31.333333
76
0.592123
false
biotcm/PICheM
CPIs/DrugBank_4.3/drugbank_xml_demo.py
1
2101
#!/usr/bin/python # Extract drugs and experimental compounds. # Songpeng Zu # 2014-12-30 import os import xml.sax class DrugBankHandler(xml.sax.ContentHandler): def __int__(self): self.CurrentData = "" self.DrugBankID = "" self.smallmolecule = "" self.drugbank = "" self.pa...
mit
5,569,404,190,398,638,000
32.349206
76
0.58496
false
rxuriguera/bibtexIndexMaker
src/bibim/rce/extraction.py
1
4634
# Copyright 2010 Ramon Xuriguera # # This file is part of BibtexIndexMaker RCE. # # # BibtexIndexMaker RCE 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
1,227,743,790,404,025,900
30.52381
100
0.624083
false
Ghini/ghini.desktop
bauble/utils/web.py
1
2060
# -*- coding: utf-8 -*- # # Copyright 2008-2010 Brett Adams # Copyright 2014-2017 Mario Frasca <mario@anche.no>. # Copyright 2016 Ross Demuth <rossdemuth123@gmail.com> # # This file is part of ghini.desktop. # # ghini.desktop is free software: you can redistribute it and/or modify # it under the terms of the GNU Genera...
gpl-2.0
-4,808,770,186,688,723,000
31.1875
90
0.633495
false
matthewoliver/swift
swift/common/middleware/s3api/controllers/obj.py
1
5246
# Copyright (c) 2010-2014 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 or agre...
apache-2.0
8,127,270,144,189,853,000
33.973333
77
0.589401
false
olethanh/django-gcaltemplatetag
gcaltemplatetag/templatetags/gcal.py
1
4419
""" Tags which can retrieve events from a public google calendar Atom feed, and return the results for use in templates. Copyright (c) 2011, Olivier Le Thanh Duong <olivier@lethanh.be> Based on django-template-utils : Copyright (c) 2009, James Bennett & Justin Quick Based, in part, on the original idea by user b...
bsd-3-clause
7,707,295,554,402,647,000
31.492647
119
0.647658
false
jaharkema/loljournal
apps/match/views.py
1
2968
from django.contrib.auth.mixins import LoginRequiredMixin from django.core.urlresolvers import reverse_lazy from django.views.generic import FormView from django.views.generic.edit import UpdateView from django.views.generic.list import ListView from apps.api.models import RiotGame, RiotChampion from apps.core.forms i...
mit
6,109,071,862,592,226,000
29.597938
75
0.58659
false
hunger/cleanroom
tests/test_exceptions.py
1
1862
#!/usr/bin/python """Test for the exceptions of cleanroom. @author: Tobias Hunger <tobias.hunger@gmail.com> """ import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import cleanroom.exceptions as ex import cleanroom.location as location def test_base_exceptions(...
gpl-3.0
2,501,669,685,371,221,000
28.09375
82
0.661654
false
tawfiqeee/ROS
ros_workspace/SpartonCompass/src/SpartonCompass.py
3
5404
#!/usr/bin/env python # Software License Agreement (BSD License) # Sparton Digital Compass ROS Driver for SP3003D/AHRS-8/GEDC-6 # Copyright (c) 2012, Cheng-Lung Lee, University of Detroit Mercy. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted ...
mit
255,627,543,700,331,460
38.735294
112
0.666728
false
adfernandes/pcp
src/pmdas/bpftrace/bpftrace/utils.py
4
1073
from typing import Optional, Tuple import sys import re import subprocess import asyncio def get_bpftrace_version(bpftrace_path: str) -> Optional[Tuple]: version_str = subprocess.check_output([bpftrace_path, '--version'], encoding='utf8').strip() version_str = version_str[version_str.find(' ')+1:] # remove '...
lgpl-2.1
-5,472,162,329,189,407,000
36
100
0.67288
false
baskoopmans/djcommon
djcommon/fields.py
1
6036
# encoding: utf-8 import hashlib from django import forms from django.db import models from django.db.models.fields import CharField from django.utils.text import capfirst class HashField(models.CharField): description = ('HashField is related to some other field in a model and' 'stores its ...
bsd-3-clause
1,045,625,181,640,980,900
37.45098
220
0.633863
false
linovia/django-rest-framework
tests/test_model_serializer.py
1
43162
""" The `ModelSerializer` and `HyperlinkedModelSerializer` classes are essentially shortcuts for automatically creating serializers based on a given model class. These tests deal with ensuring that we correctly map the model fields onto an appropriate set of serializer fields for each case. """ from __future__ import ...
bsd-2-clause
-1,534,192,570,116,637,400
37.028194
208
0.60639
false
ilastikdev/ilastik
ilastik/applets/dataSelection/dataSelectionSerializer.py
1
25923
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mo...
gpl-3.0
-757,115,857,973,133,200
47.273743
179
0.624735
false
hguemar/cinder
cinder/volume/drivers/ibm/gpfs.py
1
42616
# Copyright IBM Corp. 2013 All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
3,323,055,027,669,285,400
42.003027
79
0.568871
false
aestheticblasphemy/aestheticBlasphemy
pl_messages/migrations/0001_initial.py
1
4096
# -*- coding: utf-8 -*- # Generated by Django 1.9.8 on 2016-07-24 12:02 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_US...
gpl-3.0
9,212,579,249,829,937,000
47.188235
204
0.593262
false
yeleman/uninond
uninond/models/FloodEvents.py
1
9551
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu from __future__ import (unicode_literals, absolute_import, division, print_function) import logging import datetime from py3compat import implements_to_string from django.utils.translation import ugettext_lazy as _ f...
mit
2,973,950,030,518,471,000
32.731449
77
0.586214
false
apple/llvm-project
lldb/test/API/commands/trace/TestTraceStartStop.py
4
6010
import lldb from intelpt_testcase import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil from lldbsuite.test.decorators import * class TestTraceStartStop(TraceIntelPTTestCaseBase): mydir = TestBase.compute_mydir(__file__) def expectGenericHelpMessageForStartCommand(self): ...
apache-2.0
146,466,650,201,890,000
38.539474
108
0.627953
false
radipiz/YN-Recorder
ynrecord.py
1
3429
#!/usr/bin/env python3 import argparse import logging import os from lib import yn def main(): args = parse_args() if yn.URLBASE in args.start: # record more proceed_url(args.start) else: proceed_user(args.start, live_yes=args.yes, only_live=args.onlylive) def proceed_user(usern...
gpl-2.0
6,833,135,902,877,618,000
32.291262
111
0.585885
false
derekjchow/models
official/resnet/keras/keras_cifar_main.py
1
7184
# 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
5,303,830,818,829,422,000
33.373206
80
0.675111
false
dc3-plaso/plaso
tests/cli/tools.py
1
10156
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the CLI tools classes.""" import argparse import io import locale import sys import unittest from plaso.cli import tools from plaso.lib import errors from tests.cli import test_lib class CLIToolTest(test_lib.CLIToolTestCase): """Tests for the CLI tool base c...
apache-2.0
8,934,106,570,855,689,000
32.278689
79
0.65468
false
afrancis13/bungiesearch
setup.py
1
1554
# -*- coding: utf-8 -*- import sys from os.path import join, dirname from setuptools import setup, find_packages VERSION = (1, 1, 0) __version__ = VERSION __versionstr__ = '.'.join(map(str, VERSION)) long_description = 'Should have been loaded from README.md.' with open(join(dirname(__file__), 'README.md')) as f: ...
bsd-3-clause
7,384,480,522,323,339,000
28.884615
107
0.656371
false
mani2012/SplitQsub
splitqsub/split_qsub.py
1
3629
#!/usr/bin/env python # Author: Solaiappan Manimaran # Splits a commands file into multiple qsub files #usage information: split_qsub.py -h # SplitQsub 1.0 - Python program that given a set of commands in one file, # will split it in to multiple qsub files, # which can then be submitted to...
gpl-2.0
130,487,131,977,291,840
41.722892
106
0.627997
false
andychase/reparse
doc/source/conf.py
1
7993
# -*- coding: utf-8 -*- # # Reparse documentation build configuration file, created by # sphinx-quickstart on Mon Aug 12 16:05:44 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,931,141,451,214,182,000
30.972
80
0.701614
false
Tayamarn/socorro
socorro/scripts/__init__.py
1
2322
import argparse class WrappedTextHelpFormatter(argparse.HelpFormatter): """Subclass that wraps description and epilog text taking paragraphs into account""" def _fill_text(self, text, width, indent): """Wraps text like HelpFormatter, but doesn't squash lines This makes it easier to do lists ...
mpl-2.0
8,297,856,716,942,653,000
31.25
96
0.575797
false
GeosoftInc/gxpy
geosoft/gxapi/GXDBWRITE.py
1
11130
### extends 'class_empty.py' ### block ClassImports # NOTICE: Do not edit anything here, it is generated code from . import gxapi_cy from geosoft.gxapi import GXContext, float_ref, int_ref, str_ref from .GXDB import GXDB from .GXVA import GXVA from .GXVV import GXVV ### endblock ClassImports ### block Header # NOTIC...
bsd-2-clause
-841,323,727,959,550,500
29.49589
200
0.609164
false
Laisky/ramjet
ramjet/utils/__init__.py
1
3895
import binascii import datetime import logging import multiprocessing import os import pickle import random import re import string import sys from logging.handlers import RotatingFileHandler as RFHandler import pytz from kipp.options import opt from kipp.utils import setup_logger from ramjet.engines import thread_exe...
mit
5,981,073,280,190,442,000
24
85
0.611613
false
ThinkboxSoftware/Deadline
Custom/events/Zabbix/API/requests/packages/urllib3/util/ssl_.py
1
4364
from binascii import hexlify, unhexlify from hashlib import md5, sha1 from ..exceptions import SSLError try: # Test for SSL features SSLContext = None HAS_SNI = False import ssl from ssl import wrap_socket, CERT_NONE, PROTOCOL_SSLv23 from ssl import SSLContext # Modern SSL? fr...
apache-2.0
-2,507,825,945,572,875,300
31.060606
79
0.6022
false
mr-c/tools-iuc
data_managers/data_manager_snpeff/data_manager/data_manager_snpEff_databases.py
1
3095
#!/usr/bin/env python import sys import os import re import tempfile import subprocess import fileinput import shutil import optparse import urllib2 from ftplib import FTP import tarfile from galaxy.util.json import from_json_string, to_json_string def stop_err(msg): sys.stderr.write(msg) sys.exit(1) def fe...
mit
-6,898,282,714,550,339,000
36.743902
133
0.637157
false
selective-inference/selective-inference
doc/learning_examples/HIV/stability_CV_6000.py
3
3166
import functools import numpy as np from scipy.stats import norm as ndist import regreg.api as rr # load in the X matrix from selection.tests.instance import HIV_NRTI X_full = HIV_NRTI(datafile="NRTI_DATA.txt", standardize=False)[0] from selection.learning.utils import full_model_inference, liu_inference, pivot_pl...
bsd-3-clause
-8,777,848,729,121,220,000
29.737864
107
0.559381
false
kavi112/google-python-exercises
hello.py
1
1071
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """A tiny Python program to check that Python is working. Try running this program from t...
apache-2.0
-6,329,542,316,178,690,000
25.775
68
0.696545
false
schapman1974/tinymongo
setup.py
1
2500
import io import os from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand def read(*names, **kwargs): """Read a file.""" return io.open( os.path.join(os.path.dirname(__file__), *names), encoding=kwargs.get('encoding', 'utf8') ).read() def pars...
mit
2,156,057,822,265,391,400
29.120482
80
0.606
false
pakesson/rednotebook
rednotebook/gui/clouds.py
1
8443
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # Copyright (c) 2009 Jendrik Seipp # # RedNotebook 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 vers...
gpl-2.0
-1,094,813,892,853,056,100
34.179167
102
0.607485
false
jack-song/evolving-life
mainsite/settings.py
1
2624
""" Django settings for mainsite project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
mit
3,193,474,188,064,455,000
23.764151
73
0.72561
false