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
rhyolight/nupic.son
app/melange/request/access.py
1
13682
# Copyright 2013 the Melange 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 applicable law or agreed to in wr...
apache-2.0
930,231,751,972,041,200
34.172237
79
0.7371
false
4.035988
false
false
false
cgrima/rsr
rsr/fit.py
1
4401
""" Various tools for extracting signal components from a fit of the amplitude distribution """ from . import pdf from .Classdef import Statfit import numpy as np import time import random import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from lmfit import minimize, Parameters, report_fit def pa...
mit
-4,480,014,395,952,754,700
29.143836
81
0.452852
false
4.000909
false
false
false
emitrom/integra-openstack-ui
schedules/tables.py
1
2134
from django.utils.translation import ugettext_lazy as _ from horizon import tables from openstack_dashboard.dashboards.integra.schedules import utils from django.utils.http import urlencode from django.core.urlresolvers import reverse class AddTableData(tables.LinkAction): name = "addSchedule" verbose_name =...
apache-2.0
7,110,622,473,895,393,000
28.232877
74
0.619963
false
4.135659
false
false
false
gordielachance/plugin.audio.subsonic
main.py
1
46940
#!/usr/bin/python # -*- coding: utf-8 -*- # Module: main # Author: G.Breant # Created on: 14 January 2017 # License: GPL v.3 https://www.gnu.org/copyleft/gpl.html import xbmcvfs import os import xbmcaddon import xbmcplugin import xbmcgui import json import shutil import dateutil.parser from datetime import datetime f...
mit
1,061,290,670,147,951,900
29.268734
151
0.568871
false
3.938141
false
false
false
WilJoey/tn_ckan
ckan/lib/field_types.py
1
12439
import re import time import datetime import warnings with warnings.catch_warnings(): warnings.filterwarnings('ignore', '.*compile_mappers.*') import formalchemy from ckan.common import OrderedDict months = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'No...
mit
-3,390,214,483,191,561,700
43.584229
139
0.51845
false
4.047836
false
false
false
fergalmoran/dss
spa/migrations/0056_auto__add_field_label_object_created__add_field_label_object_updated__.py
1
38640
# -*- 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): def forwards(self, orm): # Adding field 'Label.object_created' db.add_column(u'spa_label', 'object...
bsd-2-clause
-8,021,846,938,036,338,000
71.361423
205
0.571429
false
3.608517
false
false
false
denys-duchier/kivy
kivy/uix/label.py
1
25250
'''Label ===== The :class:`Label` widget is for rendering text. It supports ascii and unicode strings:: # hello world text l = Label(text='Hello world') # unicode text; can only display glyphs that are available in the font l = Label(text=u'Hello world ' + unichr(2764)) # multiline text l = ...
mit
-6,323,048,173,125,887,000
33.400545
83
0.617465
false
4.04453
false
false
false
Weasyl/weasyl
weasyl/shout.py
1
4702
import arrow from libweasyl import staff from weasyl import define as d from weasyl import frienduser from weasyl import ignoreuser from weasyl import macro as m from weasyl import media from weasyl import welcome from weasyl.comment import thread from weasyl.error import WeasylError def select(userid, ownerid, lim...
apache-2.0
-7,151,868,114,302,378,000
32.112676
121
0.64866
false
3.746614
false
false
false
alsmirn/adist
extinction/tabular.py
1
3610
""" Copyright (c) 2009, Alexey Smirnov 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 f...
bsd-3-clause
-2,222,819,617,115,563,300
40.022727
80
0.667313
false
3.438095
false
false
false
PedroMDuarte/thesis-hubbard-lda_evap
qmc.py
1
16230
""" This file provides a way to obtain thermodynamic quantities from an interpolation of available QMC solutions """ import numpy as np import matplotlib.pyplot as plt import matplotlib from matplotlib import rc rc('font', **{'family':'serif'}) rc('text', usetex=True) import glob import os import ldaconf base...
mit
-3,425,785,279,829,014,000
31.721774
83
0.463648
false
3.43129
false
false
false
charityscience/csh-sms
tests/jobs/test_text_reminder_job.py
1
2487
import mock from mock import patch, call from freezegun import freeze_time from datetime import datetime from django.test import TestCase from tests.fixtures import contact_object from modules.text_reminder import TextReminder from jobs import text_reminder_job FAKE_NOW = datetime(2017, 7, 17, 0, 0) class TextRemind...
gpl-3.0
-2,241,891,620,633,596,700
44.218182
96
0.572577
false
3.689911
true
false
false
hajicj/safire
scripts/text_preprocessing_explorer.py
1
5761
#!/usr/bin/env python import argparse from copy import deepcopy import itertools import logging import operator import os import random import webbrowser from safire.data.text_browser import TextBrowser import safire.utils from safire.data.image_browser import ImageBrowser from safire.data.loaders import MultimodalData...
gpl-3.0
-4,264,359,828,596,876,000
34.349693
82
0.559799
false
4.407804
false
false
false
indexofire/cdc
cdc/contrib/cache/helpers.py
1
12245
# -*- coding: utf-8 -*- import types import hashlib import logging import cPickle as pickle from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str from keyedcache.utils import is_string_like, is_list_or_tuple log = logging.getLogger('cdc_cache') # The debuggi...
mit
9,166,052,249,214,150,000
30.559278
173
0.596815
false
4.080307
false
false
false
diplomacy/research
diplomacy_research/scripts/render.py
1
9835
#!/usr/bin/env python3 # ============================================================================== # Copyright 2019 - Philip Paquette # # NOTICE: 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
5,406,339,455,071,944,000
40.673729
116
0.604677
false
3.773983
false
false
false
Shinao/SmartMirror
Motion/main.py
1
1803
import cv2 import time, os from motion import Motion from tornado import web, ioloop import threading import json import requests from config import config import logging # Send gesture to node server logging.getLogger("requests").setLevel(logging.WARNING) # get infos on error take_photo = False photo_filepath = "" de...
mit
3,999,531,328,340,736,000
26.738462
99
0.687188
false
3.869099
false
false
false
iceslide/Lili
formatter.py
1
2383
# -*- coding: utf-8 -*- import constants __author__ = constants.__author__ __copyright__ = constants.__copyright__ __license__ = constants.__license__ def format(block): """ Apply formatting to a block. """ wideopeningchars = constants.WIDE_OPENING_CHARS text = block.gettext() newtext = [] ...
gpl-3.0
1,472,706,962,389,387,500
27.380952
75
0.535879
false
4.225177
false
false
false
Castronova/EMIT
wrappers/odm2.py
1
2672
__author__ = 'tonycastronova' import wrappers import stdlib from wrappers import base from utilities import geometry from utilities.status import Status from api_old.ODM2.Core.services import readCore from api_old.ODM2.Results.services import readResults class wrapper(base.BaseWrapper): def __init__(self, args)...
gpl-2.0
3,811,784,181,105,661,000
29.022472
79
0.623503
false
4.227848
false
false
false
garthg/petitions-dataverse
merge_doi_maps.py
1
2439
'''merge_doi_maps.py Copyright 2018 Garth Griffin Distributed under the GNU GPL v3. For full terms see the file LICENSE. This file is part of PetitionsDataverse. PetitionsDataverse 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 So...
gpl-3.0
7,386,181,290,347,419,000
32.410959
80
0.664207
false
3.313859
false
false
false
k4ml/Marimorepy
mamopublic/common.py
1
2741
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2009, MARIMORE Inc Tokyo, Japan. # Contributed by # Iqbal Abdullah <iqbal@marimore.co.jp> # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following condit...
bsd-3-clause
641,584,754,417,837,600
41.828125
85
0.69938
false
4.09716
false
false
false
sympsi/sympsi
sympsi/commutator.py
1
7156
"""The commutator: [A,B] = A*B - B*A.""" from __future__ import print_function, division from sympy import S, Expr, Mul, Add from sympy.core.compatibility import u from sympy.integrals.integrals import Integral from sympy.printing.pretty.stringpict import prettyForm from sympsi.dagger import Dagger from sympsi.opera...
bsd-3-clause
-1,256,890,188,336,245,500
30.488987
83
0.504896
false
3.441502
false
false
false
sveetch/boussole
tests/100_compiler/021_source_map.py
1
5369
# -*- coding: utf-8 -*- import os import io import json from boussole.conf.model import Settings def test_source_map_path_001(compiler, temp_builds_dir): """ Check about source map path from 'sourceMappingURL' with a simple path """ basic_settings = Settings(initial={ "SOURCES_PATH": ".", ...
mit
-2,243,959,979,003,704,000
26.963542
84
0.591917
false
3.353529
false
false
false
google-research/ravens
ravens/tasks/align_box_corner.py
1
2653
# coding=utf-8 # Copyright 2021 The Ravens 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 applicable law or...
apache-2.0
6,962,212,802,293,448,000
35.847222
79
0.637015
false
2.880565
false
false
false
karies/root
tutorials/roofit/rf106_plotdecoration.py
6
2263
## \file ## \ingroup tutorial_roofit ## \notebook ## Basic functionality: adding boxes with parameters to RooPlots and decorating with arrows, etc... ## ## \macro_code ## ## \author Clemens Lange, Wouter Verkerke (C++ version) import ROOT # Set up model # --------------------- # Create observables x = ROOT.RooRealVa...
lgpl-2.1
-1,037,350,025,528,606,300
26.26506
99
0.615996
false
3.013316
false
true
false
chenchiyuan/yajiong
applications/posts/management/commands/parse_weixin.py
1
1199
# -*- coding: utf-8 -*- # __author__ = chenchiyuan from __future__ import division, unicode_literals, print_function from django.core.management import BaseCommand import requests from bs4 import BeautifulSoup from applications.posts.models import Post import time headers = { "referer": "http://weixin.sogou.com...
bsd-3-clause
7,479,947,682,873,907,000
28.268293
141
0.614679
false
3.712074
false
false
false
laurentb/weboob
modules/ipapi/module.py
1
2091
# -*- coding: utf-8 -*- # Copyright(C) 2015 Julien Veyssier # # This file is part of a weboob module. # # This weboob module 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 Lice...
lgpl-3.0
1,998,065,906,981,396,000
31.671875
77
0.636538
false
3.411093
false
false
false
BdEINSALyon/adhesion
adhesion/settings.py
1
3232
""" Django settings for adhesion project. Generated by 'django-admin startproject' using Django 1.9. 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 os # ...
gpl-3.0
3,136,685,628,160,387,600
25.491803
91
0.690285
false
3.482759
false
false
false
marmyshev/transitions
openlp/plugins/bibles/lib/biblestab.py
1
26262
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
gpl-2.0
-5,386,206,835,964,329,000
59.229358
116
0.700419
false
4.19154
false
false
false
jerome-nexedi/dream
dream/simulation/CoreObject.py
1
47086
# =========================================================================== # Copyright 2013 University of Limerick # # This file is part of DREAM. # # DREAM 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 Founda...
gpl-3.0
-88,395,979,137,123,230
53.687573
217
0.514102
false
5.539529
false
false
false
winhamwr/neckbeard
neckbeard/cloud_resource.py
1
19469
import logging import time import boto.exception import dateutil.parser import requests from boto.ec2 import elb from requests.exceptions import ( ConnectionError, Timeout, RequestException, ) from simpledb import models from neckbeard.output import fab_out_opts NODE_AWS_TYPES = ['ec2', 'rds', 'elb'] EC2...
bsd-3-clause
5,361,584,043,886,388,000
33.519504
79
0.538805
false
4.465367
true
false
false
tjcsl/cslbot
cslbot/helpers/handler.py
1
28231
# -*- coding: utf-8 -*- # Copyright (C) 2013-2018 Samuel Damashek, Peter Foley, James Forcier, Srijay Kasturi, Reed Koser, Christopher Reffett, and Tris Wilson # # 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 Softw...
gpl-2.0
8,572,865,770,078,463,000
40.516176
144
0.562715
false
3.842521
true
false
false
frank-und-freunde/Lunchez
functions.py
1
1594
import math from datetime import datetime def weekDay(year, month, day): offset = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334] week = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'] afterFeb = 1 if month > 2: afterFeb = 0 aux = year - 1700 - aft...
mit
5,577,577,409,626,868,000
40.947368
151
0.557089
false
2.872072
false
false
false
webrecorder/warcio
test/test_limitreader.py
1
1457
from warcio.limitreader import LimitReader from contextlib import closing from io import BytesIO class TestLimitReader(object): def test_limit_reader_1(self): assert b'abcdefghji' == LimitReader(BytesIO(b'abcdefghjiklmnopqrstuvwxyz'), 10).read(26) def test_limit_reader_2(self): assert b'abcde...
apache-2.0
2,581,903,342,736,774,000
36.358974
122
0.654084
false
3.571078
true
false
false
saintdragon2/python-3-lecture-2015
homework_checker/civil_hw_personal_list/civil_hw_list.py
1
2177
from __future__ import print_function import glob import hw_sungyong_list import os # os.chdir("homework_01") list_a = [10, 30, 40, -20, 15] list_b = [-90, 20, 50, 2, 4] list_c = ['hello', 34, 0, 12] num_p = 3 num_q = 7 sy_a = hw_sungyong_list.square_of_list(list_a, num_p) sy_b = hw_sungyong_list.square_of_list(li...
mit
4,742,109,069,305,678,000
19.403846
82
0.573314
false
2.46915
false
false
false
yostashiro/awo-custom
sale_line_quant_extended/wizard/stock_return_picking.py
1
1645
# -*- coding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2016 Rooms For (Hong Kong) Limited T/A OSCG # <https://www.odoo-asia.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publishe...
lgpl-3.0
-1,805,168,410,514,851,300
43.459459
77
0.642553
false
3.926014
false
false
false
steelsoul/hide_to_tray
interface5.py
1
5039
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'interface.ui' # # Created by: PyQt5 UI code generator 5.14.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): Main...
gpl-3.0
8,543,905,054,595,443,000
50.418367
112
0.71919
false
4.299488
false
false
false
alex3287/PyCharmProjects
project/parser_1.py
1
2603
# Парсер для сбора внешних ссылок с сайта from urllib.request import urlopen from urllib.error import HTTPError from bs4 import BeautifulSoup url = 'http://gymn11.ru' def get_html(url): '''Считывает страницу в html''' try: html = urlopen(url) except: print('нет сайта такого') re...
gpl-3.0
583,739,816,110,222,500
22.2
55
0.539025
false
2.626274
false
false
false
TheLazyHase/dragon_dice_simulator
business/dice/face/save_with_special/counter.py
1
1773
# -*- coding: utf-8 *-* # Copyright (c) 2013 Tisserant Pierre # # This file is part of Dragon dice simulator. # # Dragon dice simulator 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 ve...
gpl-3.0
-6,605,072,641,197,626,000
33.764706
83
0.646926
false
3.640657
false
false
false
jimstorch/tokp
tokp_lib/system_rules.py
1
1980
#------------------------------------------------------------------------------ # File: system_rules.py # Purpose: # Author: James Mynderse # Revised: # License: GPLv3 see LICENSE.TXT #------------------------------------------------------------------------------ import datetime ...
gpl-3.0
7,329,093,138,148,140,000
32.172414
79
0.554545
false
3.219512
false
false
false
WaveBlocks/WaveBlocksND
WaveBlocksND/IOM_plugin_lincombwp.py
1
13903
"""The WaveBlocks Project IOM plugin providing functions for handling linear combinations of general wavepackets. @author: R. Bourquin @copyright: Copyright (C) 2013, 2016 R. Bourquin @license: Modified BSD License """ import numpy as np def add_lincombwp(self, parameters, timeslots=None, lincombsize=None, blockid...
bsd-3-clause
-8,754,087,416,531,690,000
36.474394
130
0.662519
false
3.471411
false
false
false
Chaffleson/blupy
blupy/settings.py
1
4657
""" Django settings for blupy project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths ...
gpl-2.0
-8,794,081,472,193,870,000
29.84106
101
0.704316
false
3.568582
false
false
false
sburnett/seattle
production_nat_new/test/ut_newnatdeployed_legacywithnormalclient.py
1
1401
""" One server connects to a deployed forwarder One legacy client connects to the server One new client connects to the server A few messages are exchanged """ #pragma repy restrictions.normal include NatForwardingShim.repy include NATLayer_rpc.repy def response(remote_ip,remote_port,sock,th,listenhandle): try...
mit
6,065,202,797,805,868,000
18.191781
60
0.670236
false
3.213303
false
false
false
ikumen/project-euler
solutions/013.py
1
1047
#!/usr/bin/env python ''' 013.py: https://projecteuler.net/problem=13 Large Sum Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 ... 208496039801340017239306716668235552452528...
mit
-689,761,490,315,390,700
22.795455
87
0.723018
false
2.755263
false
false
false
UltronAI/Deep-Learning
Pattern-Recognition/hw2-Feature-Selection/skfeature/example/test_chi_square.py
1
1627
import scipy.io from sklearn.metrics import accuracy_score from sklearn import cross_validation from sklearn import svm from skfeature.function.statistical_based import chi_square def main(): # load data mat = scipy.io.loadmat('../data/BASEHOCK.mat') X = mat['X'] # data X = X.astype(floa...
mit
7,051,745,803,490,119,000
31.244898
89
0.635526
false
4.098237
false
false
false
ngsxfem/ngsxfem
demos/fictdom.py
1
4669
""" In this example we solve a scalar *unfitted* PDE problem. As a discretisation method we use a level set based geometry description and a Cut (or Fictitious) Finite element method with a Nitsche formulation to impose boundary conditions. For stability we add a ghost penalty stabilization. Domain: ------- The domain...
lgpl-3.0
5,536,156,285,712,531,000
30.533784
79
0.674095
false
2.976403
false
false
false
Esri/raster-functions
functions/PercentAboveThreshold.py
1
5988
import numpy as np from datetime import timedelta import datetime #import sys #import os #import pickle #debug_logs_directory = class PercentAboveThreshold(): def __init__(self): self.name = 'Percent Above or Below Threshold' self.description = 'Calculates the percentage of pixels that are above...
apache-2.0
2,665,880,069,612,288,500
38.92
119
0.559619
false
3.768408
false
false
false
frmdstryr/enamlx
enamlx/qt/qt_tree_view.py
1
8321
# -*- coding: utf-8 -*- """ Copyright (c) 2015, Jairus Martin. Distributed under the terms of the MIT License. The full license is in the file COPYING.txt, distributed with this software. Created on Aug 28, 2015 """ from atom.api import ( Typed, Instance, Property, Int ) from enamlx.qt.qt_abstract_item_view import ...
mit
-3,384,336,813,083,965,000
32.552419
79
0.592717
false
4.304708
false
false
false
soarlab/FPTaylor
benchmarks/toplas/print_results.py
1
4016
#!/usr/bin/env python import sys import os import glob import decimal import argparse parser = argparse.ArgumentParser( description="Prints out results of FPTaylor experiments (from the log directory)") parser.add_argument('--prec', type=int, default=2, help="precision of printed results") p...
mit
-7,073,710,044,295,486,000
25.596026
97
0.525149
false
3.553982
false
false
false
dcramer/taskmaster
src/taskmaster/progressbar.py
1
1033
""" taskmaster.progressbar ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 DISQUS. :license: Apache License 2.0, see LICENSE for more details. """ from __future__ import absolute_import from progressbar import ProgressBar, UnknownLength, Counter, Timer from progressbar.widgets import Widget class Speed(Widget): 'W...
apache-2.0
8,523,526,974,073,646,000
21.955556
69
0.617619
false
3.783883
false
false
false
max291/RLScore
rlscore/measure/auc_measure.py
1
2659
import operator import numpy as np from rlscore.measure.measure_utilities import UndefinedPerformance from measure_utilities import multitask from rlscore.utilities import array_tools def auc_singletask(Y, P): #the implementation has n(log(n)) time complexity #P: predicted labels #Y: true labels, y_i \in ...
mit
-3,690,062,520,798,114,300
31.426829
79
0.618654
false
3.642466
false
false
false
fahadkaleem/DataStructures
LinkedList/Problems/nthNodeFromEndOfLinkedList/Solution2.py
1
2551
""" Author: Mohammed Fahad Kaleem Problem: Find the nth node from the end of Linked List Method: Maintain two pointers 1. Reference pointer and main pointer. 2. Initialize both reference and main pointers to head. 3. First move reference pointer to n nodes from head. 4. Move both pointers one by one until reference ...
mit
3,686,608,701,181,479,400
28.321839
73
0.588397
false
3.801788
false
false
false
gratipay/gratipay.com
gratipay/elsewhere/__init__.py
1
12580
"""This subpackage contains functionality for working with accounts elsewhere. """ from __future__ import division, print_function, unicode_literals from collections import OrderedDict from datetime import datetime import hashlib import json import logging from urllib import quote from urlparse import urlparse, urlunp...
mit
8,522,709,110,932,166,000
36.440476
112
0.592289
false
3.834197
false
false
false
jamesmcm/cryptopals
basic.py
1
9677
from math import sqrt from numpy import mean from Crypto.Cipher import AES import operator hexd={"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,"a":10,"b":11,"c":12,"d":13,"e":14,"f":15} b64d={0:"A",16:"Q",32:"g",48:"w",1:"B",17:"R",33:"h",49:"x",2:"C",18:"S",34:"i",50:"y",3:"D",19:"T",35:"j",51:"z",4:"E...
gpl-2.0
-7,439,320,829,853,359,000
27.461765
444
0.521959
false
2.644712
false
false
false
gprakhar/scripts-biopython
hmmer-pipeline-DPM_Dicty.py
1
1173
#Script to rum Hmmer on Dicty Protiens #Run it keeping in mind that HMM(s) from a particular DPM human holmolog protien are all checked against every Protien from Dicty #Author : prakhar gaur #date : Wed 16 July IST 2015 import os import argparse import csv parser = argparse.ArgumentParser() parser.add_argument('-C',...
gpl-3.0
-1,187,990,765,733,363,000
38.1
178
0.736573
false
2.867971
false
false
false
ocelot-collab/ocelot
unit_tests/ebeam_test/dba_tracking/dba_tracking_conf.py
1
1026
"""Test parameters description""" import pytest from ocelot import * """lattice elements descripteion""" Q1 = Quadrupole(l=0.4, k1=-1.3, eid="Q1") Q2 = Quadrupole(l=0.8, k1=1.4, eid="Q2") Q3 = Quadrupole(l=0.4, k1=-1.7, eid="Q3") Q4 = Quadrupole(l=0.5, k1=1.19250444829, eid="Q4") B = Bend(l=2.7, k1=-.06, angle=2*p...
gpl-3.0
2,305,508,052,010,516,700
24.02439
116
0.61306
false
1.954286
true
false
false
kepstin/picard
picard/util/tags.py
1
3767
# -*- coding: utf-8 -*- # # Picard, the next-generation MusicBrainz tagger # Copyright (C) 2007 Lukáš Lalinský # # 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...
gpl-2.0
5,036,923,362,161,006,000
35.192308
80
0.591923
false
3.403255
false
false
false
mjsauvinen/P4UL
pyLib/netcdfTools.py
1
11278
#!/usr/bin/env python3 import netCDF4 as nc import sys import argparse import numpy as np from utilities import partialMatchFromList debug = True # =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* def asciiEncode(uList, uStr): n = len(uList) if(n > 0): uList = list(uList) # This might be a tuple coming...
mit
-815,513,492,057,849,600
27.917949
124
0.561092
false
2.617313
false
false
false
clemsos/mitras
tests/test_clustering.py
1
1207
#!/usr/bin/env python # -*- coding: utf-8 -*- import unittest import numpy as np from test_helpers import TestHelpers helpers=TestHelpers() helpers.add_relative_path() from lib.api import Similarity_API from lib.clusters import get_linkage_matrix from time import time # from scipy.cluster.hierarchy import linkage,...
mit
-5,519,701,892,024,718,000
23.16
121
0.763877
false
3.055696
false
true
false
nafitzgerald/allennlp
allennlp/modules/alternating_highway_lstm.py
1
13051
from typing import Tuple from overrides import overrides import torch from torch.autograd import Function, Variable from torch.nn import Parameter from torch.nn.utils.rnn import PackedSequence, pad_packed_sequence, pack_padded_sequence from allennlp.nn.initializers import block_orthogonal from allennlp.custom_extensi...
apache-2.0
-5,288,858,517,103,349,000
49.003831
109
0.534365
false
4.740647
false
false
false
felgari/k2
report.py
1
10700
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2017 Felipe Gallego. All rights reserved. # # This 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 ...
gpl-3.0
-4,561,189,203,595,888,600
38.487085
96
0.38028
false
3.741259
false
false
false
nvbn/coviolations_web
projects/forms.py
1
1067
from pymongo import DESCENDING from django import forms from tasks.models import Tasks from tasks.exceptions import TaskDoesNotExists from .models import Project class FindTaskForBadgeForm(forms.Form): """Find task for badge form""" project = forms.ModelChoiceField( Project.objects.all(), required=Tru...
mit
-7,728,021,554,287,230,000
31.333333
70
0.605436
false
4.167969
false
false
false
aliceinwire/virt-manager
virtManager/inspection.py
1
9120
# # Copyright (C) 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 i...
gpl-2.0
184,982,375,710,807,000
33.157303
79
0.539035
false
4.119241
false
false
false
chunshen1987/superMC
scripts/generateEbeprofiles.py
1
11849
#! /usr/bin/env python import sys, shutil from numpy import * from os import path, makedirs import subprocess import re from glob import glob class color: """ define colors in the terminal """ purple = '\033[95m' cyan = '\033[96m' darkcyan = '\033[36m' blue = '\033[94m' green = '\033[9...
gpl-3.0
1,107,092,717,768,073,200
34.160237
85
0.545025
false
3.291389
false
false
false
sonusz/PhasorToolBox
examples/freq_meter.py
1
1820
#!/usr/bin/env python3 """ This is an real-time frequency meter of two PMUs. This code connects to two PMUs, plot the frequency of the past 300 time-stamps and update the plot in real-time. """ from phasortoolbox import PDC,Client import matplotlib.pyplot as plt import numpy as np import gc import logging logging.bas...
mit
5,007,648,745,987,173,000
29.847458
112
0.606044
false
2.902711
false
false
false
Nexedi/neoppod
neo/master/handlers/client.py
1
6146
# # Copyright (C) 2006-2019 Nexedi SA # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed ...
gpl-2.0
2,060,158,760,011,242,200
39.701987
81
0.642857
false
4.158322
false
false
false
Code4SA/municipal-data
bin/materialised_views.py
1
12424
""" A script to build a set files of materialised views of the data presented in municipality profiles on the Municipal Money website. Municipality-specific profile data is stored in municipality-specific files since producing them takes a lot of time with many queries against the API. By storing municipality-specific...
mit
7,838,789,445,039,154,000
38.44127
125
0.632325
false
3.681185
false
false
false
jezdez/hirefire
hirefire/procs/hotqueue.py
1
1845
from __future__ import absolute_import from hotqueue import HotQueue from . import ClientProc class HotQueueProc(ClientProc): """ A proc class for the `HotQueue <http://richardhenry.github.com/hotqueue/>`_ library. :param name: the name of the proc (required) :param queues: list of queue names ...
bsd-3-clause
-1,827,444,227,618,777,600
28.285714
72
0.598374
false
4.300699
false
false
false
kootenpv/brightml
brightml/timer.py
1
1228
import time class ZmqTimerManager(object): def __init__(self): self.timers = [] self.next_call = 0 def add_timer(self, timer): self.timers.append(timer) def check(self): if time.time() > self.next_call: for timer in self.timers: timer.check() ...
mit
6,674,582,009,593,183,000
25.695652
59
0.517101
false
3.861635
false
false
false
socialsensor/community-evolution-analysis
matlab/python_data_parsing/json_mention_multifile_noDialog_crawler.py
1
2244
#------------------------------------------------------------------------------- # Purpose: parsing data from the crawler's "rawmetadata.json.#" json files to a form: # author mentioned1,mentioned2,... unixTimestamp + text \n # creating as many txt files as there are json files. # T...
apache-2.0
3,282,412,746,953,365,500
43.88
145
0.559269
false
3.561905
false
false
false
tyrylu/pyfmodex
pyfmodex/studio/event_description.py
1
1936
"""The description for an FMOD Studio Event.""" from ctypes import byref, c_int, c_void_p, create_string_buffer from .event_instance import EventInstance from .studio_object import StudioObject from .enums import LOADING_STATE class EventDescription(StudioObject): """The description for an FMOD Studio Event. ...
mit
-1,565,802,748,173,493,800
32.982456
78
0.657541
false
4.190476
false
false
false
kronicz/ecommerce-2
bin/player.py
1
2211
#!/Users/michelkrohn-dale/Desktop/ecommerce-2/bin/python # # The Python Imaging Library # $Id$ # from __future__ import print_function try: from tkinter import * except ImportError: from Tkinter import * from PIL import Image, ImageTk import sys # -----------------------------------------------------------...
mit
-4,403,060,269,132,047,400
20.676471
72
0.475351
false
4.13271
false
false
false
yaukwankiu/armor
dataStreamTools/cwbFileNames.py
1
2022
""" to fix the file names for the data from cwb 201403111800f006_M15.txt -> WRF15.20140312.0000.txt """ #from armor import pattern #import shutil import os import datetime, time from armor import defaultParameters as dp root = dp.defaultRootFolder obsFolder = root + "data/march2014/QPESUMS/" wrfsFolder1 = ...
cc0-1.0
550,889,382,923,040,960
33.271186
104
0.577151
false
2.743555
false
false
false
eSmelser/SnookR
SnookR/api/views.py
1
3749
import hashlib from rest_framework.generics import ListCreateAPIView, UpdateAPIView, ListAPIView, RetrieveAPIView, CreateAPIView from django.core.cache import caches from rest_framework.response import Response from substitutes.models import Session, SessionEvent, Sub from accounts.models import CustomUser from teams....
mit
78,620,710,748,288,240
30.504202
113
0.746599
false
4.179487
false
false
false
alvare/python-funcional
parser-monad.py
1
1535
import sys from pymonad.Reader import curry from Parser import * def item(): return Parser(lambda cs: [] if cs == "" else [(cs[0], cs[1:])]) def sat(cond): return item() >> (lambda c: unit(Parser, c) if cond(c) else mzero(Parser)) def char(c): return sat(lambda x: c == x) def space(): return char(' ...
mit
4,481,513,220,722,752,500
21.573529
83
0.522476
false
3.05169
false
false
false
Commonists/bingo
bingo/card_maker.py
1
1930
# -*- coding: utf-8 -*- import os from string import Template, ascii_uppercase import itertools class CardMaker(object): def __init__(self, size): self.size = size self.elements = [] def make_card(self): raise NotImplemented() class MarkdownCardMaker(CardMaker): def make_card...
mit
8,819,562,063,728,641,000
27.80597
80
0.592746
false
3.600746
false
false
false
mtivadar/qiew
TextDecorators.py
1
13791
from PyQt5 import QtGui, QtCore, QtWidgets import re import string from time import time import sys import TextSelection class CTextDecorator(object): redPen = QtGui.QPen(QtGui.QColor(255, 0, 0)) greenPen = QtGui.QPen(QtGui.QColor(255, 255, 0)) whitePen = QtGui.QPen(QtGui.QColor(255, 255, 255)) norm...
gpl-2.0
-3,535,276,325,798,863,400
31.992823
171
0.516279
false
4.011344
false
false
false
google/makani
avionics/firmware/network/generate_net_send.py
1
4158
#!/usr/bin/python # Copyright 2020 Makani Technologies 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 applicabl...
apache-2.0
-7,501,108,895,089,029,000
30.984615
77
0.672198
false
3.361358
false
false
false
thecotne/smart_less_build
executer.py
1
10324
import sublime, sublime_plugin import os, sys import threading import subprocess import functools import time class ProcessListener(object): def on_data(self, proc, data): pass def on_finished(self, proc): pass # Encapsulates subprocess.Popen, forwarding stdout to a supplied # ProcessListener...
gpl-3.0
-967,074,813,617,226,400
38.106061
118
0.565866
false
4
false
false
false
google/dnae
lib/utils/utils.py
1
6860
# Copyright 2018 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
8,431,717,631,091,964,000
26.886179
79
0.61035
false
3.550725
false
false
false
ikreymer/pywb-ia
tools/iaitemhandler.py
1
3821
from pywb.webapp.handlers import WBHandler from pywb.cdx.zipnum import ZipNumCluster from pywb.cdx.cdxserver import CDXServer import os import requests import shutil #============================================================================= class ItemHandler(WBHandler): def __init__(self, query_handler, confi...
mit
1,659,556,733,371,929,600
33.423423
78
0.516619
false
3.910952
true
false
false
antivanov/chief-lunch-officer
find_cafe.py
1
8229
# Automatically fetches menus for today, grades predefined cafes and based on # additional information (weather, cafe of choice yesterday) gives recommendations # where to go for lunch. # If there are problems with encoding set Python encoding correctly by executing: # set PYTHONIOENCODING=utf-8 from chief_lunch_offic...
apache-2.0
6,199,370,958,018,314,000
41.205128
222
0.697898
false
2.774444
false
false
false
unicefuganda/edtrac
edtrac_project/rapidsms_xforms_src/pavement.py
1
2360
# -*- Import: -*- from paver.easy import * from paver.setuputils import setup from setuptools import find_packages try: # Optional tasks, only needed for development # -*- Optional import: -*- from github.tools.task import * import paver.doctools import paver.virtual import paver.misctasks ...
bsd-3-clause
-8,912,364,466,401,702,000
24.934066
93
0.607203
false
3.676012
false
false
false
brendangregg/bcc
examples/networking/http_filter/http-parse-complete.py
1
11542
#!/usr/bin/python # # Bertrone Matteo - Polytechnic of Turin # November 2015 # # eBPF application that parses HTTP packets # and extracts (and prints on screen) the URL # contained in the GET/POST request. # # eBPF program http_filter is used as SOCKET_FILTER attached to eth0 interface. # Only packets of type ip and tc...
apache-2.0
4,341,704,507,636,344,300
36.718954
100
0.574164
false
3.809241
false
false
false
maximencia/python_traning
fixture/application.py
1
1783
# -*- coding: utf-8 -*- __author__ = 'Maxim.Rumyantsev' #from selenium.webdriver.firefox.webdriver import WebDriver from selenium import webdriver from fixture.session_f import SessionHelper from fixture.group_f import GroupHelper from fixture.contact_f import ContactHelper class Application: # проверка в...
apache-2.0
7,473,063,612,288,819,000
27.052632
89
0.605072
false
3.285714
false
false
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/location_group_radius_units.py
1
1225
# -*- 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,528,833,102,422,046,000
28.878049
74
0.685714
false
3.913738
false
false
false
ArcherSys/ArcherSys
Lib/test/test_dis.py
1
124487
<<<<<<< HEAD <<<<<<< HEAD # Minimal tests for dis module from test.support import run_unittest, captured_stdout from test.bytecode_helper import BytecodeTestCase import difflib import unittest import sys import dis import io import re import types import contextlib def get_tb(): def _error(): try: ...
mit
9,050,017,357,533,923,000
48.695409
205
0.633255
false
3.174798
true
false
false
lsst-ts/ts_wep
tests/bsc/test_nbrStar.py
1
2710
# This file is part of ts_wep. # # Developed for the LSST Telescope and Site Systems. # This product includes software developed by the LSST Project # (https://www.lsst.org). # See the COPYRIGHT file at the top-level directory of this distribution # for details of code ownership. # # This program is free software: you ...
gpl-3.0
5,397,523,749,416,159,000
28.139785
80
0.628782
false
3.288835
true
false
false
praekelt/vumi-go
go/apps/jsbox/metrics.py
1
3058
# -*- test-case-name: go.apps.jsbox.tests.test_metrics -*- # -*- coding: utf-8 -*- """Metrics for JS Box sandboxes""" import re from vxsandbox import SandboxResource from vumi.blinkenlights.metrics import SUM, AVG, MIN, MAX, LAST class MetricEventError(Exception): """Raised when a command cannot be converted ...
bsd-3-clause
1,665,057,652,388,163,000
31.88172
77
0.577502
false
3.905492
false
false
false
calexil/FightstickDisplay
pyglet/image/buffer.py
1
9407
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # Copyright (c) 2008-2021 pyglet contributors # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the follo...
gpl-3.0
933,900,144,839,290,800
37.395918
114
0.635059
false
4.412289
false
false
false
glogiotatidis/mopidy
mopidy/backend.py
1
12306
from __future__ import absolute_import, unicode_literals from mopidy import listener, models class Backend(object): """Backend API If the backend has problems during initialization it should raise :exc:`mopidy.exceptions.BackendError` with a descriptive error message. This will make Mopidy print th...
apache-2.0
-5,506,081,038,595,665,000
27.887324
79
0.622461
false
4.328526
false
false
false
CMPUT410W15/cmput410-project
socialdistribution/urls.py
1
1265
from django.conf.urls import patterns, include, url from django.contrib import admin from login.views import * from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.conf import settings from django.conf.urls.static import static from posts.views import * from images.views import * urlpatter...
apache-2.0
8,455,670,157,464,625,000
36.205882
119
0.670356
false
3.553371
false
true
false
hb9kns/PyBitmessage
src/bitmessageqt/dialogs.py
1
2513
from PyQt4 import QtGui from tr import _translate from retranslateui import RetranslateMixin import widgets from newchandialog import NewChanDialog from address_dialogs import ( AddAddressDialog, NewAddressDialog, NewSubscriptionDialog, RegenerateAddressesDialog, SpecialAddressBehaviorDialog, EmailGatewayDialo...
mit
1,662,048,093,800,792,800
32.065789
79
0.652209
false
4.086179
false
false
false
phiros/nepi
src/nepi/resources/ns3/classes/single_model_spectrum_channel.py
1
3165
# # NEPI, a framework to manage network experiments # Copyright (C) 2014 INRIA # # 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 ...
gpl-3.0
3,667,919,845,605,207,000
47.692308
577
0.706793
false
4.294437
false
false
false
rndusr/stig
stig/commands/cli/misc.py
1
1667
# 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 program is distributed in the hope that it will be useful # but...
gpl-3.0
2,688,278,037,507,489,000
31.057692
78
0.644271
false
4.046117
false
false
false
route-nazionale/event_manager
ragazzi/views.py
1
1103
from django.shortcuts import render from django.core.exceptions import PermissionDenied from django.shortcuts import get_object_or_404 from django.views.decorators.http import require_POST from django.views.decorators.csrf import csrf_exempt from base.views_support import HttpJSONResponse from base.models import Rove...
agpl-3.0
2,945,973,249,241,085,400
28.026316
69
0.752493
false
3.535256
false
false
false
watchdogpolska/watchdog-kj-kultura
watchdog_kj_kultura/organizations_requests/tests/test_forms.py
1
3033
from django.core import mail from django.test import RequestFactory, TestCase from ...organizations.factories import OrganizationFactory from ..factories import TemplateFactory from ..forms import RequestForm class RequestFormTestCase(TestCase): def setUp(self): self.organization = OrganizationFactory()...
mit
387,663,058,317,457,540
42.328571
71
0.554566
false
4.395652
true
false
false
e-koch/VLA_Lband
14B-088/HI/imaging/sd_regridding/sd_comparison.py
1
3520
''' Compare the regridded versions of the SD datasets. ''' from spectral_cube import SpectralCube import matplotlib.pyplot as plt import os from corner import hist2d from radio_beam import Beam import astropy.units as u import numpy as np from paths import fourteenB_HI_data_path, data_path from galaxy_params import ...
mit
-5,906,216,601,364,028,000
31.009091
87
0.704545
false
2.367182
false
false
false
Kovak/KivyNBT
flat_kivy/uix/behaviors.py
1
19077
from weakref import ref from kivy.app import App from kivy.clock import Clock from kivy.properties import (ObjectProperty, OptionProperty, NumericProperty, ListProperty, StringProperty) from kivy.metrics import sp from kivy.animation import Animation from kivy.graphics import Color, Ellip...
mit
4,843,255,177,433,859,000
36.187135
88
0.548514
false
3.766436
false
false
false
groupe-conseil-nutshimit-nippour/django-geoprisma
geoprisma/acl/models.py
1
1433
# -*- coding: utf-8 -*- from django.conf import settings from django.contrib.auth.models import User, Group from geoprisma.models import Resource, Session #Dummy decorator if schema is not supported def schematize(original_class): return original_class #Import model that support PGSQL schema if dif...
bsd-3-clause
-81,777,879,238,157,520
27.854167
80
0.593859
false
4.190058
false
false
false
product-definition-center/pdc-client
pdc_client/plugins/image.py
1
4868
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from __future__ import print_function import sys from datetime import datetime from pdc_client.plugin_helpers import PDCClientPlugin, add_parser_arguments, extract_arguments info_des...
mit
1,686,656,099,837,159,700
37.03125
104
0.513558
false
4.111486
false
false
false
OAGr/exercism
python/twelve-days/twelve_days.py
1
1335
#1 hour 15 minutes with minor distractions def sing(): return verses(1,12) def verse(i): lines = [] lines.append("On the %s day of Christmas my true love gave to me" % days[i]) lines += chorus(i) lines.append(ending(i)) lines = ', '.join(lines) return lines + "\n" def verses(start,stop): ...
mit
8,918,104,149,386,228,000
20.532258
80
0.494382
false
3.201439
false
false
false