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
ralphhughes/TempLogger
DHT22.py
1
7329
#!/usr/bin/env python # 2014-07-11 DHT22.py import time import atexit import sys import pigpio class sensor: """ A class to read relative humidity and temperature from the DHT22 sensor. The sensor is also known as the AM2302. The sensor can be powered from the Pi 3V3 or the Pi 5V rail. Powering fr...
mit
-9,112,710,096,243,817,000
25.363309
80
0.541957
false
3.662669
false
false
false
joxer/Baka-No-Voltron
tmp/android.dist/private/renpy/display/gesture.py
1
3800
# Copyright 2004-2015 Tom Rothamel <pytom@bishoujo.us> # # 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, m...
gpl-2.0
7,992,540,546,767,366,000
26.737226
92
0.61
false
3.865717
true
false
false
WanderingStar/rpi
shutdown_button.py
1
2040
#!/usr/bin/python # This script is used with an LED and a momentary button, perhaps the same, # like https://www.sparkfun.com/products/10440 # The LED should be wired to GPIO pin 23 and the button to pin 24. # The idea is that it is run at startup (for example, from rc.local) # It turns the LED on to indicate that it'...
mit
-1,626,048,357,948,252,000
28.142857
79
0.676961
false
3.57268
false
false
false
tanglu-org/merge-o-matic
deb/controlfile.py
1
5047
#!/usr/bin/env python # -*- coding: utf-8 -*- # deb/controlfile.py - parse debian control files # # Copyright © 2008 Canonical Ltd. # Author: Scott James Remnant <scott@ubuntu.com>. # # This program is free software: you can redistribute it and/or modify # it under the terms of version 3 of the GNU General Public Licen...
gpl-3.0
-9,124,939,611,046,515,000
31.346154
71
0.551724
false
4.650691
false
false
false
phobson/conda-env
conda_env/exceptions.py
1
2210
class CondaEnvException(Exception): pass class CondaEnvRuntimeError(RuntimeError, CondaEnvException): pass class EnvironmentFileNotFound(CondaEnvException): def __init__(self, filename, *args, **kwargs): msg = '{} file not found'.format(filename) self.filename = filename super(En...
bsd-3-clause
-7,228,944,400,857,512,000
33
80
0.669683
false
4.047619
false
false
false
abhikeshav/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_drivers_media_eth_oper.py
1
182469
""" Cisco_IOS_XR_drivers_media_eth_oper This module contains a collection of YANG definitions for Cisco IOS\-XR drivers\-media\-eth package operational data. This module contains definitions for the following management objects\: ethernet\-interface\: Ethernet operational data Copyright (c) 2013\-2015 by Cisco Sy...
apache-2.0
5,103,785,533,784,643,000
29.011349
325
0.500112
false
3.974147
false
false
false
gurneyalex/odoo
addons/stock/wizard/stock_picking_return.py
4
10775
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import UserError from odoo.tools.float_utils import float_round class ReturnPickingLine(models.TransientModel): _name = "stock.return.picking.line" _...
agpl-3.0
6,509,121,793,401,225,000
54.225641
198
0.58297
false
3.840585
false
false
false
hrishioa/Aviato
flask/Scripts/gdal_polygonize.py
1
6499
#!C:\Users\SeanSaito\Dev\aviato\flask\Scripts\python.exe # -*- coding: utf-8 -*- #****************************************************************************** # $Id$ # # Project: GDAL Python Interface # Purpose: Application for converting raster data to a vector polygon layer. # Author: Frank Warmerdam, warm...
gpl-2.0
-8,949,319,689,744,370,000
28.274775
99
0.511002
false
4.163357
false
false
false
3ffusi0on/Addicted-to-XDCC
Addict7ed.py
1
3211
#!/usr/bin/env python3.4 import sys from PyQt4 import QtGui import re import os, sys import subprocess import urllib.request import urllib.error import hashlib #TODO #-input for the link of xdcc server #-dl button ? or automatize the action #- /!\ Configuration file /!\ def get_hash(name): readsize = 64 * 1024 ...
gpl-2.0
-566,545,068,900,936,960
29.875
119
0.624416
false
3.827175
false
false
false
fp12/achallonge
challonge/enums.py
1
1529
from enum import Enum class TournamentState(Enum): """ State a tournament can be in """ pending = 'pending' open_ = 'open' #: can't use `open` complete = 'complete' in_progress = 'in progress' class TournamentType(Enum): """ Type of a tournament """ single_elimination = 'single eliminat...
mit
7,507,871,851,981,742,000
26.8
105
0.657292
false
3.675481
false
false
false
BhallaLab/moose
moose-gui/plugins/kkitOrdinateUtil.py
1
19921
__author__ = "HarshaRani" __credits__ = ["Upi Lab"] __license__ = "GPL3" __version__ = "1.0.0" __maintainer__ = "HarshaRani" __email__ = "hrani@ncbs.res.in" __status__ = "Development" __updated__ = "Oct 26 2018" ''' 2018 Oct 26: xfer molecules are not put into screen Se...
gpl-3.0
-3,179,577,821,720,425,000
39.821721
159
0.560765
false
3.637874
false
false
false
strongswan/strongTNC
apps/devices/paging.py
1
5001
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import math from .models import Device, Product from apps.core.models import Session from apps.devices.models import Device from apps.swid.models import Event from apps.front.paging import ProducerFactory # PA...
agpl-3.0
-8,092,494,106,131,860,000
34.978417
92
0.634473
false
3.685335
false
false
false
openstack/sahara
sahara/utils/files.py
1
1190
# Copyright (c) 2013 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
3,584,808,584,476,616,000
28.75
69
0.708403
false
3.617021
false
false
false
imclab/confer
server/auth.py
1
12729
import json, sys, re, hashlib, smtplib, base64, urllib, os from django.http import * from django.shortcuts import render_to_response from django.views.decorators.csrf import csrf_exempt from django.core.context_processors import csrf from django.core.validators import email_re from django.db.utils import IntegrityErro...
mit
-7,501,670,995,491,163,000
30.585608
237
0.623537
false
3.582606
false
false
false
RealTimeWeb/wikisite
MoinMoin/action/thread_monitor.py
1
1932
# -*- coding: iso-8859-1 -*- """ MoinMoin - Thread monitor action Shows the current traceback of all threads. @copyright: 2006 MoinMoin:AlexanderSchremmer @license: GNU GPL, see COPYING for details. """ import os, time from StringIO import StringIO from MoinMoin import Page, wikiutil from MoinMoin.ut...
apache-2.0
5,275,388,841,327,920,000
30.16129
88
0.64234
false
3.645283
false
false
false
avrem/ardupilot
libraries/AP_Terrain/tools/create_terrain.py
1
11287
#!/usr/bin/env python ''' create ardupilot terrain database files ''' from MAVProxy.modules.mavproxy_map import srtm import math, struct, os, sys import crc16, time, struct # MAVLink sends 4x4 grids TERRAIN_GRID_MAVLINK_SIZE = 4 # a 2k grid_block on disk contains 8x7 of the mavlink grids. Each # grid block overlaps...
gpl-3.0
3,621,082,822,801,622,500
36.749164
124
0.602552
false
3.094872
false
false
false
sxslex/rows
rows/utils.py
1
4354
# coding: utf-8 # Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/> # # 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 yo...
gpl-3.0
-4,946,662,462,204,558,000
29.229167
78
0.643924
false
4.049302
false
false
false
goosechooser/cps2-zmq
cps2zmq/gather/Broker.py
1
10126
# pylint: disable=E1101 """ Contains Broker, WorkerRepresentative, and ServiceQueue classes. """ import sys import logging import zmq from zmq.eventloop.zmqstream import ZMQStream from zmq.eventloop.ioloop import IOLoop, PeriodicCallback from cps2zmq.gather import mdp, log HB_INTERVAL = 1000 HB_LIVENESS = 3 class Bro...
mit
1,896,932,177,797,409,500
29.408408
99
0.569326
false
4.045545
false
false
false
NicolasKiely/Ackermann
Ackermann.py
1
3454
''' Evaluates Ackermann function Adopted from here: http://www.eprg.org/computerphile/recursion.htm Usage: python Ackermann.py <brute|cache> <m> <n> Where <brute|cache> specifies whether to enable the cache <m> is the first parameter of the Ackermann function <n> is the second paramete...
mit
879,025,367,012,459,400
27.081301
74
0.571801
false
3.742145
false
false
false
alberthdev/nclayer
nc_diag_attr/nc_diag_attr.py
1
9821
# nc_diag_attr from netCDF4 import Dataset, getlibversion import netCDF4 import argparse import sys import traceback import numpy try: import ujson as json except: import json # Version information __version__ = "0.9b" VERSION_STR = 'nc_diag_attr v' + __version__ + "\n\n" + \ "Using the following librar...
apache-2.0
8,458,928,210,845,927,000
36.060377
115
0.562875
false
3.982563
false
false
false
BitcoinUnlimited/BitcoinUnlimited
qa/rpc-tests/excessive.py
1
14205
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Unlimited developers # Copyright (c) 2014-2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import test_framework.loginit # Test emergent c...
mit
-6,959,768,802,692,988,000
40.173913
155
0.600282
false
3.80627
true
false
false
UCSD-E4E/radio_collar_tracker_drone
scripts/ground_control_software/heatMap.py
1
1174
#!/usr/bin/env python3 import generateKML import pos_estimate import numpy as np import utm def findMax( someList ): tempMax = someList[0] for i in someList: if tempMax < i: tempMax = i return tempMax def findMin( someList ): tempMin = someList[0] for i in someList: if tempMin > i: tempMin = i return ...
gpl-3.0
1,732,163,343,495,752,000
26.952381
78
0.626917
false
2.430642
false
false
false
kooksee/myblog
BAE.py
1
11250
# -*- coding=utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') import tornado.wsgi import tornado.options import os.path,os,datetime,sys,time,codecs import markdown import tohtml import db import json import tohtml import base64 import uuid def conf(): #全局设定信息 global NAME,Subtitle,description,key...
gpl-2.0
1,647,006,971,386,371,600
37.166667
190
0.525109
false
3.626526
false
false
false
tmetsch/pyssf
docs/source/conf.py
1
8255
# -*- coding: utf-8 -*- # # pyssf documentation build configuration file, created by # sphinx-quickstart on Fri Feb 25 10:29:07 2011. # # 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 c...
lgpl-3.0
2,553,244,000,291,390,500
31.5
80
0.709267
false
3.733605
true
false
false
reclosedev/mitm_relay
socket_relay.py
1
6570
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket import select import logging log = logging.getLogger(__name__) class Server: def __init__(self, relays, timeout=0.3): self._relays = list(relays) self.timeout = timeout self.input_map = {} self.links = {} def main_...
mit
-6,196,941,404,122,939,000
31.524752
115
0.576712
false
3.713963
false
false
false
erpletzerp/letzerpcore
frappe/core/doctype/user/user.py
1
15029
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import cint, now, get_gravatar from frappe import throw, msgprint, _ from frappe.auth import _update_password from frappe.desk.notifications imp...
mit
3,309,310,681,578,158,600
32.621924
188
0.682214
false
3.104524
false
false
false
edm1/error-aware-demultiplexer
src/demultiplexer.py
1
16772
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2014 Edward Mountjoy # # 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 th...
mit
5,872,654,845,560,061,000
35.30303
93
0.599273
false
4.083759
false
false
false
t-wissmann/qutebrowser
tests/helpers/stubs.py
1
17146
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2020 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
7,100,110,923,038,181,000
25.217125
79
0.613904
false
4.016397
false
false
false
sgnn7/sgfc
communication/comms.py
1
2263
#!/usr/bin/env python2 import time from devices.zigbee_xbee import XBeeCommDevice from protobufs import sgfc_pb2 as fc_proto def test_comms(): dev1 = None dev2 = None fc_message = fc_proto.FlightMessage() fc_message.sender = "Me" payload = fc_proto.Payload() payload.type = fc_proto.GPS_PO...
lgpl-2.1
3,578,514,160,517,611,000
23.333333
60
0.549271
false
3.765391
false
false
false
daisychainme/daisychain
daisychain/channel_dropbox/tests/test_models.py
1
1492
from django.contrib.auth.models import User from django.test import TestCase from .models import DropboxAccount, DropboxUser class TestModelsDropboxAccount(TestCase): def test_account_str_len(self): user = User.objects.create_user('John') dbx_account = DropboxAccount( user = user, ...
mit
4,904,110,218,897,328,000
32.909091
90
0.577748
false
3.885417
true
false
false
cloudkeep/symantecssl
symantecssl/order.py
1
4443
from __future__ import absolute_import, division, print_function import requests from lxml import etree from symantecssl.request_models import RequestEnvelope as ReqEnv class FailedRequest(Exception): def __init__(self, response): super(FailedRequest, self).__init__() self.response = response ...
apache-2.0
-4,661,121,772,519,694,000
33.984252
79
0.684898
false
4.334634
false
false
false
Dangerpuss/Dumpster
winDATget/Forget.py
1
1457
from subprocess import Popen import os import csv srcfile = "/" + input('File Input Name: ') dirpath = os.path.dirname(__file__) srcpath = os.path.dirname(__file__) + srcfile with open(srcpath, newline='') as f: reader = csv.reader(f) for row in reader: host = (row[0]) user = (row[1]) newpath = os.path.dir...
gpl-2.0
2,042,619,565,739,580,000
39.472222
156
0.607412
false
2.649091
false
false
false
novafloss/django-formidable
formidable/forms/__init__.py
1
7650
# -*- coding: utf-8 -*- """ This module exposes everything needed to generate a standard django form class from a formidable object. Given a formidable object, you can use :func:`get_dynamic_form_class` to get its corresponding django form class. """ from __future__ import unicode_literals from collections import Or...
mit
-4,146,912,984,624,898,000
34.091743
79
0.642484
false
4.207921
false
false
false
SleepyDeveloper/alexa-cookbook
tools/TestFlow/sampleskill3/index.py
2
7822
""" This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well as testing instructions are located at http://amzn.to/1LzFrj6 For additional samples, visit the Alexa Skills Kit Getting Started guide at http://amzn.to/1LG...
apache-2.0
4,030,710,574,117,284,000
37.156098
106
0.623114
false
4.11901
false
false
false
MG-group-tools/MGFunc
mgfunc_v2/swiss2tab.py
1
7278
from __future__ import division import argparse from Bio import SeqIO from datetime import datetime as dt import time import os import sys import gzip class main: def __init__(self): self.start = time.time() self.d_ = dt.today() self.timestarted = self.d_.strftime("%d-%m-%Y %H:%M:%S") self.parseArgs() def pa...
gpl-3.0
3,271,182,841,077,309,400
36.515464
423
0.554411
false
3.315718
false
false
false
UrbanCCD-UChicago/plenario
plenario/sensor_network/api/ifttt.py
1
6149
import json import time import uuid from os import environ from dateutil.parser import parse from flask import make_response, request from plenario.api.common import crossdomain, unknown_object_json_handler from plenario.api.response import bad_request from plenario.api.validator import IFTTTValidator, sensor_network...
mit
2,408,303,469,001,245,000
34.137143
120
0.593267
false
3.941667
false
false
false
bycoffe/django-liveblog
models.py
1
1303
import datetime from django.db import models from django.conf import settings from django.template import loader, Context from markdown import markdown blog = __import__(settings.BLOG_APP) Entry = blog.models.__getattribute__(settings.BLOG_ENTRY_MODEL) if Entry.objects.count(): default_blog_entry = Entry.objects...
bsd-3-clause
335,256,228,754,973,900
34.216216
81
0.584804
false
4.071875
false
false
false
cgmb/d2lmf
d2lmf/d2lmf.py
1
11079
# -*- coding: utf-8 -*- # Copyright (C) 2015-2018 Cordell Bloor # # 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. # # Th...
gpl-3.0
-6,830,093,550,474,210,000
37.203448
90
0.601498
false
4.039008
false
false
false
codingforentrepreneurs/DjangoGap
src/postings/migrations/0003_auto_20141113_2257.py
1
1504
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('postings', '0002_auto_20141111_0540'), ] operations = [ migrations.Alt...
gpl-2.0
6,243,464,691,273,709,000
30.333333
130
0.563165
false
4.321839
false
false
false
apmichaud/vitess-apm
test/queryservice_test.py
1
2644
#!/usr/bin/env python import logging import optparse import traceback import unittest import sys import utils import framework from queryservice_tests import cache_tests from queryservice_tests import nocache_tests from queryservice_tests import stream_tests from queryservice_tests import status_tests from queryserv...
bsd-3-clause
2,655,012,504,257,989,000
33.789474
96
0.664145
false
3.804317
true
false
false
pavelponomarev/Elmer_IM2D_cases
IM_one_pole/cage/cage_generator.py
1
9486
# Elmer circuit equations generator for a cage winding taking into account periodicity # Author: P. Ponomarev # July 2016 # changelog: # version 1.3 (03.2017) by PP: # - added 'boffset' parameter - offset of the body numbers # version 1.2 (01.2017) by PP: # - added 'ns' parameter - number of slices for ...
gpl-3.0
-1,045,329,439,116,759,700
43.12093
133
0.37666
false
2.776119
false
false
false
oddt/oddt
oddt/docking/AutodockVina.py
1
15674
import sys import subprocess import re import os import warnings from tempfile import mkdtemp from shutil import rmtree from distutils.spawn import find_executable from tempfile import gettempdir from six import string_types import oddt from oddt.utils import (is_openbabel_molecule, is_molecul...
bsd-3-clause
8,064,540,954,755,132,000
36.859903
85
0.534133
false
4.168617
false
false
false
clarin-eric/Centre-Registry
centre-registry-app/centre_registry/migrations/0001_initial.py
1
13641
# pylint: disable=invalid-name import centre_registry.models from django.db import migrations from django.db import models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [] operations = [ migrations.CreateModel( name='Centre', fields=[ ...
gpl-3.0
-708,127,677,141,282,700
41.761755
119
0.467268
false
5.074777
false
false
false
google/sqlcommenter
python/sqlcommenter-python/tests/sqlalchemy/tests.py
1
4346
#!/usr/bin/python # # 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
-5,383,465,248,542,579,000
32.953125
104
0.627474
false
3.832451
true
false
false
olix0r/vtwt
vtwt/util.py
1
1493
import re from htmlentitydefs import name2codepoint from twisted.python.text import greedyWrap from twisted.web.error import Error as WebError # From http://wiki.python.org/moin/EscapingHtml _HTMLENT_CODEPOINT_RE = re.compile('&({0}|#\d+);'.format( '|'.join(name2codepoint.keys()))) def recodeText(text): ...
bsd-3-clause
-5,111,688,798,574,299,000
24.305085
68
0.561956
false
3.370203
false
false
false
onlynight/wechat-dump
wechat/smiley.py
1
4076
#!/usr/bin/env python2 # -*- coding: UTF-8 -*- # File: smiley.py # Date: Thu Jun 18 00:02:43 2015 +0800 # Author: Yuxin Wu <ppwwyyxxc@gmail.com> import os import re import json import struct from common.textutil import get_file_b64 STATIC_PATH = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'static') UNI...
gpl-3.0
-4,862,418,928,206,776,000
31.15873
94
0.57848
false
2.981604
false
false
false
molpopgen/fwdpy11
examples/discrete_demography/localadaptation.py
1
7832
# # Copyright (C) 2019 Kevin Thornton <krthornt@uci.edu> # # This file is part of fwdpy11. # # fwdpy11 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...
gpl-3.0
-7,623,108,832,788,986,000
30.967347
86
0.621425
false
3.408181
false
false
false
GbalsaC/bitnamiP
django-wiki/wiki/plugins/links/wiki_plugin.py
1
1271
# -*- coding: utf-8 -*- from django.conf.urls.defaults import patterns, url from django.utils.translation import ugettext_lazy as _ from wiki.conf import settings from wiki.core.plugins import registry from wiki.core.plugins.base import BasePlugin from wiki.plugins.links import views from wiki.plugins.links.mdx.urlize...
agpl-3.0
1,642,203,236,917,021,200
32.447368
96
0.651456
false
3.875
false
false
false
OPU-Surveillance-System/monitoring
master/scripts/planner/solvers/test_penalization_plot.py
1
1040
import matplotlib.pyplot as plt with open("test_pen", "r") as f: data = f.read() data = data.split("\n")[:-1] data = [data[i].split(" ") for i in range(0, len(data))] pen = [float(data[i][0]) for i in range(len(data))] u = [float(data[i][1]) for i in range(len(data))] d = [float(data[i][2]) for i in range(len(data...
mit
1,042,806,748,452,897,400
37.518519
75
0.632692
false
2.512077
false
false
false
Silvian/samaritan
emailservice/views.py
1
2372
""" @author: Silvian Dragan @Date: 17/06/2016 @Copyright: Copyright 2016, Samaritan CMA - Published under GNU General Public Licence v3 @Details: https://github.com/Silvian/samaritan """ import json from django.contrib.auth import get_user from django.contrib.auth.decorators import login_required from django.http impo...
gpl-3.0
-769,699,822,619,569,500
28.283951
90
0.664418
false
3.71205
false
false
false
kyubifire/softlayer-python
SoftLayer/fixtures/SoftLayer_Virtual_Guest.py
1
19232
getObject = { 'id': 100, 'hostname': 'vs-test1', 'domain': 'test.sftlyr.ws', 'fullyQualifiedDomainName': 'vs-test1.test.sftlyr.ws', 'status': {'keyName': 'ACTIVE', 'name': 'Active'}, 'billingItem': { 'id': 6327, 'nextInvoiceTotalRecurringAmount': 1.54, 'children': [ ...
mit
-4,988,771,412,386,916,000
27.619048
93
0.391275
false
4.179961
false
false
false
d120/pyfeedback
src/feedback/models/fragebogen2016.py
1
14676
# coding=utf-8 from django.db import models from feedback.models import Fragebogen, Ergebnis class Fragebogen2016(Fragebogen): fach = models.CharField(max_length=5, choices=Fragebogen.FACH_CHOICES, blank=True) abschluss = models.CharField(max_length=5, choices=Fragebogen.ABSCHLUSS_CHOICES, blank=True) sem...
agpl-3.0
4,768,601,658,121,352,000
66
157
0.658291
false
2.726017
false
false
false
littley/network_cjl
network_cjl/ReceiveRequest.py
1
1833
import time class ReceiveRequest(object): """ A ReceiveRequest is generated every time the first packet from a message is received. The ReceiveRequest then keeps track of all of the message's packets that have already ben received. """ def __init__(self, inital_packet, (host, port)): s...
apache-2.0
-5,376,255,074,754,944,000
29.55
109
0.61593
false
4.302817
false
false
false
DedMemez/ODS-August-2017
golf/GolfGlobals.py
1
13007
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.golf.GolfGlobals from direct.directnotify import DirectNotifyGlobal import random MAX_PLAYERS_PER_HOLE = 4 GOLF_BALL_RADIUS = 0.25 GOLF_BALL_VOLUME = 4.0 / 3.0 * 3.14159 * GOLF_BALL_RADIUS ** 3 GOLF_BALL_MASS = 0.5 GOLF_BALL_DENSITY = GOLF_BALL_...
apache-2.0
-2,305,301,541,882,050,600
26.158009
113
0.496041
false
3.012274
false
false
false
fluxer/spm
nuitka/nuitka/Builtins.py
1
6584
# Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
gpl-2.0
8,219,563,310,531,405,000
30.806763
79
0.605559
false
4.255979
false
false
false
seanbell/opensurfaces
server/intrinsic/algorithm/grosse2009/intrinsic.py
1
10552
import itertools import numpy as np import os import png import sys import poisson ############################### Data ########################################### def load_png(fname): reader = png.Reader(fname) w, h, pngdata, params = reader.read() image = np.vstack(itertools.imap(np.uint16, pngdata)) ...
mit
-6,676,248,594,824,166,000
32.18239
99
0.60453
false
3.157391
false
false
false
sigurdga/samklang-blog
samklang_blog/views.py
1
2247
from django.http import HttpResponseRedirect from django.views.generic.edit import CreateView, UpdateView from django.views.generic.dates import ArchiveIndexView, YearArchiveView, MonthArchiveView, DateDetailView from django.contrib.auth.decorators import login_required from django.utils.decorators import method_decora...
agpl-3.0
-2,393,359,891,051,174,000
29.780822
106
0.70227
false
3.732558
false
false
false
czpython/django-cms
cms/page_rendering.py
1
2938
# -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import resolve, Resolver404, reverse from django.http import Http404 from django.shortcuts import render from django.template.response import TemplateResponse from cms import __version__ from cms.cache.page import set_page_cache fro...
bsd-3-clause
3,639,318,368,674,407,400
35.725
102
0.687543
false
3.742675
false
false
false
rivasd/djPsych
djreceive/migrations/0019_singleaudiotrial.py
1
1328
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-04 19:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('djreceive', '0018_auto_20170104_1418')...
gpl-3.0
-2,971,340,042,235,738,600
35.888889
114
0.565512
false
4.311688
false
false
false
lrocheWB/navitia
source/jormungandr/jormungandr/scenarios/helpers.py
1
8430
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public tr...
agpl-3.0
-456,811,872,450,253,060
37.318182
116
0.655753
false
3.442221
false
false
false
ruhan/django-silk-mongoengine
setup.py
1
1322
import os from setuptools import setup with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme_file: README = readme_file.read() # allow setup.py to be run from any path os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir))) setup( name='django-silk', version='0...
mit
-4,198,657,876,189,128,000
28.377778
80
0.587746
false
3.777143
false
false
false
HaraldWeber/client
src/ladder/__init__.py
1
1144
from PyQt4 import QtCore from PyQt4 import QtWebKit import logging import urllib import util logger = logging.getLogger(__name__) class Ladder(QtCore.QObject): def __init__(self, client, *args, **kwargs): QtCore.QObject.__init__(self, *args, **kwargs) logger.debug("Ladder tab instantiating.") ...
gpl-3.0
-2,618,006,111,668,638,000
27.6
139
0.615385
false
3.838926
false
false
false
anshengme/Angelina
apps/users/views.py
1
15715
import json from django.contrib.auth import authenticate, login, logout from django.contrib.auth.backends import ModelBackend from django.contrib.auth.hashers import make_password from django.core.exceptions import ObjectDoesNotExist # ORM get查询不到数据 from django.core.urlresolvers import reverse from django.db.models i...
mit
-7,679,907,315,270,004,000
35.074359
108
0.605942
false
3.053831
false
false
false
frobnitzem/slack
gen/plan.py
1
1926
# Plan a parallel copy using n workers into output shape s. # The algorithm requires prod(s) to be a multiple of n and # works by matching factors from n with those of s, # with preference to the right (for R) or left (for L). # This means as many workers as possible for the most sig. dimensions, # each doing as many c...
gpl-3.0
-4,937,704,351,101,991,000
26.913043
84
0.548806
false
3.47027
false
false
false
agdsn/hades
src/hades/common/cli.py
1
5189
"""Functionality for the Hades command-line utilities in :mod:`hades.bin`.""" import argparse import logging.handlers import os import sys import textwrap from gettext import gettext as _ from hades import constants class ArgumentParser(argparse.ArgumentParser): """ArgumentParser subclass that exists with :data:...
mit
-2,648,820,304,603,994,000
36.601449
115
0.63943
false
4.171222
true
false
false
sunlightlabs/tcamp
tcamp/sked/migrations/0012_auto__add_field_location_has_sessions.py
1
9931
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Location.has_sessions' db.add_column(u'sked_location', 'has_sessions', ...
bsd-3-clause
-2,078,722,091,345,254,700
77.204724
187
0.551908
false
3.633736
false
false
false
tangowhisky37/RaspiPythonProjects
Write_To_LCD_Screen/RPi_I2C_driver.py
1
4851
# -*- coding: utf-8 -*- """ Compiled, mashed and generally mutilated 2014-2015 by Denis Pleic Made available under GNU GENERAL PUBLIC LICENSE # Modified Python I2C library for Raspberry Pi # as found on http://www.recantha.co.uk/blog/?p=4849 # Joined existing 'i2c_lib.py' and 'lcddriver.py' into a single library # adde...
gpl-3.0
9,119,408,727,036,929,000
24.803191
78
0.652031
false
2.85689
false
false
false
santoshsahoo/personfinder
app/admin_review.py
1
5813
#!/usr/bin/python2.5 # Copyright 2010 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 ...
apache-2.0
6,470,416,251,959,256,000
37.243421
80
0.54963
false
4.070728
false
false
false
ximion/Clementine-LibDanceTag
data/pythonlibs/uic/properties.py
1
14787
import logging import sys from uic.exceptions import UnsupportedPropertyError from uic.icon_cache import IconCache if sys.hexversion >= 0x03000000: from uic.port_v3.ascii_upper import ascii_upper else: from uic.port_v2.ascii_upper import ascii_upper logger = logging.getLogger(__name__) DEBUG = logger.debug ...
gpl-3.0
281,255,060,788,967,330
32.454751
114
0.57368
false
4.055677
false
false
false
villaverde/iredadmin
libs/iredutils.py
1
17090
# encoding: utf-8 # Author: Zhang Huangbin <zhb@iredmail.org> from os import urandom, getloadavg import re import time import urllib2 import socket from base64 import b64encode, b64decode from xml.dom.minidom import parseString as parseXMLString import random import subprocess import web import settings from libs impo...
gpl-2.0
3,642,822,410,555,801,600
26.788618
106
0.572089
false
3.64937
false
false
false
RPGOne/Skynet
pytorch-master/torch/nn/modules/linear.py
1
1934
import math import torch from torch.nn.parameter import Parameter from .module import Module class Linear(Module): r"""Applies a linear transformation to the incoming data: :math:`y = Ax + b` Args: in_features: size of each input sample out_features: size of each output sample bias:...
bsd-3-clause
-3,095,174,257,862,721,500
29.698413
89
0.592037
false
3.75534
false
false
false
andrewklau/openshift-tools
openshift/installer/vendored/openshift-ansible-3.5.13/filter_plugins/oo_filters.py
2
41534
#!/usr/bin/python # -*- coding: utf-8 -*- # vim: expandtab:tabstop=4:shiftwidth=4 # pylint: disable=no-name-in-module, import-error, wrong-import-order, ungrouped-imports """ Custom filters for use in openshift-ansible """ import os import pdb import pkg_resources import re import json import yaml import random from a...
apache-2.0
-3,096,275,517,794,424,000
40.555556
149
0.55179
false
4.168072
false
false
false
PyPlanet/PyPlanet
pyplanet/core/storage/storage.py
1
3977
import asyncio_extras import os import importlib from async_generator import yield_ from pyplanet.conf import settings from pyplanet.core.storage import StorageDriver, StorageInterface class Storage(StorageInterface): """ The storage component manager is managing the storage access trough drivers that can be cust...
gpl-3.0
4,460,439,379,608,528,000
33.885965
108
0.713603
false
3.491659
true
false
false
kg-bot/SupyBot
plugins/Mailbox/plugin.py
1
6690
### # Copyright (c) 2005, Jeremiah Fincher # Copyright (c) 2006, Jon Phillips # Copyright (c) 2006, Creative Commons # All rights reserved. ### import time import rfc822 import poplib import textwrap from cStringIO import StringIO as sio import supybot.utils as utils import supybot.world as world from supybot.command...
gpl-3.0
6,275,430,813,889,883,000
34.210526
79
0.557848
false
4.247619
false
false
false
Tancata/phylo
test_for_lgt_more_groups.py
1
6655
from ete3 import Tree, TreeStyle import sys, re #read in the bootstrapped consensus tree from one of Cedric's families. Ask whether the candidate LGT has phylogenetic support at some bootstrap threshold by checking various tree-based criteria for LGTs #Arguments: treefile target_sequence_tag #euk_supergroups = ['Vir...
mit
-7,968,757,924,115,821,000
43.66443
203
0.6284
false
3.46976
false
false
false
taimur97/Feeder
server/flaskapp/feeder/rest.py
1
7265
# -*- coding: utf-8 -*- ''' The REST-API of Feeder ''' from feeder import app from .database import db from .models import (Feed, FeedItem, UserFeed, UserDeletion, get_user, get_feed, get_userfeed) #from flask_oauthlib.client import OAuth from flask.ext.restful import (Resource, Api, reqparse, fie...
gpl-2.0
6,649,980,418,391,360,000
27.490196
84
0.591053
false
3.954818
false
false
false
sparrow242/demandfs
demandfs/demandfs.py
1
13810
#!/usr/bin/env python """ demandfs.py - mount and umount sources on demand Copyright (C) 2013 Sebastian Meyer <s.meyer@drachenjaeger.eu> Based upon the the xmp.py-FS Example in the fuse-python distribtion: Copyright (C) 2001 Jeff Epler <jepler@unpythonic.dhs.org> Copyright (C) 2006 Csaba Henk <csa...
gpl-3.0
-5,716,152,501,423,935,000
32.933661
79
0.547791
false
3.878124
false
false
false
googleapis/googleapis-gen
google/cloud/dialogflow/cx/v3beta1/dialogflow-cx-v3beta1-py/google/cloud/dialogflowcx_v3beta1/types/fulfillment.py
1
7242
# -*- 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
-547,233,568,092,019,840
35.39196
127
0.607705
false
4.57197
false
false
false
sampathweb/game_app
card_games/play_blackjack.py
1
1843
#!/usr/bin/env python from __future__ import print_function from blackjack import BlackJack def play_blackjack(player): game = BlackJack() while True: print('Your Hand %s is of value %d' % (game.player_hand, game.player_hand_value())) action = raw_input('Enter: hit (1), stand (2) or split (3) ...
mit
2,510,335,775,484,046,300
40.886364
146
0.558871
false
3.571705
false
false
false
chakki-works/arXivTimesIndicator
main.py
1
1791
import os from PIL import Image from arxivtimes_indicator.data.github import filter_issue_by_ym, fetch_issues, get_icon_url, tally_by_labels, tally_by_users from arxivtimes_indicator.data.twitter import fetch_tweets, rank_paper from arxivtimes_indicator.data.utils import download, break_line, std_score from arxivtime...
apache-2.0
-7,062,447,111,258,028,000
35.571429
124
0.698492
false
3.192513
false
false
false
wkew/FTMSVisualization
3-HeteroClassPlotter.py
1
10441
# -*- coding: utf-8 -*- """ Created on Fri Apr 22 11:42:36 2016 @author: Will Kew will.kew@gmail.com Copyright Will Kew, 2016 This file is part of FTMS Visualisation (also known as i-van Krevelen). FTMS Visualisation is free software: you can redistribute it and/or modify it under the terms of the G...
gpl-3.0
-3,138,422,466,994,427,400
42.690377
193
0.666507
false
3.08814
false
false
false
Parkayun/flask
flask/debughelpers.py
1
6024
# -*- coding: utf-8 -*- """ flask.debughelpers ~~~~~~~~~~~~~~~~~~ Various helpers to make the development experience better. :copyright: (c) 2016 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from ._compat import implements_to_string, text_type from .app import Flask from .bl...
bsd-3-clause
-7,867,772,259,524,209,000
37.864516
83
0.586819
false
4.239268
false
false
false
stpx/canto-curses
canto_curses/main.py
1
9578
# -*- coding: utf-8 -*- #Canto-curses - ncurses RSS reader # Copyright (C) 2014 Jack Miller <jack@codezen.org> # # This program 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. CANTO_PROTOCO...
gpl-2.0
-2,279,344,980,120,224,800
32.256944
102
0.546774
false
3.823553
true
false
false
voytekresearch/neurodsp
neurodsp/tests/aperiodic/test_irasa.py
1
1456
"""Tests for IRASA functions.""" import numpy as np from neurodsp.tests.settings import FS, N_SECONDS_LONG, EXP1 from neurodsp.sim import sim_combined from neurodsp.spectral import compute_spectrum, trim_spectrum from neurodsp.aperiodic.irasa import * ###############################################################...
mit
5,145,470,417,897,858,000
32.090909
99
0.581044
false
3.2
false
false
false
tkrajina/cartesius
cartesius/colors.py
1
1051
# -*- coding: utf-8 -*- """ Utility functions folr colors """ def get_color(color): """ Can convert from integer to (r, g, b) """ if not color: return None if isinstance(color, int): temp = color blue = temp % 256 temp = int(temp / 256) green = temp % 256 ...
apache-2.0
6,686,300,613,034,056,000
24.634146
92
0.527117
false
3.091176
false
false
false
ehooo/django_mqtt
test_web/settings.py
1
4373
""" Django settings for web project. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
gpl-2.0
6,900,691,633,989,705,000
25.664634
95
0.641207
false
3.435192
false
false
false
matllubos/django-reversion-log
setup.py
1
1150
from setuptools import setup, find_packages from reversion_log.version import get_version setup( name='django-reversion-log', version=get_version(), description="Log build on revisiions.", keywords='django, reversion', author='Lubos Matl', author_email='matllubos@gmail.com', url='https://g...
lgpl-3.0
-1,228,347,683,448,355,300
31.857143
78
0.618261
false
3.911565
false
true
false
MissionCriticalCloud/cosmic
cosmic-core/systemvm/patches/centos7/opt/cosmic/startup/setup_cpvm.py
1
2608
import logging import os from utils import Utils def setup_iptable_rules(cmdline): external_rules = "" for cidr in cmdline.get('allowedcidrs', '').split(','): if cidr != '': external_rules += "-A INPUT -i " + cmdline['publicnic'] + " -s " + cidr.strip() + " -p tcp -m multiport --dports 8...
apache-2.0
-2,954,845,786,210,160,600
28.977011
151
0.635353
false
3.272271
true
false
false
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/orca/structural_navigation.py
1
153933
# Orca # # Copyright 2005-2009 Sun Microsystems Inc. # # 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 # version 2.1 of the License, or (at your option) any later version. # # This...
gpl-3.0
3,199,177,288,072,333,300
39.519347
80
0.565077
false
4.794823
false
false
false
kazuoteramoto/alot
alot/ui.py
1
18751
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import urwid import logging from twisted.internet import reactor, defer from settings import settings from buffers import BufferlistBu...
gpl-3.0
-3,591,981,657,515,845,000
36.880808
79
0.55997
false
4.285943
false
false
false
ardoi/datajuicer
lsjuicer/ui/widgets/panels/eventpanel.py
1
3918
from PyQt5 import QtWidgets as QW from PyQt5 import QtCore as QC from lsjuicer.inout.db.sqla import SyntheticData from lsjuicer.ui.widgets.fileinfowidget import MyFormLikeLayout from lsjuicer.ui.widgets.clicktrees import EventClickTree, Events from actionpanel import ActionPanel from lsjuicer.ui.widgets.mergewidget i...
gpl-3.0
376,748,179,821,630,000
36.673077
74
0.639612
false
3.837414
false
false
false
nicholas-maltbie/Medina
AIPractice/tttTest.py
1
1416
from ttt import * from tttGameSpec import TicTacToeGameSpec def play_game(agent1, agent2, name1, name2): """Plays a game of tic tac toe with two agents and returns the winner.""" game_spec = TicTacToeGameSpec() return game_spec.play_game(agent1, agent2) """board = make_board() names = [name1, name2...
mit
6,103,644,358,303,188,000
36.263158
86
0.558616
false
3.210884
false
false
false
crs4/hl7apy
hl7apy/v2_8_2/__init__.py
1
3070
# -*- coding: utf-8 -*- # # Copyright (c) 2012-2018, CRS4 # # 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...
mit
2,264,156,724,461,546,500
30.010101
92
0.684691
false
3.504566
false
false
false
DTL-FAIRData/ODEX4all-UseCases
EKP/tmp/NIZO2.py
1
5816
# Load the required packages import EKP import csv import os import datetime # Knowledge platform URL url = '' # User credentials: Please fill in! username = '' password = '' # Set the output directory os.chdir("NIZO input & Output/") # Get the user token, required for access t = EKP.getToken(username, password, ur...
mit
-8,227,296,890,107,231,000
39.388889
217
0.607634
false
3.336776
true
false
false
Khurramjaved96/Recursive-CNNs
data_augmentor/augmentData.py
1
2668
import os import cv2 import numpy as np import utils def argsProcessor(): import argparse parser = argparse.ArgumentParser() parser.add_argument("-i", "--dataPath", help="DataPath") parser.add_argument("-o", "--outputFiles", help="outputFiles", default="bar") return parser.parse_args() args = a...
apache-2.0
4,897,393,317,941,922,000
38.820896
117
0.463268
false
3.789773
false
false
false
vsemionov/npamp
npamp/output.py
1
11750
# Copyright (C) 2012 Victor Semionov # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright notice, this # list of conditions and ...
bsd-2-clause
-5,244,082,922,388,500,000
49.646552
278
0.655234
false
3.151824
false
false
false
living180/vex
vex/remove.py
1
1329
import os import shutil from vex import exceptions def obviously_not_a_virtualenv(path): include = os.path.join(path, 'include') bin = os.path.join(path, 'bin') scripts = os.path.join(path, 'Scripts') if not os.path.exists(bin) and not os.path.exists(scripts): return True if os.path.exists...
mit
-4,692,091,804,238,745,000
34.918919
73
0.632054
false
3.691667
false
false
false
cginternals/glkernel
scripts/generate.py
1
19818
import posixpath # instead of os.path, to always use forward slashes import os import re # TODOs: # (more TODOs in code) standardTypes = { "bool", "char", "short", "int", "long", "long long", "unsigned char", "unsigned short", "unsigned int", "unsigned long", "unsigned lon...
mit
3,420,205,758,163,455,500
37.481553
220
0.612171
false
3.753409
false
false
false
AutorestCI/azure-sdk-for-python
azure-mgmt-monitor/azure/mgmt/monitor/models/rule_action.py
1
1307
# 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
-2,687,682,908,228,144,000
32.512821
187
0.613619
false
4.400673
false
false
false
UManPychron/pychron
pychron/experiment/experimentor.py
1
11553
# =============================================================================== # Copyright 2013 Jake Ross # # 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...
apache-2.0
-4,886,870,572,820,441,000
34.990654
110
0.521769
false
4.566403
false
false
false