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
zielmicha/hera
hera/api.py
1
4082
from hera import models from hera import settings from django.core.exceptions import PermissionDenied import requests import json import socket import hmac CALL_TIMEOUT = 600 # seconds # <-- TODO: warn in docs class Session: def __init__(self, account, api_key): self.account = models.Account.get_account...
agpl-3.0
-2,549,010,891,798,768,000
31.141732
91
0.564429
false
4.208247
false
false
false
sveetch/boussole
boussole/conf/discovery.py
1
7036
# -*- coding: utf-8 -*- """ Backend discover ================ """ import os from collections import OrderedDict from ..exceptions import SettingsDiscoveryError class Discover: """ Should be able to find a settings file without any specific backend given, just a directory path (the base dir) is required....
mit
-3,799,653,974,560,507,000
36.227513
79
0.604605
false
5.061871
false
false
false
edoburu/django-oscar-docdata
sandbox/settings/default.py
2
8518
import os from django.urls import reverse_lazy from django.utils.translation import ugettext_lazy as _ from oscar import get_core_apps, OSCAR_MAIN_TEMPLATE_DIR from oscar.defaults import * # noqa PROJECT_DIR = os.path.dirname(__file__) location = lambda x: os.path.join(os.path.dirname(os.path.dirname(os.path.realpath...
apache-2.0
-3,831,840,582,699,016,700
31.143396
110
0.654262
false
3.591062
false
false
false
jhpeterson/DXFtoMesh
pexpect_c2dmesh_v2.py
1
7819
import DXFtoSegments import pdb import dxfgrabber import pickle import sys from c2d_premesh_v5 import * import os '''Jeff's notes: Changed "Nodes" to "nodes" for Pexpect Added path control for working directory ''' if 'darwin' in sys.platform: my_os = 'osx' import pexpect elif 'linux' in sys.p...
mit
7,269,115,825,467,663,000
32.915179
147
0.505691
false
3.641826
false
false
false
leiferikb/bitpop
build/scripts/master/factory/annotator_factory.py
1
2278
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility class to generate and manage a factory to be passed to a builder dictionary as the 'factory' member, for each builder in c['builders']. Speci...
gpl-3.0
3,664,183,634,554,981,400
40.418182
80
0.734855
false
4.25
false
false
false
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/testing/keyserver/web.py
1
5621
# Copyright 2009-2011 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """GPG Key Information Server Prototype. It follows the standard URL schema for PKS/SKS systems It implements the operations: - 'index' : returns key index information - ...
agpl-3.0
-1,671,162,239,570,108,400
25.894737
75
0.609678
false
3.702899
false
false
false
vitimm144/IEPS
backend/membros/admin.py
1
3400
from django.contrib import admin from membros.models import Cargo, HistoricoEclesiastico, Contato from membros.models import Membro, Endereco from membros.models import HistoricoFamiliar from membros.models import Teologia from ieps.admin import admin_site class ContatoInline(admin.StackedInline): model = Contato...
gpl-2.0
-1,551,099,497,174,133,800
32.524752
86
0.696692
false
2.805302
false
false
false
ScalaInc/exp-python2-sdk
tests/test_auth.py
1
1115
import unittest import requests import time from . import utils class AuthBase (object): def test_authentication (self): self.exp.get_auth() def test_token_refresh (self): self.exp._sdk.authenticator._login() self.exp._sdk.authenticator._refresh() def test_refresh_401 (self): auth = self.ex...
mit
7,760,974,650,108,637,000
23.23913
74
0.686996
false
3.667763
true
false
false
eXistenZNL/SickRage
sickbeard/providers/thepiratebay.py
1
9310
# Author: Mr_Orange <mr_orange@hotmail.it> # 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 Lic...
gpl-3.0
9,199,119,350,806,031,000
37.630705
143
0.574544
false
3.934911
false
false
false
Ulauncher/Ulauncher
setup.py
1
8132
#!/usr/bin/env python3 # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- import os import sys from itertools import takewhile, dropwhile try: import DistUtilsExtra.auto except ImportError: print('To build ulauncher you need "python3-distutils-extra"', file=sys.stderr) sys.exit(1)...
gpl-3.0
1,316,542,955,617,081,900
32.603306
83
0.581776
false
3.807116
false
false
false
Duke-LeTran/practice-and-notes
matplotlib.py
1
1445
# -*- coding: utf-8 -*- """ Created on Thu Mar 26 17:32:58 2020 @author: dukel """ #%% 00. Initialize import matplotlib.pyplot as plt ls_x = [1,2,3,4] ls_y = [1,4,9,16] ls_z = [2,3,4,5] #%% I. Basic Plotting plt.plot(ls_x, # x ls_y, # y color='green', linestyle='dashed', label=...
mit
7,879,215,343,814,245,000
19.942029
63
0.56609
false
2.575758
false
true
false
shootsoft/practice
lintcode/NineChapters/03/binary-tree-serialization.py
1
4169
__author__ = 'yinjun' """ Definition of TreeNode: class TreeNode: def __init__(self, val): this.val = val this.left, this.right = None, None """ class Solution: ''' @param root: An object of TreeNode, denote the root of the binary tree. This method will be invoked first, you should des...
apache-2.0
7,999,381,860,744,141,000
24.582822
77
0.523387
false
3.828283
false
false
false
pmutale/www.mutale.nl
stick2uganda/models.py
1
3647
from __future__ import unicode_literals from ckeditor.fields import RichTextField from filer.fields.image import FilerImageField from cms.models import CMSPlugin, PlaceholderField from django.utils.translation import ugettext_lazy as _ from django.db import models class Project(models.Model): name = models.Char...
unlicense
-6,166,577,921,716,085,000
38.215054
118
0.64601
false
3.814854
false
false
false
petervaro/coublet
views/stream.py
1
3574
## INFO ######################################################################## ## ## ## COUBLET ## ## ======= ...
mit
185,259,562,077,687,900
45.415584
95
0.348629
false
4.28024
false
false
false
agraubert/agutil
tests/test_ciphers.py
1
11681
import unittest import os from py_compile import compile import sys import random import tempfile from filecmp import cmp import rsa.randnum from hashlib import md5 import Cryptodome.Cipher.AES as AES import warnings from itertools import chain import hashlib key = b'\x91^\x86\x91`\xae\xb3n4\xf8\xca\xf1\x90iT\xc2\xb6`...
mit
-7,161,250,493,035,844,000
40.275618
100
0.559456
false
4.121736
true
false
false
citrix-openstack-build/cinder
cinder/scheduler/filters/capacity_filter.py
1
1879
# Copyright (c) 2012 Intel # Copyright (c) 2012 OpenStack, LLC. # # 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/LI...
apache-2.0
-1,524,050,791,477,338,600
35.843137
78
0.666844
false
4.329493
false
false
false
SunPower/PVMismatch
pvmismatch/pvmismatch_tk/pvmodule_tk.py
1
3397
# -*- coding: utf-8 -*- """ Created on Jul 29, 2012 @author: marko """ from Tkinter import Frame, Label, Button, OptionMenu, IntVar #from Tkinter import Menu, Entry MODULE_SIZES = [72, 96, 128] class PVmodule_tk(Frame): """ classdocs """ def __init__(self, pvapp, top): """ Construct...
bsd-3-clause
5,823,362,148,952,416,000
38.045977
77
0.565793
false
3.2853
false
false
false
avivga/cocktail-party
video2speech/network.py
1
3363
from keras import optimizers from keras.layers import Dense, Convolution3D, MaxPooling3D, ZeroPadding3D, Dropout, Flatten, BatchNormalization, LeakyReLU from keras.layers.wrappers import TimeDistributed from keras.models import Sequential, model_from_json class VideoToSpeechNet: def __init__(self, model): self._m...
mit
6,291,750,038,852,244,000
31.650485
123
0.704728
false
2.816583
false
false
false
liampauling/flumine
examples/tennisexample.py
1
1740
import time import logging import betfairlightweight from betfairlightweight.filters import streaming_market_filter from pythonjsonlogger import jsonlogger from flumine import Flumine, clients, BaseStrategy from flumine.worker import BackgroundWorker from workers.inplayservice import poll_in_play_service logger = log...
mit
9,059,402,078,703,876,000
27.064516
70
0.686782
false
3.918919
false
false
false
ehrenfeu/simplify
misc/vcf_extract_photos.py
1
1656
#!/usr/bin/env python """Extract photos from all .VCF files in a given directory.""" import sys import argparse import os.path import vobject def process_vcf_file(pathname): """Process a VCF file (or all in a directory).""" outfname = os.path.splitext(pathname)[0] with open(pathname, 'r') as vcf_file: ...
gpl-3.0
3,565,980,432,918,878,000
28.571429
62
0.59058
false
3.6
false
false
false
blalab/csv2mr
item_post.py
1
1896
import requests import gzip import bz2 import csv def opener(filenames): for name in filenames: if name.endswith(".gz"):f = gzip.open(name) elif name.endswith(".bz2"): f = bz2.BZ2File(name) else: f = open(name) yield f def cat(filelist): for f in filelist: r = csv.reade...
mit
650,444,844,877,061,600
31.689655
436
0.545359
false
3.303136
false
false
false
kave/cfgov-refresh
cfgov/v1/models/sublanding_filterable_page.py
1
4172
from itertools import chain from operator import attrgetter from django.conf import settings from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.db import models from django.db.models import Q from wagtail.wagtailadmin.edit_handlers import StreamFieldPanel, FieldPanel from wagtail.wag...
cc0-1.0
-4,730,683,566,083,953,000
38.358491
121
0.665388
false
4.239837
false
false
false
yasutaka/nlp_100
kiyota/34.py
1
2032
""" 34. 「AのB」 2つの名詞が「の」で連結されている名詞句を抽出せよ. """ # -*- coding: utf-8 -*- import codecs list_d = [] #文書のリスト def do_mecab(textfile): import codecs import copy list_s = [] #文章単位のリスト #list_d = [] #文書のリスト # load data with codecs.open(textfile, 'r', 'utf-8') as f: for line in f: ...
mit
4,808,684,086,994,053,000
29.533333
101
0.487844
false
2.75
false
false
false
mwrlabs/veripy
contrib/rfc4861/router_advertisement_processing_on_link_determination.py
1
2198
from constants import * from scapy.all import * from veripy.assertions import * from veripy.models import ComplianceTestCase class OnLinkDeterminationTestCase(ComplianceTestCase): """ Router Advertisement Processing, On-link determination Verify that a host properly rejects an invalid prefix length, howe...
gpl-3.0
-4,612,849,881,026,919,000
46.782609
155
0.654231
false
3.237113
false
false
false
danmcp/pman
pman/tests/test_c_snode.py
1
4381
from unittest import TestCase from pfmisc.C_snode import C_stree import pudb class TestCSnode(TestCase): def test_csnode_constructor(self): aTree = C_stree() bTree = C_stree() ATree = C_stree() aTree.cd('/') aTree.mkcd('a') aTree.mknode(['b', 'c']) aTree....
mit
-4,447,620,016,017,195,500
30.978102
78
0.459028
false
3.08304
false
false
false
joshmoore/zeroc-ice
py/test/Ice/operations/TwowaysNewAMI.py
1
17284
# ********************************************************************** # # Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # ***********************************************************...
gpl-2.0
4,795,975,078,609,575,000
26.00625
103
0.508852
false
2.741751
true
false
false
upTee/upTee
uptee/lib/twconfig.py
1
3894
class Config: def __init__(self, path): self.path = path self.options = {} self.votes = [] self.tunes = [] self.available_rcon_commands = [] self.rcon_commands = [] def read(self): with open(self.path) as f: lines = f.readlines() ...
bsd-3-clause
3,208,990,384,926,467,600
53.84507
191
0.500257
false
3.6875
false
false
false
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/meta/gpl.py
1
73166
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
gpl-3.0
8,660,533,589,698,813,000
51.411175
122
0.787142
false
4.139285
false
false
false
n3storm/seantis-questionnaire
questionnaire/emails.py
1
6183
# -*- coding: utf-8 """ Functions to send email reminders to users. """ from django.core.mail import SMTPConnection, EmailMessage from django.contrib.auth.decorators import login_required from django.template import Context, loader from django.utils import translation from django.conf import settings from models impor...
bsd-3-clause
-8,836,740,893,859,258,000
37.886792
126
0.665858
false
3.662915
false
false
false
LionelAuroux/pyrser
tests/grammar/tl4t.py
1
11359
# little grammar for test import os from itertools import chain from pyrser import grammar from pyrser import meta from pyrser import fmt from pyrser.parsing.node import * from pyrser.hooks.echo import * from pyrser.hooks.vars import * from pyrser.hooks.set import * from pyrser.hooks.predicate import * from pyrser.hoo...
gpl-3.0
-6,879,433,769,114,857,000
23.065678
100
0.540453
false
3.238951
false
false
false
FinHackChamp/FinHack
rnn.py
1
15684
import numpy as np import pandas as pd import tensorflow as tf import time import csv from random import shuffle import random from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score from sklearn import metrics from math import sqrt user_name = 'David Mendoza' step_size = 40 batch_size = 5 ...
mit
1,610,222,289,992,615,000
36.431981
137
0.62076
false
3.453865
true
false
false
planetmarshall/bmctv_addon
deploy.py
1
1060
__author__ = 'Andrew' from zipfile import ZipFile import os import os.path import argparse includes = [ "resources/img/award.png", "resources/img/bmc.png", "resources/img/climbing.png", "resources/img/competitions.png", "resources/img/films.png", "resources/img/gear.png", "resources/img/kmf.png", "resources/img/m...
apache-2.0
-5,324,357,215,712,509,000
25.5
99
0.70566
false
2.952646
false
false
false
bn0x/theSkypeResolver
logparse.py
1
2138
#! -*- coding: utf-8 -*- # # Tiny Skype debug log parser. # Created by aki in about half an hour, at the request of bn0x. # # --------------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 43.5): # @__akiaki wrote this file. As long as you retain this notice you ca...
gpl-3.0
5,480,985,102,098,336,000
28.287671
105
0.505613
false
3.482085
false
false
false
chrisdickinson/nappingcat
nappingcat/auth.py
1
1933
from nappingcat.util import import_module from nappingcat import config class AuthBackend(object): def __init__(self, settings): self.users = {} self.settings = settings self.require_update = False def has_permission(self, user, permission): full_query = (user,) + tuple(permiss...
bsd-3-clause
-941,697,860,000,103,000
30.177419
61
0.584584
false
3.905051
false
false
false
ddu7/PyLC
092Reverse Linked List II.py
1
2067
# -*- coding: utf-8 -*- # Reverse a linked list from position m to n. Do it in-place and in one-pass. # # For example: # Given 1->2->3->4->5->NULL, m = 2 and n = 4, # # return 1->4->3->2->5->NULL. # # Note: # Given m, n satisfy the following condition: # 1 <= m <= n <= length of list. # Definition for singly-linked l...
mit
4,131,717,365,873,033,700
25.397059
89
0.477994
false
2.475862
false
false
false
ccri/gensim
gensim/models/lsimodel.py
1
34863
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """ Module for Latent Semantic Analysis (aka Latent Semantic Indexing) in Python. Implements scalable truncated Singular Value Decompo...
gpl-3.0
2,678,219,108,571,901,400
45.481333
241
0.604486
false
3.874305
false
false
false
squeaky-pl/pystacia
pystacia/lazyenum.py
1
2119
# coding: utf-8 # pystacia/lazyenum.py # Copyright (C) 2011-2012 by Paweł Piotr Przeradowski # This module is part of Pystacia and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from six import string_types class Enum(object): def __init__(self, name): self.name...
mit
54,184,110,331,084,984
21.531915
76
0.617564
false
3.645439
false
false
false
rmcauley/rainwave
api_requests/admin/update_user_avatar.py
1
1600
from libs import db import api.web from api.urls import handle_api_url from api import fieldtypes from api.exceptions import APIException from libs import config @handle_api_url("update_user_avatar_by_discord_id") class UpdateUserAvatarByDiscordId(api.web.APIHandler): auth_required = False sid_required = False...
gpl-2.0
2,680,378,987,728,456,000
35.363636
114
0.571875
false
3.809524
false
false
false
makerdao/maker.py
pymaker/feed.py
1
5485
# This file is part of Maker Keeper Framework. # # Copyright (C) 2017-2018 reverendus # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
agpl-3.0
7,170,301,331,189,471,000
37.356643
108
0.650684
false
3.946043
false
false
false
berkmancenter/mediacloud
apps/common/src/python/mediawords/util/identify_language.py
1
4998
from typing import Dict import cld2 from mediawords.util.log import create_logger from mediawords.util.perl import decode_object_from_bytes_if_needed # Min. text length for reliable language identification __RELIABLE_IDENTIFICATION_MIN_TEXT_LENGTH = 10 # Don't process strings longer than the following length __MAX_...
agpl-3.0
6,498,421,074,432,806,000
30.043478
111
0.659664
false
3.763554
false
false
false
Lilykos/pyphonetics
pyphonetics/phonetics/mra.py
1
1163
import re from unidecode import unidecode from ..utils import squeeze, check_empty, check_str from .phonetic_algorithm import PhoneticAlgorithm class MatchingRatingApproach(PhoneticAlgorithm): """ Functions related to the computation of the Match Rating Approach codex. [Reference]: https://en.wikipedia....
mit
-4,034,487,338,249,134,600
32.228571
90
0.638005
false
3.351585
false
false
false
bytedance/fedlearner
fedlearner/data_join/raw_data_iter_impl/metric_stats.py
1
1198
import copy import random from datetime import datetime import pytz from fedlearner.common import metrics, common from fedlearner.data_join.common import convert_to_str from fedlearner.common.common import convert_to_datetime class MetricStats: def __init__(self, raw_data_options, metric_tags): self._ta...
apache-2.0
-8,417,883,700,782,550,000
38.933333
77
0.627713
false
3.88961
false
false
false
KevinGrahamFoster/django-cities-light
cities_light/settings.py
1
7116
""" Settings for this application. The most important is TRANSLATION_LANGUAGES because it's probably project specific. .. py:data:: TRANSLATION_LANGUAGES List of language codes. It is used to generate the alternate_names property of cities_light models. You want to keep it as small as possible. By default...
mit
3,973,901,557,207,205,000
30.074236
79
0.68086
false
3.417867
false
false
false
henrysher/aws-cloudinit
cloudinit/util.py
1
53944
# vi: ts=4 expandtab # # Copyright (C) 2012 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # Copyright (C) 2012 Yahoo! Inc. # Copyright (C) 2014 Amazon.com, Inc. or its affiliates. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefl...
gpl-3.0
131,001,434,945,240,060
29.119486
79
0.565012
false
3.763097
false
false
false
cedricporter/funcat
funcat/helper.py
1
1619
# -*- coding: utf-8 -*- # from __future__ import print_function import datetime import numpy as np from .context import ExecutionContext, set_current_security, set_current_date, symbol from .utils import getsourcelines, FormulaException, get_int_date def suppress_numpy_warn(func): def wrapper(*args, **kwargs):...
apache-2.0
2,940,868,850,329,783,300
29.54717
85
0.639901
false
3.527233
false
false
false
qunying/gps
share/library/save_on_compile.py
1
1405
""" Automatically saves the contents of the Messages window when a compilation has finished. The output is saved in a file called "messages.txt" (or some other name set in the preferences) in the root project's object directory. If there is no object directory for the root project, then the file is saved in the direct...
gpl-3.0
-4,895,249,109,400,763,000
32.452381
78
0.637722
false
3.787062
false
false
false
CodeForPhilly/chime
src/penn_chime/view/st_display.py
1
14906
"""Streamlit display.""" import os import json from logging import INFO, basicConfig, getLogger import pandas as pd import i18n from sys import stdout from ..constants import ( CHANGE_DATE, DOCS_URL, EPSILON, FLOAT_INPUT_MIN, FLOAT_INPUT_STEP, VERSION, ) from ..model.parameters import Paramet...
mit
632,211,188,996,764,700
29.972973
124
0.603101
false
3.279331
false
false
false
frc1418/2015-robot
robot/components/drive.py
1
4164
import wpilib from networktables import NetworkTable class Drive(object): ''' The sole interaction between the robot and its driving system occurs here. Anything that wants to drive the robot must go through this class. ''' def __init__(self, robotDrive, gyro, backInfrared): ''' Constructor. :p...
apache-2.0
730,859,563,289,783,600
25.522293
143
0.670029
false
3.075332
false
false
false
IntersectAustralia/asvo-tao
core/sageimport_mpi_BSP/settingReader.py
1
2465
import xml.etree.ElementTree as ET import logging ## Helps reading XML setting file into a Hash Table of Running options and Tuples array which describes the SAGE fields and their data types def ParseParams(FilePath): ## Init Return value CurrentSAGEStruct=[] RunningOptions=dict() ################...
gpl-3.0
-96,981,286,046,738,220
47.352941
140
0.604868
false
4.46558
false
false
false
littmus/kutime_web
kutime/models.py
1
4889
#-*- coding:utf-8 -*- from django.db import models class College(models.Model): number = models.CharField(max_length=4) name = models.CharField(max_length=50) CHOICES_CAMPUS = ( ('A', u'안암'), ('S', u'세종'), ('G', u'대학원'), ('E', u'기타'), ) campus = models.CharField(ma...
mit
-4,243,619,782,773,681,700
29.00625
180
0.576547
false
3.347978
false
false
false
zhzhzoo/pdfrw
tests/pagewrite.py
1
2283
#!/usr/bin/env python import sys import os import traceback import time import gc import hashlib #gc.disable() sys.path.insert(0, '../../PyPDF2/') import PyPDF2 import find_pdfrw import pdfrw from PyPDF2 import PdfFileReader, PdfFileWriter import find_pdfrw from pdfrw import PdfReader, PdfWriter, PdfParseError ...
mit
-889,301,502,289,259,000
22.295918
107
0.587385
false
3.247511
false
false
false
mattesCZ/mtbmap
map/altitude.py
1
12426
# -*- coding: utf-8 -*- # Global imports from numpy import * import zipfile # Django imports from django.utils.translation import ugettext as _ # Local imports from .printing import svg_string_to_png from django.conf import settings from routing.mathfunctions import haversine NONE_HEIGHT = -32768 def height(point...
gpl-3.0
3,056,943,141,313,523,700
37.116564
139
0.524787
false
3.552316
false
false
false
keras-team/autokeras
autokeras/preprocessors/encoders.py
1
3609
# Copyright 2020 The AutoKeras Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
apache-2.0
-3,504,195,265,757,688,300
29.075
85
0.612081
false
4.422794
false
false
false
osteth/project-firewatch
projectfirewatch/scripts/cli.py
1
7675
# coding: utf-8 from flask import request, url_for from flask_api import FlaskAPI, status, exceptions #FlaskAPI docs avilable at http://www.flaskapi.org/ from flask import Flask, render_template from flask_googlemaps import GoogleMaps from flask_googlemaps import Map, icons import json, csv, click, wget, os, time, requ...
mit
-6,832,263,758,543,335,000
30.199187
139
0.554919
false
3.381057
false
false
false
osks/pylyskom
tests/test_requests.py
1
7959
# -*- coding: utf-8 -*- import pytest from pylyskom.protocol import MAX_TEXT_SIZE from pylyskom.datatypes import ( AuxItemInput, PrivBits, ConfType, ExtendedConfType, LocalTextNo, InfoOld, CookedMiscInfo, MIRecipient) from pylyskom import requests, komauxitems def test_all_requests_has_response_type(): f...
gpl-2.0
380,927,317,214,981,250
34.061674
93
0.660008
false
2.839458
true
false
false
emonty/ironic
ironic/virt/baremetal/driver.py
1
19972
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # # Copyright (c) 2012 NTT DOCOMO, INC # Copyright (c) 2011 University of Southern California / ISI # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the Licens...
apache-2.0
904,373,623,955,433,700
39.842536
79
0.593881
false
4.129006
false
false
false
deathbeam/awesomedotrc
qutebrowser/.config/qutebrowser/config.py
1
8032
# Enable plugins c.content.plugins = True # Adjust font and font size c.fonts.completion.category = "bold 16pt monospace" c.fonts.completion.entry = "16pt monospace" c.fonts.debug_console = "16pt monospace" c.fonts.downloads = "16pt monospace" c.fonts.hints = "16pt monospace" c.fonts.keyhint = "16pt monospace" c.fonts...
mit
-1,389,548,130,739,206,100
28.421245
71
0.766434
false
3.14364
false
false
false
be-cloud-be/horizon-addons
horizon/school_course_description/controllers/main.py
1
2421
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) 2015 be-cloud.be # Jerome Sonnet <jerome.sonnet@be-cloud.be> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
6,456,291,296,646,337,000
43.814815
132
0.601075
false
4.163511
false
false
false
nextgis/qgis.lesis2sqlite
src/dialog.py
1
10596
# -*- coding: utf-8 -*- #****************************************************************************** # # lesis2sqlite # --------------------------------------------------------- # This plugin convert lesis GIS working dir structure to sqlite data base # # Author: Alexander Lisovenko, alexander.lisovenko@nextgis.ru...
gpl-2.0
-8,985,815,751,092,968,000
35.163823
120
0.620895
false
3.882741
false
false
false
dinos66/termAnalysis
forTateDataset/termAnalysisDynamic.py
1
80493
# -*- coding: utf-8 -*- ''' Create adjacency matrices and analyse terms dynamically ''' print('Create dynamic adjacency matrices and ESOMs') #-------------------------------------------- #run create_Info_Files.py before running this #-------------------------------------------- import pickle, time, igraph, glob, os...
apache-2.0
770,716,912,347,527,700
60.118451
265
0.517387
false
3.745603
false
false
false
google-research/google-research
cluster_gcn/partition_utils.py
1
2321
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-5,812,103,375,373,815,000
30.364865
77
0.670832
false
3.166439
false
false
false
Kraymer/beets
beets/library.py
1
53386
# -*- coding: utf-8 -*- # This file is part of beets. # Copyright 2016, Adrian Sampson. # # 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 t...
mit
-958,155,747,688,783,600
32.917408
79
0.577324
false
4.111043
false
false
false
fif4evr/tm_python
basic/wordcount.py
1
3239
#!/usr/bin/python -tt # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ """Wordcount exercise Google's Python class The main() below is already defined and comp...
apache-2.0
-4,697,922,564,135,596,000
29.556604
79
0.686323
false
3.42389
false
false
false
fahhem/plumbum
plumbum/cli/termsize.py
1
2789
""" Terminal size utility --------------------- """ from __future__ import division, print_function, absolute_import import os import platform import warnings from struct import Struct def get_terminal_size(default=(80, 25)): """ Get width and height of console; works on linux, os x, windows and cygwin A...
mit
3,767,219,890,869,019,600
31.811765
107
0.610255
false
3.561941
false
false
false
ZeitOnline/zeit.content.article
src/zeit/content/article/edit/tests/test_body.py
1
8835
import gocept.testing.mock import lxml.etree import mock import unittest import zeit.content.article.testing import zope.schema class EditableBodyTest(zeit.content.article.testing.FunctionalTestCase): def setUp(self): super(EditableBodyTest, self).setUp() self.patches = gocept.testing.mock.Patche...
bsd-3-clause
-2,541,782,704,224,213,000
38.266667
79
0.609734
false
3.5625
true
false
false
donalm/thrum
docs/conf.py
1
8373
#!/usr/bin/env python # -*- coding: utf-8 -*- # # thrum documentation build configuration file, created by # sphinx-quickstart on Tue Jul 9 22:26:36 2013. # # 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 # autog...
mit
-5,124,257,481,176,899,000
29.432727
76
0.703429
false
3.709663
true
false
false
nirvn/QGIS
python/plugins/processing/modeler/ModelerParameterDefinitionDialog.py
1
24066
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerParameterDefinitionDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******...
gpl-2.0
-6,669,394,610,413,727,000
53.202703
135
0.617136
false
5.182171
false
false
false
PaulSD/cgroupsd
lib/proc_events.py
1
18741
#!/usr/bin/env python # # Copyright 2015 Paul Donohue <python_proc_events@PaulSD.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 of the # License, or (at your option) any ...
gpl-3.0
3,548,660,567,676,308,500
45.735661
268
0.68134
false
3.334104
false
false
false
bazz-erp/erpnext
erpnext/regional/india/setup.py
1
7097
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe.custom.doctype.custom_field.custom_field import create_custom_field from frappe.permissions import add_permission f...
gpl-3.0
2,784,275,214,947,402,000
39.096045
136
0.693251
false
3.026439
false
false
false
h8liu/cumulus
python/cumulus/__init__.py
1
38157
# Cumulus: Efficient Filesystem Backup to the Cloud # Copyright (C) 2008-2009, 2012 The Cumulus Developers # See the AUTHORS file for a list of contributors. # # 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 Softwar...
gpl-2.0
7,783,808,071,367,975,000
36.929423
121
0.603533
false
4.261923
false
false
false
sinneb/pyo-patcher
pyoscript.py
1
2097
#!/usr/bin/env python from pyo import * from time import sleep s = Server(audio='jack') s.setMidiInputDevice(99) s.boot().start() dummy = LFO(freq=0) dummymidi = Notein() dummytable = NewTable(length=1, chnls=1) dummyinput = Input(chnl=0, mul=.7) table_pyo4e06153256c49c = SndTable("webroot/AKWF_0019.wav") pyocd2b6b...
mit
-9,220,165,762,181,545,000
40.117647
117
0.749642
false
1.993346
false
false
false
lhaze/dharma
pca/data/observable.py
1
9197
import typing as t from pca.utils.collections import OrderedSet from pca.utils.inspect import is_argspec_valid from pca.utils.sentinel import Sentinel # sentinel object for expressing that a value of a observable hasn't been set # NB: None object might be a valid value undefined_value = Sentinel(module="pca.data.obs...
mit
1,102,903,874,814,059,900
40.242152
98
0.620746
false
4.55297
false
false
false
iConor/lego-lirc
power_functions/single_output.py
1
2799
"""LEGO Power Functions RC v1.20 - Single Output Mode""" import power_functions.rc_protocol as pf_rc # Mode Bits MODE = ["PWM", # Mode = PWM "CSTID"] # Mode = Clear/Set/Toggle/Inc/Dec OUTPUT = ["RED", # Output A "BLU"] # Output B # Data if Mode = PWM PWM = ["FLT", # Float "FWD_1", ...
mit
-2,519,746,911,384,808,400
35.350649
84
0.548767
false
3.022678
false
false
false
corerd/PyDomo
pydimage/benchmark.py
1
6974
#!/usr/bin/env python # The MIT License (MIT) # # Copyright (c) 2015 Corrado Ubezio # # 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 ri...
mit
-7,023,757,394,312,344,000
35.134715
96
0.60152
false
3.600413
false
false
false
DarkPhoenix6/My_Libraries
Python/GameOfLife.py
1
3819
# a simple parser for python. use get_number() and get_word() to read def parser(): while 1: data = list(input().split(' ')) for number in data: if len(number) > 0: yield (number) input_parser = parser() def get_word(): global input_parser return next(input_pa...
gpl-3.0
3,992,101,306,870,500,400
25.164384
73
0.485729
false
3.877157
false
false
false
ResearchSoftwareInstitute/MyHPOM
hs_core/management/commands/fix_missing_logical_files.py
1
2354
"""Fix missing logical file for composite resources. If there are resource files in django for any composite resource that are not part of any logical file, each of those files are made part of a generic logical file. * By default, prints errors on stdout. * Optional argument --log: logs output to system log. """ fro...
bsd-3-clause
-5,936,658,179,182,475,000
43.415094
97
0.608326
false
4.492366
false
false
false
ssssam/nightbus
tests/test_main.py
1
4652
# Copyright 2017 Codethink Ltd. # # 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 writin...
apache-2.0
7,404,250,999,173,043,000
31.760563
84
0.682502
false
3.440828
true
false
false
sravel/scripts
GUI/DAPC/syntax.py
1
6372
# syntax.py import sys from PyQt5.QtCore import QRegExp from PyQt5.QtGui import QColor, QTextCharFormat, QFont, QSyntaxHighlighter def format(color, style=''): """Return a QTextCharFormat with the given attributes. """ _color = QColor() _color.setNamedColor(color) _format = QTextCharFormat() ...
gpl-3.0
-4,186,816,283,252,872,700
33.258065
88
0.524011
false
3.836243
false
false
false
rafaelromcar/genetic-ant-knapsack-problem
python-test/pruebaTupla.py
1
12897
#!/usr/bin/python # -*- coding: UTF-8 -*- import string import time def doitSimple(listWords, textProcessed): result = 0 for w in textProcessed: if (w[1]==listWords[0][1]): if (w[0].lower()==listWords[0][0]):#There is two if because lower function is really expensive result+...
gpl-2.0
3,881,558,764,113,422,300
51.632653
142
0.663978
false
3.236697
true
false
false
Himon-SYNCRAFT/taskplus
taskplus/apps/rest/repositories/task_statuses_repository.py
1
3113
from taskplus.apps.rest import models from taskplus.apps.rest.database import db_session from taskplus.core.domain import TaskStatus from taskplus.core.shared.repository import Repository from taskplus.core.shared.exceptions import ( NoResultFound, NotUnique, CannotBeDeleted, DbError) from sqlalchemy import exc c...
bsd-3-clause
-9,028,159,670,768,161,000
28.367925
80
0.600064
false
4.241144
false
false
false
robinkraft/cloudless
src/cloudless/train/prepare_data.py
1
9092
import shutil import os import time import csv import json from PIL import Image import numpy as np from sklearn.cross_validation import train_test_split from sklearn.utils import shuffle import plyvel from caffe_pb2 import Datum import constants import utils def prepare_data(): """ Prepares our training and...
apache-2.0
-3,873,212,744,560,818,000
32.549815
99
0.615706
false
3.808965
true
false
false
danhuss/faker
faker/providers/currency/__init__.py
1
9734
from .. import BaseProvider localized = True class Provider(BaseProvider): # Format: (code, name) currencies = ( ("AED", "United Arab Emirates dirham"), ("AFN", "Afghan afghani"), ("ALL", "Albanian lek"), ("AMD", "Armenian dram"), ("ANG", "Netherlands Antillean guilder...
mit
1,007,488,436,341,185,300
35.814394
109
0.469904
false
2.701974
false
false
false
drewcsillag/skunkweb
pylibs/vfs/tarfs.py
1
3586
# Time-stamp: <03/08/11 13:12:06 smulloni> ######################################################################## # Copyright (C) 2002 Andrew Csillag <drew_csillag@yahoo.com> # # You may distribute under the terms of either the GNU General # Public License or the SkunkWeb License, as specified in the #...
gpl-2.0
-9,174,864,212,907,179,000
34.50495
74
0.55884
false
3.843516
false
false
false
google-research/google-research
kws_streaming/models/xception.py
1
8284
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
8,488,814,700,639,950,000
30.142857
79
0.617335
false
3.686693
false
false
false
ivotkv/neolixir
tests/test_relationship.py
1
2873
# -*- coding: utf-8 -*- # # The MIT License (MIT) # # Copyright (c) 2013 Ivo Tzvetkov # # 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 ri...
mit
4,453,792,110,003,353,600
32.8
462
0.676993
false
3.336818
false
false
false
SyrakuShaikh/python
learning/a_byte_of_python/str_format.py
1
1163
age = 20 name = 'Shaikh' print('{0} was {1} years old when he wrote this book'.format(name, age)) print('Why is {0} playing with that python?'.format(name)) # Omit the index in '{}' print('{} was {} years old when he wrote this book'.format(name, age)) print('Why is {} playing with that python?'.format(name)) # Mor...
gpl-3.0
5,028,002,855,142,084,000
29.605263
76
0.638865
false
2.922111
false
false
false
amorgun/blackbox-2016
regression_bot/bot.py
1
2361
import time import interface as bbox import numpy as np # initial: Level score= 2308.362061 14s # Optimized: Level score= 2308.362061 6.542621850967407s # test level # baseline: 2221.729980 # best: 2246.279541 # best_coefs_score=2560.100830078125_sigma=0.004999999888241291.txt: 2158.130615 # best_coefs_score=2964....
mit
2,967,137,232,418,529,300
32.267606
129
0.717069
false
2.707569
false
false
false
gencer/sentry
src/sentry/utils/auth.py
1
8652
""" sentry.utils.auth ~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six import logging from django.conf import settings from django.contrib.auth import login as _login from d...
bsd-3-clause
-7,803,873,880,384,791,000
28.22973
85
0.642395
false
3.811454
false
false
false
uclouvain/osis
assessments/views/scores_responsible.py
1
4581
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core ...
agpl-3.0
3,867,256,165,718,595,600
47.723404
105
0.713974
false
4.014023
false
false
false
deepmind/open_spiel
open_spiel/python/pytorch/nfsp_pytorch_test.py
1
3036
# Copyright 2019 DeepMind Technologies Ltd. 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 appl...
apache-2.0
5,683,369,881,241,719,000
32.362637
74
0.70191
false
3.485649
true
false
false
kudrom/lupulo
lupulo/exceptions.py
1
1384
# -*- encoding: utf-8 -*- # Copyright (C) 2015 Alejandro López Espinosa (kudrom) class NotFoundDescriptor(Exception): def __init__(self, name): self.name = name def __str__(self): return "Descriptor %s couldn't have been found" % self.name class NotListenerFound(Exception): def __init__...
gpl-2.0
-4,826,174,345,010,988,000
22.440678
77
0.597975
false
3.799451
false
false
false
edward-sihler/ais100wGPS
ais100GPS-time.py
1
2082
#! /usr/bin/python # by edward silher for collecting gps data in conjuction with AIS data # edwardsihler@ursusonline.net import serial import subprocess import os from gps import * from time import * import time import threading gpsd = None #seting the global variable os.system('clear') #clear the terminal (option...
apache-2.0
9,214,501,873,434,423,000
27.135135
121
0.646974
false
3.24805
false
false
false
intel-analytics/analytics-zoo
pyzoo/zoo/models/recommendation/recommender.py
1
4590
# # Copyright 2018 Analytics Zoo Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
1,862,403,754,328,875,000
33.253731
99
0.622876
false
3.89313
false
false
false
botswana-harvard/edc-calendar
edc_calendar/models/event.py
1
1658
from django.db import models from django.urls.base import reverse from edc_base.model_mixins import BaseUuidModel from edc_base.sites import SiteModelMixin from edc_search.model_mixins import SearchSlugManager from edc_search.model_mixins import SearchSlugModelMixin as Base from django.conf import settings class Sea...
gpl-2.0
6,785,288,702,807,448,000
27.586207
97
0.687575
false
3.995181
false
false
false
lnhubbell/tweetTrack
tweetTrack/app/views.py
1
2937
from os import environ from random import random import json import tweepy import requests from requests.exceptions import ConnectionError from flask import render_template, request, jsonify from flask.ext.mail import Message from tweetTrack.app import app, mail, db from tweetTrack.app.forms import TwitterForm, Contact...
mit
8,270,377,790,039,223,000
32
71
0.657814
false
3.859396
false
false
false
mach327/chirp_fork
chirp/drivers/vgc.py
1
49672
# Copyright 2016: # * Jim Unroe KC9HI, <rock.unroe@gmail.com> # * Pavel Milanes CO7WT <pavelmc@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 2 of the License, or # ...
gpl-3.0
-5,601,819,873,156,552,000
33.280193
80
0.520877
false
3.650742
false
false
false
SCUEvals/scuevals-api
db/alembic/versions/20170928104413_update_departments_names_if_they_exist.py
1
1423
"""Update departments names if they exist Revision ID: 15bc0e6fa7a0 Revises: 7004250e3ef5 Create Date: 2017-09-28 10:44:13.788317 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '15bc0e6fa7a0' down_revision = '7004250e3ef5' branch_labels = None depends_on = Non...
agpl-3.0
7,266,190,210,782,691,000
23.534483
110
0.683767
false
3.226757
false
false
false
egan/weinbot
src/Hardware/Alarm.py
1
3813
## # Hardware.py: Class implementing control of WEINBot alarm tones via GPIO. # # Copyright 2015, Egan McComb # ## import Adafruit_BBIO.GPIO as GPIO import threading import time import logging class Alarm(): """ Alarm: A class that provides an interface to control the WEINBot STI minicontro...
gpl-3.0
-8,399,425,728,887,080,000
24.938776
104
0.520325
false
3.691191
false
false
false
tianon/moxie
moxie/models.py
1
4573
# Copyright (c) Paul R. Tagliamonte <tag@pault.ag>, 2015 # # 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...
mit
3,312,162,262,708,882,000
30.321918
90
0.67002
false
3.804493
false
false
false
bderembl/mitgcm_configs
eddy_iwave/analysis/azimuthal_average.py
1
9428
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt import matplotlib import scipy.interpolate as spint import scipy.spatial.qhull as qhull import itertools import MITgcmutils as mit import f90nml plt.ion() def interp_weights(xyz, uvw): naux,d = xyz.shape tri = qhull.Delaunay(xyz) ...
mit
-4,567,548,868,622,510,000
28.098765
99
0.599703
false
2.042904
false
false
false