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
opencorato/sayit
speeches/search_indexes.py
2
1643
from haystack import indexes from speeches.models import Speech, Speaker, Section class SpeechIndex(indexes.SearchIndex, indexes.Indexable): # Use a template here to include speaker name as well... TODO text = indexes.CharField(document=True, model_attr='text') # , use_template=True) title = indexes.Char...
agpl-3.0
-7,003,036,244,537,974,000
33.229167
86
0.702982
false
3.829837
false
false
false
jocelynj/weboob
weboob/applications/weboorrents/weboorrents.py
1
5788
# -*- coding: utf-8 -*- # Copyright(C) 2010 Romain Bignon # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that it will b...
gpl-3.0
-737,716,371,771,267,100
31.700565
124
0.554423
false
3.736604
false
false
false
jbaragry/ardoq-archimate
setup.py
1
1672
"""A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspa...
mit
7,526,193,376,280,982,000
33.833333
77
0.678828
false
4.048426
false
false
false
abingham/ackward
site_scons/ackward/class_property.py
1
1765
from .element import SigTemplateElement from .include import ImplInclude from .trace import trace header_getter = 'static $type $property_name();' header_setter = 'static void $property_name($header_signature);' impl_getter = ''' $type $class_name::$property_name() { using namespace boost::python; try { ...
mit
3,386,836,769,049,771,000
25.343284
67
0.529178
false
4.162736
false
false
false
alexandercrosson/ml
tensorflow/cnn_text_classifier/train.py
1
7609
#! /usr/bin/env python """ Taken from Denny Britz's tutorial on CNNs http://www.wildml.com/2015/12/implementing-a-cnn-for-text-classification-in-tensorflow/ """ import tensorflow as tf import numpy as np import os import time import datetime import data_helpers from text_cnn import TextCNN from tensorflow.contrib im...
mit
-7,158,994,837,752,444,000
38.630208
112
0.613353
false
3.628517
false
false
false
bkuczenski/lca-tools
antelope_reports/tables/base.py
1
11488
""" Functions for creating tables for useful / important comparisons. These are analogous to charts in that they are forms of output and it's not clear where they belong. Lists of tabular outputs: * process or fragment Inventory * compare process inventories * compare allocations of a multioutput process * comp...
gpl-2.0
-5,190,139,048,839,691,000
34.9
120
0.566591
false
4.035125
false
false
false
saaros/pghoard
pghoard/config.py
1
5845
""" pghoard - configuration validation Copyright (c) 2016 Ohmu Ltd See LICENSE for details """ from pghoard.common import convert_pg_command_version_to_number from pghoard.postgres_command import PGHOARD_HOST, PGHOARD_PORT from pghoard.rohmu import get_class_for_transfer from pghoard.rohmu.errors import InvalidConfigu...
apache-2.0
8,807,986,599,779,522,000
45.76
119
0.648417
false
4.14539
true
false
false
glaudsonml/kurgan-ai
tools/sqlmap/plugins/dbms/oracle/fingerprint.py
1
3732
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.common import Backend from lib.core.common import Format from lib.core.data import conf from lib.core.data import kb from lib.core.data import logger ...
apache-2.0
-7,529,427,755,926,559,000
28.856
178
0.580118
false
3.746988
false
false
false
noca/pythonlibs
cache.py
1
1939
# -*- coding: utf-8 -*- ''' Common cache method for python. Check usage on Example. ''' class DontCache(Exception): pass def cache(compute_key, container_factory): marker = object() def decorator(func): def replacement(*args, **kwargs): cache = container_factory() if c...
bsd-2-clause
-4,467,158,069,026,433,000
25.561644
67
0.542548
false
4.49884
false
false
false
clchiou/garage
py/g1/devtools/buildtools/tests/test_buildtools.py
1
2374
import unittest import unittest.mock import distutils.errors from g1.devtools import buildtools class BuildtoolsTest(unittest.TestCase): @unittest.mock.patch(buildtools.__name__ + '.distutils.file_util') def test_make_copy_files(self, mock_file_util): mock_cmd = unittest.mock.Mock() mock_cm...
mit
-6,761,329,704,171,718,000
31.081081
74
0.556024
false
3.657935
true
false
false
dmayer/time_trial
time_trial_gui/lib/rq_result_processor.py
1
1207
from datetime import datetime from time import sleep from rq.job import Job from models.trial import Trial from redis import Redis __author__ = 'daniel' import threading class RqResultsProcessor(threading.Thread): session = None stopped = False def stop(self): self.stopped = True def run(se...
mit
-4,295,996,394,186,815,000
26.431818
118
0.509528
false
4.537594
false
false
false
futurely/openai-universe-agents
ga3c/NetworkVP.py
1
12245
# Copyright (c) 2016, NVIDIA CORPORATION. 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 a...
mit
7,946,365,921,996,443,000
39.546358
95
0.644753
false
3.248011
true
false
false
efforia/eos-dashboard
invent/store/store/views.py
1
3721
# -*- coding: UTF-8 -*- import paypalrestsdk,urlparse,urllib2 from xml.etree import ElementTree as ETree from hooks import paypal_api,pagseguro_api from django.core.mail import send_mail from django.conf import settings from django.http import Http404,HttpResponse from django.http import HttpResponse as response from ...
lgpl-3.0
-6,523,896,887,667,410,000
39.445652
196
0.71083
false
3.180342
false
false
false
saga-project/bliss
bliss/plugins/local/localjob.py
1
11546
# -*- coding: utf-8 -*- # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 __author__ = "Ole Christian Weidner" __copyright__ = "Copyright 2011-2012, Ole Christian Weidner" __license__ = "MIT" from bliss.interface import JobPluginInterface from bliss.plugins.local.process import LocalJobProcess import bliss....
mit
-7,737,438,792,153,225,000
43.237548
146
0.594838
false
3.774436
false
false
false
Jyrsa/hoppy.fi
hoppy/settings.py
1
3844
""" Django settings for hoppy project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
mit
-4,624,239,657,169,039,000
22.728395
95
0.601197
false
3.526606
false
false
false
dreadrel/UWF_2014_spring_COP3990C-2507
notebooks/scripts/book_code/code/timeseqs.py
1
1033
# File timeseqs.py "Test the relative speed of iteration tool alternatives." import sys, timer # Import timer functions reps = 10000 repslist = list(range(reps)) # Hoist out, list in both 2.X/3.X def forLoop(): res = [] for x in repslist: res.append(a...
apache-2.0
-2,903,239,872,491,046,000
29.382353
83
0.568248
false
3.364821
false
false
false
mdavid/cherokee-webserver-svnclone
admin/util.py
1
8071
# -*- coding: utf-8 -*- # # Cherokee-admin # # Authors: # Alvaro Lopez Ortega <alvaro@alobbs.com> # # Copyright (C) 2001-2010 Alvaro Lopez Ortega # # This program is free software; you can redistribute it and/or # modify it under the terms of version 2 of the GNU General Public # License as published by the Free S...
gpl-2.0
7,725,153,230,824,267,000
24.86859
76
0.548755
false
3.315941
false
false
false
mjs7231/python-plexapi
plexapi/library.py
1
60945
# -*- coding: utf-8 -*- from urllib.parse import quote, quote_plus, unquote, urlencode from plexapi import X_PLEX_CONTAINER_SIZE, log, utils from plexapi.base import PlexObject from plexapi.exceptions import BadRequest, NotFound from plexapi.media import MediaTag from plexapi.settings import Setting class Library(Pl...
bsd-3-clause
3,471,805,347,811,345,400
49.618771
127
0.599278
false
4.05759
false
false
false
Martin09/E-BeamPatterns
100 Wafers - 1cm Squares/Multi-Use Pattern/v1.4/MembraneDesign_100Wafer_v1.4.py
1
20307
# -*- coding: utf-8 -*- """ Created on Fri Dec 18 14:11:31 2015 @author: Martin Friedl """ import itertools from datetime import date from random import choice as random_choice import numpy as np from Patterns.GrowthTheoryCell import make_theory_cell from Patterns.GrowthTheoryCell_100_3BranchDevices import make_the...
gpl-3.0
-19,201,809,848,424,624
42.859611
114
0.566406
false
3.239273
false
false
false
Zero-Projects/Mozart
mozart/core/validators.py
1
2098
#!/usr/bin/python # -*- coding: utf-8 -*- from django import forms from django.utils.text import slugify from django.contrib.auth import authenticate from mozart.core.messages import custom_error_messages, media_messages def eval_blank(data): if str(data).isspace(): raise forms.ValidationError(custom_er...
bsd-3-clause
-6,490,742,904,031,472,000
29.405797
94
0.662536
false
3.726465
false
false
false
exaile/exaile
plugins/daapclient/test.py
1
1484
# This file contains some code to test the DAAPClient as stand-alone application. import sys import logging from .client import DAAPClient log = logging.getLogger(__name__) def main(): connection = DAAPClient() if len(sys.argv) > 1: host = sys.argv[1] else: host = "localhost" if le...
gpl-2.0
1,291,806,273,974,802,000
23.733333
92
0.566712
false
3.895013
false
false
false
hannahborje/myTodoList
todoView.py
1
1345
from flask import request, jsonify, render_template from todoModel import TodoModel import flask.views import json RETRIEVE_DEFAULT_NR = 5 # Render template for main.html class TodoView(flask.views.MethodView): def get(self): return render_template('main.html') # Add todo (item) and if it is checked or ...
mit
6,281,056,490,317,521,000
31.02381
97
0.62974
false
3.558201
false
false
false
tranquilit/WAPT
waptsetupgui/deb/createdeb.py
1
10151
#!/usr/bin/python # -*- coding: utf-8 -*- # ----------------------------------------------------------------------- # This file is part of WAPT # Copyright (C) 2013-2014 Tranquil IT Systems http://www.tranquil.it # WAPT aims to help Windows systems administrators to deploy # setup and update applications o...
gpl-3.0
-6,633,762,645,145,644,000
34.003448
144
0.63442
false
3.465688
false
false
false
GoogleCloudDataproc/cloud-dataproc
codelabs/spark-bigquery/counts_by_subreddit.py
1
3261
# Copyright 2019 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
19,847,593,516,167,104
35.640449
79
0.680773
false
3.933655
false
false
false
kingtaurus/cs224d
assignment1/tensorflow_word2vec.py
1
3188
import os import math import random import collections import numpy as np import tensorflow as tf import cs224d.data_utils as data_utils from tensorflow.models.embedding import gen_word2vec as word2vec class Options(object): def __init__(self): #Model Options self.emb_dim = 20 self.train_...
mit
-6,612,433,178,655,619,000
33.27957
109
0.584065
false
3.582022
false
false
false
chubbymaggie/barf-project
barf/utils/reil.py
1
7524
# Copyright (c) 2014, Fundacion Dr. Manuel Sadosky # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright notice, this # list of condit...
bsd-2-clause
-6,574,008,995,850,594,000
34.828571
106
0.624535
false
4.125
false
false
false
Antergos/Cnchi
src/installation/post_fstab.py
1
9489
#!/usr/bin/env python # -*- coding: utf-8 -*- # # post_fstab.py # # Copyright © 2013-2018 Antergos # # This file is part of Cnchi. # # Cnchi 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 ...
gpl-3.0
5,706,897,448,647,539,000
37.569106
92
0.541315
false
3.824264
false
false
false
bjoernricks/python-quilt
quilt/cli/delete.py
1
2083
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 - 2017 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of python-quilt for details. from quilt.cli.meta import Command from quilt.cli.parser import Argum...
mit
-4,401,374,766,035,893,000
38.283019
79
0.59414
false
4.14741
false
false
false
kbknapp/Platypus-cad
platypi/ppmodules/Apps/Testing/Network.py
1
2926
# -*- coding: utf-8 -*- #!/usr/bin/python # # Python 3.x # # ppctl_cadnetwork v0.1 # * Displays information about the network setup to the PiFaceCAD # * Requires: # * ifconfig (for subnet mask) # * grep (for subnet mask) # * awk (for subnet mask) # * ip (for default gw) # # Changelog # * v0.1 # * Initial Release #...
gpl-2.0
-4,029,454,239,713,564,000
22.796748
121
0.638414
false
2.533333
false
false
false
tomassurin/codility
Lesson 01/01 - tapes.py
1
1696
# A non-empty zero-indexed array A consisting of N integers is given. Array A represents numbers on a tape. # Any integer P, such that 0 < P < N, splits this tape into two non-empty parts: A[0], A[1], ..., A[P − 1] and A[P], A[P + 1], ..., A[N − 1]. # The difference between the two parts is the value of: |(A[0] + A[1...
unlicense
710,252,307,385,933,200
29.490909
141
0.614558
false
2.756579
false
false
false
sternoru/goscalecms
goscale/plugins/presentations/cms_plugins.py
1
2031
from goscale.cms_plugins import GoscaleCMSPluginBase from cms.plugin_pool import plugin_pool from django.utils.translation import ugettext_lazy as _ from django.conf import settings import models GOSCALE_PRESENTATIONS_PLUGIN_TEMPLATES = getattr(settings, 'GOSCALE_PRESENTATIONS_PLUGIN_TEMPLATES', ( ('presentation.h...
bsd-3-clause
7,149,152,504,235,631,000
32.866667
110
0.687839
false
3.686025
false
false
false
guohongze/adminset
branches/migrations/0001_initial.py
1
4299
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-04-18 05:56 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('appconf', '0001_initial'), ] ...
gpl-2.0
-442,874,068,296,152,400
66.171875
190
0.626192
false
3.193908
false
false
false
erickt/hue
desktop/libs/hadoop/src/hadoop/cluster.py
1
7182
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
8,905,411,804,505,308,000
26
132
0.673629
false
3.39414
true
false
false
bobobox/ansible
lib/ansible/cli/doc.py
1
13761
# (c) 2014, James Tanner <tanner.jc@gmail.com> # # 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) any later version. # # Ansible is distributed i...
gpl-3.0
4,870,792,144,390,071,000
38.205128
153
0.548943
false
4.282913
false
false
false
TUDelftGeodesy/Doris
doris_stack/functions/baselines.py
1
3319
import os import numpy as np import warnings from shutil import copyfile from doris.doris_stack.main_code.resdata import ResData import datetime import subprocess def baselines(dir_in,inputfile,start_date='2014-01-01',end_date='2018-01-01',doris=''): # This function calculates the baselines and plots a baseline p...
gpl-3.0
-2,185,828,952,843,984,600
32.525253
87
0.587828
false
3.51589
false
false
false
rolker/cesium-tools
srtm2qmesh.py
1
7012
#!/usr/bin/env python import sys import os import math import json import scipy.io.netcdf import quantized_mesh_tile.global_geodetic import quantized_mesh_tile.terrain # https://pypi.python.org/pypi/quantized-mesh-tile/ # pip install quantized-mesh-tile class Grd: def __init__(self,fname,tileSize): self....
mit
2,825,510,702,830,970,000
34.065
219
0.566315
false
2.930213
false
false
false
LaryLoose/laryloose.xbmc-addons
plugin.video.szenestreams/default.py
1
7913
#!/usr/bin/python # -*- coding: utf-8 -*- import urllib,urllib2,re,xbmcaddon,xbmcplugin,xbmcgui,xbmc,HTMLParser from stream import * htmlparser = HTMLParser.HTMLParser() pluginhandle = int(sys.argv[1]) itemcnt = 0 baseurl = 'http://www.szene-streams.com' settings = xbmcaddon.Addon(id='plugin.video.szene-streams') maxi...
gpl-2.0
3,533,005,184,932,227,000
39.172589
181
0.606091
false
2.801062
false
false
false
ericzundel/pants
src/python/pants/engine/scheduler.py
1
19768
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import logging impor...
apache-2.0
4,387,969,145,928,732,700
46.864407
120
0.608964
false
4.536026
false
false
false
SuperFriendBFG/PyBreakout
Game/Scenes/GameOverScene.py
1
1454
import pygame from Game.Scenes.Scene import Scene from Game.Shared import * from Game import Highscore class GameOverScene(Scene): def __init__(self, game): super(GameOverScene, self).__init__(game) self.__playerName = "" self.__highscoreSprite = pygame.image.load(GameConst...
gpl-3.0
4,623,302,732,384,540,000
31.090909
83
0.541265
false
4.027701
false
false
false
BertrandBordage/django-postgrefts
postgrefts/migrations/0001_initial.py
1
2798
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import postgrefts.fields class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ] operations = [ migrations.CreateModel( name='Index', ...
bsd-3-clause
-3,996,278,163,791,316,000
42.046154
117
0.572552
false
4.311248
false
false
false
zen4ever/django-dynatree
treewidget/apps/categories/models.py
1
2254
from django.db import models from django_extensions.db.fields import AutoSlugField import mptt from urlparse import urljoin class Category(models.Model): parent = models.ForeignKey('self', null=True, blank=True, related...
bsd-2-clause
3,287,626,030,816,427,000
28.657895
84
0.537711
false
4.293333
false
false
false
QuantumTechDevStudio/RUDNEVGAUSS
rms/run_manager_approx2.py
1
3432
# -*- coding: utf-8 -*- import os from rms import Run import time import math ###################################################################################################################################### # Программа для управления ранами. Руководство по использованию ...
gpl-3.0
-7,805,784,263,390,462,000
32.264368
134
0.442469
false
2.38099
false
false
false
hongzhouye/frankenstein
scf/rhfatom.py
1
6064
""" Spin-restricted Hartree-Fock for atom """ import numpy as np import scipy.linalg as slg from frankenstein import molecule, scf from frankenstein.tools.mol_utils import get_norb_l from frankenstein.tools.scf_utils import get_fock, get_fock_ao_direct, \ get_scf_energy from frankenstein.data.atom_data import ge...
bsd-3-clause
1,381,208,671,575,960,600
34.670588
208
0.54535
false
2.828358
false
false
false
9h37/pompadour-wiki
pompadour_wiki/pompadour_wiki/apps/wiki/models.py
1
1637
# -*- coding: utf-8 -*- from django.core.files.base import ContentFile from django.db.models.signals import post_delete from django.db import models from django.utils.translation import ugettext from django.core.cache import cache from gitstorage.StorageBackend import GitStorage class Wiki(models.Model): name =...
mit
-8,345,888,732,468,905,000
23.80303
60
0.677459
false
3.815851
false
false
false
retooth/morse
morse/slots/search.py
1
1306
#!/usr/bin/python # This file is part of Morse. # # Morse 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. # # Morse ...
gpl-3.0
7,996,134,308,721,858,000
30.853659
81
0.676876
false
3.818713
false
false
false
YueLinHo/Subversion
tools/dist/release.py
1
52520
#!/usr/bin/env python # python: coding=utf-8 # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache Licens...
apache-2.0
5,809,119,848,239,719,000
37.987379
133
0.571064
false
3.860051
false
false
false
sid88in/incubator-airflow
airflow/contrib/operators/sftp_operator.py
1
5426
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
4,150,012,125,310,411,000
44.216667
90
0.600995
false
4.216006
false
false
false
justinmk/python-client
neovim/__init__.py
1
1799
from client import Client from script_host import ScriptHost from plugin_host import PluginHost from uv_stream import UvStream from msgpack_stream import MsgpackStream from rpc_stream import RPCStream from time import sleep import logging, os __all__ = ['connect', 'start_host', 'ScriptHost', 'PluginHost'] # Required...
apache-2.0
1,397,941,041,186,873,000
31.125
78
0.644803
false
3.819533
false
false
false
regardscitoyens/nosfinanceslocales_scraper
localfinance/parsing/zone.py
1
5072
# -*- coding: utf-8 -*- from .document_mapper import DocumentMapper from .finance import ( CityFinanceParser, EPCIFinanceParser, DepartmentFinanceParser, DepartmentFinance2013Parser, RegionFinanceParser, RegionFinance2013Parser ) from .tax import ( CityTaxParser, CityBefore2008TaxPars...
mit
9,042,204,551,475,589,000
33.27027
78
0.637815
false
3.745938
false
false
false
czhengsci/pymatgen
pymatgen/__init__.py
1
2748
from __future__ import unicode_literals import sys import os import warnings import ruamel.yaml as yaml __author__ = "Pymatgen Development Team" __email__ ="pymatgen@googlegroups.com" __maintainer__ = "Shyue Ping Ong" __maintainer_email__ ="shyuep@gmail.com" __version__ = "2018.3.14" SETTINGS_FILE = os.path.join(os...
mit
4,265,692,872,666,505,000
30.597701
80
0.618632
false
3.606299
false
false
false
marksweiss/organize-m
lib/item.py
1
3548
from element import Elem class OrganizemIllegalDataFormatException(Exception): pass class OrganizemIllegalDataTypeException(Exception): pass # A single Item in the data file, with a root 'item:' element and child # elements for each of the fields (Elements) in an Item # Only title is required and all other args ar...
mit
1,379,241,476,481,216,000
43.35
103
0.602875
false
4.159437
false
false
false
macarthur-lab/xbrowse
seqr/migrations/0059_auto_20190705_1450.py
1
1096
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-07-05 14:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('seqr', '0058_matchmakercontactnotes'), ] operations = [ migrations.AlterFi...
agpl-3.0
-1,311,480,607,405,681,700
42.84
286
0.516423
false
2.584906
false
false
false
ahmetcemturan/SFACT
skeinforge_application/skeinforge_plugins/craft_plugins/cool.py
1
19876
""" This page is in the table of contents. Cool is a craft tool to cool the shape. Cool works well with a stepper extruder, it does not work well with a DC motor extruder. If enabled, before each layer that takes less then "Minimum Layer Time" to print the tool head will orbit around the printed area for 'Minimum Lay...
agpl-3.0
-5,475,630,925,524,603,000
45.98818
439
0.768213
false
3.316536
false
false
false
bmya/odoo-support
web_support_client_issue/wizard/support_new_issue.py
1
3221
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import fields, api, models, _ from op...
lgpl-3.0
4,524,937,655,549,498,400
29.6
80
0.557734
false
3.680412
false
false
false
dirn/Secret-Santa
tests/factories.py
1
1124
"""Factories for populating models for tests.""" import factory from factory.alchemy import SQLAlchemyModelFactory from xmas import models from xmas.core import db from xmas.utils import slugify class Event(SQLAlchemyModelFactory): """A factory instance of :class:`~xmas.models.Event`.""" FACTORY_FOR = mod...
bsd-3-clause
265,303,943,291,645,300
25.139535
72
0.69395
false
3.602564
false
false
false
DavidCain/film_server
cgi-bin/playlist.py
1
7485
#!/usr/bin/env python # David Cain # RE357 # 2012-12-16 """ A script to make a m3u bookmark playlist (playable in VLC), or an archive of .m4v video clip files. """ from collections import OrderedDict from datetime import datetime import cgi import csv import os import re import shutil import subprocess import sys im...
gpl-3.0
-7,705,770,874,046,983,000
26.929104
94
0.604275
false
3.406919
false
false
false
CMPUT410W15/cmput410-project
posts/remote.py
1
2909
"""Functions for dealing with remote posts.""" from author.models import Author from posts.models import Post, Comment from common.util import get_request_to_json, get_nodes from common.util import HINDLEBOOK, HINDLE_AUTH, BUBBLE, BUBBLE_AUTH from dateutil import parser import threading VISIBILITY = { 'PRIVATE': ...
apache-2.0
7,596,660,701,311,065,000
27.242718
68
0.559299
false
3.682278
false
false
false
MikeDMorgan/gwas_pipeline
PipelineGWAS.py
1
213238
######################################################################### ######################################################################### # Classes for handling genome-wide association input and output files, ## # analysis and qc programs, and post-hoc analyses ## ########################...
mit
-427,224,829,082,830,100
35.841396
102
0.53317
false
4.021689
false
false
false
scttcper/hangry-py
hangrypy/__init__.py
1
1419
from bs4 import BeautifulSoup from .default_recipe_parser import recipe_parser from .foodnetwork import foodnetwork from .recipe import Recipe from .schema_org_recipe_parser import schema_org_recipe_parser, use_schema_org # messy python 3 support try: from urllib.request import urlopen, quote from urllib.pars...
mit
-7,977,861,761,553,599,000
28.5625
78
0.681466
false
3.824798
false
false
false
codylane/python_twiddle
test_twiddle.py
1
12348
#!/usr/bin/env python from __future__ import print_function import twiddle import sys def get_database_connection_maximum(host, port=twiddle.DEFAULT_PORT): ''' Returns the current maximum total connections for the database pool. ''' result = twiddle.connect_factory(host, 'bean', 'datasource', 'MaxPool...
mit
4,603,005,909,222,156,300
39.090909
107
0.604227
false
4.131148
false
false
false
32bitmicro/EDA
python/eda/eda/dump.py
1
2948
# -*- coding: utf-8 -*- # # Copyright (c) 2014, Paweł Wodnicki # 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, t...
bsd-3-clause
4,909,801,486,996,867,000
34.071429
111
0.598099
false
4.13764
false
false
false
djangocon/2017.djangocon.eu
conference/schedule/models.py
1
5351
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import datetime as dt from autoslug import AutoSlugField from autoslug.utils import slugify from django.core.exceptions import ValidationError from django.db import models from django.template.defaultfilters import trunca...
bsd-3-clause
-7,714,352,984,290,550,000
32.44375
113
0.63091
false
4.044596
false
false
false
zliau/pivotalpy
pivotalpy/story.py
1
1404
import json from project import Project class Story(object): def __init__(self, pivotal): self.pivotal = pivotal self.stories_url = pivotal.base_url + 'projects/%s/stories/' # Get stories matching the query in @params def get_all(self, project_id, params=None): url = self.stories_u...
mit
8,934,251,698,385,529,000
36.945946
76
0.611823
false
3.198178
false
false
false
steinbep/Meraki-API---Python
mx_fw_rules.py
1
1190
#!/usr/bin/python import meraki import json # # Python Script Using Meraki API to collect all MX L3 Firewall Rules in all Networks to CSV file. # Returns Site, Comments, Source port and CIDR, Destination port and CIDR. # # Enter User's API Key apikey = 'xxxxxx' # Enter Organization ID Here organizationid = 'xxxxxx...
gpl-3.0
3,407,995,353,311,586,000
29.512821
197
0.647899
false
3.661538
false
false
false
SergeySatskiy/codimension
codimension/ui/runparamsdlg.py
1
35213
# -*- coding: utf-8 -*- # # codimension - graphics python two-way code editor and analyzer # Copyright (C) 2010-2017 Sergey Satskiy <sergey.satskiy@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 Softw...
gpl-3.0
4,505,693,968,886,528,000
39.708671
78
0.63221
false
4.323266
false
false
false
rouxcode/django-text-ckeditor
text_ckeditor/utils.py
1
3968
import random import re from lxml.html import fragments_fromstring, fragment_fromstring, tostring from django.apps import apps from django.utils.safestring import mark_safe from . import conf try: basestring except NameError: basestring = str class CKEditorHtml(object): # TODO replace data-djangolink...
mit
-5,744,339,242,675,329,000
32.066667
78
0.519153
false
3.680891
false
false
false
chrisb87/advent_of_code_2016
day11/day11.py
1
3413
import pdb import itertools def layout_to_grid(layout, elevator, objects): text = [] for floor in reversed(xrange(len(layout))): floor_text = ["F%d" % (floor + 1)] if floor == elevator: floor_text.append("E ") else: floor_text.append(". ") floor_objects = [objects[n] if n in layout[floor] else ". ...
unlicense
-7,786,298,473,346,507,000
19.93865
65
0.63639
false
2.700158
false
false
false
germtb/LightBeam
src/medium.py
1
1262
from math import pi from drawable import Drawable from matrix2D import Matrix from ray import Ray class Medium(Drawable): def __init__(self, refractive_index, polygon): self.refractiveIndex = refractive_index self.polygon = polygon def on_hit(self, ray, hit_point): pass def draw...
mit
5,808,206,299,481,627,000
27.704545
87
0.631537
false
3.647399
false
false
false
zstars/weblabdeusto
server/src/weblab/core/data_retriever.py
1
11519
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005 onwards University of Deusto # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # # This software consists of contributions made by many individuals, # list...
bsd-2-clause
2,681,901,111,945,592,000
47.805085
333
0.575534
false
4.763441
false
false
false
HiroyukiSakai/Contour
contour/views.py
1
25693
# Contour Copyright (C) 2013-2014 Hiroyuki Sakai # # This file is part of Contour. # # Contour 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 optio...
gpl-3.0
-2,998,517,735,398,188,500
35.392351
182
0.63313
false
3.859546
false
false
false
jdfekete/progressivis
progressivis/core/changemanager_literal.py
1
1960
"Change Manager for literal values (supporting ==)" from .bitmap import bitmap from .index_update import IndexUpdate from .changemanager_base import BaseChangeManager class LiteralChangeManager(BaseChangeManager): """ Manage changes that occured in a literal value between runs. """ VALUE = bitmap([0]...
bsd-2-clause
7,233,266,110,331,283,000
31.131148
64
0.557653
false
4.677804
false
false
false
dteal/dteal-site
pages/links.py
1
2392
title = 'Links' class Link: def __init__(self, section, url, name): self.section = section; self.url = url; self.name = name links = [ Link('News', 'https://hackaday.com', 'Hackaday : viz, articles on crazy engineering projects'), Link('News', 'https://news.ycombinator.com', 'Hacker News : a mostly-softwa...
cc0-1.0
3,724,751,775,368,633,000
60.333333
127
0.693562
false
3.043257
false
false
false
rzzzwilson/morse_trainer
tests/test_proficiency.py
1
1854
#!/usr/bin/env python3 """ Test the 'show proficiency' widget. """ import sys sys.path.append('..') from random import randint from PyQt5.QtWidgets import (QApplication, QWidget, QPushButton, QHBoxLayout, QVBoxLayout) from proficiency import Proficiency import utils class ProficiencyExa...
mit
-354,986,496,323,980,800
27.090909
72
0.625674
false
4.048035
false
false
false
UpSea/midProjects
BasicOperations/01_01_PyQt4/StandardSaveAndOpen.py
1
1219
from PyQt4 import QtGui,QtCore import os #from PyQt4.QtWidgets import QFileDialog class MyWindow(QtGui.QWidget): def __init__(self): super(MyWindow,self).__init__() self.myButton = QtGui.QPushButton(self) self.myButton.setObjectName("myButton") self.myButton.setText("Test...
mit
6,061,444,577,844,532,000
41.296296
142
0.617003
false
3.160665
false
false
false
debugger06/MiroX
tv/lib/frontends/widgets/gtk/tableviewcells.py
1
10798
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-2.0
-5,552,584,922,404,404,000
39.291045
80
0.655214
false
3.811507
false
false
false
kvar/ansible
lib/ansible/plugins/action/nxos.py
1
8406
# # (c) 2016 Red Hat Inc. # # 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) any later version. # # Ansible is d...
gpl-3.0
4,933,697,414,735,714,000
47.589595
138
0.621342
false
4.267005
false
false
false
intelmakers/candy_machine
Python/listen.py
1
1677
#!/usr/bin/python import collections import mraa import os import sys import time # Import things for pocketsphinx import pyaudio import wave import pocketsphinx as ps import sphinxbase my_dir = os.path.dirname(__file__) dict_name = 8670 # Parameters for pocketsphinx LMD = "{0}/dict/{1}.lm".format(my_dir, dict_nam...
cc0-1.0
-399,519,975,128,383,940
20.5
100
0.698271
false
2.691814
false
false
false
kietdlam/Dator
data_api/models.py
1
7208
from uuid import uuid4 from django.db import models from django.contrib.auth.models import Group from django.db.models.signals import pre_save, post_save from django.dispatch import receiver from data_api import file_provider import pandas as pd import django.utils.timezone as tmz import pytz import delorean class S...
mit
-4,165,941,014,930,690,000
30.203463
130
0.677026
false
3.805702
false
false
false
4dsolutions/Python5
get_movie.py
1
1400
# -*- coding: utf-8 -*- """ Created on Mon Jul 11 2016 @author: Kirby Urner Uses API documented at http://www.omdbapi.com/ to query IMDB movie database. """ import requests # from collections import namedtuple import json # Movie = namedtuple("Movie", "status_code content") class Movie: def __init__(self,...
mit
-994,236,702,834,751,500
26.45098
76
0.575
false
3.286385
false
false
false
peterbe/headsupper
headsupper/base/models.py
1
1493
from django.db import models from django.utils import timezone from django.conf import settings from jsonfield import JSONField class Project(models.Model): # e.g. mozilla/socorro github_full_name = models.CharField(max_length=200) # This'll match '^Headsup: ...' trigger_word = models.CharField(defa...
mpl-2.0
7,377,486,451,298,321,000
32.177778
78
0.701273
false
3.7325
false
false
false
robtherad/BC-Mod
tools/search_privates.py
1
4456
#!/usr/bin/env python3 # Created by ACE 3 team, modified by BC: https://github.com/acemod/ACE3 import fnmatch import os import re import ntpath import sys import argparse def get_private_declare(content): priv_declared = [] srch = re.compile('private.*') priv_srch_declared = srch.findall(content) ...
gpl-3.0
-4,066,306,607,683,146,000
31.75
126
0.540638
false
3.653815
false
false
false
ssebastianj/ia2013-tpi-rl
src/gui/qtgen/codetailsdialog.py
1
5881
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'D:\Sebastian\Mis documentos\Programacion\Proyectos\IA2013TPIRL\gui\qt\IA2013TPIRLGUI\codetailsdialog.ui' # # Created: Tue Jul 09 15:27:46 2013 # by: PyQt4 UI code generator 4.10.2 # # WARNING! All changes made in this file will be lost!...
mit
4,508,036,040,088,869,400
52.944954
158
0.713435
false
3.587553
false
false
false
CraigBryan/pellinglab_twitter_microscope
src/production_files/receivers/gui_receiver.py
1
2402
''' Created on Sep 6, 2013 @author: Craig Bryan ''' from receiver import Receiver class GuiReceiver(Receiver): """ A receiver that allows the router to receive and send data to a local GUI. This is to allow local requests for images, without using the Twitter-based interface. No GUI is currently impl...
mit
-4,373,891,099,005,391,400
37.126984
94
0.56453
false
5.056842
false
false
false
leppa/home-assistant
homeassistant/components/idteck_prox/__init__.py
1
2205
"""Component for interfacing RFK101 proximity card readers.""" import logging from rfk101py.rfk101py import rfk101py import voluptuous as vol from homeassistant.const import ( CONF_HOST, CONF_NAME, CONF_PORT, EVENT_HOMEASSISTANT_STOP, ) import homeassistant.helpers.config_validation as cv _LOGGER = l...
apache-2.0
-3,721,587,121,090,566,000
24.941176
77
0.559637
false
3.87522
false
false
false
magenta-aps/mox
python_agents/notification_service/notify_to_amqp_service.py
1
2455
# Copyright (C) 2015-2019 Magenta ApS, https://magenta.dk. # Contact: info@magenta.dk. # # 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/. """ Simple class to relay mess...
mpl-2.0
3,567,605,309,189,501,400
35.102941
69
0.58167
false
3.878357
false
false
false
NervanaSystems/neon
examples/ssd/layer.py
1
15145
from neon.layers.layer import Layer, ParameterLayer import numpy as np from neon.transforms import Softmax from neon.initializers.initializer import Constant import math from collections import OrderedDict class Normalize(ParameterLayer): def __init__(self, init=Constant(20.0), name=None): super(Normalize...
apache-2.0
-5,077,914,769,578,952,000
37.341772
99
0.553516
false
3.532774
false
false
false
fimad/mitmproxy
mitmproxy/controller.py
1
3905
from __future__ import absolute_import from six.moves import queue import threading class DummyReply: """ A reply object that does nothing. Useful when we need an object to seem like it has a channel, and during testing. """ def __init__(self): self.acked = False def __call_...
mit
5,079,605,450,579,444,000
26.307692
79
0.541613
false
4.07195
false
false
false
imathur/HPC-PPE
extract-timing-info.py
1
3102
import os import numpy as np import pandas as pd # Create dataframe in which dataset will be stored df = pd.DataFrame(columns=['pre-job input', 'opening input file', 'upto appmgr start', 'initialisation', 'event loop', 'ending']) # Initialize counting variables filecount = 0 included = 0 # Loop through all files i...
gpl-3.0
6,145,991,294,068,977,000
46
181
0.548034
false
4.561765
false
false
false
AmauryOrtega/Python-6.00.1x
Week 3/File5.py
1
4677
# -*- coding: utf-8 -*- """ Created on 25/09/2016 @author: Amaury Ortega <amauryocortega@gmail.com> """ ''' Things that can be done to strings, range, list or tuple being seq the name of any of the above variable -----OPERATIONS----- seq[i] len(seq) seq1 + seq2 (not range) n*seq (not range) seq[start:end] e in seq e ...
gpl-3.0
-5,361,887,684,765,019,000
27.345455
75
0.446226
false
2.930451
false
false
false
singlasahil14/char-rnn
utils.py
1
2427
import numpy as np import os from six.moves import cPickle class TextLoader(): def __init__(self, data_dir='nietzsche', batch_size=128, seq_length=8): self.data_dir = "data/" + data_dir self.batch_size = batch_size self.seq_length = seq_length self.input_file = os.path.join(self.da...
mit
-1,414,082,991,156,815,600
36.921875
89
0.588381
false
3.262097
false
false
false
j00bar/django-widgy
widgy/contrib/page_builder/forms/__init__.py
2
5872
import os from django import forms from django.utils.safestring import mark_safe from django.contrib.staticfiles.storage import staticfiles_storage from django.template.loader import render_to_string from django.conf import settings import bleach from django_pyscss import DjangoScssCompiler PAGEDOWN_EDITOR_TEMPLATE...
apache-2.0
-7,728,175,427,997,485,000
37.12987
180
0.533719
false
3.495238
false
false
false
sio2project/filetracker
filetracker/scripts/migrate_test.py
1
2281
"""Tests for migrate script.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function from multiprocessing import Process import os import shutil import tempfile import time import unittest from filetracker.client import Client, FiletrackerError from filetracker...
gpl-3.0
8,214,431,620,466,431,000
29.824324
81
0.604559
false
3.379259
true
false
false
aio-libs/aiokafka
tests/record/test_util.py
1
3681
import struct import pytest from aiokafka.record import util varint_data = [ (b"\x00", 0), (b"\x01", -1), (b"\x02", 1), (b"\x7E", 63), (b"\x7F", -64), (b"\x80\x01", 64), (b"\x81\x01", -65), (b"\xFE\x7F", 8191), (b"\xFF\x7F", -8192), (b"\x80\x80\x01", 8192), (b"\x81\x80\x01"...
apache-2.0
-1,897,615,598,977,457,200
37.747368
79
0.65906
false
2.493902
true
false
false
i2c2-caj/Utilities
Python/file_test.py
1
1763
import os, time def make_version(mtime): # t = ['Text Day', 'Month', 'Num day', 'time', 'year'] t = time.ctime(mtime).split() year = t[4] month = int(time.strptime(t[1], '%b').tm_mon) day = t[2] if (month < 10): new_version = 'y{0}m0{1}d{2}'.format(year, month, day) else: ...
gpl-2.0
-6,161,450,614,470,024,000
26.123077
72
0.519569
false
3.470472
false
false
false
LabAdvComp/tukey_middleware
setup.py
1
1983
# Copyright 2013 Open Cloud Consortium # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
apache-2.0
-2,085,793,852,312,047,400
29.045455
84
0.638931
false
3.553763
false
false
false
arvinsahni/ml4
learn/forall.py
1
2547
import pandas as pd from sklearn.preprocessing import label_binarize from sklearn.ensemble import RandomForestRegressor, RandomForestClassifier from sklearn.metrics import r2_score, roc_auc_score from learn import utils class Regression(): def __init__(self, time_to_compute=None): self.time_to_compute = t...
mit
-7,940,005,392,520,095,000
30.45679
74
0.556733
false
4.049285
false
false
false
chromium/chromium
third_party/wpt_tools/wpt/tools/wptrunner/wptrunner/vcs.py
13
1926
import subprocess from functools import partial from typing import Callable from mozlog import get_default_logger from wptserve.utils import isomorphic_decode logger = None def vcs(bin_name: str) -> Callable[..., None]: def inner(command, *args, **kwargs): global logger if logger is None: ...
bsd-3-clause
6,284,325,737,113,984,000
28.630769
88
0.593458
false
3.930612
false
false
false
hidext/oemedical
oemedical_his/models/oemedical_hospital_unit.py
1
1618
# -*- coding: utf-8 -*- ############################################################################## # # Tech-Receptives Solutions Pvt. Ltd. # Copyright (C) 2004-TODAY Tech-Receptives(<http://www.techreceptives.com>) # Special Credit and Thanks to Thymbra Latinoamericana S.A. # # This program is free soft...
agpl-3.0
3,963,752,721,680,169,000
39.45
78
0.592089
false
4.024876
false
false
false
justinmeister/The-Stolen-Crown-RPG
data/components/attack.py
1
1379
""" Sprites for attacks. """ import sys import pygame as pg from .. import setup, tools #Python 2/3 compatibility. if sys.version_info[0] == 2: range = xrange class Fire(pg.sprite.Sprite): """ Fire animation for attacks. """ def __init__(self, x, y): super(Fire, self).__init__() se...
mit
3,362,993,657,341,950,500
26.039216
64
0.518492
false
3.757493
false
false
false
alangenfeld/cloud-nfs
pyCloud/recovery.py
1
1086
#!/usr/bin/env python import boto import os import tempfile import pickle import ./cloudnfs.py #bucketName = cloudnfs bucketName = "cs699wisc_samanas" ######################################################################### # Recovery ######################################################################### # "Lo...
lgpl-3.0
4,373,986,769,432,987,600
23.681818
86
0.55709
false
3.668919
false
false
false