repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
akej74/grid-control
grid-control/helper.py
1
3109
""" helper.py --------- Implements various helper functions, e.g. to display messages using a QT Message box. """ import io import sys import traceback from PyQt5 import QtCore, QtWidgets, QtGui def excepthook(excType, excValue, tracebackobj): """Rewritten "excepthook" function, to display a message...
gpl-3.0
-29,618,981,212,196,560
30.1
98
0.700547
false
3.805386
false
false
false
tehtechguy/mldata
src/mldata/status_bar.py
1
7525
# status_bar.py # # Author : James Mnatzaganian # Contact : http://techtorials.me # Date Created : 09/17/14 # # Description : Fancy console-based status bar. # Usage : See "run_example()". # Python Version : 2.7.8 # # Adapted From : https://github.com/tehtechguy/py_StatusBar ...
mit
5,515,393,496,029,649,000
27.517647
79
0.608372
false
3.532864
false
false
false
NexusIS/tempest
tempest/config.py
1
57981
# 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
724,095,199,711,786,900
42.044543
79
0.559821
false
4.663101
true
false
false
cdiazbas/MPySIR
setup.py
1
4525
############################################################### # MPySIR: MPI python script for SIR # # CALL: mpirun -n 10 python setup.py ############################################################## """ # Author: cdiazbas@iac.es # Date: 09.06.2015 # Version: 1.7 """ """ Archivos necesarios: ==================...
mit
-7,876,671,923,221,983,000
25.934524
97
0.603536
false
2.878499
false
false
false
AndiDog/git-cola
cola/settings.py
1
6963
"""Save settings, bookmarks, etc. """ from __future__ import division, absolute_import, unicode_literals import json import os import sys from . import core from . import git from . import resources def mkdict(obj): """Transform None and non-dicts into dicts""" if isinstance(obj, dict): value = obj ...
gpl-2.0
378,139,903,769,501,250
28.379747
77
0.559242
false
4.127445
false
false
false
davidblewett/gunny
twisted/plugins/cox.py
1
1717
from zope.interface import implements from twisted.application.internet import UNIXClient from twisted.plugin import IPlugin from twisted.python import log from twisted.python import usage from twisted.application.service import IServiceMaker from autobahn.wamp import WampClientFactory from gunny.reveille.command i...
bsd-2-clause
-7,284,582,898,553,781,000
24.626866
69
0.672685
false
3.732609
false
false
false
BlueBrain/deap
deap/tools/selIBEA.py
1
5350
"""IBEA selector""" # This file is part of DEAP. # # DEAP 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 3 of # the License, or (at your option) any later version. # # ...
lgpl-3.0
-2,592,904,637,388,376,000
34.666667
79
0.674766
false
3.933824
false
false
false
spolight/spolight_service
teaminformation/teaminfo/teaminfo/spiders/spider_teaminfodetail.py
1
1190
import scrapy from scrapy_splash import SplashRequest class DmozSpider(scrapy.Spider): name = "teaminfodetail" #allowed_domains = ["dmoz.org"] start_urls = [ "http://www.nowgoal.com/detail/1245738.html" ] def start_requests(self): for url in self.start_urls: ...
gpl-3.0
-5,053,716,850,511,357,000
38.666667
114
0.581513
false
3.4
false
false
false
bally12345/enigma2
lib/python/Components/MediaPlayer.py
1
3417
from MenuList import MenuList from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename from os import path from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter from Tools.LoadPixmap import LoadPixmap STATE_PLAY = 0 STATE_PAUSE = 1 STATE_STOP = 2 STATE_REWIND = 3 STATE_FORW...
gpl-2.0
-4,197,196,912,761,128,000
29.508929
110
0.733977
false
3.002636
true
false
false
crccheck/atx-bandc
bandc/apps/agenda/feeds.py
1
1276
from django.contrib.syndication.views import Feed from django.urls import reverse from .models import BandC, Document RSS_SIZE = 100 class BandCDocumentFeed(Feed): description_template = "agenda/document_description.html" def get_object(self, request, slug): self.slug = slug if slug == "al...
bsd-3-clause
-4,029,099,297,184,972,300
25.040816
81
0.604232
false
3.866667
false
false
false
inkton/nester
setup.py
1
2206
#!/usr/bin/env python # # Copyright (C) 2016 Inkton <thebird@nest.yt> # # This file is part of nester # # 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 #...
mit
-8,053,686,960,828,547,000
37.034483
72
0.598368
false
4.062615
false
false
false
KT26/PythonCourse
8. Class/7.py
1
1724
# Created by PyCharm Pro Edition # User: Kaushik Talukdar # Date: 23-04-17 # Time: 11:33 PM # What if we want to increment the value of an attribute (instead of replacing it outright) class Car(): def __init__(self, make, model, year): self.make =...
mit
-7,323,777,537,104,650,000
29.381818
119
0.571926
false
3.393701
false
false
false
RubenRocha/ftpscout
ftpscout.py
1
5653
#!/usr/bin/env python3 # ftpscout v.0.1 # # notice: this requires RabbitMQ. # to add to the queue simply pass a text file to server.py containing the hosts in # ip:port or hostname:port format, seperated by a newline # # usage: ./ftpscout.py [logfile.txt] # usage (threaded): ./launch.sh [number of threads] [logfile.txt...
gpl-3.0
-799,190,912,222,037,000
24.931193
121
0.65735
false
2.868087
false
false
false
torchbox/longform
longform/models.py
1
1584
from django.db import models from django.conf import settings from modelcluster.fields import ParentalKey from wagtail.wagtailcore.models import Page, Orderable from wagtail.wagtailcore.fields import StreamField from wagtail.wagtailadmin.edit_handlers import ( FieldPanel, StreamFieldPanel, InlinePanel, PageChoose...
mit
-4,258,515,471,768,198,000
27.285714
65
0.682449
false
4.103627
false
false
false
suriya/save-your-vote
init-db-scripts/add-flatpages.py
1
12188
from django.contrib.sites.models import Site from django.contrib.flatpages.models import FlatPage from django.conf import settings import textwrap FlatPage.objects.all().delete() site = Site.objects.get(pk=settings.SITE_ID) site.domain = 'saveyourvote.in' site.name = 'Save Your Vote' site.save() PAGES = [ ('/fp/ter...
mit
7,640,967,246,950,248,000
41.915493
632
0.735888
false
3.59528
false
false
false
shengqh/ngsperl
lib/QC/fastQCSummary.py
1
5883
import argparse import sys import logging import os def initialize_logger(logfile, logname, isdebug): logger = logging.getLogger(logname) loglevel = logging.DEBUG if isdebug else logging.INFO logger.setLevel(loglevel) formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)-8s - %(messag...
apache-2.0
7,128,921,792,951,964,000
33.227545
114
0.623491
false
3.716361
false
false
false
heyfaraday/CMB_test
points_1.py
1
1859
from numpy import genfromtxt, zeros from math import pi from lib import minkowski N = 2048 file_map_Q = genfromtxt('planck_2_dir/file_map_Q_64_2048.dat') file_map_Qx = genfromtxt('planck_2_dir/file_map_Qx_64_2048.dat') file_map_Qy = genfromtxt('planck_2_dir/file_map_Qy_64_2048.dat') file_map_U = genfromtxt('planck_2...
mit
-2,522,698,348,195,412,000
40.311111
109
0.596019
false
2.15162
false
false
false
gentoo/grss
grs/Execute.py
2
2922
#!/usr/bin/env python # # Execute.py: this file is part of the GRS suite # Copyright (C) 2015 Anthony G. Basile # # 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...
gpl-2.0
7,208,477,461,994,891,000
35.074074
97
0.575633
false
4.13881
false
false
false
allenai/allennlp
allennlp/training/metrics/mean_absolute_error.py
1
2326
from typing import Optional from overrides import overrides import torch import torch.distributed as dist from allennlp.common.util import is_distributed from allennlp.training.metrics.metric import Metric @Metric.register("mean_absolute_error") class MeanAbsoluteError(Metric): """ This `Metric` calculates ...
apache-2.0
-1,180,683,229,054,832,600
30.432432
92
0.604041
false
4.052265
false
false
false
mh11/chip-qc
chipqc/filter_samples.py
1
4044
__author__ = 'mh719' import sqlite3 as lite import os import time import sys from exec_util import execCmd import chipqc_db def getHelpInfo(): return "[OPTIONAL STEP] Filter wiggle files" def addArguments(parser): parser.add_argument('-s','--skip',dest='skip',help="Skip filtering - use original files",action...
gpl-2.0
697,717,661,326,373,500
34.79646
143
0.597428
false
3.242983
false
false
false
DonLakeFlyer/ardupilot
libraries/SITL/examples/Morse/rover_scanner.py
7
2562
''' This is an example builder script that sets up a rover in Morse to be driven by ArduPilot. The rover has the basic set of sensors that ArduPilot needs To start the simulation use this: morse run rover.py Then connect with ArduPilot like this: sim_vehicle.py --model morse --console --map This model assumes...
gpl-3.0
-873,690,527,554,634,500
26.548387
79
0.747853
false
3.039146
false
false
false
FrankNagel/qlc
src/webapp/quanthistling/scripts/importfunctions.py
1
16483
# -*- coding: utf8 -*- import re, os import unicodedata from quanthistling import model from annotations import functions def normalize_stroke(string_src): return functions.normalize_stroke(string_src) def delete_book_from_db(Session, bibtex_key): book_q = Session.query(model.Book) book = book_q.filter_b...
gpl-3.0
2,759,722,053,947,207,000
40.396985
168
0.601032
false
3.776072
false
false
false
jdaigneau/geoq
geoq/core/models.py
1
18539
# -*- coding: utf-8 -*- # This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and # is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012) import json import cgi from django.contrib.auth.models import User, Group from django.co...
mit
-4,003,007,089,227,908,000
33.979245
174
0.612007
false
3.83592
false
false
false
saarahy/NGP-LS
neat_gp.py
1
2338
class neat: #propiedades de la especiacion #cambio para neat def get_id(self): return self.id def set_id_(self, id): self.id=id def get_parent(self): return self.parent_ def set_parent(self, arg): self.parent_ = arg def specie(self,sp): self.tspeci...
gpl-3.0
-4,350,969,255,644,673,500
18.822034
38
0.600513
false
3.292958
false
false
false
GenosResearchGroup/ContourMetrics
lib/utils.py
1
4520
import math import numpy import pandas import scipy import sklearn.decomposition from django.core import serializers from matplotlib import pyplot as plt class ExtendedDataFrame(pandas.DataFrame): def heat_plot(self, filename=None): plt.clf() column_labels = self.index.tolist() row_labels...
mit
-5,579,092,799,780,234,000
26.560976
88
0.600664
false
3.330877
false
false
false
seanjh/FDICTransactions
__main__.py
1
2673
import os import sys from sqlalchemy import create_engine from storage.sqlsession import session_scope, Base from scrape.scrape_filers import FDICFilerScraper from scrape.scrape_listing import FDICOwnFilingScraper from scrape.scrape_trades import FDICInsiderFileScraper from storage.transactions import FDICTradeHandler ...
mit
-7,940,477,416,846,872,000
36.661972
112
0.651328
false
3.631793
false
false
false
uholzer/pkb4unix
PKB4Unix/construction.py
1
11320
import re import itertools from collections import defaultdict, namedtuple import subprocess from rdflib import util, Graph, Literal, BNode, URIRef COUNT_ONEORNONE = -1 COUNT_ONEORMORE = -2 COUNT_ANY = -3 class TemplateError(Exception): pass class NotPName(Exception): pass class PrefixNotFound(Exception): ...
gpl-3.0
12,468,833,544,212,732
32.491124
100
0.526678
false
4.174041
false
false
false
DarkFenX/Pyfa
gui/utils/exportHtml.py
2
11498
import threading import time # noinspection PyPackageRequirements import wx from service.const import PortEftOptions from service.settings import HTMLExportSettings from service.fit import Fit from service.port import Port from service.market import Market from logbook import Logger from eos.db import getFit pyfalog =...
gpl-3.0
78,808,129,691,388,850
37.713805
120
0.518786
false
3.809808
false
false
false
fabioz/PyDev.Debugger
tests_python/resources/_debugger_case_gevent.py
2
1440
#!/usr/bin/env python from gevent import monkey, sleep, threading as gevent_threading import sys if 'remote' in sys.argv: import pydevd port = int(sys.argv[1]) print('before pydevd.settrace') pydevd.settrace(host=('' if 'as-server' in sys.argv else '127.0.0.1'), port=port, suspend=False) print('aft...
epl-1.0
7,166,115,034,483,378,000
24.263158
100
0.604861
false
3.295195
false
false
false
pjsdev/simplerpc
simplerpc/payload.py
1
1783
import json from .exceptions import SimpleRPCException class Payload: """ Namespace for payload encoding/decoding """ class MalformedPayload(SimpleRPCException): pass class BufferDecoder: def __init__(self): self.dangling = '' def packages(self, buf): ...
bsd-3-clause
-4,787,527,358,436,784,000
24.471429
84
0.527201
false
4.742021
false
false
false
Obooks/Obooks
ObooksService/App/migrations/0004_auto_20170928_0930.py
1
2466
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-09-28 09:30 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('App', '0003_auto_20170928_0925'), ] operations = [ migr...
gpl-3.0
3,339,412,799,141,698,600
38.142857
114
0.534874
false
4.3879
false
false
false
ninovolador/animal-guesser
adivinaconf.py
1
2209
# -*- coding: utf-8 -*- YES = "si" NO = "no" POS_YES= ['si','s','sí','yes','y'] POS_NO= ['no','n'] ACCEPTABLE_YESNO = POS_YES + POS_NO THING = "animal" #"persona", "cosa", "película" RANDOM = False NEW_AI = True FAST = False POINTS = True MAXPOINTS = 5 MAXTRIES = 6 '''This is the animal-guesser configuration file YES:...
unlicense
2,208,694,325,087,729,400
38.410714
116
0.577707
false
3.927046
false
false
false
simonmonk/prog_pi_ed2
10_RGB_LED.py
1
2182
# 10_RGB_LED.py from tkinter import * import RPi.GPIO as GPIO import time # Configure the Pi to use the BCM (Broadcom) pin names, rather than the pin positions GPIO.setmode(GPIO.BCM) GPIO.setup(18, GPIO.OUT) GPIO.setup(23, GPIO.OUT) GPIO.setup(24, GPIO.OUT) # Start Pulse Width Modulation (PWM) on the red, green...
mit
8,000,308,267,194,469,000
30.171429
85
0.653987
false
3.398754
false
false
false
RomanOsadchuk/GoStory
stories/forms.py
1
1779
from django import forms from django.forms import widgets from django.core.validators import MinLengthValidator from .models import Story, Chapter class CreateStoryForm(forms.Form): title = forms.CharField(min_length=Story.MIN_TITLE_LEN, max_length=Story.MAX_TITLE_LEN) # next is ab...
gpl-3.0
799,759,088,412,932,700
39.431818
75
0.606521
false
4.12761
false
false
false
jonesmartins/pycrusher
pycrusher/name_generator.py
1
3792
#!/usr/bin/env python import os def make_dir(dir_name): """Makes sure target directory doesn't exist, or that the command wasn't called from inside said directory. Args: dir_name(str): Name of directory where all compressed images will be stored. Usually called 'compressed' Returns...
apache-2.0
24,299,729,753,013,950
41.606742
81
0.591245
false
4.199336
false
false
false
SqueezeStudioAnimation/dpAutoRigSystem
dpAutoRigSystem/Extras/dpHeadDeformer.py
1
6699
# importing libraries: import maya.cmds as cmds import maya.mel as mel from ..Modules.Library import dpControls as ctrls # global variables to this module: CLASS_NAME = "HeadDeformer" TITLE = "m051_headDef" DESCRIPTION = "m052_headDefDesc" ICON = "/Icons/dp_headDeformer.png" class HeadDeformer(): def __init_...
gpl-2.0
-8,011,064,889,020,540,000
53.032258
168
0.605613
false
3.518382
false
false
false
jkr/notmuch-client
nmclient/dates.py
1
5062
# -*- coding: utf-8 -*- ######################################################################### # dates.py: for use with date-range substitution in notmuch-client # # # # Copyright © 2011 Jesse Rosenthal ...
gpl-3.0
4,121,855,125,936,414,700
37.930769
77
0.478166
false
4.427822
false
false
false
tlhallock/line-search-dfo
python/algorithms/filter_linesearch.py
1
9089
from math import inf as infinity from numpy import int as integral from numpy import bmat as blockmat from numpy import concatenate from numpy import dot from numpy import empty from numpy import zeros from numpy.linalg import cond as condition_number from numpy.linalg impo...
gpl-3.0
-2,567,806,604,022,658,600
28.22508
135
0.679503
false
2.931935
false
false
false
wufangjie/leetcode
661. Image Smoother.py
1
2006
class Solution(object): def imageSmoother(self, M): """ :type M: List[List[int]] :rtype: List[List[int]] """ if not M: return M nrow, ncol = len(M), len(M[0]) if ncol == 1: if nrow == 1: return M else: ...
gpl-3.0
8,525,313,534,943,113,000
28.940299
74
0.410768
false
3.360134
false
false
false
erdc/proteus
proteus/MeshTools.py
1
350670
""" Tools for creating and manipulating 1,2, and 3D meshes. .. inheritance-diagram:: proteus.MeshTools :parts: 1 """ from __future__ import print_function from __future__ import absolute_import from __future__ import division from builtins import input from builtins import zip from builtins import next from builtin...
mit
-1,103,119,450,410,455,700
47.195437
233
0.561488
false
3.853686
false
false
false
3rduncle/knowledgeflow
knowledgeflow/utility/qa_utils.py
1
12373
#coding:utf8 import sys import re import logging import random import itertools from keras.preprocessing import sequence from utility import build_vocab from letor_metrics import ndcg_score import numpy as np def extract_sentences(fname): sentences = [] start_r = re.compile('<\d+>') end_r = re.compile('</...
mit
179,556,366,745,157,000
35.090909
102
0.550012
false
3.444444
false
false
false
Lemma1/MAC-POSTS
doc_builder/sphinx-contrib/swf/sphinxcontrib/swf/__init__.py
2
7134
''' sphinxcontrib.swf ~~~~~~~~~~~~~~~~~ This module provides :rst:directive:`swf`, which you can use to embed flash objects into your documentation. ''' from docutils import nodes from docutils.parsers.rst import Directive, directives import os, sys, re, shutil __version__ = '0.3' def bool_optio...
mit
-3,679,307,147,774,893,600
30.017391
133
0.589851
false
3.549254
true
false
false
bluenote10/SimpleLanguageBenchmarks
bench_suite/specs.py
1
3588
#!/usr/bin/env python from __future__ import division, print_function import re import subprocess import platform from .utils import print_warn def match_line_in_text(text, pattern): for line in text.split("\n"): m = re.match(pattern, line) if m is not None: return m.group(1) re...
mit
792,032,795,738,131,300
27.47619
88
0.58835
false
3.480116
false
false
false
yaricom/brainhash
src/cA.py
1
9264
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ The contractive autoencoder implementation taken from Deeplearning Theano tutorial, see: https://github.com/lisa-lab/DeepLearningTutorials/blob/master/code/cA.py Copyright (c) 2010--2015, Deep Learning Tutorials Development Team All rights reserved. Redistribution an...
gpl-3.0
4,133,111,761,884,029,000
46.757732
87
0.611939
false
4.197553
false
false
false
googleapis/googleapis-gen
google/cloud/asset/v1p7beta1/asset-v1p7beta1-py/google/cloud/asset_v1p7beta1/types/asset_service.py
1
14878
# -*- 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
3,185,242,482,510,889,000
36.857506
101
0.631268
false
4.547066
true
false
false
BROADSoftware/hadeploy
lib/hadeploy/plugins/yarn/code.py
1
6452
# Copyright (C) 2018 BROADSoftware # # This file is part of HADeploy # # HADeploy 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. # # H...
gpl-3.0
-8,574,510,820,610,604,000
42.013333
185
0.643211
false
3.43009
false
false
false
KarolBedkowski/photocat
photocat/lib/wxtools/dialogs/message_boxes.py
1
6488
#!/usr/bin/python2.4 # -*- coding: utf-8 -*- """ message_boxes KPyLibs Copyright (c) Karol Będkowski, 2004, 2005, 2006 This file is part of KPyLibs """ __author__ = 'Karol Będkowski' __copyright__ = 'Copyright (C) Karol Będkowski 2006' __revision__ = '$Id$' __all__ = ['message_box_error', 'message_box_info', 'me...
gpl-2.0
8,468,368,418,460,517,000
28.080717
79
0.698843
false
2.815892
false
false
false
amboycharlie/Child-Friendly-LCMS
leonardo/module/web/page/dimension/forms.py
1
1262
import copy import floppyforms as forms from crispy_forms.bootstrap import Tab, TabHolder from crispy_forms.layout import Field, HTML, Layout from django.utils.translation import ugettext_lazy as _ from horizon.utils.memoized import memoized from horizon_contrib.forms import SelfHandlingModelForm from leonardo.modul...
apache-2.0
-8,510,855,863,465,506,000
29.780488
78
0.692552
false
3.755952
false
false
false
nextstrain/augur
setup.py
1
3412
from pathlib import Path import setuptools import sys min_version = (3, 6) if sys.version_info < min_version: error = """ Beginning with augur 7.0.0, Python {0} or above is required. This may be due to an out of date pip. Make sure you have pip >= 9.0.1. """.format('.'.join(str(n) for n in min_version)), ...
agpl-3.0
-5,344,811,685,061,659,000
32.782178
93
0.540152
false
3.127406
false
false
false
helenjin/scanalysis
src/scanalysis/sca_gui.py
1
7517
#!/usr/local/bin/python3 import tkinter as tk from tkinter import filedialog, ttk class sca_gui(tk.Tk): def __init__(self, parent): tk.Tk.__init__(self, parent) self.parent = parent self.initialize() def initialize(self): self.grid() self.vals = None self.curre...
gpl-2.0
659,605,362,825,649,500
49.449664
155
0.634562
false
3.390618
false
false
false
andredalton/bcc
2014/MAC0242/miniep5/miniep5.py
1
4921
#!/usr/bin/env python3 # Apenas para poder manipular a linha de comando import sys # Manipulacao do historico de comandos para facilitar os testes. import readline histfile = ".history" try: readline.read_history_file(histfile) except IOError: pass import atexit atexit.register(readline.write_history_file, hi...
apache-2.0
343,323,799,782,712,000
27.091429
134
0.49176
false
3.257124
false
false
false
freddyb/nodeKnock
nodeKnock-Client.py
1
1119
#!/usr/bin/env python """**************************************************************************** * nodeKnock-Client 0.2 by freddyb * * this is one of many possible nodeKnock clients, and is meant to be as a * proof of concept. * ****************************************************************************""" from ...
gpl-2.0
-5,145,565,155,360,544,000
26.975
79
0.585344
false
3.262391
false
false
false
downpat/django-cms-example
pkg/cms_example/settings.py
1
4859
""" Django settings for cms_example project. Generated by 'django-admin startproject' using Django 1.9.13. 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/ """ import ...
mit
2,701,996,148,175,975,400
25.551913
91
0.683268
false
3.409825
false
false
false
coteyr/home-assistant
homeassistant/components/media_player/snapcast.py
2
2333
""" homeassistant.components.media_player.snapcast ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Provides functionality to interact with Snapcast clients. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/media_player.snapcast/ """ import logging import s...
mit
5,035,044,712,423,639,000
27.45122
74
0.638234
false
4.050347
false
false
false
courtarro/gnuradio
gr-qtgui/examples/pyqt_const_c.py
58
6058
#!/usr/bin/env python # # Copyright 2011,2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your optio...
gpl-3.0
4,865,081,544,152,751,000
31.745946
82
0.642126
false
3.66707
false
false
false
crazyhottommy/manta
src/python/lib/workflowUtil.py
2
10379
# # Manta - Structural Variant and Indel Caller # Copyright (c) 2013-2015 Illumina, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # at your option) a...
gpl-3.0
8,957,493,526,275,949,000
28.654286
154
0.637345
false
3.827065
false
false
false
janusnic/21v-python
unit_17/3.py
2
1068
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from PyQt4 import QtGui, QtCore class Example(QtGui.QWidget): def __init__(self): super(Example, self).__init__() self.initUI() def initUI(self): self.setGeometry(300, 300, 350, 100) self.setWin...
mit
6,275,884,260,520,210,000
19.557692
50
0.519663
false
3.276074
false
false
false
maxime-beck/compassion-modules
message_center_compassion/models/ir_http.py
1
2150
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Yannick Vaucher, Emanuel Cino <ecino@compassion.ch> # # The licence is in the fil...
agpl-3.0
-2,890,648,468,614,530,000
32.59375
79
0.552093
false
4.142582
false
false
false
vortex-exoplanet/VIP
vip_hci/metrics/dust_distribution.py
2
15666
# -*- coding: utf-8 -*- """ Created on Wed May 6 17:07:00 2015 """ import numpy as np from scipy.optimize import newton _author__ = 'Julien Milli' class Dust_distribution(object): """This class represents the dust distribution """ def __init__(self,density_dico={'name':'2PowerLaws', 'ain':5, 'aout':-5, ...
mit
-3,831,389,070,457,644,000
41.923288
120
0.524512
false
3.541139
false
false
false
plotly/python-api
packages/python/plotly/plotly/tests/test_core/test_graph_objs/test_instantiate_hierarchy.py
2
1460
from __future__ import absolute_import from unittest import TestCase import os import importlib import inspect from plotly.basedatatypes import BasePlotlyType, BaseFigure datatypes_root = "plotly/graph_objs" datatype_modules = [ dirpath.replace("/", ".") for dirpath, _, _ in os.walk(datatypes_root) if not...
mit
-6,968,331,776,134,214,000
34.609756
87
0.532192
false
4.74026
false
false
false
geodelic/arke
arke/plugins/collect/system.py
1
5592
# # Copyright 2013 Geodelic # # 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 ...
apache-2.0
-6,312,197,700,102,997,000
31.137931
81
0.50912
false
4.236364
false
false
false
Glottotopia/aagd
moin/local/moin/build/lib.linux-x86_64-2.6/MoinMoin/stats/useragents.py
2
5462
# -*- coding: iso-8859-1 -*- """ MoinMoin - User-Agent Statistics This macro creates a pie chart of the type of user agents accessing the wiki. TODO: should be refactored after hitcounts. @copyright: 2002-2004 Juergen Hermann <jh@web.de>, 2007 MoinMoin:ThomasWaldmann ...
mit
2,951,261,090,398,807,000
28.010989
117
0.554925
false
3.678114
false
false
false
acassis/lintouch
lsp-modbus/tests/test_modbusmaster.py
1
3241
#!/usr/bin/env python # $Id: $ # # FILE: test_mobusmaster.py -- # AUTHOR: Jiri Barton <jbar@swac.cz> # DATE: 14 June 2005 # # Copyright (c) 2001-2005 S.W.A.C. GmbH, Germany. # All Rights Reserved. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General...
gpl-2.0
-3,508,030,124,394,234,000
33.115789
75
0.594878
false
3.821934
false
false
false
ngautam0/keras-pro-bar
keras_tqdm/tqdm_notebook_callback.py
1
1601
from tqdm import tqdm_notebook from .tqdm_callback import TQDMCallback import sys class TQDMNotebookCallback(TQDMCallback): def __init__(self, outer_description="Training", inner_description_initial="Epoch {epoch}", inner_description_update="[{metrics}] ", ...
mit
-171,157,851,222,273,600
47.515152
103
0.501562
false
5.301325
false
false
false
kordless/zoto-server
aztk/servers/ZSPServer.py
1
16722
from twisted.python import usage from ConfigParser import ConfigParser from AZTKServer import AZTKServer import Image, ImageFile, sys, errors, validation, pprint, md5, time, socket, zsp_packets from twisted.internet.protocol import Factory from twisted.internet.app import Application from twisted.internet import defer,...
bsd-3-clause
-3,120,618,513,269,569,000
29.184116
119
0.679345
false
3.08524
true
false
false
Keripo/Beats
scripts/images/holds.py
2
2285
import Image, glob, ImageChops, ImageMath, ImageEnhance files = glob.glob("arrow_*_4.png") def incrange(start, stop, step): if step > 0: return range(start, stop+1, step) else: return range(start, stop-1, step) def channelMap(f, image): return Image.merge(image.mode, [f(chan) for chan in image.split()]) #pun ...
bsd-3-clause
-5,256,766,923,649,650,000
29.878378
79
0.674398
false
2.66007
false
false
false
wummel/linkchecker
linkcheck/plugins/locationinfo.py
9
3883
# -*- coding: iso-8859-1 -*- # Copyright (C) 2000-2014 Bastian Kleineidam # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later versi...
gpl-2.0
1,782,142,971,426,514,000
34.3
90
0.654906
false
3.938134
false
false
false
joaonvfigueiredo/killbill
troika/killbill.py
2
1869
from xlrd import open_workbook from person import Person from bill import Bill from datetime import date, timedelta billWorkbook = open_workbook('../bills.xls') def readPeople(sheet, columns, rows): people = [] for column in range(columns): values = [] for row in range(rows): value...
mit
3,542,677,353,861,659,600
30.677966
90
0.639914
false
3.448339
false
false
false
daonb/Open-Knesset
mmm/migrations/0001_initial.py
14
17515
# -*- 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 model 'Document' db.create_table('mmm_document', ( ('id', self.gf('django.db.models.fie...
bsd-3-clause
-4,221,528,581,501,139,000
81.234742
216
0.552726
false
3.544829
false
false
false
krukas/Mage2Gen
mage2gen/snippets/model.py
1
69809
# A Magento 2 module generator library # Copyright (C) 2016 Maikel Martens # # This file is part of Mage2Gen. # # Mage2Gen 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 # ...
gpl-3.0
-7,379,776,745,117,829,000
43.951062
405
0.638156
false
3.421004
false
false
false
teampheenix/StarCraft-Casting-Tool
scctool/settings/history.py
1
4381
"""Provide history manager for SCCTool.""" import json import logging import scctool.settings.translation from scctool.settings import getJsonFile, idx2race, race2idx module_logger = logging.getLogger(__name__) _ = scctool.settings.translation.gettext class HistoryManager: """History manager for SCCTool.""" ...
gpl-3.0
-1,711,385,107,263,561,700
33.226563
73
0.530701
false
4.241045
false
false
false
knowledgecommonsdc/kcdc3
kcdc3/apps/classes/migrations/0018_auto__chg_field_event_location_address1__chg_field_event_location_addr.py
1
9954
# -*- 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): # Changing field 'Event.location_address1' db.alter_column('classes_event', 'location_address1', self.gf('d...
mit
-3,789,741,378,202,330,000
73.849624
237
0.582078
false
3.677133
false
false
false
jantman/awslimitchecker
awslimitchecker/tests/support.py
1
13142
""" awslimitchecker/tests/support.py The latest version of this package is available at: <https://github.com/jantman/awslimitchecker> ################################################################################ Copyright 2015-2018 Jason Antman <jason@jasonantman.com> This file is part of awslimitchecker, als...
agpl-3.0
-5,978,919,376,088,293,000
32.35533
80
0.458302
false
4.528601
false
false
false
kiritoe/pokeapi
pokemon/models.py
12
11645
from __future__ import unicode_literals from django.db import models from imagekit.models.fields import ProcessedImageField from imagekit.processors import ResizeToFill from .utils import unique_filename class DateTimeModel(models.Model): class Meta: abstract = True modified = models.DateTimeField...
bsd-3-clause
2,845,050,407,254,119,000
23.260417
78
0.552168
false
3.768608
false
false
false
labase/brython_crafty
fabfile.py
1
1183
# -*- coding: utf-8 -*- """ ############################################################ Brython Crafty - - Fabric deployment ############################################################ :Author: *Carlo E. T. Oliveira* :Contact: carlo@nce.ufrj.br :Date: $Date: 2014/10/10 $ :Status: This is a "work in progress" :Revi...
gpl-2.0
8,053,135,288,582,555,000
30.945946
121
0.594755
false
2.742459
false
false
false
Tocknicsu/nctuoj
backend/service/tag.py
1
2375
from req import Service from map import * from service.base import BaseService from utils.form import form_validation class TagService(BaseService): def __init__(self, db, rs): super().__init__(db, rs) TagService.inst = self def get_tag_list(self): # res = self.rs.get('tag_list') ...
mit
2,419,667,435,661,461,500
30.25
85
0.501895
false
3.603945
false
false
false
mbway/Bayesian-Optimisation
turbo/recorder.py
1
11887
#!/usr/bin/env python3 import os import time import datetime import numpy as np import turbo as tb import turbo.modules as tm #TODO: I have decided that pickling is a totally inappropriate serialisation method for this data for the following reasons (note them down in the documentation) # - from Gpy: Pickling is mea...
gpl-3.0
4,236,832,310,468,843,000
42.068841
206
0.625894
false
4.007755
false
false
false
LeonhardFS/flightbbq
src/extractBigTable.py
1
7425
# coding: utf-8 # ### Linear Regression Model # In[1]: # import required modules for prediction tasks import numpy as np import pandas as pd import math import random import requests import zipfile import StringIO import re import json import os # In[3]: # first step: Accumulate the data # given a list of column...
mit
5,420,441,894,893,552,000
39.135135
118
0.646195
false
2.715801
false
false
false
stuartarchibald/numba
numba/tests/test_byteflow.py
3
2426
""" Test byteflow.py specific issues """ import unittest from numba.tests.support import TestCase from numba.core.compiler import run_frontend class TestByteFlowIssues(TestCase): def test_issue_5087(self): # This is an odd issue. The exact number of print below is # necessary to trigger it. Too m...
bsd-2-clause
-2,437,444,889,852,700,700
24.808511
80
0.395301
false
5.708235
true
false
false
mlperf/training_results_v0.7
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/nnvm/tests/python/frontend/onnx/model_zoo/super_resolution.py
2
2037
# 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
-2,807,129,401,254,200,300
55.583333
104
0.697104
false
3.233333
false
false
false
64studio/pdk
utest.py
1
1519
# $Progeny$ # # Copyright 2005 Progeny Linux Systems, Inc. # # This file is part of PDK. # # PDK is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your optio...
gpl-2.0
210,661,105,084,248,740
32.755556
70
0.736669
false
3.302174
true
false
false
sghai/robottelo
tests/foreman/api/test_permission.py
1
15179
# -*- coding: utf-8 -*- """Unit tests for the ``permissions`` paths. Each ``APITestCase`` subclass tests a single URL. A full list of URLs to be tested can be found here: http://theforeman.org/api/apidoc/v2/permissions.html :Requirement: Permission :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent:...
gpl-3.0
-6,009,887,279,699,730,000
36.82793
79
0.598062
false
4.239519
true
false
false
alfred82santa/envsense
envsense/logic/__init__.py
1
5155
import asyncio import weakref from collections import OrderedDict from envsense.devices import BaseDeviceManager, BaseDevice class LogicDeviceManager(BaseDeviceManager): CONFIG_KEY = 'logics' def __init__(self, app): super(LogicDeviceManager, self).__init__(app) # Add sensors self.i...
mit
-1,424,948,867,478,193,400
32.914474
114
0.592435
false
3.612474
false
false
false
Hedde/django-networth
networth/unittests.py
1
1434
__author__ = 'heddevanderheide' import unittest # App specific from networth.mixins import NetworthMixin class TestObject(NetworthMixin): first_name = '' last_name = '' tags = None class Networth: fields = ( ('first_name', (True, 1)), ('last_name', (lambda f: f.star...
mit
4,209,273,522,948,263,400
22.916667
67
0.528591
false
3.374118
true
false
false
jrosebr1/imutils
demos/picamera_fps_demo.py
1
2980
# author: Adrian Rosebrock # website: http://www.pyimagesearch.com # USAGE # BE SURE TO INSTALL 'imutils' PRIOR TO EXECUTING THIS COMMAND # python picamera_fps_demo.py # python picamera_fps_demo.py --display 1 # import the necessary packages from __future__ import print_function from imutils.video import VideoSt...
mit
-895,183,849,479,864,700
28.22549
71
0.723154
false
3.225108
false
false
false
weissercn/MLTools
Dalitz_simplified/classifier_eval_simplified_with_MLP_code.py
1
8748
#adapted from the example at http://scikit-learn.org/stable/auto_examples/svm/plot_rbf_parameters.html """ This script can be used to get the p value for classifiers. It takes input files with column vectors corresponding to features and lables. Then there are two different routes one can go down. When mode has a val...
mit
-6,771,905,230,740,556,000
35.298755
188
0.624714
false
3.311128
false
false
false
mutanthost/plexhole
PlexConnect.py
1
5291
#!/usr/bin/env python """ PlexConnect Sources: inter-process-communication (queue): http://pymotw.com/2/multiprocessing/communication.html """ import sys, time from os import sep import socket from multiprocessing import Process, Pipe from multiprocessing.managers import BaseManager import signal, errno from Versi...
gpl-2.0
4,669,393,885,179,552,000
26.414508
91
0.609904
false
3.765836
false
false
false
mat128/python-ubersmith-remote-module-server
ubersmith_remote_module_server/router.py
1
1221
# Copyright 2016 Internap # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
apache-2.0
3,638,908,354,356,112,000
36
117
0.671581
false
4.056478
false
false
false
emnh/namingmuse
namingmuse/filepath.py
2
2931
""" Contains filepath, a path representation class $Id: """ import os from musexceptions import * class FilePath(object): """A class that represents a file path. It also provides some useful and common methods regarding paths. We pass around paths as encoded strings (not unicode) by default becau...
gpl-2.0
-8,755,508,739,750,030,000
26.914286
101
0.57523
false
4.169275
false
false
false
Zeght/Prass
tools.py
2
3735
from common import PrassError import bisect import math def parse_scxvid_keyframes(text): return [i-3 for i,line in enumerate(text.splitlines()) if line and line[0] == 'i'] def parse_keyframes(path): with open(path) as file_object: text = file_object.read() if text.find('# XviD 2pass stat file')...
mit
-9,155,276,446,894,454,000
33.266055
96
0.578313
false
3.69802
false
false
false
drtuxwang/system-config
bin/txz.py
1
3751
#!/usr/bin/env python3 """ Make a compressed archive in TAR.XZ format. """ import argparse import glob import os import shutil import signal import sys from typing import List import command_mod import subtask_mod class Options: """ Options class """ def __init__(self) -> None: self._args: ...
gpl-2.0
-5,209,942,590,577,605,000
23.51634
78
0.486804
false
4.17706
false
false
false
vkgrd/instabot
instabot/bot/bot.py
1
12502
import datetime import atexit import signal from ..api import API from .bot_get import get_media_owner, get_your_medias, get_user_medias from .bot_get import get_timeline_medias, get_hashtag_medias, get_user_info from .bot_get import get_geotag_medias, get_timeline_users, get_hashtag_users from .bot_get import get_me...
apache-2.0
-5,600,884,494,373,340,000
32.25
204
0.638218
false
3.458368
false
false
false
cjforman/pele
pele/potentials/xyspin.py
5
4232
import numpy as np from copy import copy from pele.potentials import BasePotential import networkx as nx __all__ = ["XYModel"] def angle_to_2dvector(theta): return np.cos(theta), np.sin(theta) class XYModel(BasePotential): """ XY model of 2d spins on a lattice """ def __init__(self, dim=None,...
gpl-3.0
-4,005,206,605,871,008,300
26.660131
95
0.557892
false
3.174794
false
false
false
gautam1858/tensorflow
tensorflow/tools/compatibility/update/generate_v2_renames_map.py
10
7161
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
1,969,881,131,430,991,400
36.689474
80
0.69669
false
3.531065
false
false
false
codepython/CollectorCity-Market-Place
marketplaces/apps/market_sell/tests.py
2
3626
""" This file demonstrates two different styles of tests (one doctest and one unittest). These will both pass when you run "manage.py test". Replace these with more appropriate tests for your application. """ import logging from django.test import TestCase from django.core.urlresolvers import reverse from auth.model...
apache-2.0
3,334,057,743,875,397,000
31.375
74
0.533922
false
3.722793
true
false
false
sam-m888/addons-source
Form/selectform.py
2
5153
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2015 Nick Hall # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) a...
gpl-2.0
-24,963,507,568,043,970
33.583893
79
0.523384
false
4.115815
false
false
false
SRI-CSL/PLambda
plambda/antlr4/PLambdaParser.py
1
63514
# Generated from PLambda.g4 by ANTLR 4.8 # encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786...
mit
-6,695,734,416,499,598,000
36.738562
188
0.558664
false
3.61697
false
false
false
Xi-Plus/Xiplus-Wikipedia-Bot
policy-newsletter/policy-newsletter.py
1
11697
#!/usr/bin/env python # coding: utf-8 import argparse import os import re from datetime import date import pymysql os.environ['PYWIKIBOT_DIR'] = os.path.dirname(os.path.realpath(__file__)) import pywikibot from dateutil.relativedelta import relativedelta from config import host, password, user # pylint: disable=E0...
mit
-2,312,043,178,374,885,000
26.774026
115
0.560086
false
2.562425
false
false
false
alexlib/openpiv-python
openpiv/lib.py
2
6691
import numpy as np def replace_nans(array, max_iter, tol, kernel_size=2, method="disk"): """Replace NaN elements in an array using an iterative image inpainting algorithm. The algorithm is the following: 1) For each element in the input array, replace it by a weighted average of th...
gpl-3.0
1,186,867,909,054,422,300
34.590426
79
0.562995
false
4.213476
false
false
false
betterlife/psi
psi/app/utils/format_util.py
2
3006
# coding=utf-8 from decimal import Decimal, ROUND_HALF_UP from pypinyin import pinyin, lazy_pinyin import pypinyin def format_decimal(value): """ Format a decimal with two decimal point with rounding mode ROUND_HALF_UP :param value the decimal to format """ return Decimal( Decimal(value).qu...
mit
-6,693,992,227,477,102,000
33.767442
93
0.625084
false
3.853093
false
false
false