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
realm/realm-core
evergreen/bloaty_to_json.py
1
6304
#!/usr/bin/env python3 from __future__ import annotations import argparse import json import re from csv import DictReader from pathlib import Path parser = argparse.ArgumentParser(description='Checks how bloated realm has become') parser.add_argument( '--short-symbols-input', type=Path, help='Path to CSV...
apache-2.0
-2,903,165,258,596,488,700
35.022857
104
0.564562
false
3.618829
false
false
false
aekazakov/narrative
src/biokbase/narrative/tests/test_kbasewsmanager.py
4
10729
""" Tests for Narrative notebook manager """ __author__ = 'Bill Riehl <wjriehl@lbl.gov>' import unittest from getpass import getpass from biokbase.narrative.kbasewsmanager import KBaseWSNotebookManager from biokbase.workspace.client import Workspace import biokbase.workspace import biokbase.auth import os import re fr...
mit
-1,639,539,438,502,310,700
33.28115
136
0.63072
false
3.768528
true
false
false
rabbitvcs/rabbitvcs
rabbitvcs/util/strings.py
1
7919
# # This is an extension to the Nautilus file manager to allow better # integration with the Subversion source control system. # # Copyright (C) 2006-2008 by Jason Field <jason@jasonfield.com> # Copyright (C) 2007-2008 by Bruce van der Kooij <brucevdkooij@gmail.com> # Copyright (C) 2008-2010 by Adam Plumb <adamplumb@gm...
gpl-2.0
1,803,338,357,491,945,200
33.732456
81
0.613335
false
3.821911
false
false
false
fsi-hska/fsiBot
modules/WeatherModule.py
1
3372
#! /usr/bin/env python # coding=utf8 from BotModule import BotModule import urllib, json class WeatherModule(BotModule): def __init__(self): return def command(self, nick, cmd, args, type): if cmd == "!wetter": postalcode = "karlsruhe" if len(args) > 0: postalcode = ' '.join(args).lower() if post...
mit
-964,415,333,796,767,900
27.516949
129
0.622585
false
2.959543
false
false
false
labase/vitollino
src/lab/views/main.py
1
9327
#! /usr/bin/env python # -*- coding: UTF8 -*- # Este arquivo é parte do programa Vittolino # Copyright 2011-2017 Carlo Oliveira <carlo@nce.ufrj.br>, # `Labase <http://labase.selfip.org/>`__, `GPL <http://is.gd/3Udt>`__. # # Vittolino é um software livre, você pode redistribuí-lo e/ou # modificá-lo dentro dos termos da ...
gpl-3.0
1,896,173,857,323,334,400
41.737327
113
0.63755
false
2.2
false
false
false
igorwwwwwwwwwwwwwwwwwwww/ngenious.website
fabfile.py
1
1625
from fabric.api import * from fabric.utils import abort from fabric.contrib.project import rsync_project from fabric.contrib.files import exists if not env.hosts: env.hosts = [ 'www-data@app-0.igor.io', 'www-data@app-1.igor.io', ] project_name = 'ngenious.website' target_dir = '/var/www/'+proj...
mit
6,400,153,944,193,456,000
26.083333
57
0.584615
false
3.329918
false
false
false
mvo5/snapcraft
tests/fake_servers/search.py
2
5444
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2016-2019 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
gpl-3.0
-6,621,952,700,684,669,000
35.05298
86
0.5259
false
4.223429
true
false
false
CMTaylor/robotframework-autoitlibrary
setup.py
3
5035
""" Package: robotframework-AutoItLibrary Module: AutoItLibrary Installation Module Purpose: This is a Python "Distutils" setup program used to build installers for and to install the robotframework-AutoItLibrary. Copyright (c) 2008-2010 Texas Instruments, Inc. Licensed under the Apache Li...
apache-2.0
6,858,002,108,029,616,000
39.934959
114
0.565641
false
4.241786
true
false
false
danrschlosser/eventum
eventum/routes/auth.py
1
8487
""" .. module:: auth :synopsis: All routes on the ``auth`` Blueprint. .. moduleauthor:: Dan Schlosser <dan@schlosser.io> """ import base64 import httplib2 import os from apiclient.discovery import build from flask import (Blueprint, render_template, request, flash, session, g, redirect, url_fo...
mit
309,365,035,966,521,340
34.51046
78
0.592318
false
4.1
false
false
false
meraki-analytics/cassiopeia-datastores
cassiopeia-diskstore/cassiopeia_diskstore/spectator.py
1
3073
from typing import Type, TypeVar, MutableMapping, Any, Iterable from datapipelines import DataSource, DataSink, PipelineContext, Query, validate_query from cassiopeia.data import Platform, Region from cassiopeia.dto.spectator import FeaturedGamesDto, CurrentGameInfoDto from cassiopeia.datastores.uniquekeys import con...
mit
3,853,958,600,843,314,000
42.28169
119
0.636837
false
3.846058
false
false
false
ddcampayo/polyFEM
tools/movie_particles.py
1
1385
#!/usr/bin/python import matplotlib.pyplot as plt import numpy as np #import matplotlib.cm as cm #from matplotlib.colors import Normalize import sys #print "This is the name of the script: ", sys.argv[0] #print "Number of arguments: ", len(sys.argv) #print "The arguments are: " , str(sys.argv) if(len(sys.argv) == 1...
gpl-3.0
-8,238,294,631,123,967,000
19.367647
68
0.537184
false
2.379725
false
false
false
AveryPratt/django-imager
imagersite/imager_images/migrations/0003_auto_20170127_1757.py
1
1340
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-01-27 17:57 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('imager_images', '0002_auto_20170125_0218'), ] operations = [ migrations.Alt...
mit
3,201,460,821,906,132,500
28.777778
65
0.55597
false
4.161491
false
false
false
llfccc/weekly
weekly/utils/permission_middleware.py
1
2194
# !/usr/bin/env python # !-*-coding:utf-8-*- import time from django.utils.deprecation import MiddlewareMixin from django.core.cache import cache from utils.tools import my_response, Logger # class PermissionCheck(MiddlewareMixin): # """ # 中间件,用于检查请求权限 # """ # cookie_time = 2 * 3600 # @stat...
apache-2.0
-5,133,435,417,261,500,000
30.279412
102
0.564911
false
3.245802
false
false
false
slackpad/hashtagtodo-open
todo/models/calendar.py
1
1322
from google.appengine.ext import ndb class Calendar(ndb.Model): summary = ndb.StringProperty() time_zone = ndb.StringProperty() show_in_todolist = ndb.BooleanProperty(default=True) active = ndb.BooleanProperty(default=True) watch_id = ndb.StringProperty() watch_expires = ndb.DateTimeProperty()...
mit
-4,252,697,951,458,202,600
31.243902
65
0.611195
false
3.96997
false
false
false
op3/hdtv
hdtv/histogram.py
1
26585
# -*- coding: utf-8 -*- # HDTV - A ROOT-based spectrum analysis software # Copyright (C) 2006-2009 The HDTV development team (see file AUTHORS) # # This file is part of HDTV. # # HDTV is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # ...
gpl-2.0
-1,190,877,172,737,850,600
32.272841
126
0.556517
false
3.752294
false
false
false
schneidersoft/KiBoM
bomlib/component.py
1
17090
# -*- coding: utf-8 -*- from __future__ import unicode_literals from bomlib.columns import ColumnList from bomlib.preferences import BomPref import bomlib.units as units from bomlib.sort import natural_sort import re import sys DNF = [ "dnf", "dnl", "dnp", "do not fit", "do not place", "do not...
mit
2,352,314,765,385,590,300
28.618718
111
0.533645
false
4.219753
false
false
false
HackUCF/ppl
membership/views.py
1
2160
import json from django.conf import settings from django.contrib.auth.decorators import user_passes_test, login_required from django.core.cache import cache from django.core.serializers.json import DjangoJSONEncoder from django.db.models import Q from django.forms import model_to_dict from django.http import HttpRespo...
gpl-3.0
-1,755,547,526,197,939,500
27.72
76
0.720984
false
3.778947
false
false
false
mbayon/TFG-MachineLearning
vbig/lib/python2.7/site-packages/pandas/tests/series/test_quantile.py
7
7083
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest import numpy as np import pandas as pd from pandas import (Index, Series, _np_version_under1p9) from pandas.core.indexes.datetimes import Timestamp from pandas.core.dtypes.common import is_integer import pandas.util.testing as tm from .common import Test...
mit
-3,280,415,586,390,864,400
32.889952
79
0.54059
false
3.518629
true
false
false
joxeankoret/diaphora
diaphora.py
1
75782
#!/usr/bin/python3 """ Diaphora, a diffing plugin for IDA Copyright (c) 2015-2021, Joxean Koret This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your op...
agpl-3.0
-3,937,475,404,436,159,500
33.746447
154
0.56652
false
3.548843
false
false
false
ibm-cds-labs/simple-data-pipe-connector-flightstats
pixiedust_flightpredict/pixiedust_flightpredict/histogramDisplay.py
1
1782
# ------------------------------------------------------------------------------- # Copyright IBM Corp. 2016 # # 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/licens...
apache-2.0
5,486,381,640,515,526,000
40.44186
112
0.627946
false
3.995516
false
false
false
openSUSE/vdsm
vdsm/libvirtev.py
1
18363
# # Copyright 2011 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in th...
gpl-2.0
-3,574,015,940,346,871,300
35.218935
116
0.608506
false
4.059019
false
false
false
jnez71/navboxplus
demos/demo_motor.py
1
6671
#!/usr/bin/env python """ Using navboxplus to perfectly control a motor sensed with only a cheap encoder. Model-augmented state is: [position, velocity, drag/inertia, b/inertia, disturbance]. """ from __future__ import division import numpy as np; npl = np.linalg import matplotlib.pyplot as plt from navboxplus import ...
mit
-1,178,019,511,444,619,000
31.383495
85
0.611902
false
2.529769
false
false
false
codelieche/codelieche.com
apps/utils/tools/export.py
1
7987
# -*- coding:utf-8 -*- """ 导出Model信息 待优化的点:加个filter过滤功能 """ import time import xlwt from django.apps import apps from django.http.response import HttpResponse SECRET_FIELDS = ["admin_pwd", "password"] def field_can_export(field): """ 判断字段是否可以导出 :param field: :return: """ if field in SECRET_F...
mit
1,785,901,874,491,865,000
26.023715
82
0.523036
false
2.738086
false
false
false
chrisfromthelc/python-rake
rake_example.py
1
4417
from __future__ import absolute_import from __future__ import print_function import six import rake import operator import io import csv import os import MySQLdb import collections import gc import time from os import system import formatter import htmllib import cStringIO # Pull in chats from MySQL db = MySQLdb.con...
mit
1,181,583,639,862,126,300
26.60625
102
0.696627
false
3.397692
false
false
false
0x00ach/zer0m0n
signatures/recon_systeminfo.py
6
1252
# Copyright (C) 2012 Claudio "nex" Guarnieri (@botherder) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This pro...
gpl-3.0
1,236,607,287,380,904,400
36.939394
86
0.691693
false
3.962025
false
false
false
domeger/SplunkTAforPuppetEnterprise
bin/input_module_puppet_enterprise_metrics.py
1
2674
# encoding = utf-8 import os import sys import time import datetime import json import jsonpath_rw from datetime import datetime def validate_input(helper, definition): """Implement your own validation logic to validate the input stanza configurations""" # This example accesses the modular input variable ...
apache-2.0
2,656,314,683,567,090,000
30.470588
156
0.557218
false
4.369281
false
false
false
grandecose/global-toucan
main.py
2
4308
on = 1; a = -9.800000000000 print("Welcome to Global Toucan, a physics calculator.\n"); valid = "Please choose a valid option\n"; #I've never been good at commenting, if you can't understand whats going on contact me and I will help. while(on == 1): a = -9.800000000000000000000000 choice = raw_input("What equation wo...
gpl-3.0
4,295,777,861,401,514,500
38.163636
565
0.637419
false
3.167647
false
false
false
jstac/recursive_utility_code
python/long_run_risk/src/ssy_fp_discretized.py
1
1742
""" Compute the equilibrium wealth consumption ratio in the SSY model by first computing the fixed point of A = phi K. """ from ssy_discretized_test import * import numpy as np default_K, default_I, default_J = 4, 4, 4 def wealth_cons_ratio(ssyd, tol=1e-7, init_val=1, ...
mit
-9,144,569,409,453,873,000
22.283784
75
0.549042
false
2.991319
false
false
false
zachdj/ultimate-tic-tac-toe
scenes/GameCompleted.py
1
5911
import pygame, numpy from .SceneBase import SceneBase from .DrawingUtils import * from widgets import Button from models.game import Board, Move from services import ImageService, FontService, SceneManager, SettingsService as Settings class GameCompleted(SceneBase): """ This scene shows the result of a game b...
mit
-2,822,672,325,319,119,400
44.821705
148
0.581627
false
3.593313
false
false
false
olivierdalang/stdm
ui/reports/ui_rpt_builder.py
1
23463
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_rpt_builder.ui' # # Created: Sun Jun 08 13:58:36 2014 # by: PyQt4 UI code generator 4.10.3 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fro...
gpl-2.0
-3,415,312,747,470,689,300
59.907652
149
0.678004
false
3.558235
false
false
false
Mapkin/tally
tally/api/models.py
1
1603
from django.contrib.auth.models import User from django.db import models from django.utils.timezone import now import os class Client(models.Model): api_key = models.TextField(unique=True, blank=True) app_name = models.TextField() user = models.ForeignKey(User) date_created = models.DateTimeField(aut...
mit
-8,551,973,503,065,906,000
26.637931
67
0.577043
false
3.871981
false
false
false
Ayase-252/waife-crawler
crawler/selector.py
1
1675
""" Selector Selector decides whether a picture should be download. """ import copy class Selector: """ Selector middleware implements a queue of selector functions. Candidates go through a series of functions and are flitered. """ def __init__(self): self._selector_queue = [] se...
mit
4,757,792,966,291,532,000
30.603774
76
0.615522
false
4.691877
false
false
false
playfire/django-autologin
django_autologin/middleware.py
2
1519
from django.shortcuts import redirect from django.utils.cache import add_never_cache_headers from django.core.signing import TimestampSigner, BadSignature from django.contrib.auth.models import User from . import app_settings from .utils import login, strip_token, get_user_salt class AutomaticLoginMiddleware(object):...
bsd-3-clause
5,125,886,268,442,271,000
27.12963
76
0.59052
false
4.29096
false
false
false
paulscherrerinstitute/bsread_python
bsread/data/serialization.py
1
3893
from logging import getLogger import numpy from bsread.data.compression import NoCompression, BitshuffleLZ4 _logger = getLogger(__name__) def deserialize_number(numpy_array): """ Return single value arrays as a scalar. :param numpy_array: Numpy array containing a number to deserialize. :return: Arr...
gpl-3.0
5,786,850,743,777,654,000
31.173554
88
0.655792
false
3.548769
false
false
false
CompileInc/agua
agua/evaluate.py
1
1212
from agua.config import get_btr_columns from agua.utils import get_check_function from agua.validators import EMPTY_VALUES def evaluate(data, config): result = [None] * len(config) for i, c in enumerate(config): column, test_column, result_column = get_btr_columns(config[i]) check_function = ...
mit
-1,278,688,474,731,033,000
29.3
72
0.523102
false
4.222997
false
false
false
ClonedOne/pandalog_investigator
pandaloginvestigator/core/io/db_manager.py
1
1559
import sqlite3 """ This module is used to obtain the name of the starting malware tested in each log file. Malware process names are the first 14 characters of the md5, the log file name is actually the uuid. """ db_name = 'panda.db' table_name = 'samples' column1 = 'uuid' column2 = 'filename' column3 = 'md5' def ...
mit
-1,615,236,946,322,152,000
27.87037
107
0.65619
false
3.188139
false
false
false
hmunfru/fiware-paas
automatization_scripts/tools/http.py
1
4843
# -*- coding: utf-8 -*- # Copyright 2014 Telefonica Investigación y Desarrollo, S.A.U # # This file is part of FI-WARE project. # # 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: # # h...
apache-2.0
3,568,522,416,927,700,000
27.650888
136
0.622057
false
3.605361
false
false
false
brkrishna/freelance
albonazionalegestoriambientali_it/archive/cittametropolitina.py
1
1151
# -- coding: utf-8 -- # encoding=utf8 import requests, os, time, random, csv from lxml import html from lxml.html.clean import Cleaner url = 'http://www.cittametropolitana.mi.it/cultura/progetti/integrando/cd-online/htm/tab_riassuntiva.htm' base_url = 'http://www.cittametropolitana.mi.it/cultura/progetti/integrando/cd...
gpl-2.0
7,814,547,587,145,674,000
30.108108
116
0.664639
false
2.773494
false
false
false
otknoy/michishiki_api_server
post.py
1
1209
#!/usr/bin/env python # -*- coding: utf-8 -*- import cgi import sqlite3 import time import config def valid(qs): required_keys = ['title', 'comment', 'posted_by', 'localite', 'latitude', 'longitude'] return all([qs.has_key(k) for k in required_keys]) def post(title, comment, posted_by, localite, latitude, lo...
mit
544,783,474,685,951,600
30
156
0.622002
false
3.377095
false
false
false
makerdao/keeper
pymaker/numeric.py
1
14935
# This file is part of Maker Keeper Framework. # # Copyright (C) 2017-2018 reverendus # Copyright (C) 2018 bargst # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the...
agpl-3.0
5,257,306,446,090,939,000
35.25
134
0.595581
false
3.956291
false
false
false
ideascube/ideascube
ideascube/management/utils.py
1
1747
from django.utils.termcolors import colorize class Reporter: """Store reports and render them on demand.""" ERROR = 1 WARNING = 2 NOTICE = 3 LEVEL_LABEL = { ERROR: 'errors', WARNING: 'warnings', NOTICE: 'notices', } def __init__(self, verbosity): self.verb...
agpl-3.0
1,777,486,645,642,965,800
27.639344
74
0.503721
false
4.169451
false
false
false
dotslash/MiniProjects
SecSharing/revealSecret.py
1
1164
def Bfunc(number,k): if( (number & (1<<k)) ==0 ): return False return True def gcd2(num1,num2): n1 = max(num1,num2) n2 = min(num1,num2) while n2!=0: n = n2 n2 = n1%n2 n1 = n return n1 def gcdn(num_lst): if(len(num_lst)==0): return 0 if(len(num_lst)==1): retu...
mit
-7,619,012,290,567,015,000
24.304348
52
0.524914
false
2.852941
false
false
false
jwodder/headerparser
src/headerparser/scanner.py
1
9222
import re from warnings import warn from .errors import MalformedHeaderError, UnexpectedFoldingError from .util import ascii_splitlines def scan_string(s, **kwargs): """ Scan a string for RFC 822-style header fields and return a generator of ``(name, value)`` pairs for each header field in the input, plus...
mit
2,834,413,941,573,353,000
37.107438
80
0.650727
false
4.161552
false
false
false
rasmuse/graph-prov-test
gpc/fsdb.py
1
2890
import os import json import sqlite3 import functools import itertools import shutil from os.path import abspath import logging from gpc import hexdigest logger = logging.getLogger(__name__) class DatabaseError(Exception): pass class Database(object): """Class to interact with the plain text-backed sqlite data...
lgpl-3.0
-3,387,949,105,836,521,000
26.009346
78
0.567128
false
4.081921
false
false
false
ankanch/tieba-zhuaqu
tieba-zhuaqu/linux-dist/old_dist/tieba-title_old.py
1
5182
#coding=utf-8 import urllib.request import re import os import sys import threading import datetime import pickle import time import MailService begURL = 'http://tieba.baidu.com/f?' PATH_DOWNLOAD_CACHE = sys.path[0]+'\\dlcache\\' GV_DOWNLOAD_ALL = [] GV_THEAD_COUNT = 4 page = 0 x=0 max_page = 0 sum = 0 pocessList=...
gpl-3.0
6,584,390,364,780,618,000
30.91875
180
0.555229
false
2.794745
false
false
false
kidaa/pySDC
pySDC/sweeper_classes/generic_LU.py
1
4411
import scipy.linalg as LA import numpy as np from pySDC.Sweeper import sweeper class generic_LU(sweeper): """ Custom sweeper class, implements Sweeper.py LU sweeper using LU decomposition of the Q matrix for the base integrator Attributes: Qd: U^T of Q^T = L*U """ def __init__(sel...
bsd-2-clause
-4,815,010,697,354,567,000
28.026316
111
0.547495
false
3.577453
false
false
false
marcusbuffett/command-line-chess
src/main.py
1
5340
import random import sys from src.AI import AI from src.Board import Board from src.InputParser import InputParser WHITE = True BLACK = False def askForPlayerSide(): playerChoiceInput = input( "What side would you like to play as [wB]? ").lower() if 'w' in playerChoiceInput: print("You will ...
mit
-6,009,297,712,481,852,000
27.709677
80
0.551124
false
4.21468
false
false
false
openstack/monasca-thresh
docker/kafka_wait_for_topics.py
2
5029
#!/usr/bin/env python # coding=utf-8 # (C) Copyright 2017 Hewlett Packard Enterprise Development LP # (C) Copyright 2018 FUJITSU LIMITED # # 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 # # h...
apache-2.0
-7,059,508,135,713,383,000
33.682759
79
0.634719
false
3.938136
false
false
false
TamiaLab/carnetdumaker
apps/blog/feeds.py
1
14096
""" RSS/Atom feeds for the blog app. """ from django.contrib.syndication.views import Feed from django.core.urlresolvers import reverse, reverse_lazy from django.utils.feedgenerator import Atom1Feed from django.utils.translation import ugettext_lazy as _ from apps.licenses.models import License from .models import (...
agpl-3.0
-2,670,948,389,950,702,000
28.738397
130
0.600809
false
4.343914
true
false
false
CivicKnowledge/ambry
ambry/identity.py
1
51456
"""Identity objects for constructing names for bundles and partitions, and Object Numbers for datasets, columns, partitions and tables. Copyright (c) 2013 Clarinova. This file is licensed under the terms of the Revised BSD License, included in this distribution as LICENSE.txt """ from collections import OrderedDict ...
bsd-2-clause
-24,262,653,475,965,656
27.491694
112
0.562675
false
4.142662
false
false
false
rc1405/Minerva
bin/Minerva/server/dns.py
1
5634
''' Copyright (C) 2015 Ryan M Cote. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is d...
gpl-2.0
4,670,705,531,512,347,000
36.065789
123
0.518992
false
4.064935
false
false
false
yarhajile/sven-daemon
Sven/Daemon.py
1
4165
# # Daemon.py # # # Documentation # """ Disk And Execution MONitor (Daemon) Default daemon behaviors (they can be modified): 1.) Ignore SIGHUP signals. 2.) Default current working directory to the "/" directory. 3.) Set the current file creation mode mask to 0. 4.) Close all open files (0 to [SC_OPEN_MAX...
gpl-2.0
5,869,123,554,980,802,000
31.046154
79
0.643697
false
3.863636
false
false
false
nicememory/pie
pyglet/tests/integration/resource/test_resource_loading.py
1
3664
#!/usr/bin/env python ''' Layout: . (script home) file.txt F1 dir1/ file.txt F2 dir1/ file.txt F3 res.zip/ file.txt F7 dir1/ file.txt F8 ...
apache-2.0
7,559,877,571,650,317,000
23.264901
77
0.526474
false
3.038143
true
false
false
Eureka22/ASM_xf
PythonD/site_python/twisted/test/test_ssl.py
2
7095
# Twisted, the Framework of Your Internet # Copyright (C) 2001 Matthew W. Lefkowitz # # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the...
gpl-2.0
-3,102,412,264,390,012,400
29.581897
94
0.613249
false
4.153981
true
false
false
sim1234/Versioning
setup.py
1
3811
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.md'), encoding='utf-8') as ...
gpl-2.0
8,158,990,582,437,618
36.732673
98
0.660194
false
4.128927
false
false
false
ryaninhust/sampling
egraphs.py
1
1417
from igraph import Graph from seed import generate_seed_graph from query import query_seed class EGraph(object): def __init__(self, path): self.path = path self._seed_graph = None self._g = None def query_node(self, name): raise NotImplementedError @property def ori...
mit
3,165,686,679,552,840,000
24.763636
86
0.599859
false
3.71916
false
false
false
ClusterHQ/eliot
examples/dask_eliot.py
2
1095
from os import getpid from dask.bag import from_sequence import dask.config from dask.distributed import Client from eliot import log_call, to_file from eliot.dask import compute_with_trace @log_call def multiply(x, y=7): return x * y @log_call def add(x, y): return x + y @log_call def main_computation(): ...
apache-2.0
-5,911,900,486,905,028,000
22.804348
73
0.671233
false
3.298193
false
false
false
randerzander/wellbook
etl/hive/model.py
1
1481
#!./pyenv/bin/python import sys, json, numpy as np from sklearn.preprocessing import LabelEncoder from sklearn.ensemble import RandomForestRegressor file_nos, x, y_oil, y_gas, y_water = [], [], [], [], [] files = {} idx = 0 f = open('predict_input.txt') lines = f.read().split('\n') #for line in sys.stdin: for line i...
apache-2.0
4,250,318,843,458,691,600
37.973684
147
0.656313
false
2.789077
false
false
false
liumeixia/xiaworkspace
pythonProject/automate/idaiyanpre/system.py
9
2321
#-*- coding: utf-8 -*- ######################################################################## import logging import datetime from datetime import datetime import time import os import sys lis=0 class system(object): """""" #---------------------------------------------------------------------- def __in...
gpl-2.0
8,262,490,510,182,584,000
35.333333
182
0.518587
false
3.362654
true
false
false
azer/jsbuild
jsbuild/index.py
1
3930
from functools import partial from glob import glob from itertools import chain from jsbuild.dependency import Dependency from jsbuild.logging import logger from jsbuild.manifest import Manifest from jsbuild.maps import get_class_by_format from jsbuild import templates import os.path import re clean_backdir = lambda p...
mit
6,466,859,445,148,958,000
32.305085
162
0.669975
false
3.43832
true
false
false
ISMiller101/vpsolver
setup.py
1
2141
#!/usr/bin/env python """ Basic Setup Script This code is part of the Arc-flow Vector Packing Solver (VPSolver). Copyright (C) 2013-2015, Filipe Brandao Faculdade de Ciencias, Universidade do Porto Porto, Portugal. All rights reserved. E-mail: <fdabrandao@dcc.fc.up.pt>. This program is free software: you can redistr...
gpl-3.0
7,635,097,545,252,229,000
30.028986
84
0.684727
false
3.717014
false
false
false
anksp21/Community-Zenpacks
ZenPacks.community.HPBladeChassis/ZenPacks/community/HPBladeChassis/BladeChassisInterconnect.py
5
2484
from Globals import InitializeClass # from AccessControl import ClassSecurityInfo from Products.ZenRelations.RelSchema import * from Products.ZenModel.DeviceComponent import DeviceComponent from Products.ZenModel.ManagedEntity import ManagedEntity from Products.ZenUtils.Utils import convToUnits from Products.ZenModel...
gpl-2.0
3,578,364,691,106,884,000
29.292683
116
0.646538
false
3.192802
false
false
false
swegener/libsigrokdecode
decoders/max7219/pd.py
3
3720
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2015 Paul Evans <leonerd@leonerd.org.uk> ## ## 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...
gpl-3.0
-5,946,079,890,034,845,000
31.347826
88
0.55457
false
3.546235
false
false
false
kawamon/hue
desktop/core/ext-py/pytest-4.6.11/testing/test_unittest.py
3
30188
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import division from __future__ import print_function import gc import pytest from _pytest.main import EXIT_NOTESTSCOLLECTED def test_simple_unittest(testdir): testpath = testdir.makepyfile( """ import unittest ...
apache-2.0
-2,479,681,594,579,308,000
27.292409
95
0.52872
false
4.457767
true
false
false
bcgov/gwells
app/backend/gwells/models/__init__.py
1
3065
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distri...
apache-2.0
8,003,407,017,705,290,000
35.927711
110
0.722349
false
3.522989
false
false
false
Felixaverlant/starter_kit_python_notebook_gapi
auth.py
2
1996
"""A simple example of how to access the Google Analytics API.""" import argparse from apiclient.discovery import build import httplib2 from oauth2client import client from oauth2client import file from oauth2client import tools def get_service(api_name, api_version, scope, client_secrets_path): """Get a service ...
mit
4,952,279,847,229,344,000
31.721311
79
0.728457
false
4.0818
false
false
false
benjohnston24/partyCoin
partycoin/updateDonations.py
1
9826
#! /usr/bin/env python """! ----------------------------------------------------------------------------- File Name : updateDonations.py Purpose: This module is used to read the data downloaded from the Australian electoral commission website and update the database accordingly Updated: Thu Mar 5 19:25:41 AEDT 2015 ...
mpl-2.0
-7,321,782,133,038,778,000
40.635593
79
0.448199
false
4.261058
false
false
false
UITools/saleor
saleor/dashboard/seo/fields.py
1
1793
from django import forms from django.utils.translation import pgettext_lazy from ...seo.models import SeoModel from ..widgets import CharsLeftWidget SEO_FIELD_HELP_TEXT = pgettext_lazy( 'Form field help text', 'If empty, the preview shows what will be autogenerated.') MIN_DESCRIPTION_LENGTH = 120 MIN_TITLE_LE...
bsd-3-clause
-7,445,493,343,679,669,000
34.86
79
0.650864
false
3.659184
false
false
false
DemocracyClub/UK-Polling-Stations
polling_stations/apps/data_importers/management/commands/import_slough.py
1
1132
from data_importers.management.commands import BaseXpressDemocracyClubCsvImporter class Command(BaseXpressDemocracyClubCsvImporter): council_id = "E06000039" addresses_name = ( "parl.2019-12-12/Version 1/Democracy_Club__12December2019slough.CSV" ) stations_name = "parl.2019-12-12/Version 1/Dem...
bsd-3-clause
-1,444,987,101,396,873,500
34.375
88
0.638693
false
3.215909
false
false
false
numenta-archive/htmresearch
projects/dp1/dp_experiment1.py
3
12622
# Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2016, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This program is free software: you can redistribute it and/or modify # it under the ...
agpl-3.0
-7,704,964,464,401,315,000
33.77135
97
0.647283
false
4.114081
false
false
false
huanghao/mic
plugins/imager/loop_plugin.py
5
9832
#!/usr/bin/python -tt # # Copyright (c) 2011 Intel, 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; version 2 of the License # # This program is distributed in the hope that it will be us...
gpl-2.0
-8,321,301,634,943,653,000
36.526718
79
0.518918
false
4.438826
true
false
false
palmtree5/Red-DiscordBot
redbot/cogs/audio/core/utilities/parsers.py
4
1323
import logging import re import struct from typing import Final, Optional import aiohttp from ..abc import MixinMeta from ..cog_utils import CompositeMetaClass log = logging.getLogger("red.cogs.Audio.cog.Utilities.Parsing") STREAM_TITLE: Final[re.Pattern] = re.compile(br"StreamTitle='([^']*)';") class ParsingUti...
gpl-3.0
702,563,211,058,560,600
36.8
99
0.571429
false
4.309446
false
false
false
facebook/screenshot-tests-for-android
plugin/src/py/android_screenshot_tests/device_name_calculator.py
1
3786
# Copyright (c) Facebook, Inc. and its affiliates. # # 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
7,558,238,337,540,248,000
31.637931
88
0.589276
false
4.07535
false
false
false
skirpichev/omg
diofant/tests/polys/test_polyfuncs.py
2
2972
"""Tests for high-level polynomials manipulation functions.""" import pytest from diofant import (ComputationFailed, MultivariatePolynomialError, horner, interpolate, symbols, symmetrize, viete) from diofant.abc import a, b, c, d, e, x, y, z __all__ = () def test_symmetrize(): assert symm...
bsd-3-clause
-5,562,564,503,117,511,000
31.659341
79
0.475774
false
2.253222
true
false
false
MostlyOpen/odoo_api
myo_employee.py
1
11410
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pub...
agpl-3.0
2,261,187,033,920,331,800
26.886076
109
0.465557
false
4.345011
false
false
false
SmingHub/Sming
Sming/Components/Storage/Tools/hwconfig/hwconfig.py
1
4450
#!/usr/bin/env python3 # # Sming hardware configuration tool # import common, argparse, os, partition from common import * from config import Config from config import schema as config_schema def openOutput(path): if path == '-': try: stdout_binary = sys.stdout.buffer # Python 3 excep...
lgpl-3.0
8,049,036,951,163,652,000
37.034188
163
0.643596
false
3.819742
true
false
false
sublee/etc
etc/adapter.py
1
2507
# -*- coding: utf-8 -*- """ etc.adapter ~~~~~~~~~~~ The interface for etcd adapters. A subclass of :class:`Adapter` will be injected verification code automatically. """ from __future__ import absolute_import import functools import six __all__ = ['Adapter'] def with_verifier(verify, func): @fu...
bsd-3-clause
-6,410,024,683,960,013,000
30.734177
77
0.609095
false
3.992038
false
false
false
specify/specify7
specifyweb/specify/encryption.py
1
1452
# See edu.ku.brc.helpers.Encryption and rfc2898 from itertools import islice from hashlib import md5 from Crypto.Cipher import DES from Crypto.Random.random import randint ITERATION_COUNT = 1000 def decrypt(text: str, password: str) -> str: key = password.encode('utf-8') fromhex = bytes.fromhex(text) sal...
gpl-2.0
3,260,853,576,327,188,500
28.04
93
0.657713
false
3.3
false
false
false
getsentry/rigidsearch
rigidsearch/utils.py
1
2243
import re from cStringIO import StringIO as BytesIO from datetime import timedelta from functools import update_wrapper from flask import make_response, current_app, request _ws_re = re.compile(r'(\s+)') def chop_tail(base, tail): if not base.endswith(tail): return base, False return base[:-len(tail)...
bsd-3-clause
6,092,743,340,628,280,000
29.726027
67
0.593848
false
3.942004
false
false
false
ZeitOnline/zeit.cms
src/zeit/cms/content/interfaces.py
1
21341
from zeit.cms.i18n import MessageFactory as _ import zc.form.field import zc.form.interfaces import zeit.cms.content.field import zeit.cms.content.sources import zeit.cms.interfaces import zeit.cms.repository.interfaces import zeit.cms.tagging.interfaces import zope.component.interfaces import zope.interface import zop...
bsd-3-clause
2,148,707,815,413,582,600
29.270922
79
0.659997
false
4.110362
false
false
false
Xevaquor/the-art-of-ai
005/solitare.py
1
3098
from astar import astar import copy Moves = { 'W':(0,-1), 'S':(1,0), 'N':(-1,0), 'E':(0,1) } def t2l(t): l = [] for x in range(5): i = [] for y in range(5): i.append(t[x][y]) l.append(i) return l def print_state(s): for x in range(5): print ...
gpl-3.0
-8,575,674,368,633,035,000
21.779412
80
0.453196
false
3.374728
false
false
false
OpenDMM/bitbake
lib/prserv/serv.py
1
11381
import os,sys,logging import signal, time, atexit, threading from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandler import xmlrpclib import threading import Queue try: import sqlite3 except ImportError: from pysqlite2 import dbapi2 as sqlite3 import bb.server.xmlrpc import prserv import...
gpl-2.0
7,377,694,387,516,378,000
29.67655
103
0.59037
false
3.935339
false
false
false
jcoady9/youtube-dl
youtube_dl/extractor/adobepass.py
1
6269
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re import time import xml.etree.ElementTree as etree from .common import InfoExtractor from ..utils import ( unescapeHTML, urlencode_postdata, unified_timestamp, ) class AdobePassIE(InfoExtractor): _SERVICE_PROVIDER_TEMPLATE = 'h...
unlicense
4,938,944,430,969,354,000
44.759124
129
0.566438
false
3.891372
false
false
false
jskurka/PyChess-Learning-Module
lib/pychess/widgets/gamenanny.py
1
11390
""" This module intends to work as glue between the gamemodel and the gamewidget taking care of stuff that is neither very offscreen nor very onscreen like bringing up dialogs and """ import math import gtk from pychess.Utils.Offer import Offer #from pychess.Utils.GameModel import GameModel #from pychess.Uti...
gpl-3.0
3,256,816,127,223,838,700
38.006849
194
0.583231
false
3.727094
false
false
false
KirarinSnow/Google-Code-Jam
Code Jam Beta 2008/C.py
1
3465
#!/usr/bin/python # # Problem: Random Route # Language: Python # Author: KirarinSnow # Usage: python thisfile.py <input.in >output.out import heapq MAX = 100000000000 def compute(): def countroutes(v, x, s): # num of routes into x toward v if v in counts[x]: return if x[0] == s: ...
gpl-3.0
-1,755,201,136,878,354,000
23.574468
76
0.435209
false
3.306298
false
false
false
balint256/gr-baz
apps/papr.py
4
7476
#!/usr/bin/env python # -*- coding: utf-8 -*- # # papr.py # # Copyright 2014 Balint Seeber <balint256@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of th...
gpl-3.0
-7,776,518,439,012,479,000
34.264151
129
0.675896
false
2.758672
false
false
false
richardjgowers/MDA-RDFTool
rdftool.py
1
3827
"""Tool for calculating RDFs """ from __future__ import print_function import numpy as np from MDAnalysis.lib.distances import distance_array from analysisbase import AnalysisBase, blocks_of class InterRDF(AnalysisBase): """Analysis object for calculating intermolecular RDF. See the init method for argume...
gpl-2.0
1,466,646,118,820,482,000
29.133858
79
0.563888
false
3.905102
false
false
false
Chirayu-sopho/Hindi-DateTime-Parser
functions.py
1
4957
import datetime from dateutil.relativedelta import * ## give final date and time after parsing by changing current date-time def change_datetime ( c="0", y=0, mt=0, w=0, d=0, h=0, m=0, s=0): #mt = mt + 12*y #d = d + 30*mt now = datetime.datetime.now() change = relativedelta( years =+ y, months =+ mt, weeks...
mit
-5,793,549,747,210,335,000
18.987903
142
0.614686
false
2.924484
false
false
false
helixyte/TheLMA
thelma/repositories/rdb/schema/tables/worklistseriesexperimentdesign.py
1
1221
""" This file is part of the TheLMA (THe Laboratory Management Application) project. See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information. Worklist series experiment design table. """ from sqlalchemy import Column from sqlalchemy import ForeignKey from sqlalchemy import Integer from sqlalchemy i...
mit
1,640,412,216,775,302,100
38.387097
80
0.647011
false
4.625
false
false
false
DailyActie/Surrogate-Model
01-codes/tensorflow-master/tensorflow/tensorboard/backend/server.py
1
5519
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
mit
5,267,909,568,332,017,000
34.152866
82
0.678746
false
4.281614
false
false
false
nicolewhite/py2neo
book/conf.py
2
11546
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # Py2neo documentation build configuration file, created by # sphinx-quickstart on Fri Oct 17 16:03:15 2014. # # 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 # au...
apache-2.0
-1,233,306,012,841,267,200
29.373684
80
0.693641
false
3.619316
true
false
false
Equitable/trump
trump/extensions/source/tx-pydatadatareaderst/pydatadatareaderstext.py
2
1062
""" This uses pandas.io.data.DataReader, all kwargs get passed to that. start and end are optional, but must be of the form 'YYYY-MM-DD'. Will default to since the beginning of available data, and run through "today". data_column is required to be specified as well. """ stype = 'PyDataDataReaderST' renew = True cl...
bsd-3-clause
3,986,232,752,445,041,700
28.5
79
0.584746
false
3.726316
false
false
false
jackdesert/lyxblogger
src/LyxBlog/parsing.py
1
5586
#! /usr/bin/env python # -*- coding: utf-8 -*- ##################### A U T H O R ########################## # # # Copyright 2010 Jack Desert # # <jackdesert@gmail.com> ...
gpl-3.0
-8,272,553,882,738,798,000
43.301587
115
0.509495
false
3.992847
false
false
false
agustinhenze/natsort.debian
test_natsort/profile_natsorted.py
1
3093
# -*- coding: utf-8 -*- """\ This file contains functions to profile natsorted with different inputs and different settings. """ from __future__ import print_function import cProfile import random import sys sys.path.insert(0, '.') from natsort import natsorted, index_natsorted from natsort.compat.py23 import py23_ran...
mit
3,724,489,187,692,291,000
26.371681
78
0.630133
false
2.904225
false
false
false
janastu/followsheep-tracker-server
servers/emule.py
1
5118
from app import create_app from flask import (render_template, request, redirect, url_for, flash, make_response, Response) from flaskext.uploads import (UploadSet, configure_uploads, ARCHIVES, UploadConfiguration) from flask.ext.pymongo import PyMongo import hashlib impo...
mit
-1,589,133,590,861,117,000
35.297872
76
0.560961
false
4.315346
true
false
false
unbracketed/tipi
tipi/commands/base.py
1
12932
""" Base classes for writing management commands (named commands which can be executed through ``tipi.py``). """ import os import sys from ConfigParser import ConfigParser from optparse import make_option, OptionParser from virtualenv import resolve_interpreter class CommandError(Exception): """ Exception cl...
mit
5,023,752,352,078,874,000
35.022284
171
0.597819
false
4.060283
false
false
false
jkolczasty/appletree
appletree/gui/rteditorbase.py
1
12191
#!/usr/bin/env python3 # # Copyright 2017+ Jakub Kolasa <jkolczasty@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # ...
gpl-3.0
-7,350,194,851,866,700,000
32.958217
114
0.585924
false
3.848169
false
false
false
irl/gajim
src/network_manager_listener.py
1
3736
# -*- coding: utf-8 -*- ## src/network_manager_listener.py ## ## Copyright (C) 2006 Jeffrey C. Ollie <jeff AT ocjtech.us> ## Nikos Kouremenos <kourem AT gmail.com> ## Stefan Bethge <stefan AT lanpartei.de> ## Copyright (C) 2006-2014 Yann Leboulanger <asterix AT lagaule.org> ## ## T...
gpl-3.0
-547,461,880,927,801,860
35.627451
80
0.615632
false
4.052061
false
false
false
LedgerHQ/blue-loader-python
ledgerblue/loadApp.py
1
12915
""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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-2.0
-7,240,628,984,998,045,000
40.261981
227
0.710879
false
3.385321
false
false
false
DesertBot/DesertBot
desertbot/modules/utils/Sub.py
1
6918
""" Created on Feb 28, 2015 @author: StarlitGhost """ import re from twisted.plugin import IPlugin from twisted.words.protocols.irc import assembleFormattedText as colour, attributes as A from zope.interface import implementer from desertbot.message import IRCMessage from desertbot.moduleinterface import IModule fro...
mit
5,800,723,203,344,052,000
38.531429
102
0.594102
false
4.557312
false
false
false