repo_name
stringlengths
5
92
path
stringlengths
4
221
copies
stringclasses
19 values
size
stringlengths
4
6
content
stringlengths
766
896k
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
32
997
alpha_frac
float64
0.25
0.96
autogenerated
bool
1 class
ratio
float64
1.5
13.6
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
ios-xr/iosxr-ansible
local/library/iosxr_nc11_send.py
1
4463
#!/usr/bin/python #------------------------------------------------------------------------------ # # Copyright (C) 2016 Cisco Systems, Inc. # # 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 Fou...
gpl-3.0
6,026,454,946,953,059,000
26.89375
95
0.611248
false
3.719167
false
false
false
Fyzel/weather-data-flaskapi
database/__init__.py
1
5398
""" @author: Fyzel@users.noreply.github.com @copyright: 2017 Englesh.org. All rights reserved. @license: https://github.com/Fyzel/weather-data-flaskapi/blob/master/LICENSE @contact: Fyzel@users.noreply.github.com @deffield updated: 2017-06-14 """ from flask_sqlalchemy import SQLAlchemy db = SQLAlchem...
apache-2.0
7,651,208,777,404,038,000
29.497175
126
0.608744
false
4.363783
false
false
false
ladinu/CS350-project
TestEfficency.py
1
2211
import time from geometry.utils import getNRandomPoints, getCircle import BruteForceHull, QuickHull from math import log global fcount fcount = 2 def outStr(a, b): return "%i,%f" % (a, b) def getBruteForceExecTime(points): t1 = time.time() BruteForceHull.computeHull(points) t2 = time.time() return t2-t1...
mit
5,516,835,767,643,267,000
30.585714
114
0.679331
false
2.955882
false
false
false
rdo-management/tuskar
tuskar/api/renderers.py
1
2382
# 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
3,922,971,986,940,133,400
32.549296
78
0.625525
false
4.528517
false
false
false
xibalbanus/PIA2
osiris_phylogenetics/phylogenies/phytab_raxml_pars.py
1
5675
#!/usr/bin/env python ## This tool runs RAxML's parsimony inference on a phytab input. ## If N = # of nodes requested in job runner, then N RAxML jobs will run simultaneously. Make sure that the ## number of processors ('ppn') in the job runner matches the 'numthreads' commandline argument -T. ## ## Usage: ./ph...
mit
-6,460,458,334,718,591,000
28.868421
160
0.551366
false
3.369952
false
false
false
lehinevych/cfme_tests
cfme/tests/test_rest.py
1
4051
# -*- coding: utf-8 -*- """This module contains REST API specific tests.""" import fauxfactory import pytest from cfme import Credential from cfme.configure.access_control import User, Group from cfme.login import login from cfme.rest import vm as _vm from utils.providers import setup_a_provider as _setup_a_provider f...
gpl-2.0
6,124,307,325,183,130,000
34.535088
99
0.680573
false
3.547285
true
false
false
scality/manila
manila/scheduler/filters/capabilities.py
1
3548
# Copyright (c) 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...
apache-2.0
9,135,078,643,539,611,000
39.318182
78
0.580045
false
4.775236
false
false
false
antiface/audiolazy
examples/pi.py
1
2141
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of AudioLazy, the signal processing Python package. # Copyright (C) 2012-2014 Danilo de Jesus da Silva Bellini # # AudioLazy is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # ...
gpl-3.0
-3,385,673,187,416,630,000
31.439394
74
0.670715
false
3.032578
false
false
false
achernya/byobu
usr/lib/byobu/include/select-session.py
1
6798
#!/usr/bin/python3 # # select-session.py # Copyright (C) 2010 Canonical Ltd. # Copyright (C) 2012-2014 Dustin Kirkland <kirkland@byobu.org> # # Authors: Dustin Kirkland <kirkland@byobu.org> # Ryan C. Thompson <rct@thompsonclan.org> # # This program is free software: you can redistribute it an...
gpl-3.0
-5,511,983,227,267,064,000
31.371429
338
0.649603
false
2.963383
false
false
false
p-l-/miasm
miasm2/expression/simplifications_common.py
1
19247
# ----------------------------- # # Common simplifications passes # # ----------------------------- # from miasm2.expression.expression import * from miasm2.expression.expression_helper import * def simp_cst_propagation(e_s, e): """This passe includes: - Constant folding - Common logical identities ...
gpl-2.0
-3,524,819,148,954,221,000
32.473043
88
0.470203
false
3.070187
false
false
false
kpeckett/willie-trello
willie-trello.py
1
1429
# -*- coding: utf-8 -*- """ willie-trello.py - Enhanced Trello links Licensed under the GNU GPLv3 Copyright (C) 2015 Kieran Peckett """ import willie.module import requests import time import re def setup(bot): regex = re.compile(r".*\bhttps?://trello\.com/c/(\w+).*") if not bot.memory.contains('url_callbacks'): b...
gpl-3.0
-7,577,456,725,166,876,000
30.021739
91
0.644008
false
2.770874
false
false
false
jangxyz/ecogwiki-client
setup.py
1
1523
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Ecogwiki OAuth client `ecog` is a python client that talks with [ecogwiki](http://www.ecogwiki.com/). It is configurable to talk with any other ecogwiki hosts. See https://github.com/jangxyz/ecogwiki-client for details. """ from setuptools import setup...
mit
8,209,925,821,725,269,000
26.196429
141
0.61392
false
3.945596
false
false
false
nuagenetworks/vspk-python
vspk/v5_0/nupolicydecision.py
1
11345
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
bsd-3-clause
-3,218,528,264,936,086,000
28.857895
175
0.58052
false
4.570911
false
false
false
AlCap23/Thesis
Python/Experiments/MIMO/titostudy_extern_PTN_H05_TICONST.py
1
11238
""" Python programm to study the robustness of TITO systems. Identitfies the system, computes the controller and analysis the controller using the state space - transfer function relation. Computes the singular values. Use this script from the terminal / console with ./python FILENAME.py --file_storage = FOLDERNAME t...
gpl-3.0
4,852,432,078,727,296,000
33.158055
133
0.555348
false
3.284044
false
false
false
AlexPayment/github-sms-notifier
github_sms_notifier/github_sms_notifier.py
1
7472
import json import re from flask import Flask, flash, make_response from flask.globals import request from flask.templating import render_template import requests from twilio.rest import TwilioRestClient PHONE_NUMBER_PATTERN = re.compile("^\\+?\\d{10,14}$") PULL_REQUEST_OPENED = 'prOpened' PULL_REQUEST_CLOSED = 'prCl...
mit
1,487,203,907,290,717,700
36.928934
119
0.633565
false
3.816139
false
false
false
unixnut/cpylmnl
cpylmnl/linux/genetlinkh.py
1
1734
# -*- coding: utf-8 -*- import ctypes from cpylmnl.nlstruct import NLStructure import cpylmnl.linux.netlinkh as netlink GENL_NAMSIZ = 16 # length of family name GENL_MIN_ID = netlink.NLMSG_MIN_TYPE GENL_MAX_ID = 1023 class Genlmsghdr(NLStructure): """struct genlmsghdr """ _fields_ = [("cmd", ctypes....
lgpl-2.1
-5,343,383,620,565,762,000
23.083333
64
0.672434
false
2.162095
false
false
false
sagiss/txrm2nexus
txm2nexuslib/xrmnex.py
1
44684
#!/usr/bin/python """ (C) Copyright 2016-2017 Carlos Falcon, Zbigniew Reszela, Marc Rosanes The program is distributed under the terms of the GNU General Public License (or the Lesser GPL). This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as pub...
gpl-3.0
-3,555,758,332,532,904,400
37.720971
143
0.567362
false
3.815884
false
false
false
Teknologforeningen/tf-info
apps/reittiopas/views.py
1
2286
from django.shortcuts import render_to_response from django.template import RequestContext from django.http import HttpResponse from django.conf import settings from operator import itemgetter from datetime import datetime, timedelta import json import urllib2 import re # Get API user and token from settings user = se...
bsd-3-clause
-5,200,406,112,815,346,000
36.491803
131
0.631234
false
3.914384
false
false
false
quantumlib/Cirq
cirq-core/cirq/ops/diagonal_gate.py
1
8669
# Copyright 2021 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
8,599,835,669,843,185,000
40.442211
100
0.5927
false
3.437682
false
false
false
chromium/chromium
third_party/android_deps/libs/com_google_android_gms_play_services_basement/3pp/fetch.py
6
1389
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
bsd-3-clause
-1,260,905,872,956,646,100
23.803571
125
0.647948
false
3.222738
false
false
false
splunk/splunk-webframework
server/splunkdj/testlib.py
1
1436
# # # 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 und...
apache-2.0
-6,819,429,677,982,128,000
29.553191
75
0.667131
false
3.891599
false
false
false
lynxis/libavg
src/python/app/app.py
1
12797
#!/usr/bin/env python # -*- coding: utf-8 -*- # libavg - Media Playback Engine. # Copyright (C) 2003-2013 Ulrich von Zadow # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # vers...
lgpl-2.1
-4,420,832,061,049,459,700
32.238961
90
0.608815
false
4.057387
false
false
false
lochiiconnectivity/exabgp
lib/exabgp/protocol/ip/fragment.py
1
1401
# encoding: utf-8 """ fragment.py Created by Thomas Mangin on 2010-02-04. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ # =================================================================== Fragment # Uses bitmask operand format defined above. # 0 1 2 3 4 5 6 7 # +---+---+---+---+---...
bsd-3-clause
4,092,678,265,313,435,600
30.133333
78
0.58601
false
3.120267
false
false
false
tulip-control/tulip-control
contrib/aut2simulink.py
1
14363
# Copyright (c) 2012 by California Institute of Technology # 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...
bsd-3-clause
-22,288,746,802,600,890
34.289926
115
0.53227
false
3.765863
false
false
false
Data2Semantics/prov-o-matic
src/provomatic/extension.py
1
2174
from watcher import NotebookWatcher, CodeVisitor from wrapper import prov, replace from builder import get_dataset, save_prov, clear_dataset, add_prov, revive, list_entities, list_activities from viewer import Viewer from ducktape import Ducktape import logging import os log = logging.getLogger('provomatic.extension...
mit
5,969,903,609,708,959,000
27.233766
107
0.674793
false
3.45628
false
false
false
Linktime/Aike
app/userApp/forms.py
1
2544
#-*- coding:utf-8 -*- from django import forms from django.contrib.auth.models import User from app.userApp.models import AikeUser, MessageBoard class UserRegisterForm(forms.ModelForm): username = forms.EmailField(label=u"*用户名(邮箱)") password = forms.CharField(widget=forms.PasswordInput,label=u"*密码") ...
apache-2.0
-8,952,682,153,699,489,000
50.634146
109
0.682576
false
2.411173
false
false
false
mfherbst/bohrium
test/python/tests/test_reorganization.py
4
4226
import util import functools import operator class test_gather: def init(self): for ary, shape in util.gen_random_arrays("R", 3, max_dim=50, dtype="np.float64"): nelem = functools.reduce(operator.mul, shape) if nelem == 0: continue cmd = "R = bh.random.R...
lgpl-3.0
6,225,781,323,098,376,000
33.647541
90
0.514671
false
3.230887
true
false
false
mupif/mupif
mupif/examples/Example09-operatorEmail/Example09.py
1
6155
#!/usr/bin/env python3 import sys sys.path.extend(['..', '../../..']) from mupif import * import jsonpickle import time # for sleep import logging log = logging.getLogger() import mupif.Physics.PhysicalQuantities as PQ # # Expected response from operator: E-mail with "CSJ01" (workflow + jobID) # in the subject line, ...
lgpl-3.0
-1,701,757,126,261,883,600
40.308725
221
0.543461
false
4.192779
false
false
false
armijnhemel/cleanup-for-discogs
monthly/compare-not-accepted.py
1
2940
#! /usr/bin/python3 ## Hackish example script to compare some results output by process-discogs-chunks.py ## ## Licensed under the terms of the General Public License version 3 ## ## SPDX-License-Identifier: GPL-3.0 ## ## Copyright 2017-2019 - Armijn Hemel import os import sys import argparse def main(): parser ...
gpl-3.0
4,643,265,375,250,114,000
30.612903
90
0.620748
false
3.616236
false
false
false
CrafterLuc2/Python
Scenery/main.py
1
2193
# Importation of Pygame import pygame from car import Car import os folder = os.path.dirname(os.path.realpath(__file__)) pygame.init() pygame.mixer.init() # Colouration BLACK = ( 0, 0, 0) WHITE = ( 255, 255, 255) GREEN = ( 0, 255, 0) RED = ( 255, 0, 0) BLUE = (0, 0, 255) SKYBLUE = (135,206,235) GRASSG...
apache-2.0
8,310,543,791,064,626,000
24.421687
66
0.611035
false
2.727612
false
false
false
daphnei/nn_chatbot
remove_proper_names/proper_names.py
1
1587
import urllib2 import csv from pygtrie import Trie from pygtrie import PrefixSet import pickle import os def _create_trie(): tsvs = ["https://www2.census.gov/topics/genealogy/1990surnames/dist.female.first", "https://www2.census.gov/topics/genealogy/1990surnames/dist.male.first"] # "https://www2.census.gov/topi...
mit
2,190,983,337,128,533,500
29.519231
246
0.655955
false
2.712821
false
false
false
Erotemic/ibeis
ibeis/web/futures_utils/process_actor.py
1
11765
""" Implements ProcessActor """ from concurrent.futures import _base from concurrent.futures import process from multiprocessing.connection import wait from ibeis.web.futures_utils import _base_actor import os import queue import weakref import threading import multiprocessing # Most of this code is duplicated from t...
apache-2.0
-5,419,728,240,105,604,000
37.198052
87
0.569571
false
4.586745
false
false
false
andrewyoung1991/supriya
supriya/tools/requesttools/BufferGetRequest.py
1
2109
# -*- encoding: utf-8 -*- from supriya.tools import osctools from supriya.tools.requesttools.Request import Request class BufferGetRequest(Request): r'''A /b_get request. :: >>> from supriya.tools import requesttools >>> request = requesttools.BufferGetRequest( ... buffer_id=23, ...
mit
8,440,430,544,276,011,000
21.688172
64
0.515884
false
4.119141
false
false
false
lucidfrontier45/RethinkPool
rethinkpool/__init__.py
1
2195
from __future__ import absolute_import from logging import getLogger import rethinkdb as r from future.builtins import range from future.moves.queue import Queue logger = getLogger("RethinkPool") class ConnectionResource(object): def __init__(self, queue, conn, **kwds): self._queue = queue if ...
apache-2.0
2,460,425,041,709,897,700
26.4375
78
0.596355
false
4.173004
false
false
false
dynamikdev/transportutils
transportutils/driver.py
1
2790
""" Tools for calculate hours/periods of a Truck's driver Actually only valable in France """ from datetime import timedelta from dateutil import rrule import pytz # GMT = pytz.timezone('UTC') # fr = pytz.timezone('Europe/Paris') ENDNIGHT = 6 STARTNIGHT = 21 class DriverDaysDates(object): """ """ def _...
gpl-2.0
-3,237,510,786,302,446,000
33.02439
108
0.567384
false
3.586118
false
false
false
Stefan-Korner/SpacePyLibrary
CCSDS/CLTU.py
1
6692
#****************************************************************************** # (C) 2018, Stefan Korner, Austria * # * # The Space Python Library is free software; you can redistribute it and/or * ...
mit
-4,633,000,611,466,024,000
39.313253
83
0.59997
false
3.405598
false
false
false
chandrikas/sm
drivers/blktap2.py
1
90416
#!/usr/bin/env python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # This program is distributed in the hope that it will ...
lgpl-2.1
-5,769,786,515,209,374,000
30.340035
129
0.533656
false
3.767804
true
false
false
intel-ctrlsys/actsys
actsys/control/commands/bios/bios_version.py
1
1059
# -*- coding: utf-8 -*- # # Copyright (c) 2017 Intel Corp. # """ Get BIOS version """ from ...commands.command import CommandResult from ...plugin import DeclarePlugin from .bios import BiosCommand @DeclarePlugin('bios_version', 100) class BiosVersionCommand(BiosCommand): """Bios Get Version Command""" def ...
apache-2.0
-7,822,982,988,380,406,000
31.090909
91
0.623229
false
4.120623
false
false
false
RedHatQE/cfme_tests
cfme/services/service_catalogs/__init__.py
1
3979
import importscan import sentaku from widgetastic.utils import deflatten_dict from widgetastic.utils import Parameter from widgetastic.utils import ParametrizedLocator from widgetastic.utils import ParametrizedString from widgetastic.widget import ParametrizedView from widgetastic.widget import Select from widgetastic....
gpl-2.0
-2,037,682,114,986,794,200
37.259615
100
0.656195
false
4.179622
false
false
false
WardBenjamin/FRCBuild
setup.py
1
1637
""" CLI Tool for building FIRST Robotics (FRC) C++ projects w/ WPILib """ from setuptools import find_packages, setup dependencies = ['click'] setup( name='frcbuild', version='0.1.0', url='https://github.com/WardBenjamin/frc-build', license='BSD', author='Benjamin Ward', author_email='ward.pro...
gpl-2.0
2,587,404,946,052,572,700
33.104167
84
0.598045
false
4.03202
false
false
false
phillc/django-filebrowser-fork
views.py
1
20390
# coding: utf-8 from django.shortcuts import render_to_response from django.template import RequestContext as Context from django.http import HttpResponseRedirect from django.contrib.admin.views.decorators import staff_member_required from django.views.decorators.cache import never_cache from django.utils.translation ...
bsd-3-clause
-4,157,568,425,170,416,600
43.714912
309
0.582688
false
3.776625
false
false
false
Dev-Cloud-Platform/Dev-Cloud
dev_cloud/cc1/src/clm/utils/tokens.py
1
2164
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
apache-2.0
-4,509,081,930,120,977,400
27.84
78
0.626445
false
3.939891
false
false
false
bioconda/bioconda-utils
bioconda_utils/lint/check_noarch.py
1
4912
"""Use of ``noarch`` and ``skip`` When to use ``noarch`` and when to use ``skip`` or pin the interpreter is non-intuitive and idiosynractic due to ``conda`` legacy behavior. These checks aim at getting the right settings. """ import re from . import LintCheck, ERROR, WARNING, INFO # Noarch or not checks: # # - Py...
mit
7,150,494,295,863,050,000
30.487179
70
0.617875
false
3.787201
false
false
false
normcyr/sopel-modules
strava.py
1
1773
#!/usr/bin/python3 ''' strava.py - strava activity module author: Norm1 <normand.cyr@gmail.com> found here: https://github.com/normcyr/sopel-modules ''' import requests from bs4 import BeautifulSoup from sopel.module import commands, example def fetch_new_activity(url): r = requests.get(url) if r.status_co...
gpl-3.0
-6,875,788,661,379,818,000
29.568966
121
0.64467
false
3.271218
false
false
false
andrewyoung1991/supriya
supriya/tools/ugentools/Lag3UD.py
1
4787
# -*- encoding: utf-8 -*- from supriya.tools.synthdeftools.CalculationRate import CalculationRate from supriya.tools.ugentools.Filter import Filter class Lag3UD(Filter): r'''An up/down exponential lag generator. :: >>> source = ugentools.In.ar(bus=0) >>> lag_3_ud = ugentools.Lag3UD.ar( ...
mit
4,332,414,997,754,665,500
22.820896
71
0.448715
false
3.545926
false
false
false
rwg0/ironlab
ILabPythonLib/ironplot/ironplot_mscharts.py
1
1682
from ironplot_windows import * import clr import System import System.Windows.Controls from System.Windows.Controls import * clr.AddReferenceByPartialName("System.Windows.Forms.DataVisualization") clr.AddReferenceByPartialName("System.Drawing") clr.AddReferenceToFile("IronPlot.dll") import System.Windows.Forms...
lgpl-3.0
-5,491,246,122,984,367,000
31.68
96
0.708086
false
3.571125
false
false
false
DaveBerkeley/lasercut
laser/gears.py
1
3508
#!/usr/bin/python import sys import math from laser import Polygon, Circle, Collection, Config from laser import radians, rotate_2d from render import DXF as dxf # Involute gears, see : # http://www.cartertools.com/involute.html # # def circle_intersect(v, r): # see http://mathworld.wolfram.com/Circle-LineInte...
gpl-2.0
-6,214,801,681,637,845,000
22.702703
77
0.498575
false
3.029361
false
false
false
spjmurray/openstack-sentinel
sentinel/conf/opts.py
1
1449
# Copyright 2017 DataCentred Ltd # # 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 ag...
apache-2.0
1,883,553,916,626,965,200
25.345455
78
0.661836
false
3.9375
false
false
false
zestrada/nova-cs498cc
nova/exception.py
1
34128
# 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
1,228,007,779,956,419,300
27.251656
79
0.67241
false
4.234243
false
false
false
rishig/zulip
zproject/backends.py
1
46330
# Documentation for Zulip's authentication backends is split across a few places: # # * https://zulip.readthedocs.io/en/latest/production/authentication-methods.html and # zproject/prod_settings_template.py have user-level configuration documentation. # * https://zulip.readthedocs.io/en/latest/subsystems/auth.html ha...
apache-2.0
-2,213,531,157,359,025,700
46.083333
118
0.651349
false
4.183673
false
false
false
NitishT/minio-py
tests/unit/minio_mocks.py
1
2552
# -*- coding: utf-8 -*- # Minio Python Library for Amazon S3 Compatible Cloud Storage, # (C) 2015,2016 Minio, 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.or...
apache-2.0
-269,605,990,221,122,240
32.142857
80
0.668887
false
3.981279
false
false
false
sternshus/arelle2.7
svr-2.7/arelle/plugin/cdrFormula/cdrContext.py
1
19169
''' cdrContext provides the validation and execution context for CDR Formula language expressions. (c) Copyright 2013 Mark V Systems Limited, California US, All rights reserved. ''' from collections import OrderedDict from .cdrParser import astNode from arelle.ModelFormulaObject import aspectModels, Aspect, aspectS...
apache-2.0
-6,810,582,852,387,637,000
48.5323
156
0.608952
false
4.49449
false
false
false
zerosum0x0/koadic
modules/implant/inject/shellcode_dynwrapx.py
1
2827
import core.implant import core.job import string import uuid class DynWrapXShellcodeJob(core.job.Job): def create(self): self.fork32Bit = True self.options.set("DLLUUID", uuid.uuid4().hex) self.options.set("MANIFESTUUID", uuid.uuid4().hex) self.options.set("SHELLCODEDECCSV", self.c...
apache-2.0
7,122,812,421,590,287,000
37.202703
147
0.655111
false
3.619718
false
false
false
0mu-Project/Gensokyo-Server-Platform
Yakumo/Yakumo-Instance/muMDAU_app/docker.py
1
2456
# -*- coding: utf-8 -*- # muMDAU_app main / first page from muMDAU_app import app, socketio from threading import Thread from flask import render_template, url_for, redirect, session, request from docker import Client pullthread = None # index page main route page @app.route('/project') def pview(): return rende...
gpl-3.0
3,742,627,619,181,106,700
35.878788
208
0.628595
false
3.302578
false
false
false
bast/gitink
gitink/color.py
1
1192
def whiter_shade_of_pale(hex_color): ''' This function pales the color a bit for the interior of the boxes. ''' pale_shift = 70 # separate the red, green, blue parts r_hex = hex_color[1:3] g_hex = hex_color[3:5] b_hex = hex_color[5:7] # convert from hex to dec r_dec = int(r...
mpl-2.0
8,822,537,647,600,122,000
24.361702
61
0.551174
false
2.865385
false
false
false
analogue/mythbox
resources/src/mythbox/mythtv/protocol.py
1
13858
# # MythBox for XBMC - http://mythbox.googlecode.com # Copyright (C) 2012 analogue@yahoo.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 2 # of the License, or (at yo...
gpl-2.0
-5,766,141,552,974,468,000
26.119374
140
0.571655
false
3.894885
false
false
false
jffm/pyanalyzer
core/rule.py
1
2373
# Copyright (c) 2008-2009 Junior (Frederic) FLEURIAL MONFILS # # This file is part of PyAnalyzer. # # PyAnalyzer 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 # (a...
gpl-3.0
-3,664,105,495,476,861,400
33.41791
80
0.626633
false
3.50517
false
false
false
leppa/home-assistant
homeassistant/components/xiaomi_miio/vacuum.py
1
15770
"""Support for the Xiaomi vacuum cleaner robot.""" import asyncio from functools import partial import logging from miio import DeviceException, Vacuum # pylint: disable=import-error import voluptuous as vol from homeassistant.components.vacuum import ( ATTR_CLEANED_AREA, PLATFORM_SCHEMA, STATE_CLEANING,...
apache-2.0
5,748,690,026,502,680,000
32.2
88
0.58104
false
3.694939
false
false
false
themattrix/bashup
bashup/test/test_bashup.py
1
6069
import subprocess import os import itertools import textwrap import pathlib2 as pathlib import pytest import temporary from .. import test # Compile some bashup and run it against multiple versions of bash. The versions are expected to be found in # $BASH_VERSIONS_DIR. If none are found, or the environment variable...
mit
6,559,511,140,477,054,000
27.097222
114
0.526116
false
3.680412
true
false
false
vpelletier/neoppod
neo/admin/handler.py
1
5095
# # Copyright (C) 2009-2016 Nexedi SA # # 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 distributed...
gpl-2.0
7,400,558,522,298,591,000
37.308271
78
0.671443
false
3.901225
false
false
false
Maslor/freshman-berries
FreshmanClientV8.py
1
1046
# -*- encoding: latin1 -*- #FRESHMAN BERRIES #Cliente #Version: 8.1 #Author: NEETI import socket def enviar( mensagem ): sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) servidor=('neetiproj.tagus.ist.utl.pt', 4000) sock.connect( servidor ) mensagens = [] try: ...
gpl-2.0
-5,482,627,804,460,246,000
21.288889
60
0.441683
false
3.619377
false
false
false
prasannav7/ggrc-core
test/integration/ggrc_workflows/notifications/test_recurring_cycles.py
1
3523
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: miha@reciprocitylabs.com # Maintained By: miha@reciprocitylabs.com from integration.ggrc import TestCase from freezegun import freeze_time from mo...
apache-2.0
-6,311,678,311,958,132,000
29.903509
78
0.642066
false
3.587576
true
false
false
christopherjbly/tasks-indicator
src/googletasksapi.py
1
18600
#!/usr/bin/python # -*- coding: iso-8859-1 -*- # # # googletasksapi.py # # Copyright (C) 2011 Lorenzo Carbonell # lorenzo.carbonell.cerezo@gmail.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 Foundat...
gpl-3.0
-4,239,862,703,708,010,500
30.260504
182
0.671075
false
2.894942
false
false
false
MKLab-ITI/DanceAnno
DanceAnno_Loader.py
1
20273
# This class loads the data # 1. Skeleton (.skel or .mat) # 2. Video (a folder with frames XXXXXX_[index].png or .jpg or .jpeg # if you have actual video you can use ffmpeg to split it. # 3. Choreography (.svl) # 4. Music beats (.txt) import os import DanceAnno_Application __author__ = 'DIMITRIOS' from tkinter ...
apache-2.0
6,038,724,737,106,642,000
43.656388
157
0.565432
false
3.611794
true
false
false
wantee/pocolm
scripts/validate_int_dir.py
2
5948
#!/usr/bin/env python # we're using python 3.x style print but want it to work in python 2.x, from __future__ import print_function import os import argparse import sys import subprocess parser = argparse.ArgumentParser(description="Validates directory containing integerized " "text d...
apache-2.0
-8,972,085,041,014,795,000
38.390728
105
0.583053
false
3.352875
false
false
false
haphaeu/yoshimi
GumbleBootstrap/matrix.py
1
2495
''' matrix.py Basic operations with matrixes: - multiply - transpose - invert And a simple linear least squares solver, performing a linear fit between two vectors yi = a+b.xi Revision History rev Date Description 0.1 2013.02.13 first issue, basic insanity check Rafael Rossi RaRossi@external.technip....
lgpl-3.0
1,635,034,303,182,393,000
22.317757
74
0.550701
false
2.867816
false
false
false
ryanpetrello/cleaver
cleaver/backend/db/__init__.py
1
8256
from datetime import datetime from . import model from .session import session_for from cleaver.experiment import Experiment as CleaverExperiment from cleaver.backend import CleaverBackend def _sqlalchemy_installed(): try: import sqlalchemy except ImportError: # pragma: nocover raise Import...
bsd-3-clause
4,451,674,343,953,962,000
32.975309
79
0.562379
false
4.791642
false
false
false
stackforge/wsme
wsme/api.py
1
7477
import traceback import functools import inspect import logging import six import wsme.exc import wsme.types from wsme import utils log = logging.getLogger(__name__) def iswsmefunction(f): return hasattr(f, '_wsme_definition') def wrapfunc(f): @functools.wraps(f) def wrapper(*args, **kwargs): ...
mit
1,039,123,132,913,184,800
30.548523
79
0.604521
false
4.193494
false
false
false
session-id/pineapple-ai
policies.py
1
15317
from collections import defaultdict import math import numpy as np import random import feature_extractors import game as g import hand_optimizer class BasePolicy(object): ''' Base class for all policies. ''' def __init__(self, game, args=None): self.game = game # Must return the optimal action as det...
mit
-9,055,318,519,636,846,000
35.731415
116
0.65757
false
3.466953
false
false
false
Passtechsoft/TPEAlpGen
blender/release/scripts/modules/bpy_types.py
1
24184
# ##### 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
5,162,792,521,147,929,000
27.72209
78
0.556732
false
4.050243
false
false
false
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/music21/analysis/metrical.py
1
6733
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: metrical.py # Purpose: Tools for metrical analysis # # Authors: Christopher Ariza # Michael Scott Cuthbert # # Copyright: Copyright © 2009-2012 Michael Scott Cuthbert and t...
mit
3,405,661,291,353,366,000
30.457944
100
0.559863
false
3.638919
true
false
false
frutiger/pygit2
docs/conf.py
1
7971
# -*- coding: utf-8 -*- # # pygit2 documentation build configuration file, created by # sphinx-quickstart on Sun Jan 6 09:55:26 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 ...
gpl-2.0
-3,619,021,428,859,344,400
31.643443
121
0.702825
false
3.721963
true
false
false
AlienCowEatCake/ImageViewer
src/ThirdParty/Exiv2/exiv2-0.27.3-Source/tests/bugfixes/github/test_CVE_2018_11531.py
3
1094
# -*- coding: utf-8 -*- from system_tests import CaseMeta, path, check_no_ASAN_UBSAN_errors class TestCvePoC(metaclass=CaseMeta): """ Regression test for the bug described in: https://github.com/Exiv2/exiv2/issues/283 """ url = "https://github.com/Exiv2/exiv2/issues/283" cve_url = "https://cv...
gpl-3.0
534,201,225,946,510,660
34.290323
97
0.669104
false
3.180233
false
false
false
litecoinz-project/litecoinz
qa/rpc-tests/test_framework/script.py
2
23865
# # script.py # # This file is modified from python-bitcoinlib. # # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # """Scripts Functionality to build scripts, as well as SignatureHash(). """ from __future__ import absolute_i...
mit
-3,195,067,513,813,755,400
25.635045
146
0.566646
false
2.816594
false
false
false
mopidy/pyspotify
examples/shell.py
1
6169
#!/usr/bin/env python """ This is an example of a simple command line client for Spotify using pyspotify. You can run this file directly:: python shell.py Then run the ``help`` command on the ``spotify>`` prompt to view all available commands. """ from __future__ import print_function, unicode_literals import...
apache-2.0
3,352,281,336,376,357,000
28.516746
80
0.573999
false
3.9243
false
false
false
kevinlee12/oppia
core/controllers/admin_test.py
1
85129
# Copyright 2014 The Oppia 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 applicable ...
apache-2.0
-4,891,581,027,496,295,000
38.854401
114
0.606186
false
3.8909
true
false
false
Tust-Celitea/celitea_portal_ng
app/auth/forms.py
1
3777
import flask_wtf import wtforms from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo from ..models import User class LoginForm(flask_wtf.FlaskForm): email = wtforms.StringField('电子邮件地址', validators=[DataRequired(), Length(1, 64), Email()...
gpl-3.0
-548,536,487,658,854,460
45.814286
108
0.611535
false
2.812876
false
false
false
capitalone/cloud-custodian
tests/test_batch.py
1
2707
# Copyright 2018 Capital One Services, LLC # Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from .common import BaseTest class TestBatchComputeEnvironment(BaseTest): def test_batch_compute_update(self): session_factory = self.replay_flight_data("test_batch_compute_update") ...
apache-2.0
7,499,708,579,604,423,000
38.231884
88
0.58478
false
4.236307
true
false
false
HaprianVlad/TensorFlowProjects
LinearModels/dataHandler.py
1
5358
import tempfile import urllib.request import pandas as pd import os import tensorflow as tf # DATA LABELS LABEL_COLUMN = "label" CATEGORICAL_COLUMNS = ["workclass", "education", "marital_status", "occupation", "relationship", "race", "gender", "native_country"] CONTINUOUS_COLUMNS = ["age", "edu...
apache-2.0
1,279,183,477,228,595,000
35.44898
123
0.703434
false
3.091748
true
false
false
wger-project/wger
wger/exercises/api/serializers.py
1
4625
# -*- coding: utf-8 -*- # This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any ...
agpl-3.0
7,936,270,238,942,832,000
23.865591
97
0.588541
false
4.310345
false
false
false
josegonzalez/chef-solo-cup
chef_solo_cup/helpers.py
1
15230
# -*- coding: utf-8 -*- from __future__ import with_statement import base64 import collections import itertools import json import os import re import sys import unidecode import urllib2 from boto.ec2 import connect_to_region from boto.exception import EC2ResponseError import boto.ec2.autoscale from fabric.api impor...
mit
-8,145,522,986,752,087,000
30.273101
201
0.535259
false
3.862541
false
false
false
fishilico/shared
python/network/udp_multihome.py
1
7006
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- # Copyright (c) 2014 Nicolas Iooss # # 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...
mit
-7,359,975,875,040,569,000
42.246914
120
0.672566
false
3.51002
false
false
false
Durandaul/BounceBack_Script
prev_versions/bouncev1.py
1
2827
import imaplib import re import email as emlib import json import csv mail = imaplib.IMAP4_SSL('imap.gmail.com') regexMessage = b'Delivery to the following recipient failed permanently:\s{1,}.+\s' find_bounce_back_message = re.compile(regexMessage) regexEmail = b'.{1,}@.+' find_email = re.compile(regexEmail) def mu...
unlicense
-7,139,973,591,972,969,000
29.73913
92
0.585426
false
3.835821
false
false
false
analyst-collective/dbt
plugins/postgres/dbt/adapters/postgres/connections.py
1
5388
from contextlib import contextmanager import psycopg2 import dbt.exceptions from dbt.adapters.base import Credentials from dbt.adapters.sql import SQLConnectionManager from dbt.contracts.connection import AdapterResponse from dbt.logger import GLOBAL_LOGGER as logger from dbt.helper_types import Port from dataclasse...
apache-2.0
-9,168,342,729,262,479,000
31.654545
79
0.591128
false
4.573854
false
false
false
onia/pygobject
demos/gtk-demo/demos/Icon View/iconviewbasics.py
1
7312
#!/usr/bin/env python # -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2010 Red Hat, Inc., John (J5) Palmieri <johnp@redhat.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License a...
lgpl-2.1
-6,643,193,018,444,488,000
31.789238
79
0.58657
false
3.630586
false
false
false
henry-ngo/VIP
vip_hci/preproc/subsampling.py
1
4966
#! /usr/bin/env python """ Module with pixel and frame subsampling functions. """ from __future__ import division from __future__ import print_function __author__ = 'C. Gomez @ ULg' __all__ = ['cube_collapse', 'cube_subsample', 'cube_subsample_trimmean'] import numpy as np def cube_collapse(...
mit
-7,150,221,523,624,467,000
31.03871
126
0.517519
false
3.745098
false
false
false
Marto32/pyetherscan
tests/test_response.py
1
1328
""" Tests related to response objects. """ import unittest import requests from pyetherscan import client, response, error class FakeResponse(requests.Response): """Fake instance of a Response object""" def __init__(self, status_code, text): requests.Response.__init__(self) self.status_code...
mit
777,112,246,740,399,900
24.538462
63
0.655873
false
4.061162
true
false
false
DREAM-ODA-OS/tools
imgproc/img/geotiff.py
1
3410
#!/usr/bin/env python #------------------------------------------------------------------------------- # # GeoTIFF creation subroutine # # Author: Martin Paces <martin.paces@eox.at> # #------------------------------------------------------------------------------- # Copyright (C) 2016 EOX IT Services GmbH # # Permissio...
mit
48,940,018,558,685,450
33.795918
81
0.642522
false
3.82287
false
false
false
mathiasertl/django-xmpp-server-list
account/auth_urls.py
1
1456
# This file is part of django-xmpp-server-list # (https://github.com/mathiasertl/django-xmpp-server-list) # # django-xmpp-server-list 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 Lic...
gpl-3.0
-7,956,175,443,058,019,000
49.206897
109
0.752747
false
3.841689
false
false
false
rsmuc/health_monitoring_plugins
health_monitoring_plugins/trustedfilter.py
1
5728
# Copyright (C) 2017-2019 rsmuc <rsmuc@sec-dev.de> # This file is part of "Health Monitoring Plugins". # "Health Monitoring Plugins" 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
8,863,428,745,276,231,000
40.507246
122
0.615922
false
3.225225
false
false
false
OmnesRes/onco_lnc
mrna/cox/STAD/cox_regression.py
1
10031
## A script for finding every cox coefficient and pvalue for every mRNA in STAD Tier 3 data downloaded Jan. 5th, 2016 from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running fr...
mit
-539,384,491,624,888,770
32.888514
142
0.64181
false
3.101732
false
false
false
google/retrieval-qa-eval
nq_to_squad.py
1
5989
#!/usr/bin/python3 # Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
apache-2.0
-2,737,648,638,829,636,000
35.29697
79
0.625313
false
3.788109
false
false
false
TadLeonard/enumap
enumap.py
1
14184
import enum from collections import namedtuple, OrderedDict from itertools import zip_longest __version__ = "1.5.0" class EnumapMeta(enum.EnumMeta): """An EnumMeta for friendlier, more informative REPL behavior""" def _iter_fmt_parts(cls): names = cls.names() types = cls.types() fo...
mit
-2,633,654,742,041,224,000
37.02681
78
0.590031
false
4.061856
false
false
false
atodorov/anaconda
pyanaconda/ui/gui/spokes/lib/accordion.py
1
21359
# vim: set fileencoding=utf-8 # Mountpoint selector accordion and page classes # # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your o...
gpl-2.0
-7,701,931,762,083,401,000
37.894353
141
0.614527
false
4.024312
false
false
false
michaelnetbiz/mistt-solution
app/controllers/interviews.py
1
2627
from app import db from app.models.interviews import InterviewSevenDays, InterviewNinetyDays from flask import Blueprint, make_response, jsonify from flask_cors import cross_origin from flask_login import login_required # instantiate the module's blueprint interviews = Blueprint('interviews', __name__, template_folder...
mit
-7,827,549,883,789,478,000
32.679487
104
0.719833
false
3.086957
false
false
false
hobarrera/khal
khal/__init__.py
1
1725
# Copyright (c) 2013-2017 Christian Geier et al. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, ...
mit
2,818,969,302,320,337,000
45.621622
79
0.738551
false
4.049296
false
false
false
meng89/epubuilder
epubaker/metas/dcterms.py
1
2746
# coding=utf-8 """Dublin Core Metadata Initiative, see http://dublincore.org/documents/dcmi-terms/""" from epubaker.metas.attrs import Attrs, AltScript, Dir, FileAs, Id, Role, Lang from epubaker.xl import Element, URI_XML def always_true(*args, **kwargs): pass l = [ 'abstract', 'accessRights', 'accrualMeth...
mit
-3,042,853,000,001,800,700
23.300885
114
0.59177
false
3.288623
false
false
false
pygeo/pycmbs
pycmbs/icon.py
1
3243
# -*- coding: utf-8 -*- """ This file is part of pyCMBS. (c) 2012- Alexander Loew For COPYING and LICENSE details, please refer to the LICENSE file """ from pycmbs.data import Data import os from pycmbs.netcdf import * import numpy as np class Icon(Data): """ Main class for ICON data handling """ d...
mit
4,772,429,266,076,823,000
28.752294
74
0.547641
false
4.094697
false
false
false
paopao74cn/noworkflow
capture/noworkflow/now/models/history.py
1
5563
# Copyright (c) 2015 Universidade Federal Fluminense (UFF) # Copyright (c) 2015 Polytechnic Institute of New York University. # This file is part of noWorkflow. # Please, consult the license terms in the LICENSE file. from __future__ import (absolute_import, print_function, division, unicode_li...
mit
-6,656,497,510,584,656,000
32.926829
77
0.528132
false
4.544935
false
false
false
openstack/manila
releasenotes/source/conf.py
1
8885
# 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 the...
apache-2.0
3,138,875,757,549,318,700
32.152985
79
0.706697
false
3.824796
false
false
false