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
douglassquirrel/alexandra
games/boxes/components/walls/walls.py
1
1920
#! /usr/bin/env python from alexandra import Alexandra from json import dumps from maze import make_maze from sys import argv H_WIDTH = 80 H_HEIGHT = 3 V_WIDTH = 3 V_HEIGHT = 80 COLOUR = [0, 50, 200] CELL_WIDTH = 80 def init(alex): alex.pubsub.publish('wall_horizontal/wall_horizontal.json', ...
mit
6,810,112,812,047,201,000
32.684211
76
0.589063
false
3.265306
false
false
false
josrolgil/exjobbCalvin
calvin/utilities/authorization/policy_retrieval_point.py
1
4007
# -*- coding: utf-8 -*- # Copyright (c) 2016 Ericsson AB # # 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 ...
apache-2.0
-4,278,018,940,343,838,000
36.101852
110
0.64587
false
4.21346
false
false
false
cmdunkers/DeeperMind
Players/Connect4_Human.py
1
1087
from Player import Player import numpy class Connect4_Human(Player): def __init__(self,value): self.value = value #end def init() ''' ''' def value(self): return self.value #end def value() ''' ''' def DetermineMove(self, board): ##### ...
bsd-3-clause
2,990,052,595,898,871,300
22.12766
65
0.442502
false
4.852679
false
false
false
weijia/obj_sys
obj_sys/management/commands/tag_the_file.py
1
1478
import os from optparse import make_option from django.core.management import BaseCommand from djangoautoconf.cmd_handler_base.msg_process_cmd_base import DjangoCmdBase from obj_sys.models_ufs_obj import UfsObj class FileTagger(DjangoCmdBase): option_list = BaseCommand.option_list + ( make_option('--tag...
bsd-3-clause
-6,862,857,651,892,867,000
35.04878
108
0.539919
false
4.16338
false
false
false
0xced/youtube-dl
youtube_dl/utils.py
1
22883
#!/usr/bin/env python # -*- coding: utf-8 -*- import errno import gzip import io import json import locale import os import re import sys import traceback import zlib import email.utils import json import datetime try: import urllib.request as compat_urllib_request except ImportError: # Python 2 import urllib...
unlicense
2,333,244,252,129,757,000
33.204783
207
0.595245
false
3.864066
false
false
false
oddeyeco/oe-agent2
checks_available/check_solr.py
1
3686
import lib.record_rate import lib.puylogger import lib.record_rate import lib.getconfig import lib.commonclient import lib.basecheck import json solr_url = lib.getconfig.getparam('Solr', 'stats') check_type = 'solr' class Check(lib.basecheck.CheckBase): def precheck(self): try: stats_json ...
apache-2.0
-8,053,115,460,244,553,000
54.014925
203
0.585187
false
3.500475
false
false
false
felgari/cpmb
extcol.py
1
3072
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2016 Felipe Gallego. All rights reserved. # # This file is part of ycas: https://github.com/felgari/cpmb # # 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 Softw...
gpl-3.0
-8,825,784,661,951,138,000
32.043011
81
0.547526
false
4.202462
false
false
false
leandrotoledo/python-telegram-bot
tests/test_callbackquery.py
2
18574
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2021 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
lgpl-3.0
5,923,333,969,951,532,000
40.367483
99
0.621352
false
3.97645
true
false
false
ianfhunter/LoLss
secondscreen/synch/migrations/0001_initial.py
1
5340
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Screen' db.create_table(u'synch_screen', ( (u'id', self.gf('django.db.models.fie...
gpl-2.0
-7,017,538,594,027,866,000
64.938272
157
0.585581
false
3.38403
false
false
false
wijjo/scripts
cli_programs/tzar/plugins/gzip/__cli__.py
1
1249
# Copyright 2016-17 Steven Cooper # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
-250,786,344,258,345,250
34.685714
89
0.732586
false
3.819572
false
false
false
AtwooTM/ccm
ccmlib/cluster_factory.py
1
1860
import os import yaml from ccmlib import common, repository from ccmlib.cluster import Cluster from ccmlib.dse_cluster import DseCluster from ccmlib.node import Node class ClusterFactory(): @staticmethod def load(path, name): cluster_path = os.path.join(path, name) filename = os.path.join(c...
apache-2.0
-4,839,687,159,748,747,000
36.2
105
0.582258
false
4
false
false
false
aam-at/tensorflow
tensorflow/python/distribute/multi_process_lib.py
1
5765
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-7,432,885,174,317,511,000
32.517442
80
0.671639
false
3.731392
true
false
false
vianuevm/cppStyle
app/models.py
1
1090
# from app import db # FALSE = 0 # TRUE = 1 # class User(db.Model): # id = db.Column(db.Integer, primary_key = True) # name = db.Column(db.String(65)) # passed_grader = db.Column(db.SmallInteger, default = FALSE) # email = db.Column(db.String(120), unique = True) # umich_id = db.Column(db.Integer,...
mit
-868,055,323,148,667,500
27.710526
65
0.591743
false
2.891247
false
false
false
2Guys1Python/Project-Cacophonum
data/spellhandler.py
1
5043
import pygame, sys, copy, random, operator from entityclasses import * from compositeclasses import * #from statushandler import * def useSpell(spell, source, target): for func in spell.effectsList: funcdict[func[0]](func[1], source, target) def useSpellAoE(spell, source, target): for x in range(0, len(target)): ...
mit
8,143,784,072,489,958,000
28.840237
116
0.622844
false
2.698234
false
false
false
RichieStacker/bingame
bingame_output.py
1
1971
# Number-to-binary game # Copyright (C) 2013 Jonathan Humphreys # 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. # Thi...
gpl-2.0
-202,123,231,074,712,740
45.928571
100
0.722476
false
3.507117
false
false
false
bjlittle/iris
lib/iris/tests/unit/analysis/cartography/test__xy_range.py
1
1643
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for :func:`iris.analysis.cartography._xy_range`""" # Import iris.tests first so that some things can be initial...
lgpl-3.0
-7,154,258,106,684,715,000
27.824561
71
0.631163
false
3.495745
true
false
false
emdash/todoserver
auth.py
1
2743
from util import failUnless, failUnlessRaises, SoftFailure class Rights(object): def __init__(self, pwhash): self.pwhash = pwhash self.actions = set([]) class PasswordAuthentication(object): def __init__(self): self.credentials = {} def userIsValid(self, username): retur...
mit
8,884,050,786,377,453,000
29.820225
68
0.646737
false
4.200613
false
false
false
emreg00/biana
biana/BianaParser/pfamSeqParser.py
2
4093
""" File : pfamParser.py Author : Javier Garcia Creation : 19 December 2007 Contents : fills up tables in database biana with information from PFAM Called from : ======================================================================================================= """ ## STEP 1: IMPORT NECESSARY ...
gpl-3.0
2,842,127,073,670,221,000
35.221239
183
0.598583
false
4.012745
false
false
false
ragupta-git/ImcSdk
imcsdk/mometa/bios/BiosVfUsbXhciSupport.py
1
3718
"""This module contains the general information for BiosVfUsbXhciSupport ManagedObject.""" from ...imcmo import ManagedObject from ...imccoremeta import MoPropertyMeta, MoMeta from ...imcmeta import VersionMeta class BiosVfUsbXhciSupportConsts: VP_USB_XHCI_SUPPORT_DISABLED = "Disabled" VP_USB_XHCI_SUPPORT_EN...
apache-2.0
-8,252,207,225,957,920,000
48.573333
252
0.618074
false
3.261404
false
false
false
jdavidagudelo/django-social-auth-corrected
social_auth/backends/contrib/rdio.py
1
4316
import urllib from oauth2 import Request as OAuthRequest, SignatureMethod_HMAC_SHA1 try: import json as simplejson except ImportError: try: import simplejson except ImportError: from django.utils import simplejson from social_auth.backends import ConsumerBasedOAuth, OAuthBackend, BaseOAut...
bsd-3-clause
3,342,198,085,597,139,500
32.984252
79
0.588508
false
3.776028
false
false
false
eniac/faas
factor/utils.py
1
5921
import os import shlex import subprocess import time import logging from cadotask import Polynomials import cadoprograms import cadoparams import datetime import fcntl import pickle import copy import threading def str_time(t): m, s = divmod(t, 60) h, m = divmod(m, 60) return "%02d:%02d:%02d" % (h, m, s) ...
lgpl-3.0
-7,543,934,372,919,643,000
28.90404
127
0.582503
false
3.719221
false
false
false
dna2github/dna2sevord
computer/algorithm/py/aco_shortestpath.py
1
3842
import random def trie(tr, path): cur = tr for x in path: if x not in cur: cur[x] = {} cur = cur[x] if len(path) > 0: cur['_'] = True def trie_find(tr, path): cur = tr for x in path: if x not in cur: return False cur = cur[x] if len(path) == 0: return True r...
gpl-3.0
-5,085,734,335,152,200,000
23.787097
55
0.422957
false
2.893072
false
false
false
AllanYangZhou/oppia
scripts/pre_push_hook.py
1
11218
#!/usr/bin/env python # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
apache-2.0
-1,899,512,089,063,326,500
37.027119
80
0.63202
false
3.826057
true
false
false
tessie/oneanddone
oneanddone/tests/functional/pages/user/user_profile_edit.py
1
2544
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from selenium.webdriver.common.by import By from pages.base import Base from pages.user.user_profile_delete import User...
mpl-2.0
7,590,874,595,658,911,000
37.545455
95
0.695362
false
3.578059
false
false
false
pepitogithub/PythonScripts
prueba.py
1
1360
import os import Aplicacion import math import random from datetime import datetime from Menu import * from Variable import * class Prueba(Aplicacion.Aplicacion): def iniciar(self,**args): # las variables de usuario se agregan con la clase Variable. # la funcion para modificarlas debe ser creada en la clase que ...
gpl-2.0
2,103,553,620,826,413,000
39.029412
123
0.746324
false
2.682446
false
false
false
Osmose/normandy
recipe-server/normandy/recipes/signing.py
1
8619
import base64 import binascii import hashlib import logging from datetime import datetime import ecdsa import requests from pyasn1.codec.der.decoder import decode as der_decode from pyasn1.codec.native.encoder import encode as python_encode from pyasn1_modules import rfc5280 from requests_hawk import HawkAuth from dj...
mpl-2.0
5,819,108,604,241,928,000
28.618557
94
0.624086
false
4.086771
true
false
false
rogerhil/thegamesdb
thegamesdb/items.py
1
3683
# TheGamesDb API, Python Wrapper - http://wiki.thegamesdb.net/index.php/Main_Page # Copyright (C) 2015 Rogerio Hilbert Lima <rogerhil@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, ...
gpl-2.0
-5,058,086,117,325,474,000
33.420561
81
0.606299
false
3.723964
false
false
false
agoose77/hivesystem
manual/movingpanda/panda-14f.py
1
11564
import dragonfly import dragonfly.pandahive import bee from bee import connect import dragonfly.scene.unbound, dragonfly.scene.bound import dragonfly.std import dragonfly.io import dragonfly.canvas import dragonfly.convert.pull import dragonfly.logic import dragonfly.bind import dragonfly.op.pull import Spyder # ## ...
bsd-2-clause
-2,415,785,636,739,940,400
30.856749
110
0.666551
false
2.953768
false
false
false
Neurita/boyle
boyle/image/base.py
1
12702
# coding=utf-8 """ A class to manage neuroimage files. A wrapper around nibabel, nipy and the rest of boyle for own purposes. """ # ------------------------------------------------------------------------------ # Author: Alexandre Manhaes Savio <alexsavio@gmail.com> # Klinikum rechts der Isar, TUM, Munich # # 2016, Ale...
bsd-3-clause
2,107,672,781,771,408,400
30.834586
120
0.566053
false
3.901106
false
false
false
eswartz/RenderPipeline
rpcore/stages/cull_lights_stage.py
1
5295
""" RenderPipeline Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
mit
5,670,255,817,371,023,000
42.760331
98
0.69254
false
3.532355
false
false
false
blogoben/python
makedist.py
1
1759
#!/usr/bin/env python # -*- coding: utf-8 -*- # 1 2 3 4 5 6 7 8 9 9 # 3456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789 """ Packs all Python executable scripts and modules into executable...
mit
-3,489,105,519,141,615,000
25.920635
99
0.626492
false
3.917595
false
false
false
FSI-HochschuleTrier/hacker-jeopardy
de/hochschuletrier/jpy/overlays/QuestionOverlay.py
1
1480
__author__ = 'miko' from de.hochschuletrier.jpy.overlays.Overlay import Overlay from de.hochschuletrier.jpy.Constants import Constants, Fonts from Tkinter import Label from PIL import Image, ImageTk class QuestionOverlay(Overlay): def __init__(self, *args, **kwargs): Overlay.__init__(self, *args, **kwargs) self....
mit
5,739,553,203,047,542,000
22.492063
61
0.706081
false
2.88499
true
false
false
apache/cloudstack-gcestack
gstack/controllers/machine_type.py
2
3938
#!/usr/bin/env python # encoding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Vers...
apache-2.0
5,004,823,278,447,751,000
37.607843
103
0.714068
false
3.953815
false
false
false
influence-usa/pupa
pupa/tests/importers/test_base_importer.py
1
3885
import os import json import shutil import tempfile import mock import pytest from opencivicdata.models import Person from pupa.scrape import Person as ScrapePerson from pupa.scrape import Organization as ScrapeOrganization from pupa.importers.base import omnihash, BaseImporter from pupa.importers import PersonImporter...
bsd-3-clause
9,201,026,737,643,270,000
30.844262
94
0.667439
false
3.289585
true
false
false
deerwalk/voltdb
lib/python/voltcli/clusterinfo.py
1
2141
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # 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 option) any later ver...
agpl-3.0
-5,843,744,810,515,910,000
35.931034
87
0.67305
false
3.723478
false
false
false
boscoh/inmembrane
inmembrane/plugins/signalp4.py
1
1872
# -*- coding: utf-8 -*- from inmembrane.helpers import run, parse_fasta_header citation = {'ref': u"Petersen TN, Brunak S, von Heijne G, Nielsen H. " u"SignalP 4.0: discriminating signal peptides from " u"transmembrane regions. Nature methods 2011 " u"Jan;8(10):...
bsd-2-clause
-4,958,131,504,092,978,000
33.666667
80
0.560897
false
3.57935
false
false
false
lfcnassif/MultiContentViewer
release/modules/ext/libreoffice/share/extensions/dict-en/Lightproof.py
1
6524
# -*- encoding: UTF-8 -*- # Lightproof grammar checker for LibreOffice and OpenOffice.org # 2009-2012 (c) László Németh (nemeth at numbertext org), license: MPL 1.1 / GPLv3+ / LGPLv3+ import uno, unohelper, os, sys, traceback from lightproof_impl_en import locales from lightproof_impl_en import pkg import lightproof_i...
lgpl-3.0
4,705,376,533,129,502,000
41.070968
118
0.619384
false
3.71567
false
false
false
foahchon/conferenceapi
main.py
1
2183
#!/usr/bin/env python """ main.py -- Udacity conference server-side Python App Engine HTTP controller handlers for memcache & task queue access $Id$ created by wesc on 2014 may 24 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import webapp2 from google.appengine.api import app_identity from google.appe...
apache-2.0
5,969,798,011,845,248,000
31.58209
86
0.653688
false
3.850088
false
false
false
alexvh/python-gitlab3
gitlab3/__init__.py
1
17349
""" gitlab3 ~~~~~~~ Python wrapper for GitLab API v3 :copyright: (c) 2013 by Alex Van't Hof. :license: LGPLv3, see LICENSE for more details. """ import json import re import requests from datetime import tzinfo, timedelta, datetime from math import ceil import urllib from . import exceptions from ._api_definition ...
lgpl-3.0
-8,032,993,001,286,835,000
33.767535
79
0.560897
false
3.707051
false
false
false
vitchyr/rlkit
rlkit/torch/sac/policies/base.py
1
1924
import abc import logging import numpy as np import torch import torch.nn.functional as F from torch import nn as nn import rlkit.torch.pytorch_util as ptu from rlkit.policies.base import ExplorationPolicy from rlkit.torch.core import torch_ify, elem_or_tuple_to_numpy from rlkit.torch.distributions import ( Delta...
mit
-290,704,162,319,291,970
28.151515
88
0.695426
false
3.802372
false
false
false
dongxingshui/virt-manager
virtManager/host.py
1
37375
# # Copyright (C) 2007, 2013-2014 Red Hat, Inc. # Copyright (C) 2007 Daniel P. Berrange <berrange@redhat.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 the License, o...
gpl-2.0
-8,337,038,681,347,858,000
36.752525
85
0.582742
false
3.844374
false
false
false
btovar/autopyfactory
autopyfactory/info.py
1
9436
#! /usr/bin/env python import datetime import logging import logging.handlers import threading import time import traceback import os import pwd import sys from pprint import pprint from autopyfactory.apfexceptions import FactoryConfigurationFailure, CondorStatusFailure, PandaStatusFailure from autopyfactory.logserv...
apache-2.0
-1,926,716,004,404,706,300
29.636364
108
0.511975
false
4.675917
false
false
false
pipermerriam/pyethereum
ethereum/abi.py
1
20571
# -*- coding: utf8 -*- import ast import re import warnings import yaml # use yaml instead of json to get non unicode (works with ascii only data) from rlp.utils import decode_hex, encode_hex from ethereum import utils from ethereum.utils import encode_int, zpad, big_endian_to_int, is_numeric, is_string, ceil32 from...
mit
-98,196,517,471,034,980
34.044293
98
0.553352
false
3.760007
false
false
false
hariseldon99/archives
eth_question/scripts/mat_bin2ascii.py
1
1265
#!/usr/bin/python """ * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - * Rigol Lattice: postprocessing of Petsc Matrix data * Copyright (c) 2013 Analabha Roy (daneel@utexas.edu) * * This is free software: you can redistribute it and/or modify it under the * terms of version 3 of th...
gpl-2.0
-7,682,340,365,344,902,000
31.435897
78
0.575494
false
2.738095
false
false
false
Eric89GXL/scipy
scipy/stats/tests/test_stats.py
1
185775
""" Test functions for stats module WRITTEN BY LOUIS LUANGKESORN <lluang@yahoo.com> FOR THE STATS MODULE BASED ON WILKINSON'S STATISTICS QUIZ https://www.stanford.edu/~clint/bench/wilk.txt Additional tests by a host of SciPy developers. """ from __future__ import division, print_function, absolute_imp...
bsd-3-clause
-9,009,860,520,550,408,000
39.394651
134
0.552442
false
2.971021
true
false
false
R-Morgan/python
text_processing.py
1
5254
# !/usr/bin/env python # Basic text processing script in python # Copyright (C) <2014> <J. Arianna Morgan> # # 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, o...
gpl-3.0
5,668,293,265,192,448,000
35.741259
95
0.642558
false
4.30303
false
false
false
MirkoRossini/pybuilder_django_enhanced_plugin
src/integrationtest/python/django_test_coverage_tests.py
1
1252
from pybuilder import BuildFailedException __author__ = 'Mirko Rossini' import unittest import shutil from integrationtest_support import IntegrationTestSupport from common import BUILD_FILE_TEMPLATE_COVERAGE class DjangoEnhancedPluginTest(IntegrationTestSupport): def test_django_coverage(self): self.wr...
bsd-3-clause
8,025,127,518,077,078,000
40.733333
117
0.700479
false
4.145695
true
false
false
PopCap/GameIdea
Engine/Extras/Maya_AnimationRiggingTools/ArtToolsOSX/MayaTools/General/Scripts/Modules/ART_Arm.py
1
83258
import maya.cmds as cmds import maya.mel as mel import os import ART_rigUtils as utils reload(utils) #The arm module, added as an extra rig module, needs a name, a prefix or suffix (but not both), and a parent to get started class Arm(): #pass in items we need to know about (do we build a clavicle? What is the root...
bsd-2-clause
-6,241,532,052,753,223,000
71.970202
352
0.553713
false
3.123776
false
false
false
jmeppley/py-metagenomics
assign_paths.py
1
10699
#! /usr/bin/env python """ Takes a single hit table file and generates a table (or tables) of pathway/gene family assignments for the query sequences (aka 'reads'). Assignments can be for gene families, gene classes, or pathways. Multiple pathway or classification levels can be given. If they are, an assignment will be...
mit
8,317,075,105,860,355,000
37.764493
79
0.591831
false
4.063426
false
false
false
lexxodus/gacfacg
app/api/task.py
1
2328
from __future__ import unicode_literals __author__ = 'lexxodus' from app import db from app.api import api from app.models import Task as TaskModel from flask import abort, request from flask.ext.restful import Resource def get_task_json(task, public=False): data = {} data["id"] = task.id data["name"] = ...
agpl-3.0
-2,654,935,148,141,690,000
27.390244
63
0.548969
false
3.797716
false
false
false
jayBana/InventoryMan
G53IDS/server/ml_helpers/collect_features.py
1
11356
__author__ = 'janosbana' ''' this script is responsible for collecting all the features data for the next 7 days from today and for each day create a list of features that can be used by our trained models ''' import json import os import requests import calendar from datetime import datetime, timedelta, date from xml...
apache-2.0
-4,231,904,624,096,083,000
34.823344
142
0.587883
false
3.509271
false
false
false
CanopyTax/asyncpgsa
asyncpgsa/testing/mockpool.py
1
1708
from asyncpgsa import compile_query from asyncpg import protocol from asyncpg.pool import Pool from .mockconnection import MockConnection from .mocktransactionmanager import MockTransactionManager class MockSAPool(Pool): def __init__(self, connection=None): super().__init__(min_size=1, ...
apache-2.0
-5,169,652,973,194,524,000
27
64
0.566745
false
4.506596
false
false
false
webmedic/booker
src/gdata/analytics/service.py
1
13337
#!/usr/bin/python # # Copyright (C) 2006 Google Inc. # Refactored in 2009 to work for Google Analytics by Sal Uryasev at Juice 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 # # ht...
mit
-3,158,945,713,651,887,600
39.293051
79
0.633876
false
4.674728
false
false
false
jcchoiling/learningPython
s13/Day10/practice/s1.py
1
1076
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng # 在 Java/C+ 世界里没法打印 name # 但在 Python/ JavaScript 世界里可以打印 name # if 1 == 1: # name = 'Janice' # for i in range(10): # name = i # def func(): # name = 'Janice' # name = 'janice' # # def f1(): # name = 'eric' # print(name) # # f...
gpl-3.0
-7,178,984,049,415,529,000
10.078652
40
0.469574
false
1.960239
false
false
false
joshuamckenty/yolo-octo-wookie
nova/fakerabbit.py
1
4630
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
apache-2.0
-5,151,208,215,358,748,000
33.552239
78
0.587905
false
4.209091
false
false
false
mahrz/flintstone
flintstone/widget.py
1
6673
from curtsies import FSArray, fmtstr from .layout_manager import LayoutManager, OverlayLayout from .utils import wrap, box, fmtfsa, center, blit __author__ = 'malte' class Decorator(object): def __init__(self, fg=None, bg=None): self.fg = fg self.bg = bg self.kwargs = {} if fg is ...
bsd-3-clause
5,346,375,405,268,170,000
34.68984
618
0.598382
false
3.236178
false
false
false
retrogradeorbit/Pigo
pigo/gfx/SDLFont.py
1
9348
# # Just a class to wrap the functions to do with SDL and fint management. # This is NOT a pigo font, but is used by that kind of font in generation # from SDL import SDL_Color, SDL_CreateRGBSurface, SDL_SWSURFACE, SDL_Rect, SDL_SetAlpha, SDL_SRCALPHA, SDL_FillRect, SDL_MapRGBA, SDL_BlitSurface from SDL.ttf import TTF...
gpl-3.0
-7,524,283,213,476,566,000
33.241758
310
0.567822
false
3.598152
false
false
false
sio2project/oioioi
oioioi/base/forms.py
1
6698
# coding: utf-8 from collections import OrderedDict from captcha.fields import CaptchaField, CaptchaTextInput from django import forms from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.auth.forms import ( PasswordResetForm, UserChangeForm, UserCreationForm,...
gpl-3.0
2,929,294,958,972,584,400
30.153488
101
0.669155
false
3.831808
false
false
false
mediawiki-utilities/python-mwpersistence
setup.py
1
1457
import os from setuptools import find_packages, setup def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() def requirements(fname): for line in open(os.path.join(os.path.dirname(__file__), fname)): yield line.strip() setup( name="mwpersistence", version="0.2....
mit
-411,315,577,124,502,000
32.113636
77
0.628689
false
4.210983
false
false
false
MrKrabat/plugin.video.akibapass
resources/lib/view.py
1
4466
# -*- coding: utf-8 -*- # Akibapass - Watch videos from the german anime platform Akibapass.de on Kodi. # Copyright (C) 2016 MrKrabat # # 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, eit...
agpl-3.0
6,007,659,053,618,661,000
34.728
121
0.615764
false
3.759259
false
false
false
mrpau/kolibri
kolibri/core/device/serializers.py
1
5135
from django.db import transaction from django.utils.translation import check_for_language from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from kolibri.core.auth.constants.facility_presets import choices from kolibri.core.auth.constants.facility_presets import mappings fro...
mit
3,702,982,336,836,827,000
39.117188
108
0.651607
false
4.536219
false
false
false
markgrovs/alfred-airmail-to-todoist
src/lib/todoist/managers/generic.py
1
1139
# -*- coding: utf-8 -*- class Manager(object): # should be re-defined in a subclass state_name = None object_type = None def __init__(self, api): self.api = api # shortcuts @property def state(self): return self.api.state @property def queue(self): return ...
mit
7,545,696,289,953,283,000
21.333333
67
0.574188
false
3.710098
false
false
false
mechaphish/colorguard
colorguard/pov/c_templates/naive_hex_c_template.py
1
5064
naive_hex_c_template = """ #include <libcgc.h> #include <stdlib.h> #include <boolector.h> #include <string.h> enum register_t { eax = 0, ecx = 1, edx = 2, ebx = 3, esp = 4, ebp = 5, esi = 6, edi = 7 }; void die(const char *str) { transmit(2, str, strlen(str), NULL); _terminate(...
bsd-2-clause
1,904,947,363,784,793,300
18.109434
89
0.560821
false
2.652698
false
false
false
MattDevo/edk2
BaseTools/Source/Python/BPDG/GenVpd.py
1
33152
## @file # This file include GenVpd class for fix the Vpd type PCD offset, and PcdEntry for describe # and process each entry of vpd type PCD. # # Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials # are licensed and made available under th...
bsd-2-clause
1,151,655,575,099,521,500
45.976845
206
0.544552
false
3.985094
false
false
false
NeblioTeam/neblio
test/functional/test_framework/blocktools.py
1
7444
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Utilities for manipulating blocks and transactions.""" from .address import ( key_to_p2sh_p2wpkh, ...
mit
-1,519,230,791,762,014,000
34.961353
108
0.673294
false
3.292349
false
false
false
hagne/atm-py
atmPy/data_archives/arm/_aipfitrh1ogrenC1.py
1
11033
from atmPy.general import timeseries as _timeseries from atmPy.data_archives.arm import _netCDF import pandas as _pd import numpy as _np from atmPy.aerosols.physics import hygroscopicity as _hygrow from atmPy.tools import decorators as _decorators class ArmDatasetSub(_netCDF.ArmDataset): info = ("This data produc...
mit
9,110,173,222,229,102,000
36.65529
148
0.553068
false
3.204473
false
false
false
wichtounet/dll
.ycm_extra_conf.py
1
5051
# Generated by YCM Generator at 2015-07-01 14:51:38.867126 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publis...
mit
-6,786,387,082,902,028,000
31.587097
79
0.694714
false
3.724926
false
false
false
rtb1c13/scripts
Fields/vector_plots.py
1
4739
#!/usr/bin/env python # Author: Richard Bradshaw, R.T.Bradshaw@soton.ac.uk # Script to create 3D matplotlib plots of e.g. field vectors. # Vectors may need rotation into reference frame, i.e multiplication # by a rotation matrix # Requirements: numpy, matplotlib v2.0.0b1 or later import numpy as np import matplotlib...
gpl-2.0
1,235,563,544,507,471,400
37.528455
135
0.674615
false
2.873863
false
false
false
nigelboid/lc-investor
lc-report.py
1
6922
#!/usr/bin/env python # # Import all necessary libraries # import argparse from lcrequest import LCRequest # # Define some global constants # VERSION= '0.1.0' GRADES= map(chr, range(ord('A'), ord('G')+1)) # Lending Club API data structure keys KEY_COUNT= 'count' KEY_TOTAL= 'total' KEY_NOTES= 'myNotes' KEY_GRADE...
mit
2,735,583,579,406,702,000
31.195349
297
0.684484
false
3.230051
false
false
false
Forage/Gramps
gramps/gen/filters/rules/_hasnotebase.py
1
2859
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2007 Donald N. Allingham # Copyright (C) 2007-2008 Brian G. Matherly # Copyright (C) 2008 Jerome Rapinat # Copyright (C) 2008 Benny Malengier # # This program is free software; you can redistribute it and/or modify # it under the terms of the ...
gpl-2.0
-8,505,627,731,178,724,000
34.7375
75
0.543896
false
4.344985
false
false
false
zenoss/ZenPacks.ShaneScott.CPUCount
ZenPacks/ShaneScott/CPUCount/__init__.py
1
2465
import Globals import logging import os log = logging.getLogger('zen.CPUCount') from Products.ZenModel.ZenPack import ZenPackBase from Products.ZenModel.ZenMenu import ZenMenu from Products.ZenUtils.Utils import zenPath from Products.ZenUtils.Utils import monkeypatch class ZenPack(ZenPackBase): def i...
gpl-2.0
-3,496,780,438,048,597,500
30.038961
95
0.646653
false
3.815789
false
false
false
87boy/mqpp
paho/br/puber.py
1
1132
#! /usr/bin/env python # -*- coding: utf-8 -*- """ main program of the publisher @author: Bin Zhang @email: sjtuzb@gmail.com """ import paho.mqtt.client as mqtt from get_config import * from pub_lib import * def main(): config = GetConfig() broker = config.get_broker() topics = config.get_to...
gpl-2.0
-9,172,951,332,465,129,000
26.609756
230
0.628092
false
3.35905
false
false
false
ppnchb/django-board
django_board/api_v1/permissions.py
1
1389
from rest_framework import permissions class IsAuthorOrReadOnly(permissions.BasePermission): """ Custom permission to only allow owners of an object to edit it. """ def has_object_permission(self, request, view, obj): # Read permissions are allowed to any request, # so we'll always al...
mit
7,543,705,685,267,784,000
32.878049
94
0.639309
false
4.554098
false
false
false
TheStackBox/xuansdk
SDKLibrary/com/cloudMedia/theKuroBox/sdk/paramComponents/kbxDateTimeRange.py
1
2255
############################################################################################## # Copyright 2014-2015 Cloud Media Sdn. Bhd. # # This file is part of Xuan Application Development SDK. # # Xuan Application Development SDK is free software: you can redistribute it and/or modify # it under the terms of...
gpl-3.0
8,894,159,326,248,036,000
35.583333
100
0.639024
false
3.998227
false
false
false
flaviovdf/tag_assess
src/tagassess/stats/topk.py
1
2515
# -*- coding: utf8 ''' Methods for comparing Top-K lists. See [1]_ References ---------- .. [1] Comparing top k lists. Ronald Fagin, Ravi Kumar, D. Sivakumar SIAM J. Discrete Mathematics 17, 1 (2003). PP/ 134-160 ''' from __future__ import division, print_function import itertools def kendall_tau_dist...
bsd-3-clause
5,425,856,873,452,386,000
29.682927
78
0.605964
false
3.445205
false
false
false
myron0330/caching-research
section_cmab/display/rewards.py
1
8238
# -*- coding: UTF-8 -*- # **********************************************************************************# # File: Display rewards # **********************************************************************************# import numpy as np import pandas as pd import matplotlib.pyplot as plt from matplotlib import r...
mit
-5,759,725,905,620,133,000
42.136842
114
0.597121
false
3.572799
false
false
false
onajafi/Cookie_Sharing_Bot
announcement.py
1
1110
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import sqlite3 from datetime import datetime from datetime import timedelta from telebot import types import telebot import logging import emoji import inits tb = telebot.TeleBot(inits.bot_address) announce_message="""Hey everybody, Finally, the moment we have all been...
gpl-3.0
2,897,905,412,727,593,500
22.617021
98
0.637838
false
3.46875
false
false
false
caseywstark/colab
colab/settings.py
1
10299
# -*- coding: utf-8 -*- # Django settings for social pinax project. import os.path import posixpath import pinax PINAX_ROOT = os.path.abspath(os.path.dirname(pinax.__file__)) PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) # tells Pinax to use the default theme PINAX_THEME = "default" DEBUG =...
mit
4,604,664,492,172,662,300
28.026239
223
0.650743
false
3.42387
false
false
false
Lukas0907/feeds
feeds/spiders/tvthek_orf_at.py
1
5351
import json from datetime import datetime, timedelta from dateutil.tz import gettz from scrapy import Request from feeds.exceptions import DropResponse from feeds.loaders import FeedEntryItemLoader from feeds.spiders import FeedsSpider class TvthekOrfAtSpider(FeedsSpider): name = "tvthek.orf.at" http_user =...
agpl-3.0
552,736,534,409,679,170
38.585185
87
0.557448
false
3.90929
false
false
false
ksmit799/Toontown-Source
toontown/makeatoon/ClothesGUI.py
1
9903
from pandac.PandaModules import * from toontown.toon import ToonDNA from direct.fsm import StateData from direct.gui.DirectGui import * from pandac.PandaModules import * from MakeAToonGlobals import * from toontown.toonbase import TTLocalizer from direct.directnotify import DirectNotifyGlobal import ShuffleButton impor...
mit
-909,565,232,051,786,000
44.426606
302
0.651823
false
3.466223
false
false
false
benoit-pierre/mcomix
mcomix/ui.py
1
23266
"""ui.py - UI definitions for main window. """ import gtk from mcomix import bookmark_menu from mcomix import openwith_menu from mcomix import edit_dialog from mcomix import enhance_dialog from mcomix import preferences_dialog from mcomix import recent from mcomix import dialog_handler from mcomix import constants fr...
gpl-2.0
-4,301,101,762,795,138,000
47.470833
102
0.494756
false
4.344725
false
false
false
T-Tony-T/mainframe-env-simulator
zPE/base/pgm/asma90_err_code_rc.py
1
4495
__I_MSG = { # ASMAxxxI 33 : lambda info, line: 'Storage alignment for {0} unfavorable'.format(line[info[1]:info[2]]), } __N_MSG = { # ASMAxxxN } __W_MSG = { # ASMAxxxW 45 : lambda info, line: 'Register or label not previously used - {0}'.fo...
bsd-3-clause
6,698,306,845,718,258,000
59.743243
141
0.624027
false
3.319793
false
false
false
8enmann/model-based-rl
utils.py
1
2909
import os import gym import numpy as np import tensorflow as tf from gym import spaces from collections import deque def sample(logits): noise = tf.random_uniform(tf.shape(logits)) return tf.argmax(logits - tf.log(-tf.log(noise)), 1) def cat_entropy(logits): """More computationally stable than softmax fol...
mit
-5,333,215,770,965,379,000
28.09
83
0.601238
false
3.336009
false
false
false
FireURL/FireURL-Server
fireURL.py
1
2914
""" GPL License 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...
gpl-2.0
-6,647,995,406,967,703,000
31.021978
95
0.62766
false
3.597531
false
false
false
MSEMJEJME/Get-Dumped
renpy/display/pgrender.py
1
4815
# Copyright 2004-2012 Tom Rothamel <pytom@bishoujo.us> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, m...
gpl-2.0
-8,994,877,754,951,338,000
27.323529
76
0.688474
false
3.803318
false
false
false
mweinberger/scmigrator
scmigrator.py
1
9078
#!/usr/bin/env python # -*- coding: utf-8 -*- # This script is Copyright (C) 2015 Tenable Network Security, Inc. from extra import * def check_version(): import securitycenter version = securitycenter.__version__.split(".") if version[0] > 2: return elif version[0] == 2: if version[1...
bsd-3-clause
3,344,609,363,278,093,000
38.12931
118
0.450319
false
3.831997
false
false
false
longzhi/Zappa
zappa/handler.py
1
20781
from __future__ import unicode_literals import base64 import boto3 import collections import datetime import importlib import inspect import json import logging import os import sys import traceback import zipfile from builtins import str from werkzeug.wrappers import Response # This file may be copied into a projec...
mit
5,045,834,730,124,892,000
38.963462
119
0.582503
false
4.614923
false
false
false
grantmcconnaughey/django-lazy-tags
setup.py
1
1747
import codecs import re import os from setuptools import setup, find_packages, Command def read(*parts): filename = os.path.join(os.path.dirname(__file__), *parts) with codecs.open(filename, encoding='utf-8') as fp: return fp.read() def find_version(*file_paths): version_file = read(*file_paths)...
mit
-4,179,360,638,481,466,000
32.596154
72
0.60332
false
3.925843
false
false
false
ArchiveTeam/furaffinity-discovery
server/fadisco/model.py
1
2099
import base64 import itertools import json import logging import random _logger = logging.getLogger(__name__) class Model(object): def __init__(self, database, secrets_path): self._database = database self._secrets_path = secrets_path def add_user_discovery(self, results): usernames...
unlicense
-2,035,821,914,739,126,800
26.618421
92
0.543116
false
4.310062
false
false
false
pkathail/magic
python/magic/utils.py
1
5366
import numbers import numpy as np import pandas as pd import scprep from scipy import sparse try: import anndata except (ImportError, SyntaxError): # anndata not installed pass def check_positive(**params): """Check that parameters are positive as expected Raises ------ ValueError : unac...
gpl-2.0
8,417,365,257,068,038,000
25.17561
82
0.58852
false
4.162917
false
false
false
eric6356/apod-crawler
apod/spiders/mixins.py
1
2302
import re import logging from datetime import datetime from urllib.parse import urlparse from apod.items import APODItem logger = logging.getLogger(__name__) def parse_apod(response, apod): date = response.css('center:first-child>p:last-child::text').extract_first().strip() try: apod['date'] = date...
mit
8,793,564,607,955,572,000
34.415385
99
0.605995
false
3.580093
false
false
false
dc3-plaso/plaso
plaso/parsers/sqlite_plugins/imessage.py
1
3356
# -*- coding: utf-8 -*- """This file contains a parser for the iMessage database on OSX and iOS. iMessage and SMS data in OSX and iOS are stored in SQLite databases named chat.db and sms.db respectively. """ from plaso.containers import time_events from plaso.lib import eventdata from plaso.parsers import sqlite from...
apache-2.0
-538,173,818,401,078,400
38.952381
80
0.68236
false
3.857471
false
false
false
SuperTaiyaki/fitconverter
write_fit.py
1
8094
#!/usr/bin/python3 # vim: et sw=4 ts=4 import sys import struct import datetime import time import binascii import math from xml.dom.minidom import parse import xml.etree.ElementTree as ET # Garmin-defined epoch = datetime.datetime(1989, 12, 31, 0, 0, 0) track_name = "" laps = [] trackpoints = [] # FIT lat/lon unit...
mit
4,730,299,135,559,864,000
30.250965
112
0.578824
false
3.00334
false
false
false
marcli/sos
sos/plugins/grafana.py
1
1829
# Copyright (C) 2016 Red Hat, Inc., Pratik Bandarkar <pbandark@redhat.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 the License, or # (at your option) any later versi...
gpl-2.0
2,299,940,436,332,239,600
34.862745
75
0.609623
false
3.702429
false
false
false
IgowWang/ML_python3
sparkgo/profiles.py
2
2210
#!/usr/bin/env python # -*- coding: utf-8 -*- # author igor # Created by iFantastic on 16-6-14 ''' Computing User Profiles with Spark data: /data/tracks.csv /data/cust.csv ''' import os import csv # os.environ["PYSPARK_PYTHON"] = "/home/igor/anaconda3/bin/ipython" # os.environ["PYSPARK_DRIVER_PYTHON"] = "pytho...
gpl-3.0
-5,416,736,684,000,604,000
25.626506
93
0.595475
false
3.148148
false
false
false
ctu-osgeorel/gdal-vfr
vfr4ogr/parse.py
1
2433
############################################################################### # # VFR importer based on GDAL library # # Author: Martin Landa <landa.martin gmail.com> # # Licence: MIT/X # ############################################################################### import os import sys from .utils import read_fil...
mit
-3,391,020,950,857,114,000
27.964286
102
0.542951
false
4.075377
false
false
false
RPGOne/Skynet
pytorch-master/torch/legacy/nn/JoinTable.py
1
1882
import torch from .Module import Module class JoinTable(Module): def __init__(self, dimension): super(JoinTable, self).__init__() self.size = torch.Size() self.dimension = dimension self.gradInput = [] def _getPositiveDimension(self, input): dimension = self.dimension...
bsd-3-clause
-5,851,561,124,224,058,000
29.354839
89
0.580234
false
4.091304
false
false
false
rusiv/BSScript
bsscript/BllExecuter.py
1
2179
# -*- coding: utf-8 -*- import os import subprocess class BllExecuter: SHOW_LOGIN = str.encode('ShowLoginWindow') SHOW_LOGIN_OFF = str.encode('ShowLoginWindow =0\r\n') def __init__(self, workingDir, bllFullPath): self.workingDir = workingDir self.exeDir = self.workingDir + '\\exe\\' self.bllFullPath = bll...
mit
8,914,845,092,912,923,000
34.16129
110
0.672327
false
2.940621
false
false
false
decimalbell/dust
.ycm_extra_conf.py
1
4820
# Generated by YCM Generator at 2015-10-24 21:20:34.483150 # This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publis...
mit
7,812,677,283,048,225,000
32.472222
79
0.700415
false
3.742236
false
false
false
kitsunde/ansible
lib/ansible/cli/__init__.py
1
22640
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
1,793,598,166,491,601,000
43.920635
177
0.576502
false
4.066822
true
false
false