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
dvstter/SelfPythonSmallTools
ftp_server/client.py
1
1463
import socket import struct import math class client: def init_client(self, address, port): self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: self.sock.connect((address.strip(), int(port))) except socket.error, e: print 'error:%s' % e def main_loop(self): while True: cmd = raw_inp...
gpl-2.0
-1,645,092,799,523,094,300
24.224138
63
0.640465
false
2.902778
false
false
false
proofchains/python-smartcolors
smartcolors/db.py
1
8363
# Copyright (C) 2014 Peter Todd <pete@petertodd.org> # # This file is part of python-smartcolors. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-smartcolors, including this file, may be copied, modified, # propagated, or distribu...
gpl-3.0
4,823,416,512,252,157,000
32.8583
144
0.656343
false
3.664768
false
false
false
hetica/webeni
static/lib/cisco_clt.py
1
3492
#!/usr/bin/python # *-* coding:utf-8 *-* __appname__ = 'pytacad-clt' __version__ = "0.1" __author__ = "Benoit Guibert <benoit.guibert@free.fr>" __licence__ = "" import os, sys import unicodedata from django.utils.encoding import smart_unicode server = os.path.dirname(sys.argv[0]) + '/pytacad-server' cwd = '/var/loca...
lgpl-3.0
5,053,427,114,607,111,000
30.572727
199
0.624532
false
2.498561
false
false
false
KanoComputing/kano-apps
kano_apps/MainWindow.py
1
4372
# MainWindow.py # # Copyright (C) 2014-2018 Kano Computing Ltd. # License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPLv2 # # The MainWindow class from gi import require_version require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk from kano_apps import Media from kano_apps.UIElements import Contents fr...
gpl-2.0
-7,431,524,287,024,962,000
30.007092
90
0.583486
false
3.772217
false
false
false
przemyslawjanpietrzak/pyMonet
pymonet/semigroups.py
1
5042
class Semigroup: """ In mathematics, a semigroup is an algebraic structure consisting of a set together with an associative binary operation. A semigroup generalizes a monoid in that there might not exist an identity element. It also (originally) generalized a group (a monoid with all inverses) ...
mit
-2,265,434,369,184,133,000
27.485876
120
0.601349
false
3.701909
false
false
false
celiao/django-rest-authemail
authemail/admin.py
1
3085
from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from django.utils.translation import ugettext_lazy as _ from authemail.forms import EmailUserCreationForm, EmailUserChangeForm from authemail.models import SignupCode, PasswordResetCode, Emai...
gpl-3.0
-7,126,561,763,274,769,000
29.245098
80
0.621718
false
3.851436
false
false
false
simodalla/django-caronte
setup.py
1
1497
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import caronte try: from setuptools import setup except ImportError: from distutils.core import setup version = caronte.__version__ if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') print("You probably want to ...
bsd-3-clause
5,328,639,089,583,490,000
26.218182
66
0.607882
false
3.838462
false
true
false
OpenDrift/opendrift
examples/example_plast.py
1
1520
#!/usr/bin/env python """ Plastic ================================== """ from datetime import timedelta from opendrift.readers import reader_netCDF_CF_generic from opendrift.models.plastdrift import PlastDrift o = PlastDrift(loglevel=20) o.list_configspec() # to see available configuration options # Arome atmospher...
gpl-2.0
396,845,777,678,186,000
30.666667
133
0.721711
false
2.690265
false
true
false
rh-marketingops/dwm
dwm/test/test_val_g_lookup.py
1
1702
""" test generic validation lookup function """ import mongomock #from mock import patch #from nose.tools import raises from dwm import Dwm # Setup mongomock db DB = mongomock.MongoClient().db DB.genericLookup.insert({"find": "BADVALUE"}) # Setup Dwm instance FIELDS = { 'field1': { 'lookup': ['generi...
gpl-3.0
8,576,870,995,289,725,000
25.184615
66
0.596357
false
3.044723
true
false
false
mikesname/ehri-collections
ehriportal/portal/forms.py
1
6151
"""Portal search forms.""" import string from django import forms from django.contrib.admin import widgets from django.utils import translation from django.utils.translation import ugettext_lazy as _ from django.forms.models import modelformset_factory, inlineformset_factory from jsonfield.forms import JSONFormField ...
mit
-8,758,907,469,438,605,000
32.612022
95
0.679402
false
4.128188
false
false
false
franklingu/leetcode-solutions
questions/longest-common-subsequence/Solution.py
1
1711
""" Given two strings text1 and text2, return the length of their longest common subsequence. A subsequence of a string is a new string generated from the original string with some characters(can be none) deleted without changing the relative order of the remaining characters. (eg, "ace" is a subsequence of "abcde" wh...
mit
-3,796,396,246,717,548,000
29.553571
328
0.5827
false
3.572025
false
false
false
iwinulose/eve
eve/objects.py
1
2549
# Copyright (c) 2014, Charles Duyk # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # Redistributions of source code must retain the above copyright # notice, this list of conditions and the fo...
bsd-2-clause
-414,263,850,727,675,300
31.679487
83
0.708905
false
3.641429
false
false
false
apache/bloodhound
bloodhound_dashboard/bhdashboard/wiki.py
2
3618
# -*- coding: UTF-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
apache-2.0
3,236,449,236,041,884,000
35.18
80
0.572692
false
4.231579
false
false
false
bskari/sparkfun-avc
analysis/process_gps.py
1
1997
"""Formats GPS log messages into a path KMZ file that Google Earth can read.""" #!/bin/env python import collections import json import sys from plot_points import get_kml def main(): """Main function.""" if len(sys.argv) <= 1: print('Usage: {} <log file>'.format(sys.argv[0])) return in...
mit
-5,713,281,913,200,312,000
28.367647
79
0.564347
false
3.767925
false
false
false
magfest/ubersystem
alembic/versions/e74a6a5904cd_add_payment_method_to_receipt_items.py
1
1766
"""Add payment_method to receipt items Revision ID: e74a6a5904cd Revises: 53b71e7c45b5 Create Date: 2019-12-20 19:00:34.631484 """ # revision identifiers, used by Alembic. revision = 'e74a6a5904cd' down_revision = '53b71e7c45b5' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa ...
agpl-3.0
-5,071,260,178,703,831,000
28.932203
120
0.627973
false
3.503968
false
false
false
dpshelio/sunpy
sunpy/visualization/animator/image.py
2
9327
import matplotlib as mpl import astropy.wcs from sunpy.visualization.animator.base import ArrayAnimator __all__ = ['ImageAnimator', 'ImageAnimatorWCS'] class ImageAnimator(ArrayAnimator): """ Create a matplotlib backend independent data explorer for 2D images. The following keyboard shortcuts are defi...
bsd-2-clause
-2,824,382,928,485,726,700
41.395455
105
0.609199
false
3.833539
false
false
false
rbianchi66/survey
src/radioquestion.py
1
2777
from PyQt4 import QtGui, Qt, QtCore from question import Question class RadioQuestion(Question): def __init__(self, id, question, card, parent = None): self.buttons = [] super(RadioQuestion, self).__init__(id, question, card, parent) def updateValue(self, question, answer): se...
gpl-2.0
6,312,017,638,981,724,000
40.723077
111
0.476413
false
4.479032
false
false
false
wlieurance/aim-reporting
classes.py
1
2503
import numpy ### sample standard deviation class stdevs: def __init__(self): self.list = [] self.x = 0 def step(self, value): if value != None: self.list.append(value) def finalize(self): #print(self.list) if len(self.list) > 1: self.x = numpy...
gpl-3.0
3,504,032,938,813,552,000
28.104651
92
0.503396
false
3.387009
false
false
false
ddico/odoo
addons/mail/controllers/main.py
1
14644
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import base64 import logging import psycopg2 import werkzeug.utils import werkzeug.wrappers from werkzeug.urls import url_encode from odoo import api, http, registry, SUPERUSER_ID, _ from odoo.exceptions import AccessE...
agpl-3.0
1,157,204,141,075,389,200
48.14094
123
0.593076
false
4.159046
false
false
false
f304646673/scheduler_frame
src/frame/loggingex.py
1
3302
import os import sys import inspect import logging import logging.config from singleton import singleton @singleton class loggingex(): def __init__(self, conf_path): error = 0 while True: try: logging.config.fileConfig(conf_path) except IOError as e: ...
apache-2.0
-3,504,118,964,041,598,500
26.983051
109
0.574197
false
3.644592
false
false
false
lapineige/Blender_add-ons
Material-Advanced-Override/material_advanded_override_v0-8.py
1
7758
###################################################################################################### # A simple add-on that enhance the override material tool (from renderlayer panel) # # Actualy partly uncommented - if you do not understand some parts of the code, # # please se...
gpl-3.0
-2,470,813,614,757,134,000
42.1
174
0.579144
false
3.842496
false
false
false
ownport/ansiblite
src/ansiblite/utils/encrypt.py
1
6355
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
654,723,775,037,806,000
39.737179
307
0.663415
false
3.849182
false
false
false
0xquad/mfu
tests.py
1
18569
#!/usr/bin/env python3 # # The test program for the MFU Python library. # # Copyright (c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com> # # This work is distributed under the LGPL license. See LICENSE.txt for details. import sys import unittest from unittest.mock import Mock, call, patch, ANY from ultraligh...
lgpl-3.0
-3,854,851,223,214,129,000
29.743377
79
0.557865
false
3.372503
true
false
false
AlexStarov/Shop
applications/bitrix/management/commands/1cbitrix.py
1
12839
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand import xml.etree.ElementTree as ET from time import sleep import os from applications.product.models import Category __author__ = 'AlexStarov' def search_in_category(name, id_1c, parent=None, ): try: cat = Category.objects.get(t...
apache-2.0
-4,928,253,206,802,143,000
60.794118
220
0.399889
false
4.497324
false
false
false
astrorafael/twisted-mqtt
mqtt/test/test_pdu.py
1
20218
# ---------------------------------------------------------------------- # Copyright (C) 2015 by Rafael Gonzalez # # 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, includ...
mit
5,394,915,169,349,317,000
38.565558
106
0.633594
false
4.086095
true
false
false
DayGitH/Family-Tree
mainwindow1.py
1
7475
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file '.\mainwindow.ui' # # Created: Wed Dec 17 21:45:47 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(object): def setu...
cc0-1.0
-3,483,384,771,466,825,000
62.347458
147
0.734849
false
4.082469
false
false
false
spirali/shampoo
src/ui/editor.py
1
6904
# # Copyright (C) 2014 Stanislav Bohm # # This file is part of Shampoo. # # Shampoo is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # Shampoo is distributed in the...
gpl-3.0
8,687,659,416,699,172,000
28.630901
74
0.581547
false
4.006965
false
false
false
alephu5/Soundbyte
environment/lib/python3.3/site-packages/sympy/solvers/tests/test_solvers.py
1
55773
from sympy import ( Abs, And, Derivative, Dummy, Eq, Float, Function, Gt, I, Integral, LambertW, Lt, Matrix, Or, Piecewise, Poly, Q, Rational, S, Symbol, Wild, acos, asin, atan, atanh, cos, cosh, diff, erf, erfinv, erfc, erfcinv, erf2, erf2inv, exp, expand, im, log, pi, re, sec, sin, sinh, solve, so...
gpl-3.0
-7,980,767,662,230,217,000
37.597232
94
0.481523
false
2.423859
true
false
false
treehopper-electronics/treehopper-sdk
Python/treehopper/libraries/sensors/inertial/bno055.py
1
4767
from time import sleep from typing import List from treehopper.api import I2C from treehopper.libraries import SMBusDevice from treehopper.libraries.sensors.inertial.bno055_registers import Bno055Registers, OperatingModes, PowerModes from treehopper.libraries.sensors.inertial import Accelerometer, Gyroscope from treeh...
mit
2,991,752,316,976,240,000
34.849624
110
0.578561
false
3.786338
false
false
false
placher/pokeproject2
devfiles/testprojectileimpact.py
1
3561
import sys import pygame import os import inspect from pygame.locals import * currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(currentdir) sys.path.insert(0,parentdir) from scripts import player from scripts import background from scripts import projec...
gpl-3.0
-4,463,376,372,307,577,300
29.965217
236
0.660769
false
3.306407
false
false
false
mensi/gittornado
gittornado/iowrapper.py
1
16438
# -*- coding: utf-8 -*- # # Copyright 2011 Manuel Stocker <mensi@mensi.ch> # # This file is part of GitTornado. # # GitTornado 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, o...
gpl-3.0
4,464,436,423,476,009,500
40.510101
137
0.582309
false
4.209475
false
false
false
markomanninen/tagtor
tagtor/main.py
1
3012
#!/usr/local/bin/python # -*- coding: utf-8 -*- # file: main.py from copy import deepcopy class TAG(object): """ Simple html tag generator """ def __init__(self, *args, **kw): self._name = self.__class__.__name__.lower() self._attributes = dict([k.lower(), str(w)] for k, w in kw.iteritems()) ...
mit
-2,851,480,116,332,622,300
30.673684
102
0.548537
false
3.921773
false
false
false
sixninetynine/pex
pex/resolver_options.py
1
7285
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import print_function from pkg_resources import safe_name from .crawler import Crawler from .fetcher import Fetcher, PyPIFetcher from .http import Context from .installer...
apache-2.0
5,057,392,927,551,107,000
33.201878
100
0.699657
false
4.20612
false
false
false
XBMC-Addons/service.xbmc.versioncheck
resources/lib/version_check/viewer.py
1
5158
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Copyright (C) 2011-2013 Martijn Kaijser Copyright (C) 2013-2014 Team-XBMC Copyright (C) 2014-2019 Team Kodi This file is part of service.xbmc.versioncheck SPDX-License-Identifier: GPL-3.0-or-later See LICENSES/GPL-3.0-or-later.tx...
gpl-2.0
6,787,627,537,322,967,000
30.440252
100
0.582784
false
3.928408
false
false
false
nigelsmall/py2neo
py2neo/database/cypher.py
1
6889
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2016, Nigel Small # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unle...
apache-2.0
8,277,273,479,301,094,000
28.566524
99
0.575555
false
4.076331
false
false
false
alex/changes
tests/changes/api/test_system_options.py
1
1427
from changes.config import db from changes.models import SystemOption from changes.testutils import APITestCase class SystemOptionsListTest(APITestCase): def test_simple(self): path = '/api/0/systemoptions/' resp = self.client.get(path) assert resp.status_code == 200 data = self.u...
apache-2.0
-5,700,007,956,722,778,000
25.425926
55
0.58164
false
4.077143
true
false
false
chiffa/Pharmacosensitivity_growth_assays
src/plot_drawings.py
1
5857
import numpy as np from matplotlib import pyplot as plt from chiffatools.linalg_routines import rm_nans from chiffatools.dataviz import better2D_desisty_plot import supporting_functions as SF from scipy import stats def quick_hist(data): plt.hist(np.log10(rm_nans(data)), bins=20) plt.show() def show_2d_arra...
bsd-3-clause
-7,508,849,187,087,418,000
38.85034
140
0.621137
false
2.86126
false
false
false
google-research/google-research
protein_lm/domains.py
1
14044
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
apache-2.0
-4,031,687,846,241,752,000
33.421569
81
0.662489
false
3.82879
false
false
false
hakonsbm/nest-simulator
pynest/examples/BrodyHopfield.py
1
4554
# -*- coding: utf-8 -*- # # BrodyHopfield.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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, ...
gpl-2.0
3,528,837,289,585,193,000
37.923077
81
0.585859
false
4.387283
false
false
false
bschmoker/stix-validator
validators/xml_schema.py
1
7809
# Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import os from collections import defaultdict from lxml import etree class XmlSchemaValidator(object): NS_XML_SCHEMA_INSTANCE = "http://www.w3.org/2001/XMLSchema-instance" NS_XML_SCHEMA = "http://www.w3.or...
bsd-3-clause
-661,948,361,949,860,100
38.841837
85
0.548726
false
4.585437
false
false
false
on-three/asobot
asobot/emulator.py
1
1610
# vim: set ts=2 expandtab: # -*- coding: utf-8 -*- """ Module: Emulator.py Desc: pass keypresses to a game emultor or something. Author: on_three Email: on.three.email@gmail.com DATE: Thursday, Jan 16th 2014 """ import string import re from twisted.python import log from controls import Key class Emulator(object)...
mit
2,284,341,602,436,959,700
23.769231
65
0.647205
false
3.469828
false
false
false
sserrot/champion_relationships
venv/Lib/site-packages/PIL/SunImagePlugin.py
1
4302
# # The Python Imaging Library. # $Id$ # # Sun image file handling # # History: # 1995-09-10 fl Created # 1996-05-28 fl Fixed 32-bit alignment # 1998-12-29 fl Import ImagePalette module # 2001-12-18 fl Fixed palette loading (from Jean-Claude Rimbault) # # Copyright (c) 1997-2001 by Secret Labs AB # Copyright (c...
mit
-6,823,107,286,268,212,000
30.632353
82
0.547652
false
3.683219
false
false
false
JingheZ/shogun
examples/undocumented/python_modular/structure_discrete_hmsvm_mosek.py
2
1217
#!/usr/bin/env python import numpy import scipy from scipy import io data_dict = scipy.io.loadmat('../data/hmsvm_data_large_integer.mat', struct_as_record=False) parameter_list=[[data_dict]] def structure_discrete_hmsvm_mosek (m_data_dict=data_dict): from modshogun import RealMatrixFeatures from modshogun impo...
gpl-3.0
2,882,753,445,676,237,000
26.659091
92
0.733772
false
2.83683
false
false
false
madduck/reclass
reclass/errors.py
2
6324
# # -*- coding: utf-8 -*- # # This file is part of reclass (http://github.com/madduck/reclass) # # Copyright © 2007–14 martin f. krafft <madduck@madduck.net> # Released under the terms of the Artistic Licence 2.0 # import posix, sys import traceback from reclass.defaults import PARAMETER_INTERPOLATION_SENTINELS clas...
artistic-2.0
5,022,595,609,476,263,000
28.676056
83
0.621895
false
3.668601
false
false
false
stencila/hub
manager/users/migrations/0001_initial.py
1
5290
# Generated by Django 3.0.8 on 2020-07-08 22:03 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import users.models class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0011_update_pr...
apache-2.0
5,189,788,996,011,161,000
81.65625
279
0.652174
false
4.242181
false
false
false
Nic30/hwtLib
hwtLib/peripheral/i2c/masterBitCntrl_test.py
1
1862
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from _collections import deque import unittest from hwt.simulator.simTestCase import SimTestCase from hwtLib.peripheral.i2c.intf import I2cAgent from hwtLib.peripheral.i2c.masterBitCntrl import I2cMasterBitCtrl, \ NOP, START, READ, WRITE from hwtSimApi.constants impo...
mit
4,142,820,898,430,028,300
27.646154
73
0.593985
false
3.067545
true
false
false
mvaled/sentry
src/sentry/south_migrations/0397_auto__add_latestrelease__add_unique_latestrelease_repository_id_enviro.py
1
102302
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): # Flag to indicate if this migration is too risky # to run online and needs to be coordinated for offline ...
bsd-3-clause
9,205,398,465,352,764,000
90.668459
233
0.580878
false
3.886559
false
false
false
micahjonas/python-2048-ai
chromectrl.py
1
3685
import urllib, urllib2, json, threading, itertools try: import websocket except ImportError: websocket = None class ChromeDebuggerControl(object): ''' Control Chrome using the debugging socket. Chrome must be launched using the --remote-debugging-port=<port> option for this to work! ''' def __ini...
mit
258,010,317,988,155,460
36.222222
131
0.544369
false
4.355792
false
false
false
hpc-cecal-uy/pf_metrics
jmetal/pf_metrics.py
1
4208
# Copyright 2015 Renzo Massobrio # Facultad de Ingenieria, UdelaR # 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
1,158,768,144,247,686,000
38.327103
136
0.612643
false
3.533165
false
false
false
arnaudjuracek/py_suzanne
bak.run.py
1
1766
# --------------------------- # py_suzanne 1.0 # Arnaud Juracek # github.com/arnaudjuracek import RPi.GPIO as GPIO import glob, pygame, time, os, random # -------------------------- # startup notification print 'py_suzanne started' os.system('omxplayer data/hello_world.aiff') # -------------------------- # GPIO sett...
gpl-3.0
2,631,060,658,673,370,000
24.970588
91
0.610985
false
2.92869
false
false
false
markfinal/BuildAMation
codingtools/dotnetcore_make_release.py
1
10008
#!/usr/bin/python from generate_docs import build_documentation from generate_docs import NoDoxygenError from optparse import OptionParser import os import platform import shutil import stat import subprocess import sys import tarfile import tempfile import traceback import zipfile g_script_dir = os.path.dirname(os....
bsd-3-clause
2,779,776,771,498,325,000
36.066667
220
0.624201
false
3.565372
true
false
false
Unthinkingbit/bitcointools
base58.py
1
3506
#!/usr/bin/env python """encode/decode base58 in the same way that Bitcoin does""" import hashlib import math __b58chars = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz' __b58base = len(__b58chars) getNewRIPEMD160 = None getNewSHA256 = None def b58encode(v): """ encode v, which is a string of bytes...
mit
-4,130,492,044,310,019,000
25.969231
80
0.692527
false
2.951178
false
false
false
thomasquintana/jobber
profile.py
1
2236
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
1,259,529,836,510,303,700
32.878788
81
0.76297
false
3.822222
false
false
false
guacamoleo/Tensile
Tensile/ClientWriter.py
1
38398
################################################################################ # Copyright (C) 2016 Advanced Micro Devices, Inc. All rights reserved. # # 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 th...
mit
2,385,873,656,909,588,000
40.421791
152
0.550992
false
3.774872
false
false
false
eayunstack/python-neutronclient
neutronclient/neutron/v2_0/network.py
1
8760
# Copyright 2012 OpenStack Foundation. # All Rights Reserved # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
5,446,808,212,747,097,000
36.758621
79
0.573973
false
4.231884
false
false
false
ffalcinelli/wstunnel
setup.py
1
4807
#!/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2013 Fabio Falcinelli # # 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 late...
lgpl-3.0
5,581,825,389,117,905,000
38.735537
108
0.524027
false
4.176368
false
false
false
garyd203/flying-circus
src/flyingcircus/_raw/budgets.py
1
1096
"""Raw representations of every data type in the AWS Budgets service. See Also: `AWS developer guide for Budgets <https://docs.aws.amazon.com/awsaccountbilling/latest/aboutv2/>`_ This file is automatically generated, and should not be directly edited. """ from attr import attrib from attr import attrs from ...
lgpl-3.0
-4,699,627,189,435,388,000
26.4
106
0.737226
false
3.665552
false
false
false
py-eww/eww
eww/command.py
1
15282
# -*- coding: utf-8 -*- """ eww.command ~~~~~~~~~~~ This is our custom command module. It is a subclass of :py:class:`cmd.Cmd`. The most significant change is using classes rather than functions for the commands. Due to this change, we don't use CamelCase for command class names here. St...
mit
357,748,505,772,380,400
28.501931
79
0.499018
false
4.936047
false
false
false
alessio/dokku
contrib/dokku-installer.py
1
7718
#!/usr/bin/env python2.7 import cgi import json import os import SimpleHTTPServer import SocketServer import subprocess import sys import threading VERSION = 'v0.4.11' hostname = '' try: command = "bash -c '[[ $(dig +short $HOSTNAME) ]] && echo $HOSTNAME || wget -q -O - icanhazip.com'" hostname = subprocess....
mit
5,662,286,861,856,601,000
34.081818
208
0.564006
false
3.497055
false
false
false
rbiswas4/FluctuationsInCosmology
interfacecosmology/psutils.py
1
25544
#!/usr/bin/env python # #This is a set of wrappers designed to use methods of obtaining linear #quantities of interest from outputs of actual programs taht do the #calculations, like CAMB with the help of utilities for specific programs. # #USEFUL ROUTINES: # #powerspectrum: obtains the linear power spectrum of vario...
mit
-3,501,540,544,829,631,000
24.672362
127
0.65393
false
2.754664
false
false
false
necroguemancer/google-play-discord-bot
utils.py
1
1935
from time import sleep, strftime from datetime import datetime # from requests.packages.urllib3.exceptions import InsecureRequestWarning import requests, random try: from faker import Faker fake = Faker() except Exception: print("Run \"pip install Faker\" using the correct pip path and you should be fine.") # impor...
gpl-3.0
4,605,339,655,682,512,000
23.493671
86
0.663049
false
3.042453
false
false
false
googleapis/python-dataflow-client
google/cloud/dataflow_v1beta3/types/metrics.py
1
16973
# -*- 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
-5,073,147,159,870,581,000
40.196602
98
0.654274
false
4.253885
false
false
false
debug-icons-project/debug-icons-tools
code/check_icon_names.py
1
2994
import os ICON_DATABASE_FOLDER = "../icon-database" def check_for_context_problems(themes): print "Checking the following themes for icons in multiple contexts:" print ", ".join(themes) print Icons = {} for theme in themes: with open(os.path.join(ICON_DATABASE_FOLDER, theme + ".txt")...
mit
1,633,209,410,626,736,400
25.732143
95
0.565464
false
4.135359
false
false
false
Johnzero/erp
openerp/addons/fg_account/report/period_check.py
1
6379
# -*- coding: utf-8 -*- import tools from osv import fields, osv class reconcile_item(osv.osv_memory): _name = "fg_account.reconcile.item" _columns = { 'ref_doc':fields.reference('单据', selection=[('fg_sale.order','销售订单'),('fg_account.bill','收款单')], size=128, readonl...
agpl-3.0
-1,519,215,445,223,832,300
32.938202
105
0.460833
false
3.477069
false
false
false
kdschlosser/SonyAPI
setup.py
1
1842
# -*- coding: utf-8 -*- # # SonyAPI # External control of Sony Bravia Generation 3 TV's # Copyright (C) 2017 Kevin G. Schlosser # # 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 ...
gpl-2.0
2,833,613,687,066,089,000
28.238095
73
0.679696
false
3.869748
false
false
false
MiniSEC/GRR_clone
lib/flows/general/grep.py
1
4124
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. """A simple grep flow.""" import time from grr.lib import aff4 from grr.lib import flow from grr.lib import rdfvalue from grr.lib import type_info from grr.lib import utils class Grep(flow.GRRFlow): """Greps a file on the client for a patt...
apache-2.0
-9,200,251,228,935,758,000
30.968992
80
0.634336
false
3.793928
false
false
false
KelSolaar/Umbra
umbra/globals/ui_constants.py
1
7560
#!/usr/bin/env python # -*- coding: utf-8 -*- """ **ui_constants.py** **Platform:** Windows, Linux, Mac Os X. **Description:** Defines **Umbra** package ui constants through the :class:`UiConstants` class. **Others:** """ from __future__ import unicode_literals __author__ = "Thomas Mansencal" __copyright...
gpl-3.0
371,396,141,367,701,060
29.857143
103
0.667725
false
3.655706
false
false
false
kalcho83/black-hat-python
bhpnet.py
1
8452
#!/opt/local/bin/python2.7 import sys import socket import getopt import threading import subprocess # define some global variables listen = False command = False upload = False execute = "" target = "" upload_destination = "" port = 0 # this r...
gpl-3.0
-4,140,704,907,797,089,300
34.074689
133
0.428064
false
5.520575
false
false
false
callowayproject/django-massmedia
example/settings.py
1
4213
# Django settings for example project. DEBUG = True TEMPLATE_DEBUG = DEBUG import os import sys APP = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) PROJ_ROOT = os.path.abspath(os.path.dirname(__file__)) sys.path.append(APP) ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS D...
apache-2.0
-6,627,286,543,488,898,000
32.975806
123
0.688346
false
3.555274
false
false
false
liamneath1/hailey.io
hailey_web/hailey_api/migrations/0001_initial.py
1
1312
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-14 22:41 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='StockM...
mit
1,092,914,653,890,573,000
33.526316
114
0.539634
false
4.373333
false
false
false
macedir/Software-Development
Python/P1.py
1
1648
# KYLE'S CHANGE COUNTER VERSION 1000 # INCLUDES UNSOLVABLE PENNY ERROR import math dict = { 100: 'hundred dollar bill', 50: 'fifty dollar bill', 20: 'twenty dollar bill', 10: 'ten dollar bill', 5: 'five dollar bill', 2: 'toonie', 1: 'loonie', ...
gpl-3.0
3,040,184,352,776,137,700
27.428571
77
0.426578
false
3.806005
false
false
false
xmendez/wfuzz
src/wfuzz/factories/fuzzresfactory.py
1
4150
import copy from .fuzzfactory import reqfactory from .payman import payman_factory from ..fuzzobjects import FuzzResult, FuzzType, FuzzWord, FuzzWordType from ..helpers.obj_factory import ObjectFactory, SeedBuilderHelper class FuzzResultFactory(ObjectFactory): def __init__(self): ObjectFactory.__init__(...
gpl-2.0
-3,708,989,993,210,402,300
31.170543
82
0.630361
false
3.608696
false
false
false
WayStudios/fora
fora/core/user.py
1
3473
# fora # class User # Xu [xw901103@gmail.com] Copyright 2015 from fora.core.dbsession import ( DBSession, OR ) from fora.models.user import UserModel import uuid from datetime import datetime class User(object): """ This class contains core functionality of fora user manipulation. """ model = None...
bsd-3-clause
-2,055,657,441,272,897,500
35.557895
239
0.624532
false
3.893498
false
false
false
phate/jive
scripts/arrayliterals.py
1
2660
import re import sys r = re.compile('([a-zA-Z0-9_*_ ]*\\[\\]) *') r = re.compile('\\(([a-zA-Z0-9_*_ ]*)\\[\\]\\)') def scan_stmt_starts(text): starts = [] next_line_stmt = False beginning_decl = False nested_decls = set() depth = 0 for n in range(len(text)): c = text[n] if c == '{': if beginning_decl: ...
lgpl-2.1
9,154,337,267,762,679,000
20.803279
79
0.608271
false
2.733813
false
false
false
glenngillen/dotfiles
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/jedilsp/pygls/protocol.py
1
29516
############################################################################ # Copyright(c) Open Law Library. All rights reserved. # # See ThirdPartyNotices.txt in the project root for additional notices. # # # # Licensed u...
mit
1,117,900,913,965,417,300
38.09404
117
0.599336
false
4.543719
true
false
false
simonpessemesse/seguinus
chambres/joursFerie.py
1
5799
#!/usr/bin/python # -*- coding: iso-8859-1 -*- def datepaques(an): """Calcule la date de Paques d'une annee donnee an (=nombre entier)""" a = an // 100 b = an % 100 c = (3 * (a + 25)) // 4 d = (3 * (a + 25)) % 4 e = (8 * (a + 11)) // 25 f = (5 * a + b) % 19 g = (19 * f + c - e) % 30 ...
gpl-2.0
4,589,852,060,434,486,000
27.24878
83
0.473493
false
2.454854
false
false
false
anrl/gini3
frontend/src/gbuilder/UI/MainWindow.py
1
59141
"""The main window for gbuilder 2.0""" import os, time, math, subprocess, sys from PyQt4.QtCore import * from PyQt4.QtGui import * from DropBar import * from LogWindow import * from Canvas import * from Node import * from Edge import * from Configuration import * from Core.globals import * import thread i...
mit
2,184,146,233,005,499,600
36.032797
248
0.561083
false
4.235854
false
false
false
daonb/django-oklinks
oklinks/models.py
1
1797
import os from django.db import models from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.utils.translation import ugettext_lazy as _ from django.core.files.storage import FileSystemStorage from django.conf import settings from managers import LinksM...
bsd-3-clause
1,131,894,914,825,749,500
35.673469
93
0.687257
false
3.898048
false
false
false
mavroskardia/ilovemymudder
mudder/src/common/utils.py
1
2484
import sys import os import shutil import io import datetime import time import importlib import threading class HijackedStdOut(io.TextIOWrapper): def write(self, s): if s == '\n': super().write(s) return s = '{:%Y.%m.%d %H:%M:%S} => {}'.format(datetime.datetime.now(), s)...
mit
892,111,590,700,638,300
23.84
75
0.579308
false
3.690936
false
false
false
lefakkomies/pynomo
examples/ex_type1_nomo_1.py
1
1854
""" ex_type1_nomo_1.py Simple nomogram of type 1: F1 + F2 + F3 = 0 Copyright (C) 2007-2009 Leif Roschier 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...
gpl-3.0
1,613,223,115,143,167,700
24.39726
73
0.599784
false
2.883359
false
false
false
wdmchaft/taskcoach
taskcoachlib/gui/viewer/category.py
1
10590
# -*- coding: utf-8 -*- ''' Task Coach - Your friendly task manager Copyright (C) 2004-2010 Task Coach developers <developers@taskcoach.org> Copyright (C) 2008 Rob McMullen <rob.mcmullen@gmail.com> Copyright (C) 2008 Thomas Sonne Olesen <tpo@sonnet.dk> Task Coach is free software: you can redistribute it and/or modif...
gpl-3.0
5,805,815,929,631,619,000
46.066667
117
0.622285
false
4.833409
false
false
false
singingwolfboy/flask-dance
flask_dance/consumer/storage/__init__.py
1
1267
from abc import ABCMeta, abstractmethod class BaseStorage(metaclass=ABCMeta): @abstractmethod def get(self, blueprint): return None @abstractmethod def set(self, blueprint, token): return None @abstractmethod def delete(self, blueprint): return None class NullStorag...
mit
1,565,694,463,115,637,000
22.036364
72
0.648777
false
4.508897
false
false
false
schenc3/InteractiveROSETTA
InteractiveROSETTA/scripts/io_tools/process_pdb.py
1
117335
#!/usr/bin/env python # :noTabs=true: """ create a directory of the contents in a PDB splits into chains, grouped chains (pairings parsed from the header), individual HETATM PDB lines, sequence files (FASTA), etc. verbosely: This method behaves slightly differently for PDB files with multiple models, nucleic ...
gpl-2.0
6,684,947,784,690,174,000
40.890396
461
0.522973
false
3.198708
false
false
false
jordifierro/abidria-api
experiences/entities.py
1
2739
class Experience: def __init__(self, title, description, author_id, author_username=None, id=None, picture=None, is_mine=False, is_saved=False): self._id = id self._title = title self._description = description self._picture = picture self._author_id = autho...
mit
-958,076,121,102,915,600
26.39
93
0.551661
false
4.403537
false
false
false
redCOR-Public/PiBot-A
robot-oa.py
1
1993
#!/usr/bin/python # ======================================================== # Python script for PiBot-A: obstacle avoidance # Version 1.0 - by Thomas Schoch - www.retas.de # ======================================================== from __future__ import print_function #+# NUR WENN PRINT! from pololu_drv8835_rpi impor...
mit
6,732,276,785,605,981,000
28.308824
58
0.601606
false
3.39523
false
false
false
mattvonrocketstein/smash
smashlib/plugins/cmd_env.py
1
1353
""" smashlib.plugins.env_command """ import os from smashlib import get_smash from smashlib.plugins import Plugin from smashlib.patches.base import PatchMagic from smashlib.completion import smash_env_complete env_completer = lambda himself, event: smash_env_complete(event.symbol) env_regex = r'env [A-Za-z0-9_]+$' cl...
mit
-4,364,809,888,031,154,000
25.019231
74
0.589061
false
3.617647
false
false
false
teknologkoren/teknologkoren-se
teknologkoren_se/util.py
1
2092
from urllib.parse import urlparse, urljoin from flask import g, request, session, url_for from teknologkoren_se import app def paginate(content, page, page_size): """Return a page of content. Calculates which posts to have on a specific page based on which page they're on and how many objects there are p...
mpl-2.0
5,092,879,950,161,629,000
30.223881
71
0.630497
false
3.831502
false
false
false
SDeans0/Moodle
matchToCloze.py
1
7517
# Written by Sam Deans. # Twitter/GitHub: @sdeans0 # Licensed under the Apache License, Version 2.0 (see below) # This program is for turning matching type Moodle questions to Cloze type questions in # Moodle xml format. # Run it from the command line by importing the moduleand running the # matchToCloze.main('file...
apache-2.0
-6,817,513,452,035,199,000
37.352041
127
0.673407
false
3.792634
false
false
false
joereynolds/Mr-Figs
src/game.py
1
1318
import pygame import json import src.config as config from src.user_data import UserData class Game(object): def __init__(self, fps): self.done = False self.fps = fps self.clock = pygame.time.Clock() def run(self, scene): """Our main function call. inits pygame, starts our f...
gpl-3.0
129,886,711,976,486,270
28.288889
71
0.575873
false
3.865103
false
false
false
Ezra/qwertonic
music.py
1
2072
###music.py ###Created by Joseph Rollinson, JTRollinson@gmail.com ###Last Modified: 12/07/11 ###Requires: pyo ###Turns pyo into a note class that is very easy to run. ###Also contains functions to run pyo music server. import pyo class note(object): '''creates a note that can be played''' def __ini...
bsd-2-clause
-5,588,362,250,769,846,000
31.419355
102
0.543919
false
3.801835
false
false
false
yuanagain/seniorthesis
src/2017-04-06.py
1
6190
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D import math import numdifftools as nd default_lambda_1, default_lambda_2, default_lambda_3 = 0.086, 0.141, 0.773 default_start = (0.372854105052, 0.393518965248, -0.0359026080443, -0.216701666067) x_0 = default_start res = 0.01...
mit
6,692,264,478,511,544,000
26.757848
92
0.47609
false
2.722076
false
false
false
Maverun/Nurevam
Bot/cogs/remind.py
1
14685
from datetime import datetime, timedelta from discord.ext import commands from .utils import utils import traceback import asyncio import discord import pytz loop_list = {} class Remind(commands.Cog): #This is to remind user about task they set. def __init__(self,bot): self.bot = bot self.redis = ...
mit
6,257,882,285,061,678,000
49.463918
197
0.55383
false
3.744263
false
false
false
crypticmac/McGregor
contrib/bitrpc/bitrpc.py
1
9665
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") e...
mit
-8,488,040,174,819,469,000
27.679525
101
0.568546
false
3.944898
false
false
false
Ebag333/Pyfa
gui/itemStats.py
1
50776
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
gpl-3.0
-3,734,646,158,873,923,000
38.606864
127
0.56119
false
4.114082
false
false
false
mkhuthir/learnPython
Book_pythonlearn_com/twitter/twfriends.py
1
2583
import urllib.request, urllib.parse, urllib.error import twurl import json import sqlite3 TWITTER_URL = 'https://api.twitter.com/1.1/friends/list.json' conn = sqlite3.connect('friends.sqlite') cur = conn.cursor() cur.execute('''CREATE TABLE IF NOT EXISTS People (id INTEGER PRIMARY KEY, name TEXT UNIQUE, retriev...
mit
-3,992,820,602,990,398,000
32.115385
77
0.562137
false
3.855224
false
false
false
TariqAHassan/ZeitSci
analysis/quantitative/quantitative.py
1
2852
""" Formal Python Analyses of the Data ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Python 3.5 """ import pandas as pd from tqdm import tqdm from pprint import pprint from funding_database_tools import MAIN_FOLDER from easymoney.easy_pandas import pandas_print_full # ---------------------------------------------...
gpl-3.0
-1,514,281,424,299,409,700
39.169014
120
0.542426
false
3.737877
false
false
false
postlund/pyatv
pyatv/airplay/pairing.py
1
3297
"""Device pairing and derivation of encryption keys.""" import binascii import logging from typing import Optional from pyatv import conf, exceptions from pyatv.airplay.auth import AirPlayPairingProcedure from pyatv.airplay.srp import LegacyCredentials, SRPAuthHandler, new_credentials from pyatv.const import Protocol...
mit
1,528,977,526,204,508,200
35.633333
87
0.657264
false
4.157629
false
false
false
klmitch/nova
nova/policies/limits.py
1
2189
# Copyright 2016 Cloudbase Solutions Srl # 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 r...
apache-2.0
-8,685,073,734,015,824,000
30.724638
78
0.660576
false
4.083955
false
false
false
scm-spain/slippin-jimmy
tests/slippinj/databases/drivers/test_sqlserver.py
1
5305
import logging from mock import Mock from slippinj.databases.drivers.sqlserver import Sqlserver class TestSqlserver: def setup_method(self, method): self.logger = logging.getLogger('test') self.logger.addHandler(logging.NullHandler()) def teardown_method(self, method): self.logger =...
apache-2.0
7,177,636,296,262,225,000
45.535088
123
0.514986
false
4.355501
true
false
false
guillaume-philippon/aquilon
lib/aquilon/worker/commands/update_building_preference.py
1
2073
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2016,2017 Contributor # # 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 #...
apache-2.0
5,816,525,462,180,406,000
38.865385
87
0.655572
false
4.064706
false
false
false