repo_name
stringlengths
6
61
path
stringlengths
4
230
copies
stringlengths
1
3
size
stringlengths
4
6
text
stringlengths
1.01k
850k
license
stringclasses
15 values
hash
int64
-9,220,477,234,079,998,000
9,219,060,020B
line_mean
float64
11.6
96.6
line_max
int64
32
939
alpha_frac
float64
0.26
0.9
autogenerated
bool
1 class
ratio
float64
1.62
6.1
config_test
bool
2 classes
has_no_keywords
bool
2 classes
few_assignments
bool
1 class
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/music21/lily/translate.py
1
101025
# -*- coding: utf-8 -*- #------------------------------------------------------------------------------- # Name: lily/translate.py # Purpose: music21 classes for translating to Lilypond # # Authors: Michael Scott Cuthbert # # Copyright: Copyright © 2007-2012 Michael Scott Cuthbert and the mu...
mit
6,628,346,927,522,504,000
37.447091
187
0.553334
false
4.17127
false
false
false
larsks/cloud-init
cloudinit/dhclient_hook.py
3
2536
# This file is part of cloud-init. See LICENSE file for license information. """Run the dhclient hook to record network info.""" import argparse import os from cloudinit import atomic_helper from cloudinit import log as logging from cloudinit import stages LOG = logging.getLogger(__name__) NAME = "dhclient-hook" U...
gpl-3.0
5,726,797,158,366,657,000
28.835294
78
0.62776
false
3.455041
false
false
false
malimome/game-auth
classifier.py
1
4439
import data as mldata import pdb class ClassificationBase(object): def __init__(self, start, length): self.start = start self.length = length self.profiles = {} self.attempt = {} self.userlvl = [] self.mindtPr = {} self.level = -1 def readProfiles(self): """ Get data for all users ...
gpl-2.0
1,073,319,948,299,777,800
28.993243
102
0.646091
false
3.467969
false
false
false
netkicorp/python-partner-client
netki/NetkiClient.py
2
10490
__author__ = 'frank' from Certificate import Certificate from Domain import Domain from Partner import Partner from Requestor import process_request from WalletName import WalletName class Netki: """ General methods for interacting with Netki's Partner API. :param partner_id: Your Partner ID available i...
bsd-3-clause
2,813,477,632,977,907,000
32.621795
121
0.638608
false
4.405712
false
false
false
laprice/ducttape
ducttape/package.py
1
1233
from fabric.api import sudo class PackageBase(object): def update(self): raise Exception('Not Implemented') def upgrade(): raise Exception('Not Implemented') def install(): raise Exception('Not Implemented') class PackageOpenBSD(PackageBase): pass class PackageYum(Package...
isc
-7,792,383,946,054,784,000
22.264151
62
0.565288
false
4.003247
false
false
false
bozokyzoltan/nmr
nmr_read_fit_plot.py
1
120762
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created by Zoltan Bozoky on 2013.03.13. Under GPL licence. Module handling a Sparky NMR file without nmrglue or additional nmr proccessing or handling softwares Purpose: ======== * One program that reads, visualizes multidimensional NMR data, finds peaks, fit peak...
gpl-2.0
-5,602,564,242,661,520,000
42.691027
243
0.480101
false
4.034949
false
false
false
radicalbit/ambari
ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/service_advisor.py
1
8471
#!/usr/bin/env ambari-python-wrap """ 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
6,362,549,142,980,725,000
43.584211
123
0.733325
false
4.177022
true
false
false
jpalladino84/roguelike-game
tdl/__init__.py
2
53198
""" The documentation for python-tdl. A Pythonic port of U{libtcod<http://doryen.eptalys.net/libtcod/>}. You can find the project page on Google Code U{here<http://code.google.com/p/python-tdl/>}. Report any bugs or issues to the Google Code issue tracker U{here<https://code.google.co...
mit
-9,165,600,255,512,424,000
38.78908
135
0.578086
false
4.092784
false
false
false
codeforamerica/typeseam
typeseam/form_filler/queries.py
1
8649
import io, csv, json from datetime import datetime from sqlalchemy import desc, inspect, func, text from sqlalchemy.orm import subqueryload from flask import abort, Markup from flask.ext.login import current_user from typeseam.app import db from .models import ( TypeformResponse, Typeform, SeamlessDoc, F...
bsd-3-clause
-1,366,382,294,274,125,600
29.135889
98
0.628974
false
3.67886
false
false
false
f-frhs/queequeg
constraint.py
1
8450
#!/usr/bin/env python ## $Id: constraint.py,v 1.3 2003/07/03 23:07:42 euske Exp $ ## ## constraint.py - Pattern matching / constraint checker ## import sys, re import pstring from regpat import PatternActionSet, PatCounter from sentence import Sentence, TextTokenizer, SentenceSplitter, POSTagger from abstfilter imp...
gpl-2.0
3,713,613,431,374,230,000
28.238754
143
0.609112
false
2.736399
false
false
false
burakbayramli/dersblog
tser/tser_070_voltar/util.py
2
14675
from scipy.optimize import minimize import pandas as pd, random import numpy as np, datetime import scipy.stats FLAG_BAD_RETURN=-99999.0 CALENDAR_DAYS_IN_YEAR = 365.25 BUSINESS_DAYS_IN_YEAR = 256.0 ROOT_BDAYS_INYEAR = BUSINESS_DAYS_IN_YEAR**.5 WEEKS_IN_YEAR = CALENDAR_DAYS_IN_YEAR / 7.0 ROOT_WEEKS_IN_YEAR = WEEKS_IN_Y...
gpl-3.0
-7,466,262,017,966,809,000
35.6875
140
0.643271
false
3.088823
false
false
false
spasticVerbalizer/tom-bot
tombot/plugins/system_plugin.py
1
3235
''' Provides commands to globally modify the bot's behaviour. ''' import logging import pydoc from .users_plugin import isadmin from tombot.registry import get_easy_logger, Command, Subscribe, BOT_START from tombot.registry import COMMAND_DICT, COMMAND_CATEGORIES from tombot.helper_functions import determine_sender, ex...
mit
1,681,421,250,180,765,700
32.697917
83
0.634003
false
3.731257
false
false
false
seanballais/botos
core/migrations/0002_auto_20190714_1353.py
1
2465
# Generated by Django 2.2.3 on 2019-07-14 13:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0001_initial'), ] operations = [ migrations.CreateModel( name='ElectionSetting', fields=[ ('...
gpl-3.0
8,521,539,974,967,091,000
38.758065
119
0.565923
false
4.199319
false
false
false
Carnon/nlp
TextClassify/textclassify/rnnmodel.py
1
2481
import tensorflow as tf from tensorflow.contrib.rnn import BasicLSTMCell class RNNModel(object): def __init__(self,args,text_data): self.args = args self.text_data = text_data self.input_x = None self.input_y = None self.dropout = None self.losses = None se...
apache-2.0
4,867,269,093,125,074,000
43.303571
194
0.644901
false
3.205426
false
false
false
ucoin-io/cutecoin
src/sakia/data/processors/sources.py
3
2400
import attr import sqlite3 import logging from ..entities import Source from .nodes import NodesProcessor from ..connectors import BmaConnector from duniterpy.api import bma, errors @attr.s class SourcesProcessor: """ :param sakia.data.repositories.SourcesRepo _repo: the repository of the sources :param s...
mit
5,394,411,755,953,615,000
30.578947
86
0.622917
false
4.013378
false
false
false
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/Mezzanine-3.1.10-py2.7.egg/mezzanine/core/admin.py
10
11563
from __future__ import unicode_literals from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from django.forms import ValidationError, ModelForm from django.http import HttpResponseRedirect from django.shortcuts import redirect from django.util...
gpl-2.0
4,187,259,666,729,593,000
36.664495
79
0.611779
false
4.513271
false
false
false
JnyJny/Geometry
Geometry/triangle2.py
1
9993
''' a Triangle ''' import math import collections import itertools from . import Polygon, Point, Segment, Circle from .constants import Epsilon, Half_Pi, nearly_eq, Sqrt_3 from .exceptions import * class Triangle(Polygon): '''a pythonic Triangle Implements a Triangle object in the XY plane having three ...
mit
7,130,236,080,199,315,000
23.079518
82
0.559592
false
3.803959
false
false
false
jirikadlec2/garmin-client
test_selenium.py
1
8613
# -*- coding: utf-8 -*- from selenium import webdriver import time #auxiliary functions def read_saved_track_names(track_file): tracks = set() with open(track_file) as f: for line in f: line2 = line.strip() tracks.add(line2) return tracks def save_garmin_tracks(activity_li...
mit
-1,088,594,471,736,206,600
40.805825
778
0.672318
false
2.80065
false
false
false
nicopresto/webSkapes
modules/savage/graphics/color.py
2
2555
class ColorMap: def __init__ (self, base, bound, num): self.base = base self.bound = bound self.num = float (num) def index (self, val): val = float (val) return self.base.interpolate (self.bound, val / (self.num - 1)) def __iter__ (self): return ColorMapIte...
mit
-7,536,077,556,048,083,000
24.04902
82
0.504892
false
3.221942
false
false
false
tebriel/dd-agent
emitter.py
5
2388
# (C) Datadog, Inc. 2010-2016 # All rights reserved # Licensed under Simplified BSD License (see LICENSE) # stdlib from hashlib import md5 import logging import re import zlib # 3p import requests import simplejson as json # project from config import get_version from utils.proxy import set_no_proxy_settings set_no...
bsd-3-clause
-7,868,835,654,060,473,000
27.428571
106
0.659129
false
3.553571
true
false
false
Teagan42/home-assistant
tests/components/mqtt/test_switch.py
2
18781
"""The tests for the MQTT switch platform.""" import json from unittest.mock import ANY from asynctest import patch import pytest from homeassistant.components import mqtt, switch from homeassistant.components.mqtt.discovery import async_start from homeassistant.const import ( ATTR_ASSUMED_STATE, STATE_OFF, ...
apache-2.0
8,798,958,616,628,749,000
30.353923
81
0.578776
false
3.724172
true
false
false
uudiin/bleachbit
tests/TestUpdate.py
3
4480
# vim: ts=4:sw=4:expandtab # BleachBit # Copyright (C) 2008-2015 Andrew Ziem # http://bleachbit.sourceforge.net # # 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...
gpl-3.0
-910,371,654,899,689,500
31.230216
218
0.603795
false
3.666121
true
false
false
hippyk/pix2code
model/classes/model/pix2code.py
2
3237
from __future__ import absolute_import __author__ = 'Tony Beltramelli - www.tonybeltramelli.com' from keras.layers import Input, Dense, Dropout, \ RepeatVector, LSTM, concatenate, \ Conv2D, MaxPooling2D, Flatten from keras.models import Sequential, Model from keras.opt...
apache-2.0
9,004,505,941,516,108,000
41.592105
126
0.656472
false
3.458333
false
false
false
damoxc/vsmtpd
plugins/queue/smtp_forward.py
1
2180
# # queue/smtp_foward.py # # Copyright (C) 2011 Damien Churchill <damoxc@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. #...
gpl-3.0
-5,603,379,824,121,702,000
28.459459
73
0.647706
false
3.720137
false
false
false
iotile/coretools
transport_plugins/jlink/setup.py
1
1591
"""Setup file for iotile-transport-jlink package.""" from setuptools import setup, find_packages import version setup( name="iotile-transport-jlink", packages=find_packages(exclude=("test",)), version=version.version, license="LGPLv3", install_requires=[ "iotile-core>=5.2", "pylink...
gpl-3.0
6,060,860,339,663,529,000
36
98
0.639849
false
3.918719
false
false
false
djohsson/Cryptchat
cryptchat/test/test_aes.py
1
1991
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Run from Cryptchat # python3 -m unittest discover import unittest from ..crypto.aes import AESCipher class testAESCipher(unittest.TestCase): def test_encrypt_decrypt(self): key = "TTTcPolAhIqZZJY0IOH7Orecb/EEaUx8/u/pQlCgma8=" cipher = AESCipher(ke...
mit
-3,590,336,263,947,979,000
33.910714
459
0.643478
false
2.734266
true
false
false
nop33/indico
indico/modules/events/contributions/models/fields.py
2
5336
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
gpl-3.0
-5,259,591,984,329,933,000
27.688172
118
0.625
false
3.889213
false
false
false
HIPS/optofit
optofit/test/geweke_test.py
1
6320
__author__ = 'scott' import numpy as np # Set the random seed for reproducibility seed = np.random.randint(2**16) print "Seed: ", seed np.random.seed(seed) import matplotlib.pyplot as plt from optofit.models.model import Model from optofit.population.population import Population from optofit.neuron.neuron import Ne...
gpl-2.0
-4,441,891,441,626,008,600
38.254658
157
0.68038
false
3.013829
false
false
false
nicolashainaux/mathmaker
mathmaker/lib/old_style_sheet/exercise/question/Q_RightTriangle.py
1
23978
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2017 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
gpl-3.0
-7,726,776,038,957,097,000
42.755474
80
0.449662
false
4.570721
false
false
false
MOLSSI-BSE/basis_set_exchange
basis_set_exchange/writers/dalton.py
1
2999
''' Conversion of basis sets to Dalton format ''' from .. import lut, manip, sort, misc, printing def write_dalton(basis): '''Converts a basis set to Dalton format ''' s = '! Basis = {}\n\n'.format(basis['name']) basis = manip.make_general(basis, False, True) basis = sort.sort_basis(basis, Fals...
bsd-3-clause
6,519,890,812,113,413,000
35.13253
116
0.520173
false
3.587321
false
false
false
schocco/mds-web
apps/muni_scales/api.py
1
5813
# -*- coding: utf-8 -*- from django.conf.urls import url from tastypie import fields from tastypie.authentication import MultiAuthentication from tastypie.authorization import Authorization from tastypie.bundle import Bundle from tastypie.exceptions import NotFound from tastypie.resources import Resource, ModelResourc...
mit
3,969,057,971,859,929,600
34.018072
122
0.653707
false
4.059358
false
false
false
s20121035/rk3288_android5.1_repo
external/lldb/utils/misc/grep-svn-log.py
2
2461
#!/usr/bin/env python """ Greps and returns the first svn log entry containing a line matching the regular expression pattern passed as the only arg. Example: svn log -v | grep-svn-log.py '^ D.+why_are_you_missing.h$' """ import fileinput, re, sys, StringIO # Separator string for "svn log -v" output. separator =...
gpl-3.0
546,846,880,806,010,430
27.952941
80
0.572938
false
3.77454
false
false
false
JohanComparat/nbody-npt-functions
bin/bin_MD/DF_degrade_resolution.py
1
2873
# cd pySU/pyMultidark/trunk/bin/fortranfile-0.2.1/ import numpy as n import os from os.path import join from astropy.io import fits import time import fortranfile import cPickle DFdir = join("/data2", "users", "gustavo", "BigMD", "1Gpc_3840_Planck1_New", "DENSFIELDS") mockDir = "/data1/DATA/eBOSS/Multidark-box-mocks/...
cc0-1.0
3,952,391,942,574,257,000
38.356164
254
0.616777
false
2.060976
false
false
false
widdowquinn/find_differential_primers
diagnostic_primers/scripts/pdp_script.py
1
2333
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """pdp_script.py Implements the pdp script for finding differential primers (c) The James Hutton Institute 2017-2019 Author: Leighton Pritchard Contact: leighton.pritchard@hutton.ac.uk Leighton Pritchard, Information and Computing Sciences, James Hutton Institute, Erro...
mit
-2,280,028,092,503,700,000
30.958904
77
0.743678
false
3.787338
false
false
false
cheral/orange3-text
orangecontrib/text/widgets/owwordenrichment.py
1
7520
import numpy as np from AnyQt.QtWidgets import QTreeWidget, QTreeView, QTreeWidgetItem from Orange.data import Table from Orange.widgets import gui from Orange.widgets.settings import Setting from Orange.widgets.widget import OWWidget, Msg from orangecontrib.text.util import np_sp_sum from orangecontrib.text.stats imp...
bsd-2-clause
-4,776,932,693,328,571,000
37.762887
129
0.574335
false
3.708087
false
false
false
xiaohan2012/capitalization-restoration
cap_transform.py
1
3211
import nltk from ground_truth import (ARTICLES, PREPOSITIONS, CONJUNCTIONS) from operator import itemgetter def make_capitalized_title(title = None, title_words = None): """ >>> make_capitalized_title(title = "This translation app helps professionals traveling in China and Japan") ['This', 'Translation', '...
gpl-2.0
-5,132,698,211,757,617,000
40.701299
171
0.582685
false
3.141879
false
false
false
internetarchive/bookserver
bookserver/catalog/Catalog.py
1
2008
#!/usr/bin/env python """ Copyright(c)2009 Internet Archive. Software license AGPL version 3. This file is part of bookserver. bookserver 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, eithe...
agpl-3.0
6,544,399,357,708,317,000
32.466667
84
0.608566
false
4.374728
false
false
false
zenn1989/scoria-interlude
L2Jscoria-Game/data/scripts/quests/112_WalkOfFate/__init__.py
1
2208
# Rewritten by RayzoR import sys from com.l2scoria.gameserver.model.quest import State from com.l2scoria.gameserver.model.quest import QuestState from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest qn = "112_WalkOfFate" # ~~~~~ npcId list: ~~~~~ Livina = 30572 Karuda = ...
gpl-3.0
-3,607,683,265,188,356,000
28.837838
159
0.597826
false
3.053942
false
false
false
flockchat/pyflock
flockos/apis/chat.py
1
1384
# coding: utf-8 # python 2 and python 3 compatibility library from six import iteritems from ..api_client import call_api def fetch_messages(token, chat, uids, **kwargs): """ This method makes a synchronous HTTP request. :param str token: (required) :param str chat: (required) :param...
apache-2.0
-1,932,706,288,706,491,400
25.113208
69
0.632948
false
3.812672
false
false
false
LighthouseUK/koalacore
koalacore/api.py
1
16622
# -*- coding: utf-8 -*- """ koala.api ~~~~~~~~~~~~~~~~~~ Contains base implementations for building an internal project API :copyright: (c) 2015 Lighthouse :license: LGPL """ from blinker import signal from google.appengine.ext import deferred __author__ = 'Matt Badger' # TODO: remove the defe...
lgpl-3.0
-1,690,080,187,786,669,800
39.541463
138
0.60089
false
4.310685
false
false
false
runefriborg/pycsp
test/unix/check.py
1
2240
import sys sys.path.insert(0, "../..") from pycsp.parallel import * def print_state(received, poison, retire): sys.stdout.write("Received: " + str(received) + "\n") if poison: sys.stdout.write("Poisoned\n") if retire: sys.stdout.write("Retired\n") sys.stdout.flush() @process def Asser...
mit
4,462,060,319,707,481,000
31.941176
123
0.519196
false
3.929825
false
false
false
hynekcer/django
tests/admin_inlines/models.py
276
6824
""" Testing of admin inline formsets. """ from __future__ import unicode_literals import random from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible @pyt...
bsd-3-clause
-4,537,177,001,815,998,000
24.750943
93
0.722743
false
3.522974
false
false
false
UkrainianTrickingCommunity/website
logsys/views.py
1
2432
from django.http import HttpResponse from django.shortcuts import redirect, render from django.core.context_processors import csrf import django.contrib.auth.decorators as decorators import django.contrib.auth as auth import django.contrib.auth.forms as auth_forms import django.contrib.auth.models as auth_models impor...
gpl-2.0
9,127,130,040,032,611,000
31.426667
77
0.628289
false
4
false
false
false
MattBroach/Django-Merged-Inlines
merged_inlines/admin.py
1
2288
from django.contrib import admin class MergedInlineAdmin(admin.ModelAdmin): # optional field ordering variable merged_field_order = None merged_inline_order = 'id' # Edited Change_Form Template with one inline form change_form_template = 'admin/change_form_merged_inlines.html' class Media: ...
mit
-3,833,279,934,971,811,000
36.508197
117
0.555507
false
4.221402
false
false
false
google/brain-tokyo-workshop
AttentionAgent/tasks/gym_task.py
1
6712
import cv2 import gin import gym from gym import spaces import numpy as np import os import tasks.abc_task import time import car_racing_variants from takecover_variants.doom_take_cover import DoomTakeCoverEnv class GymTask(tasks.abc_task.BaseTask): """OpenAI gym tasks.""" def __init__(self): self._e...
apache-2.0
-87,645,405,447,678,300
30.810427
80
0.56183
false
3.671772
false
false
false
dasadc/conmgr
support/qgen.py
1
15383
#! /usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2017 DA Symposium 2017 # All rights reserved. # """ アルゴリズムデザインコンテスト2017の問題データと正解データを、ランダムに作成する。 """ from __future__ import print_function import numpy as np import random import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirna...
bsd-3-clause
9,050,501,921,223,880,000
31.071594
130
0.518615
false
2.508037
false
false
false
miyyer/rmn
util.py
1
2018
import theano, cPickle, h5py, lasagne, random, csv, gzip import numpy as np import theano.tensor as T # convert csv into format readable by rmn code def load_data(span_path, metadata_path): x = csv.DictReader(gzip.open(span_path, 'rb')) wmap, cmap, bm...
mit
8,096,248,828,738,338,000
35.690909
106
0.561447
false
3.062215
false
false
false
anksp21/Community-Zenpacks
ZenPacks.community.DellEqualLogicMon/ZenPacks/community/DellEqualLogicMon/DellEqualLogicVolume.py
2
3866
################################################################################ # # This program is part of the DellEqualLogicMon Zenpack for Zenoss. # Copyright (C) 2010 Eric Enns. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zenoss.com/o...
gpl-2.0
-4,979,848,674,276,066,000
32.617391
95
0.53104
false
3.981462
false
false
false
jodal/mopidy-gmusic
mopidy_gmusic/playlists.py
1
4447
from __future__ import unicode_literals import logging import operator from mopidy import backend from mopidy.models import Playlist, Ref logger = logging.getLogger(__name__) class GMusicPlaylistsProvider(backend.PlaylistsProvider): def __init__(self, *args, **kwargs): super(GMusicPlaylistsProvider, s...
apache-2.0
-6,140,924,827,346,596,000
37.336207
79
0.515179
false
4.473843
false
false
false
robertavram/Linux-Server-Configuration
FlaskApp/secret_keys.py
1
1363
CSRF_SECRET_KEY, SESSION_KEY = "0h97kel3aq17853645odikh97kel3aq4vndtonignnobfjh", "3aq4vnd4vndtonignnt801785onignnob" # Google APIs GOOGLE_APP_ID = '768017853645-odikh97kel3aq4vndtonignnobfjhkea.apps.googleusercontent.com' GOOGLE_APP_SECRET = 'gb2X0NdP36xF-2kmj_S2IN3U' #GOOGLE_REDIRECT_URI = 'http://localhost:5000/aut...
apache-2.0
-3,014,239,941,012,855,300
40.30303
117
0.775495
false
2.606119
false
false
false
davelab6/html2markdown
html2markdown.py
1
38624
#!/usr/bin/python # # html2markdown # Copyright 2005 Dale Sedivec # # 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. # # ...
gpl-2.0
6,418,462,569,879,237,000
35.130964
79
0.594061
false
4.293941
false
false
false
LLNL/spack
var/spack/repos/builtin/packages/py-joblib/package.py
5
1234
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyJoblib(PythonPackage): """Python function as pipeline jobs""" homepage = "http://pa...
lgpl-2.1
-6,032,124,726,619,497,000
44.703704
96
0.757699
false
2.45328
false
false
false
EclipseXuLu/DataHouse
DataHouse/crawler/master_avatar_crawler.py
1
1477
import os import requests URL_TEMPLATE = "http://yjsjy.hust.edu.cn/Uploadfiles/StudentPhoto/%s.jpg" SAVE_TO_DIR_ROOT = "D:/HUST" def mkdirs_if_not_exist(dir_name): """ create new folder if not exist :param dir_name: :return: """ if not os.path.exists(dir_name): os.makedirs(dir_name) ...
mit
-7,978,295,527,017,499,000
29.142857
98
0.526066
false
3.334086
false
false
false
unclechu/pi-pedalboard
server.py
1
5528
#!/usr/bin/env python3 # pedalboard server import socket from threading import Thread from gpiozero import Button from signal import pause from time import sleep, time from radio import Radio TCP_IP = '0.0.0.0' TCP_PORT = 31415 ENC = 'UTF-8' NEW_PRESS_DELAY = 0.3 # i...
gpl-3.0
5,056,181,114,897,626,000
23.317181
76
0.644565
false
3.552124
false
false
false
tobi2006/mysds
export/views.py
1
84393
from datetime import date from django.contrib.auth.decorators import login_required, user_passes_test from django.http import ( HttpResponse, HttpResponseRedirect, HttpResponseForbidden) from django.shortcuts import render_to_response, redirect, get_object_or_404 from django.template import RequestContext from djan...
gpl-3.0
-2,231,097,893,349,251,000
33.815594
79
0.533682
false
3.724152
false
false
false
pdl30/pyngspipe
setup.py
1
1055
import os from setuptools import setup, find_packages setup(name='pyngspipe', version='0.0.1', description='pyngspipe is a pipeline for processing GEO NGS datasets based on the pyrnatools/pychiptools packages', author='Patrick Lombard', author_email='ptk.lmb55@gmail.com', packages=find_pa...
gpl-2.0
147,680,674,970,054,800
31.96875
121
0.653081
false
3.754448
false
false
false
JaredKerim-Mozilla/leaderboard-server
leaderboard/fxa/authenticator.py
2
3147
import re from django.conf import settings from rest_framework.exceptions import AuthenticationFailed from rest_framework.authentication import ( get_authorization_header, BaseAuthentication, ) from leaderboard.fxa.client import FXAClientMixin, FXAException from leaderboard.contributors.models import Contribu...
mpl-2.0
5,073,975,312,316,815,000
31.443299
79
0.614236
false
4.168212
false
false
false
knowsis/django
tests/text/tests.py
81
4256
# coding: utf-8 from __future__ import unicode_literals from django.test import TestCase from django.utils.encoding import iri_to_uri, force_text from django.utils.functional import lazy from django.utils.http import (cookie_date, http_date, urlquote, urlquote_plus, urlunquote, urlunquote_plus) from django.utils i...
bsd-3-clause
-7,975,211,482,157,299,000
39.504762
90
0.540089
false
3.261503
true
false
false
JoshAshby/Fla.gr
app/controllers/flags/view.py
1
1582
#!/usr/bin/env python """ fla.gr controller for editing flags For more information, see: https://github.com/JoshAshby/ http://xkcd.com/353/ Josh Ashby 2013 http://joshashby.com joshuaashby@joshashby.com """ from seshat.route import autoRoute from utils.baseHTMLObject import baseHTMLObject from views.flags.flagViewT...
mit
9,159,416,367,571,800,000
26.754386
81
0.631479
false
3.476923
false
false
false
rclement/yodel
demo/custom_filter_design.py
1
3658
import yodel.analysis import yodel.filter import yodel.complex import yodel.conversion import matplotlib.pyplot as plt def frequency_response(response): size = len(response) freq_response_real = [0] * size freq_response_imag = [0] * size fft = yodel.analysis.FFT(size) fft.forward(response, freq_re...
mit
2,789,876,935,842,057,700
32.254545
132
0.609076
false
3.137221
false
false
false
all-of-us/raw-data-repository
rdr_service/lib_fhir/fhirclient_3_0_0/models/healthcareservice.py
1
11073
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 (http://hl7.org/fhir/StructureDefinition/HealthcareService) on 2017-03-22. # 2017, SMART Health IT. from . import domainresource class HealthcareService(domainresource.DomainResource): """ The details of a healthcare service avai...
bsd-3-clause
-2,152,641,763,683,152,100
40.47191
113
0.624311
false
4.477558
false
false
false
twilio/twilio-python
twilio/rest/verify/v2/__init__.py
1
1682
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from twilio.base.version import Version from twilio.rest.verify.v2.form import FormList from twilio.rest.verify.v2.service import ServiceList from twilio.rest.verify.v2.verification_attempt import Ve...
mit
5,366,185,485,770,542,000
25.28125
82
0.585612
false
3.902552
false
false
false
acutesoftware/faceswap
faceswap.py
18
7474
#!/usr/bin/python # Copyright (c) 2015 Matthew Earl # # 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, me...
mit
-4,521,035,938,372,268,500
33.127854
101
0.647444
false
3.140336
false
false
false
dan-passaro/django-recommend
src/django_recommend/models.py
1
11423
# coding: utf-8 """Models for item-to-item collaborative filtering.""" from __future__ import (absolute_import, division, print_function, unicode_literals) from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.cor...
mit
-730,400,907,116,461,400
33.303303
79
0.60597
false
3.996851
false
false
false
romanoid/buck
python-dsl/buck_parser/buck.py
2
77780
# Copyright 2018-present Facebook, 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 i...
apache-2.0
5,986,481,487,547,775,000
35.159926
108
0.600231
false
4.17118
true
false
false
yapdns/yapdns-client
vendor/github.com/elastic/beats/filebeat/tests/system/test_fields.py
6
2499
from filebeat import BaseTest import os import socket """ Tests for the custom fields functionality. """ class Test(BaseTest): def test_custom_fields(self): """ Tests that custom fields show up in the output dict. """ self.render_config_template( path=os.path.abspath(...
mit
4,191,973,657,852,844,500
28.75
68
0.55102
false
3.815267
true
false
false
aldro61/kover
core/kover/learning/experiments/experiment_scm.py
1
31666
#!/usr/bin/env python """ Kover: Learn interpretable computational phenotyping models from k-merized genomic data Copyright (C) 2015 Alexandre Drouin 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 Fo...
gpl-3.0
8,289,923,641,412,694,000
52.671186
156
0.58836
false
4.123177
true
false
false
affan2/django-notification
notification/backends/onsite.py
1
3820
from django.core.exceptions import ObjectDoesNotExist from django.conf import settings from django.contrib.auth.models import User from django.template import Context from django.utils.translation import ugettext from django.utils import translation from django.utils import timezone from notification import backends ...
mit
-4,104,252,907,369,937,000
36.45098
125
0.554712
false
4.745342
false
false
false
richbs/colourlens
colourlens/utils.py
1
6035
import colorsys import webcolors from cooperhewitt import swatchbook from colormath.color_objects import RGBColor from decimal import Decimal COLOURS = { 'RED': ((255, 0, 0), (340, 17), (10, 100), (40, 100)), 'ORANGE': ((252, 106, 8), (18, 45), None, (66, 100)), 'YELLOW': ((255, 255, 0), (46, 66), None, (7...
mit
8,238,642,064,376,963,000
31.621622
81
0.479867
false
3.106022
false
false
false
callowayproject/Transmogrify
transmogrify/tests/test_utils.py
1
1632
""" Test the utils """ from transmogrify import utils def test_is_tool(): assert utils.is_tool('date') is True assert utils.is_tool('foo') is False def test_purge_security_hash(): from hashlib import sha1 from transmogrify.settings import SECRET_KEY security_hash = sha1('PURGE' + SECRET_KEY).he...
apache-2.0
-6,749,814,629,902,662,000
33.723404
80
0.664828
false
3.168932
true
false
false
theakholic/ThinkStats2
code/timeseries.py
66
18035
"""This file contains code for use with "Think Stats", by Allen B. Downey, available from greenteapress.com Copyright 2014 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ from __future__ import print_function import pandas import numpy as np import statsmodels.formula.api as smf import st...
gpl-3.0
3,049,585,497,129,932,000
27.995177
78
0.636096
false
3.566344
false
false
false
ZeitOnline/briefkasten
deployment/jailhost.py
2
3037
# coding: utf-8 from fabric import api as fab from fabric.api import env, task from bsdploy.fabfile_mfsbsd import bootstrap as mfsbootstrap from ploy.common import yesno from ploy.config import value_asbool AV = None # hide stdout by default # from fabric.state import output # output['stdout'] = False @task def boo...
bsd-3-clause
8,950,279,406,958,018,000
35.590361
104
0.670728
false
3.519119
false
false
false
JoostvanPinxten/ConstraintPuzzler
gui/puzzlerepresentation/valuehexagon.py
1
4856
''' Created on 30 dec. 2012 @author: Juice ''' from PySide import QtGui, QtCore from math import * from structure.cell import Cell from constraints import Constraint def centerTextItem(text): form = QtGui.QTextBlockFormat() form.setAlignment(QtCore.Qt.AlignCenter) cursor = text.textCursor() cursor.se...
mit
6,221,386,427,122,202,000
35.787879
96
0.563633
false
4.104818
false
false
false
vicnet/weboob
modules/myedenred/browser.py
1
3412
# -*- coding: utf-8 -*- # Copyright(C) 2017 Théo Dorée # # 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 Lesser General Public License as published by # the Free Software Foundation, either version 3 of the Lice...
lgpl-3.0
-382,926,120,379,920,060
44.466667
121
0.582111
false
4.440104
false
false
false
tommybobbins/7persecond
7cell_brief5.py
1
3293
import pygame, sys, re from time import sleep from pygame.locals import * from random import shuffle clock = pygame.time.Clock() FPS = 30 playtime = 0.0 counter = 0 pygame.font.init() font = pygame.font.Font(None, 30) batch_size = 7 # 7 Squares displayed (e.g 7 of 16*9 = 7/144 ) tiles = {} sprite_currently_displayed ...
gpl-2.0
1,781,229,823,855,516,000
33.302083
143
0.605831
false
3.163305
false
false
false
sheepslinky/franklin
server/driver.py
1
134244
#!/usr/bin/python3 # vim: set foldmethod=marker fileencoding=utf8 : # Python parts of the host side driver for Franklin. {{{ # Copyright 2014-2016 Michigan Technological University # Copyright 2016 Bas Wijnen <wijnen@debian.org> # Author: Bas Wijnen <wijnen@debian.org> # # This program is free software: you can redistr...
agpl-3.0
8,010,818,517,369,724,000
37.630791
701
0.603842
false
2.758322
false
false
false
maas/maas
src/maasserver/forms/iprange.py
1
1559
# Copyright 2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """IPRange form.""" from django import forms from django.contrib.auth.models import User from maasserver.forms import MAASModelForm from maasserver.models import Subnet from maa...
agpl-3.0
2,087,308,162,693,567,500
32.891304
76
0.609365
false
3.977041
false
false
false
Wuguanping/Server_Manage_Plugin
Openstack_Plugin/ironic-plugin-pike/ironic/tests/unit/drivers/modules/ilo/test_boot.py
4
52035
# Copyright 2015 Hewlett-Packard Development Company, L.P. # 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...
apache-2.0
5,620,285,987,895,974,000
50.724652
79
0.562371
false
3.87194
true
false
false
dostavro/dotfiles
sublime2/Packages/LaTeXTools/viewPDF.py
1
2572
# ST2/ST3 compat from __future__ import print_function import sublime if sublime.version() < '3000': # we are on ST2 and Python 2.X _ST3 = False import getTeXRoot else: _ST3 = True from . import getTeXRoot import sublime_plugin, os, os.path, platform from subprocess import Popen # View PDF file c...
mit
-4,437,854,508,914,317,300
35.823529
109
0.667574
false
3.125152
false
false
false
dhylands/teensy-mon
teensy-mon.py
1
8986
#!/usr/bin/python -u """Program for monitoring serial messages from the Teensy. This program waits for the device to be connected and when the teensy is disconnected, then it will go back to waiting for the teensy to once again be connected. This program also looks for lines that start with a single letter followed ...
mit
-45,455,361,719,860,664
32.281481
79
0.551858
false
3.977866
false
false
false
mikewiebe-ansible/ansible
test/units/modules/network/fortios/test_fortios_spamfilter_options.py
21
5380
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
gpl-3.0
-8,573,058,264,405,497,000
34.629139
133
0.684387
false
3.754361
true
false
false
wri/gfw-api
gfw/models/subscription.py
1
4363
# Global Forest Watch API # Copyright (C) 2013 World Resource Institute # # 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...
gpl-2.0
8,102,869,510,840,577,000
31.804511
94
0.646115
false
4.171128
false
false
false
rubenlalinde/quacher
quacher.py
1
3508
#!/usr/bin/python # Package imports import requests import csv # Stock information symbol = input('Enter a stock symbol: ').upper() stock = dict( [ ( 'name' , 'Excellent Co.' ), ( 'symbol' , symbol ), ( 'phone' , '800-YOU-GAIN' ), ( 'currentPrice' , '150' ), ( 'yearHigh' , '12' ), ( 'yearLow' , ...
mit
1,302,003,198,169,908,700
25.984615
75
0.526796
false
2.70888
false
false
false
qiyeboy/SpiderBook
ch11/APISpider/SpiderDataOutput.py
1
1240
#coding:utf-8 import codecs class SpiderDataOutput(object): def __init__(self): self.filepath='kuwo.html' self.output_head(self.filepath) def output_head(self,path): ''' 将HTML头写进去 :return: ''' fout=codecs.open(path,'w',encoding='utf-8') fout.write...
mit
4,054,300,558,502,535,700
24.255319
55
0.482293
false
3.350282
false
false
false
akretion/odoo
addons/test_mass_mailing/tests/test_blacklist_mixin.py
12
3425
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from unittest.mock import patch from odoo.tests.common import users from odoo.addons.test_mass_mailing.tests import common from odoo.addons.test_mass_mailing.models.mass_mail_test import MassMailTestBlacklist from odoo....
agpl-3.0
5,994,033,542,301,576,000
41.283951
109
0.635912
false
3.567708
true
false
false
osrf/osrf_hw
kicad_scripts/freecad_gen_BGA.py
1
5331
from __future__ import print_function import sys sys.path.append('/usr/lib/freecad/lib') print(sys.path) import FreeCAD# as App import ImportGui import FreeCADGui# as Gui import os import Draft#,Sketch,Part # lets assume for now that we have all the information in a filename # lets also assume that they are only full b...
apache-2.0
-542,362,453,800,167,000
40.325581
150
0.763271
false
3.001689
false
false
false
ayarshabeer/django-rest-framework-jwt
rest_framework_jwt/utils.py
13
2538
import jwt import warnings from calendar import timegm from datetime import datetime from rest_framework_jwt.compat import get_username, get_username_field from rest_framework_jwt.settings import api_settings def jwt_payload_handler(user): username_field = get_username_field() username = get_username(user) ...
mit
8,271,559,828,750,785,000
24.128713
74
0.64342
false
3.828054
false
false
false
quantumlib/Cirq
cirq-core/cirq/contrib/acquaintance/optimizers_test.py
1
2786
# Copyright 2018 The Cirq Developers # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
-2,892,330,833,436,625,000
28.946667
94
0.584595
false
2.642353
false
false
false
chrison999/mycroft-skill-bitcoin-enhanced
__init__.py
1
4818
# mycroft-skill-obitcoin-enhanced # # A skill for MycroftAI that querys various bitcoin statistics. # # Adapted from a MycroftAI skill by Red5d # # Licensed under the GNU General Public License v3 # (see LICENSE for more details from os.path import dirname, join from adapt.intent import IntentBuilder from mycroft.ski...
gpl-3.0
5,888,199,872,106,512,000
39.15
111
0.557285
false
3.851319
false
false
false
fujicoin/electrum-fjc
electrum/gui/qt/__init__.py
1
14139
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2012 thomasv@gitorious # # 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 witho...
mit
-6,204,389,142,058,746,000
38.166205
143
0.606903
false
4.075814
true
false
false
wimoverwater/Sick-Beard
sickbeard/metadata/xbmc.py
1
10797
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
-8,118,284,363,383,384,000
36.560714
177
0.560248
false
4.028731
false
false
false
fxia22/ASM_xf
PythonD/site_python/numarray/codegenerator/bytescode.py
2
18281
"""This module generates the "bytes" module which contains various byte munging C functions: copying, alignment, byteswapping, choosing, putting, taking. WARNING: This module exists solely as a mechanism to generate a portion of numarray and is not intended to provide any post-installation functionality. """ from b...
gpl-2.0
-333,324,760,290,137,660
28.919804
106
0.542312
false
3.231
false
false
false
NorbertAgoston3pg/PythonLearning
DemoProject/src/input_output_menu.py
1
1858
import input_output def launch_input_output_menu(): print("I/O Section - Enter the exercise number you want to run") selection = 0 while selection != 7: print("exercise #1") print("exercise #2") print("exercise #3") print("exercise #4") print("exercise #5") ...
mit
9,058,435,035,290,472,000
37.708333
76
0.548977
false
3.995699
false
false
false
onebeartoe/3D-Modeling
openscad/models/src/main/openscad/external-resources/stl-to-scad/stl2scad-python-2.py
1
4179
#!/usr/bin/python # -*- coding: utf-8 -*- """ STL to SCAD converter. This code is based on Riham javascript code. See http://www.thingiverse.com/thing:62666 Ascii STL file: solid _40x10 facet normal 0.000000e+000 0.000000e+000 1.000000e+000 outer loop vertex 1.286803e+001 2.957990e+001 1.200...
lgpl-2.1
4,506,072,384,435,413,000
26.313725
181
0.572146
false
3.272514
false
false
false
unrza72/qplotutils
qplotutils/player.py
1
4353
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ User controls for interactivity. """ import logging import numpy as np from qtpy.QtCore import * from qtpy.QtGui import * from qtpy.QtWidgets import * from qplotutils import CONFIG from .ui.playback import Ui_PlaybackControl __author__ = "Philipp Baust" __copyright...
mit
3,355,007,466,227,761,700
26.726115
90
0.606938
false
3.710997
false
false
false
gatsinski/kindergarten-management-system
kindergarten_management_system/kms/contrib/kindergartens/migrations/0002_auto_20170327_1844.py
1
1460
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('kindergartens', '0001_initial'), ] operations = [ migrations.CreateModel( name='Group', fields=[ ...
gpl-3.0
5,348,770,137,331,171,000
32.953488
114
0.526712
false
4.464832
false
false
false
kawamon/hue
desktop/core/ext-py/jaeger-client-4.0.0/jaeger_client/ioloop_util.py
2
2199
# Copyright (c) 2016 Uber Technologies, 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 ...
apache-2.0
4,988,481,130,676,824,000
29.541667
75
0.663029
false
4.204589
false
false
false
jphnoel/udata
udata/core/discussions/models.py
1
1281
# -*- coding: utf-8 -*- from __future__ import unicode_literals import logging from datetime import datetime from udata.models import db log = logging.getLogger(__name__) class Message(db.EmbeddedDocument): content = db.StringField(required=True) posted_on = db.DateTimeField(default=datetime.now, required=...
agpl-3.0
290,421,496,397,661,800
26.255319
78
0.640125
false
4.053797
false
false
false
Jaapp-/cloudomate
cloudomate/test/test_cmdline.py
1
5478
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import os import unittest from argparse import Namespace from future import standard_library from mock.mock import MagicMock import cloudomate.cmdline as cmdline from c...
lgpl-3.0
-5,257,675,227,843,671,000
33.45283
101
0.62322
false
3.573386
true
false
false
scragg0x/realms-wiki
realms/lib/flask_csrf_test_client.py
2
2839
# Source: https://gist.github.com/singingwolfboy/2fca1de64950d5dfed72 # Want to run your Flask tests with CSRF protections turned on, to make sure # that CSRF works properly in production as well? Here's an excellent way # to do it! # First some imports. I'm assuming you're using Flask-WTF for CSRF protection. import...
gpl-2.0
8,793,346,743,163,914,000
45.540984
82
0.673124
false
4.090778
true
false
false