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
WhatDo/FlowFairy
examples/sine_fix/dilated3.py
1
2514
import tensorflow as tf import tensorflow.contrib.slim as slim from flowfairy.conf import settings from util import lrelu, conv2d, maxpool2d, embedding, avgpool2d, GLU, causal_GLU from functools import partial import ops discrete_class = settings.DISCRETE_CLASS batch_size = settings.BATCH_SIZE samplerate = sr = settin...
mit
379,616,175,697,035,800
29.289157
149
0.624503
false
2.717838
false
false
false
anthill-services/anthill-common
anthill/common/social/google.py
1
5627
import tornado.httpclient import ujson import jwt import abc from urllib import parse from .. import admin as a from .. social import SocialNetworkAPI, APIError, AuthResponse, SocialPrivateKey class GoogleAPI(SocialNetworkAPI, metaclass=abc.ABCMeta): GOOGLE_OAUTH = "https://www.googleapis.com/oauth2/" NAM...
mit
-8,178,881,027,545,703,000
28.772487
108
0.53421
false
4.168148
false
false
false
mahabs/nitro
nssrc/com/citrix/netscaler/nitro/resource/config/rewrite/rewritepolicy_rewriteglobal_binding.py
1
6060
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
apache-2.0
-7,462,817,870,828,477,000
26.420814
137
0.701155
false
3.441227
false
false
false
1tush/reviewboard
reviewboard/reviews/models/base_review_request_details.py
1
9919
from __future__ import unicode_literals import re from django.db import models from django.utils import six from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ from djblets.db.fields import JSONField from reviewboard.diffviewer.models import DiffSet f...
mit
-8,082,577,163,745,702,000
34.679856
78
0.633229
false
4.650258
true
false
false
Clarity-89/clarityv2
src/clarityv2/accounts/managers.py
1
1420
from django.contrib.auth.models import BaseUserManager class UserManager(BaseUserManager): use_in_migrations = True def _create_user(self, username, email, password, **extra_fields): """ Creates and saves a User with the given username, email and password. """ if not username:...
mit
-5,557,580,562,345,280,000
40.764706
79
0.661268
false
4.115942
false
false
false
GalPressman/matrigram
docs/conf.py
1
10481
# -*- coding: utf-8 -*- # # matrigram documentation build configuration file, created by # sphinx-quickstart on Tue Dec 20 11:09:38 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # #...
mit
2,914,533,651,014,203,000
27.793956
80
0.68753
false
3.558913
true
false
false
migasfree/migasfree
migasfree/stats/views/software.py
1
6246
# -*- coding: utf-8 -*- import json from collections import defaultdict from django.contrib.auth.decorators import login_required from django.db.models import Count from django.shortcuts import render from django.urls import reverse from django.utils.translation import ugettext as _ from ...server.models import Pro...
gpl-3.0
6,193,939,635,404,802,000
27.651376
84
0.490394
false
4.180723
false
false
false
kapilgarg1996/mospy
mospy/GUI.py
1
2367
import os import pickle from Tkinter import * from PIL import ImageTk, Image import tkMessageBox import tkFileDialog from ttk import Frame, Button, Label, Style from random import randint from PIL import Image import mosaic class MainFrame(Frame): def __init__(self, parent): Frame.__init__(self, par...
mit
8,678,145,406,439,883,000
28.6
170
0.646388
false
3.273859
false
false
false
pxg/pxg.github.io
slides/deployment/python/5_two_step_deploy.py
1
2664
""" By default the HEAD of the current branch will be pushed to the remote server: fab stage deploy This can be overridden by providing a hash: fab stage deploy:2ab1c583e35c99b66079877d49e3ec03812d3e53 If you don't like all the output: fab stage deploy --hide=stdout """ import os from fabric.api import env, execute,...
mit
5,292,689,465,113,000,000
26.75
79
0.67042
false
3.380711
false
false
false
btrent/knave
pychess/Utils/EndgameTable.py
1
2387
from gobject import GObject, SIGNAL_RUN_FIRST from Move import Move from lutils.egtb_k4it import egtb_k4it from lutils.egtb_gaviota import egtb_gaviota providers = [] class EndgameTable(GObject): """ Wrap the low-level providers of exact endgame knowledge. """ __gsignals__ = { "scored": (SIGNA...
gpl-3.0
-4,503,694,866,982,983,700
34.626866
80
0.560117
false
4.217314
false
false
false
martey/django-shortcodes
shortcodes/parser.py
1
1822
import re import shortcodes.parsers from django.core.cache import cache def import_parser(name): mod = __import__(name) components = name.split('.') for comp in components[1:]: mod = getattr(mod, comp) return mod def parse(value): ex = re.compile(r'\[(.*?)\]') groups = ex.findall(val...
mit
-7,133,755,439,112,442,000
26.606061
78
0.487925
false
3.986871
false
false
false
edison7500/dugong
apps/photos/migrations/0004_auto_20200313_1554.py
1
1198
# Generated by Django 2.2.11 on 2020-03-13 07:54 import apps.images.handlers from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [("photos", "0003_auto_20200306_1424")] operations = [ migrations.AlterModelOptions( n...
gpl-3.0
-897,384,506,030,921,200
27.333333
72
0.529412
false
4.524715
false
false
false
m3z/HT
openstack_dashboard/dashboards/project/instances/views.py
1
7166
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
apache-2.0
-4,953,366,527,320,025,000
37.320856
78
0.596428
false
4.555626
false
false
false
madsmtm/fbchat
fbchat/utils.py
1
8679
# -*- coding: UTF-8 -*- from __future__ import unicode_literals import re import json from time import time from random import random import warnings import logging from .models import * try: from urllib.parse import urlencode basestring = (str, bytes) except ImportError: from urllib import urlencode ...
bsd-3-clause
-4,507,116,148,179,314,000
35.686441
207
0.647263
false
3.043234
false
false
false
Azure/azure-storage-python
samples/queue/encryption_usage.py
1
7709
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- import uui...
mit
5,391,607,162,951,025,000
35.192488
85
0.586587
false
4.247383
false
false
false
communityshare/communityshare
community_share/flask_helpers.py
1
2439
from functools import wraps from flask import request from typing import Dict from community_share.app_exceptions import Unauthorized, Forbidden from community_share.authorization import get_requesting_user from community_share.models.user import User from community_share.models.base import Serializable def api_pat...
mpl-2.0
6,863,411,846,151,159,000
25.802198
81
0.611316
false
4.058236
false
false
false
shyampurk/bluemix-parking-meter
testApp/app.py
1
1873
'''********************************************************************************* APP - SMART PARKING LOT SYSTEM *********************************************************************************''' from pubnub import Pubnub from threading import Thread import sys pub_key = "demo" sub_key = "demo" g_userData = dict...
mit
-4,338,057,441,368,052,000
26.558824
105
0.595836
false
3.320922
false
false
false
sambandi/eMonitor
emonitor/lib/location.py
2
5124
import re from math import cos, sqrt, tan, sin, atan, trunc, radians, degrees def getFloat(value): try: return float(value) except ValueError: value = str(value).replace('B', '8').replace('O', '0').replace(',', '.') _errcount = 0 for i in value: if not re.match(r'[0...
bsd-3-clause
2,488,118,184,217,061,400
42.423729
194
0.598946
false
2.949914
false
false
false
rzhxeo/youtube-dl
youtube_dl/extractor/youtube.py
1
76832
# coding: utf-8 from __future__ import unicode_literals import itertools import json import os.path import re import time import traceback from .common import InfoExtractor, SearchInfoExtractor from .subtitles import SubtitlesInfoExtractor from ..jsinterp import JSInterpreter from ..swfinterp import SWFInterpreter ...
unlicense
-1,893,902,528,345,365,200
43.208525
226
0.517656
false
3.68369
false
false
false
stuser/temp
web_crawler/thread_sample.py
1
2625
import threading import time import requests import datetime as dt import NTUH_clinic as nc # 門診查詢參數檔案(.CSV file) ParamaterFileName = "NTUH_params" # 查詢動作的時間間隔 interval = 300 # sec def query(sess, classname, directory, url, hosp, dept, ampm, querydate): bs = nc.BsObject(url, hosp, dept, ampm, querydate, sess) ...
mit
2,986,205,221,865,317,400
32.689189
106
0.561974
false
2.875433
false
false
false
kyokley/MediaConverter
main.py
1
1082
from tv_runner import TvRunner from movie_runner import MovieRunner from settings import (MEDIAVIEWER_INFER_SCRAPERS_URL, SEND_EMAIL, CELERY_VHOST, ) from utils import postData, send_email from celery import Celery from log import LogFile log = LogFile(...
mit
-8,782,212,688,426,282,000
24.761905
72
0.609982
false
3.547541
false
false
false
procrastinatio/mapproxy
mapproxy/test/unit/test_image.py
2
22774
# -:- encoding: utf8 -:- # This file is part of the MapProxy project. # Copyright (C) 2010 Omniscale <http://omniscale.de> # # 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.ap...
apache-2.0
8,792,674,897,666,819,000
38.469671
125
0.584438
false
3.285343
true
false
false
daskol/mipt-classifier
setup.py
1
1380
#!/usr/bin/env python3 # encoding: utf8 # setup.py """MIPT Student Classifier """ from setuptools import setup, find_packages DOCLINES = (__doc__ or '').split('\n') CLASSIFIERS = """\ Development Status :: 4 - Beta Environment :: Console Intended Audience :: Developers Intended Audience :: End Users/Desktop In...
mit
-7,745,480,850,932,025,000
21.622951
72
0.62029
false
3.650794
false
false
false
tensorflow/models
research/audioset/yamnet/params.py
1
1847
# Copyright 2019 The TensorFlow Authors All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-6,389,886,753,464,823,000
35.215686
85
0.708175
false
3.784836
false
false
false
marco-mariotti/selenoprofiles
libraries/networkx/algorithms/tests/test_core.py
1
2003
#!/usr/bin/env python from nose.tools import * import networkx as nx class TestCore: def setUp(self): # G is the example graph in Figure 1 from Batagelj and # Zaversnik's paper titled An O(m) Algorithm for Cores # Decomposition of Networks, 2003, # http://arXiv.org/abs/cs/0310049. ...
gpl-2.0
6,964,820,110,641,476,000
36.092593
78
0.545182
false
2.84517
false
false
false
kedz/cuttsum
wp-scripts/test-wtmf.py
1
12192
import corenlp as cnlp from sklearn.metrics.pairwise import cosine_similarity import re import os import gzip import wtmf from sklearn.externals import joblib import cuttsum.events import cuttsum.judgements import pandas as pd from collections import defaultdict matches_df = cuttsum.judgements.get_merged_dataframe() ...
apache-2.0
-4,383,275,878,599,725,000
36.170732
127
0.485482
false
3.50748
false
false
false
liosha2007/temporary-groupdocs-python-sdk
groupdocs/ApiClient.py
1
11192
#!/usr/bin/env python """Wordnik.com's Swagger generic API client. This client handles the client- server communication, and is invariant across implementations. Specifics of the methods and models for each application are generated from the Swagger templates.""" from __future__ import print_function import sys import...
apache-2.0
1,865,152,210,899,522,800
34.871795
137
0.536455
false
4.620974
false
false
false
naoliv/osmose-backend
analysers/analyser_merge_public_transport_FR_transgironde.py
1
3717
#!/usr/bin/env python #-*- coding: utf-8 -*- ########################################################################### ## ## ## Copyrights Frédéric Rodrigo 2014 ## ## ...
gpl-3.0
-8,028,650,922,773,014,000
53.470588
169
0.461123
false
4.213879
false
false
false
darogan/ParticleStats
scripts/ParticleStats_Compare.py
1
27381
#!/usr/bin/env python ############################################################################### # ____ _ _ _ ____ _ _ # # | _ \ __ _ _ __| |_(_) ___| | ___/ ___|| |_ __ _| |_ ___ # # | |_) / _` | '__| __| |/ __| |/ _ \___ \| __/ _` |...
gpl-3.0
5,150,384,486,752,012,000
44.635
113
0.552463
false
3.644483
false
false
false
ArcherSys/ArcherSys
Lib/encodings/cp500.py
1
39503
<<<<<<< HEAD <<<<<<< HEAD """ Python Character Mapping Codec cp500 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP500.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) ...
mit
6,183,082,987,881,244,000
41.613808
116
0.51948
false
3.141641
false
false
false
againer/supercda
utils/clinic_pickler.py
1
3611
""" Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the Li...
apache-2.0
-7,934,011,113,419,530,000
36.226804
76
0.585987
false
3.94214
false
false
false
creotiv/django-fuzzytest
django_fuzzytest/utils.py
1
8312
# -*- coding: utf-8 -*- import itertools from sre_constants import * import sre_parse import string import random from django.core.urlresolvers import RegexURLPattern, RegexURLResolver, LocaleRegexURLResolver from django.utils import translation from django.core.exceptions import ViewDoesNotExist from django.contrib.a...
bsd-3-clause
3,566,915,466,897,581,600
34.827586
133
0.522859
false
4.400212
false
false
false
davibe/pygobject
gi/_signalhelper.py
1
9887
# -*- Mode: Python; py-indent-offset: 4 -*- # pygobject - Python bindings for the GObject library # Copyright (C) 2012 Simon Feltman # # gi/_signalhelper.py: GObject signal binding decorator object # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General ...
lgpl-2.1
-5,544,120,678,858,116,000
37.321705
103
0.607363
false
4.20187
false
false
false
cmoutard/mne-python
mne/io/array/array.py
2
1869
"""Tools for creating Raw objects from numpy arrays""" # Authors: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import numpy as np from ..base import _BaseRaw from ...utils import verbose, logger class RawArray(_BaseRaw): """Raw object from numpy array Parameters ---------- dat...
bsd-3-clause
7,648,877,112,066,561,000
34.942308
79
0.578919
false
3.686391
false
false
false
bcorbet/SickRage
sickbeard/tv.py
1
109275
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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
470,947,764,053,170,940
42.345894
221
0.563395
false
4.107928
false
false
false
baloo/shinken
shinken/modules/ip_tag_arbiter/__init__.py
1
1426
#!/usr/bin/python #Copyright (C) 2009 Gabes Jean, naparuba@gmail.com # #This file is part of Shinken. # #Shinken is free software: you can redistribute it and/or modify #it under the terms of the GNU Affero General Public License as published by #the Free Software Foundation, either version 3 of the License, or #(at yo...
agpl-3.0
-5,142,636,619,774,961,000
30.688889
81
0.699158
false
3.66581
false
false
false
jcushman/pywb
pywb/warc/archiveiterator.py
1
14850
from pywb.utils.timeutils import iso_date_to_timestamp from pywb.utils.bufferedreaders import DecompressingBufferedReader from pywb.utils.canonicalize import canonicalize from pywb.utils.loaders import extract_post_query, append_post_query from recordloader import ArcWarcRecordLoader import hashlib import base64 imp...
gpl-3.0
1,864,010,479,243,279,400
30.395349
99
0.535825
false
4.393491
false
false
false
matpalm/cartpoleplusplus
dqn_cartpole.py
1
2303
#!/usr/bin/env python # copy pasta from https://github.com/matthiasplappert/keras-rl/blob/master/examples/dqn_cartpole.py # with some extra arg parsing import numpy as np import gym from keras.models import Sequential from keras.layers import Dense, Activation, Flatten from keras.optimizers import Adam from rl.agen...
mit
8,919,449,101,382,390,000
31.9
99
0.752497
false
3.112162
false
false
false
CTSNE/NodeDefender
NodeDefender/config/database.py
1
3997
import NodeDefender import flask_migrate import sqlalchemy import os from flask_sqlalchemy import SQLAlchemy import alembic import shutil import pip default_config = {'engine' : '', 'username' : '', 'password' : '', 'host' : '', 'port' : '', ...
mit
-6,365,526,685,889,680,000
27.347518
75
0.597698
false
4.078571
true
false
false
mufaddalq/cloudstack-datera-driver
tools/marvin/marvin/deployAndRun.py
1
5113
# 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 # "License"); you may not u...
apache-2.0
4,409,944,793,403,968,000
29.616766
77
0.580677
false
4.07086
true
false
false
franciscouzo/crosswordly
app/app/models.py
1
1735
import string from django.db import models from django.contrib import admin from django.contrib.auth.models import User from django.dispatch import receiver from django.db.models.signals import post_save class UserProfile(models.Model): user = models.OneToOneField(User) score = models.IntegerField(default=0...
gpl-3.0
-3,721,119,490,238,843,400
26.539683
78
0.665706
false
3.668076
false
false
false
AdrianGaudebert/elmo
apps/privacy/migrations/0001_initial.py
1
5309
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Policy' db.create_table('privacy_policy', ( ('id', self.gf('django.db.models.fie...
mpl-2.0
566,294,100,273,939,260
58.662921
182
0.557355
false
3.792143
false
false
false
Erotemic/hotspotter
hotspotter/feature_compute2.py
1
7452
''' Computes feature representations ''' from __future__ import division, print_function from hscom import __common__ (print, print_, print_on, print_off, rrr, profile) = __common__.init(__name__, '[fc2]') # scientific import numpy as np # python from os.path import join # hotspotter from hscom import helpers as util ...
apache-2.0
4,390,036,601,219,088,000
35.891089
89
0.608427
false
3.10759
false
false
false
Maselkov/GW2Bot
guildwars2/worldsync.py
1
7774
import asyncio import discord from discord.ext import commands, tasks from .exceptions import APIError, APIKeyError class WorldsyncMixin: @commands.guild_only() @commands.has_permissions(manage_guild=True) @commands.group(case_insensitive=True) async def worldsync(self, ctx): """Role managem...
mit
8,110,200,218,613,507,000
39.489583
78
0.551839
false
3.912431
false
false
false
stevarino/cmsc495
mac_app/forms.py
1
1837
from django import forms from django.contrib.auth.models import User from .models import Department class NewUserTicket(forms.Form): username = forms.CharField(label='Username', max_length=32) password = forms.CharField(label='Password', widget=forms.PasswordInput) firstname = forms.CharField(label='First...
mit
-1,642,018,643,992,884,500
40.772727
89
0.663582
false
4.028509
false
false
false
CanalTP/navitia
source/navitiacommon/navitiacommon/parser_args_type.py
1
9951
# encoding: utf-8 # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobilit...
agpl-3.0
2,071,259,826,487,371,000
30.490506
110
0.592604
false
3.962963
false
false
false
lwerdna/alib
py/bytes.py
1
8254
#!/usr/bin/python #------------------------------------------------------------------------------ # # Copyright 2011-2016 Andrew Lamoureux # # This file is a part of autils. # # autils is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
gpl-3.0
1,060,310,704,577,615,400
28.478571
84
0.531015
false
2.363012
false
false
false
mancoast/CPythonPyc_test
fail/331_test_inspect.py
1
88168
import re import sys import types import unittest import inspect import linecache import datetime import collections import os import shutil from os.path import normcase from test.support import run_unittest, TESTFN, DirsOnSysPath from test import inspect_fodder as mod from test import inspect_fodder2 as mod2 # C mo...
gpl-3.0
-9,168,784,811,708,351,000
37.467714
88
0.540309
false
3.947703
true
false
false
d7415/merlin
Hooks/user/edituser.py
1
4554
# This file is part of Merlin. # Merlin is the Copyright (C)2008,2009,2010 of Robin K. Hansen, Elliot Rosemarine, Andreas Jacobsen. # Individual portions may be copyright by individual contributors, and # are included in this collective work with permission of the copyright # owners. # This program is free software; ...
gpl-2.0
-7,891,953,885,707,710,000
45.469388
156
0.593105
false
4.022968
true
false
false
code-for-india/sahana_shelter_worldbank
private/templates/Sandy/controllers.py
1
8864
# -*- coding: utf-8 -*- from os import path from gluon import * from gluon.storage import Storage from s3 import * # ============================================================================= class index(): """ Custom Home Page """ def __call__(self): auth = current.auth if auth.is_logge...
mit
2,980,182,400,315,720,700
36.880342
118
0.463109
false
4.587992
false
false
false
M0n0xy2/mpsi_python_cours
python/charles/mini-projet 3/PPCLS.py
1
2272
# -*- coding: utf-8 -*- # *************************** # PCSIB DM3 2015 # Nom: Dizier Charles # **************************** import random equi_num_object = { 1: "pierre", 2: "papier", 3: "ciseaux", 4: "lezard", 5: "spock" } winner_dict = { "papier, ciseaux": False, "ciseaux, papier": True...
mit
5,174,479,759,390,140,000
27.3875
121
0.547336
false
2.904092
false
false
false
franziz/artagger
artagger/Utility/Eval.py
1
2652
# -*- coding: utf-8 -*- import os import sys os.chdir("../") sys.setrecursionlimit(100000) sys.path.append(os.path.abspath("")) os.chdir("./Utility") from Utility.Utils import getWordTag, readDictionary def computeAccuracy(goldStandardCorpus, taggedCorpus): tagged = open(taggedCorpus, "r").read().split() gol...
apache-2.0
-2,303,381,570,509,057,000
33.441558
111
0.584087
false
3.678225
false
false
false
tsbischof/photon_correlation
scripts/plot_intensity.py
1
2283
#!/usr/bin/env python3 import csv import sys import argparse import matplotlib.pyplot as plt import photon_correlation as pc def intensity_from_stream(stream): for line in csv.reader(stream): time_left = int(line[0]) time_right = int(line[1]) counts = map(int, line[2:]) yield(((t...
bsd-3-clause
7,184,816,256,500,360,000
28.269231
70
0.526938
false
3.646965
false
false
false
rlindner81/pyload
module/plugins/hoster/ZbigzCom.py
1
4492
# -*- coding: utf-8 -*- import random import re import time import urlparse from module.plugins.internal.Hoster import Hoster from module.plugins.internal.misc import json class ZbigzCom(Hoster): __name__ = "ZbigzCom" __type__ = "hoster" __version__ = "0.02" __status__ = "testing" __pattern__ =...
gpl-3.0
4,467,117,906,312,538,000
29.557823
87
0.518923
false
3.5936
false
false
false
jptomo/rpython-lang-scheme
rpython/rtyper/rclass.py
1
47390
import sys import types from rpython.flowspace.model import Constant from rpython.flowspace.operation import op from rpython.annotator import description, model as annmodel from rpython.rlib.objectmodel import UnboxedValue from rpython.tool.pairtype import pairtype, pair from rpython.tool.identity_dict import identity...
mit
-5,830,441,345,531,532,000
39.195081
91
0.57375
false
3.872681
false
false
false
simplegeo/rtree
tests/data.py
1
1251
import os.path boxes15 = [] f = file(os.path.join(os.path.dirname(__file__), 'boxes_15x15.data'), 'r') for line in f.readlines(): if not line: break [left, bottom, right, top] = [float(x) for x in line.split()] boxes15.append((left, bottom, right, top)) boxes3 = [] f = file(os.path.join(os.path.di...
lgpl-2.1
514,539,122,646,075,300
31.076923
87
0.577138
false
2.889145
false
false
false
kvaps/vdsm
vdsm/network/configurators/dhclient.py
1
4498
# Copyright (C) 2013, IBM Corporation # Copyright (C) 2013-2014, Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later ...
gpl-2.0
2,782,631,134,923,793,000
33.6
79
0.609604
false
3.73588
false
false
false
jason-ni/eventlet-raft
counter_test.py
1
1047
from eventlet_raft.client import RaftClient server_address_list = [ ('127.0.0.1', 4000), ('127.0.0.1', 4001), ('127.0.0.1', 4002), ('127.0.0.1', 4003), ('127.0.0.1', 4004), ] def write_log(log, data, msg): log.write("{0}: {1}\n".format( msg, str(data), )) client = RaftCl...
apache-2.0
6,919,018,597,424,594,000
25.175
52
0.560649
false
3.201835
false
false
false
Signbank/FinSL-signbank
signbank/dictionary/views.py
1
7652
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.contrib import messages from django.contrib.auth.decorators import permission_required from django.contrib.admin.views.decorators impor...
bsd-3-clause
-1,069,654,723,331,064,700
46.825
135
0.659827
false
3.962714
false
false
false
PoprostuRonin/memes-api
parsers/mistrzowie.py
1
1724
from parsel import Selector from utils import download, find_id_in_url, catch_errors, get_last_part_url from data import ImageContent, Meme, Author, Page import re ROOT = "https://mistrzowie.org" COMMENT = re.compile(r"Skomentuj\(([0-9]+?)\)") def scrap(url): html = download(url) return parse(html) def pa...
mit
-4,502,319,310,330,862,600
23.28169
86
0.581206
false
3.25283
false
false
false
MarkusHackspacher/unknown-horizons
horizons/util/startgameoptions.py
1
6231
# ################################################### # Copyright (C) 2008-2017 The Unknown Horizons Team # team@unknown-horizons.org # This file is part of Unknown Horizons. # # Unknown Horizons is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published ...
gpl-2.0
626,343,943,137,751,400
32.5
147
0.71048
false
3.291601
false
false
false
ConnectedVision/connectedvision
test/UnitTest/GeneratorTestCode.py
1
1271
import os import subprocess if not "ConnectedVision" in os.environ: raise Exception("\"ConnectedVision\" environment variable is not defined") cvDir = os.path.abspath(os.environ["ConnectedVision"]) if not os.path.isdir(cvDir): raise Exception("the directory path referenced by the ConnectedVision environment variab...
mit
495,858,675,220,353,340
35.314286
168
0.738002
false
3.284238
false
true
false
agoragames/kairos
test/functional/histogram_helper.py
1
14454
from helper_helper import * from helper_helper import _time from collections import OrderedDict @unittest.skipUnless( os.environ.get('TEST_HISTOGRAM','true').lower()=='true', 'skipping histogram' ) class HistogramHelper(Chai): def setUp(self): super(HistogramHelper,self).setUp() self.series = Timeseries(s...
bsd-3-clause
-724,267,455,489,234,600
42.667674
152
0.600664
false
2.938402
true
false
false
alex/wal-e
wal_e/worker/s3_deleter.py
1
4203
import gevent from gevent import queue from wal_e import exception from wal_e import retries class Deleter(object): def __init__(self): # Allow enqueuing of several API calls worth of work, which # right now allow 1000 key deletions per job. self.PAGINATION_MAX = 1000 self._q = qu...
bsd-3-clause
-8,131,093,756,282,691,000
37.559633
73
0.563169
false
4.593443
false
false
false
rnelsonchem/gcmstools
gcmstools/general.py
1
3104
import os from urllib.request import urlopen from IPython.parallel import Client, interactive import gcmstools.filetypes as gcf import gcmstools.reference as gcr import gcmstools.fitting as gcfit import gcmstools.datastore as gcd import gcmstools.calibration as gcc _ROOT = os.path.abspath(os.path.dirname(__file__))...
bsd-3-clause
6,772,476,318,539,915,000
27.740741
76
0.600515
false
3.495495
false
false
false
camilothorne/nasslli2016
Nasslli16/annotation/savestat.py
1
2647
''' Created on 2016 @author: camilothorne ''' #import re, string, array from subprocess import call import os class SaveStat: # path : path to report file # plotfile : path to the plots # tables : path to the table # constructor def __init__(self,table,plotfi...
gpl-3.0
-8,763,846,241,750,692,000
32.0875
101
0.529278
false
3.53877
false
false
false
wlashell/lyrical_page
site_seo/migrations/0002_auto__add_siteurldefaults.py
1
5402
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'SiteUrlDefaults' db.create_table('site_seo_siteurldefaults', ( ('id', self.gf('d...
apache-2.0
3,382,999,590,637,498,400
65.703704
178
0.556831
false
3.60855
false
false
false
dodonator/area51
Kryptotests/OneTimePad/Alpha/oneTimePy2.py
1
1880
import os import random import getpass import time os.system('clear') def encode(klartext): ''' Create a random One-Time-Pad and encode the input strings ''' laengeKlartext = len(klartext) key = '' keyArray = [] klartextArray = list(klartext) geheimtextArray = [] geheimtext = '' alphabet = [] for i in ran...
gpl-3.0
5,432,290,994,494,786,000
24.066667
87
0.722872
false
2.666667
false
false
false
christophercrouzet/nani
tests/data/particle.py
1
1153
import numpy import nani from . import vector2 _PARTICLE_ID = 0 _PARTICLE_POSITION = 1 _PARTICLE_MASS = 2 _PARTICLE_NEIGHBOURS = 3 class ParticleView(object): __slots__ = ('_data',) def __init__(self, data): self._data = data def __str__(self): return ( "Particle(id=%s, ...
mit
3,566,905,308,198,292,000
19.589286
66
0.590633
false
3.211699
false
false
false
iEngage/python-sdk
iengage_client/models/notification.py
1
7552
# coding: utf-8 """ Stakeholder engagement API This API enables Intelligent Engagement for your Business. iEngage is a platform that combines process, augmented intelligence and rewards to help you intelligently engage customers. OpenAPI spec version: 1.0 Generated by: https://github.com/swagger...
apache-2.0
-2,243,176,710,946,412,300
23.842105
186
0.532707
false
4.514047
false
false
false
vrbagalkote/avocado-misc-tests-1
generic/openblas.py
1
2440
#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that ...
gpl-2.0
-1,176,776,689,350,797,300
35.41791
78
0.643443
false
3.77709
true
false
false
RobertABT/heightmap
region.py
1
2223
from numpy import * class Region: xllc = 0 #<--x yllc = 0 #<--y nrows = 3 #<-- b ncols = 3 #<-- a step = 50 grid = [[1,2,3], [4,5,6], [3,8,9] ] #Reading files, retrieving integers and creating an array. def read (self, filename): if filename is None: print("Your ...
mit
-6,753,461,964,680,506,000
22.648936
68
0.482231
false
3.597087
false
false
false
CCI-MOC/GUI-Backend
api/v1/serializers/export_request_serializer.py
1
1091
from core.models.export_request import ExportRequest from core.models.user import AtmosphereUser from core.models.instance import Instance from rest_framework import serializers class ExportRequestSerializer(serializers.ModelSerializer): """ """ name = serializers.CharField(source='export_name') inst...
apache-2.0
9,100,617,223,407,332,000
37.964286
78
0.605866
false
4.914414
false
false
false
emmanuelle/scikits.image
skimage/feature/texture.py
2
9818
""" Methods to characterize image textures. """ import math import numpy as np from scipy import ndimage from ._texture import _glcm_loop, _local_binary_pattern def greycomatrix(image, distances, angles, levels=256, symmetric=False, normed=False): """Calculate the grey-level co-occurrence matri...
bsd-3-clause
-8,732,840,251,207,591,000
34.316547
80
0.561316
false
3.450967
false
false
false
lablup/sorna-jupyter-kernel
src/ai/backend/integration/jupyter/install.py
1
4036
''' The kernel installer. Run `python -m ai.backend.integration.jupyter.install` to use Backend.AI in your Jupyter notebooks. ''' import argparse import json import os import sys import webbrowser from jupyter_client.kernelspec import KernelSpecManager from IPython.utils.tempdir import TemporaryDirectory from .kerne...
mit
8,950,631,238,253,865,000
36.027523
125
0.610505
false
3.793233
false
false
false
deryni/cockpit
tools/title2sentence.py
1
4253
#!/usr/bin/env python3 # This file is part of Cockpit. # # Copyright (C) 2020 Red Hat, Inc. # # Cockpit 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 2.1 of the License, or # (at your ...
lgpl-2.1
3,002,470,520,402,526,700
27.543624
106
0.5589
false
3.619574
false
false
false
jclement/Cacheberry-Pi
lib/gislib.py
1
3683
# Adapted from code & formulas by David Z. Creemer and others # http://www.zachary.com/blog/2005/01/12/python_zipcode_geo-programming # http://williams.best.vwh.net/avform.htm # # Additions by Jeff Clement from math import sin,cos,atan,acos,asin,atan2,sqrt,pi, modf, radians,degrees # At the equator / on another great...
bsd-3-clause
593,282,141,699,682,600
28.230159
97
0.663046
false
2.890895
false
false
false
jmdejong/Asciifarm
asciifarm/client/display.py
1
5695
import os from ratuil.layout import Layout from ratuil.bufferedscreen import BufferedScreen as Screen #from ratuil.screen import Screen from ratuil.textstyle import TextStyle from asciifarm.common.utils import get from .listselector import ListSelector SIDEWIDTH = 20 ALPHABET = "!\"#$%&'()*+,-./0123456789:;<=>?@A...
gpl-3.0
3,941,003,261,231,911,400
31.729885
109
0.569096
false
4.01339
false
false
false
3DGenomes/tadbit
scripts/liftover_tads_genomes.py
2
7055
""" 17 May 2013 Liftover (1) wrapper applied to the comparison of topologically associated domains. This script allows to compare Hi-C experiments (mainly align TAD boundaries) done with different assemblies (e.g.: NCBI36 and GRCh37 for human genome), or in different species. INSTALL: - liftover tool needs to b...
gpl-3.0
-5,894,526,456,116,291,000
38.634831
80
0.505599
false
4.019943
false
false
false
smallyear/linuxLearn
salt/salt/modules/cloud.py
1
8214
# -*- coding: utf-8 -*- ''' Salt-specific interface for calling Salt Cloud directly ''' # Import python libs from __future__ import absolute_import import os import logging import copy # Import salt libs try: import salt.cloud HAS_SALTCLOUD = True except ImportError: HAS_SALTCLOUD = False import salt.uti...
apache-2.0
4,759,294,254,014,473,000
20.061538
163
0.632213
false
3.876357
true
false
false
jasonhamilton/hotwing-core
hotwing_core/panel.py
1
3463
from __future__ import division from .rib import Rib from .profile import Profile from .coordinate import Coordinate class Panel(): """ A Panel is a representation of a wing panel and contains all of the items/objects necessary to define a wing. A Panel can be thought of as a wing facing down with ri...
gpl-3.0
3,650,149,134,089,995,000
28.862069
103
0.520358
false
4.270037
false
false
false
emanuil-tolev/fundfind
fundfind/core.py
1
1312
import os from flask import Flask from flask.ext.login import LoginManager, current_user from fundfind import default_settings login_manager = LoginManager() def create_app(): app = Flask(__name__) configure_app(app) configure_jinja(app) setup_error_email(app) login_manager.setup_app(app) ret...
mit
3,052,434,311,215,307,300
28.155556
64
0.632622
false
3.624309
true
false
false
nikkomidoy/project_soa
project_soa/users/views.py
1
1647
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView from django.contrib.auth.mixins import LoginRequiredMixin from .models import User class UserDetailView(Login...
mit
1,562,233,376,126,577,700
29.5
79
0.694596
false
4.12782
false
false
false
mozilla-releng/services
lib/please_cli/please_cli/config.py
1
3928
# -*- coding: utf-8 -*- # 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/. import glob import os import click CWD_DIR = os.path.abspath(os.getcwd()) NO_ROOT_DIR_ERROR =...
mpl-2.0
-2,205,204,115,440,344,000
30.677419
93
0.52113
false
3.295302
false
false
false
andreask/mailchimp-python
mailchimp/objects/mc_interest_category.py
1
3803
# coding=utf-8 import logging from mailchimp.exceptions import MCInterestCategoryNotFound, MCListNotFound, ObjectNotFound from mailchimp import Request from .base_object import BaseObject from .mc_link import MCLink logger = logging.getLogger(__name__) class MCInterestCategory(BaseObject): item_url = '/lists/{...
mit
8,170,451,207,158,942,000
32.359649
120
0.611097
false
4.138194
false
false
false
sondree/Master-thesis
Python PLOTS/batchRunner.py
1
1407
from plotfitness_emitter import main as main_em from plotfitness_receiver import main as main_recv from plotfitness_direction import main as main_dir from time import sleep production = True if production: print "Warning running in production mode. This will take a long time" sleep(1) num_steps = [1,1] ...
gpl-3.0
-3,059,308,023,333,114,400
32.5
134
0.625444
false
2.853955
false
false
false
code-sauce/tensorflow
tensorflow/contrib/distributions/python/ops/kullback_leibler.py
1
5019
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
2,924,097,993,749,842,400
34.097902
80
0.662483
false
3.618601
false
false
false
kirstymcnaught/SpecialEffectMinecraftMods
src/gen_toml.py
1
1831
import subprocess, re, shutil ## Grep all the files for MODID cmd="find . -iname '*.java' | xargs grep 'MODID = ' -h" regex = "\"(.*)\"" result = subprocess.run(cmd.split(), stdout=subprocess.PIPE, shell=True) lines = result.stdout.decode("utf-8").split("\r\n") mod_ids = [] for line in lines: match = re.sear...
gpl-3.0
8,918,407,722,003,720,000
29.032787
87
0.59148
false
3.092905
false
false
false
ericchill/gnofract4d
fract4dgui/painter.py
1
1313
# GUI for painting colors onto the fractal import gtk import dialog import browser import utils def show(parent,f): PainterDialog.show(parent,f) class PainterDialog(dialog.T): def show(parent, f): dialog.T.reveal(PainterDialog, True, parent, None, f) show = staticmethod(show) def __ini...
bsd-3-clause
-2,438,796,135,652,036,600
28.177778
72
0.593298
false
3.587432
false
false
false
kubernetes-client/python
kubernetes/client/configuration.py
1
13238
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.18 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import c...
apache-2.0
6,432,329,210,058,188,000
32.261307
124
0.585662
false
4.654712
true
false
false
Szkered/BC_2402
sydb/stocks/admin.py
1
1758
from django.contrib import admin from stocks.models import * class StockAdmin(admin.ModelAdmin): list_display = ['name', 'unit_measure', 'unit_price', 'category_slug'] ordering = ['name'] search_fields = ('name',) class DonorAdmin(admin.ModelAdmin): list_display = ['name', 'contact_no', 'address', 'r...
apache-2.0
4,979,858,879,367,325,000
27.354839
75
0.6843
false
3.573171
false
false
false
centricular/cerbero
cerbero/commands/check.py
1
2640
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
lgpl-2.1
-215,881,122,121,253,340
35.666667
79
0.623864
false
4.334975
false
false
false
Teagan42/home-assistant
homeassistant/components/netatmo/binary_sensor.py
1
6522
"""Support for the Netatmo binary sensors.""" import logging import pyatmo from homeassistant.components.binary_sensor import BinarySensorDevice from .camera import CameraData from .const import AUTH, DOMAIN, MANUFACTURER _LOGGER = logging.getLogger(__name__) # These are the available sensors mapped to binary_sens...
apache-2.0
-1,740,085,250,344,084,000
36.268571
87
0.568997
false
3.882143
false
false
false
dksr/REMIND
python/base/utils/LoggerManager.py
1
3182
#!/usr/bin/env python import logging import logging.handlers from Singleton import Singleton import os LOGPATH = '/tmp' class LoggerManager(Singleton): def __init__(self): self.loggers = {} formatter = logging.Formatter('%(asctime)s:%(levelname)-8s:%(name)-10s:%(lineno)4s: %(mes...
mit
-1,496,373,961,397,045,000
48.734375
116
0.52137
false
4.895385
false
false
false
trevor/calendarserver
txweb2/server.py
1
26937
# -*- test-case-name: txweb2.test.test_server -*- ## # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # Copyright (c) 2010-2014 Apple Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), t...
apache-2.0
-2,017,913,453,591,127,000
36.516713
165
0.605932
false
4.334889
false
false
false
elthariel/dff
modules/viewer/hexedit/offsetItem.py
1
2183
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
3,857,610,205,408,654,000
27.723684
78
0.63628
false
3.675084
false
false
false
iakov/margen
margen.py
1
4589
#!/usr/bin/python2 """ Copyright 2016 Iakov Kirilenko Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable...
apache-2.0
-5,827,541,999,847,004,000
36.008065
119
0.577468
false
3.330189
false
false
false
fiete201/qutebrowser
qutebrowser/mainwindow/prompt.py
1
34258
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2016-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
8,010,042,735,672,391,000
34.537344
81
0.594547
false
4.234087
false
false
false
huggingface/transformers
src/transformers/utils/versions.py
1
4381
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
-2,630,832,435,068,718,000
35.508333
139
0.635471
false
3.880425
false
false
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons/io_scene_obj/export_obj.py
1
38495
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
-8,155,557,614,567,815,000
44.181925
132
0.444317
false
4.304965
false
false
false