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
freedomtan/tensorflow
tensorflow/python/tpu/tpu_outside_compilation_test.py
2
22688
# Copyright 2020 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,471,741,532,479,555,000
30.511111
94
0.650432
false
3.608716
true
false
false
atomictom/WiseGuy
old_sequential_nn.py
1
3808
# Neural Network # -- nn.py # # @package NeuralNetwork import Queue import random import math import time import threading NUM_THREADS = 1 NUM_TESTS = 100 NUM_INPUTS = 50 NUM_HIDDEN = 30 NUM_OUTPUTS = 50 USE_BACKPROPOGATE = True OUTPUTS = [] # test_input = [ .0, .3, .6, .2, .8 ] class Node: def __init__(self):...
gpl-3.0
5,303,224,215,373,582,000
23.254777
86
0.591649
false
3.439928
false
false
false
openstack/monasca-persister
monasca_persister/repositories/influxdb/abstract_repository.py
1
3517
# (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP # # 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 appli...
apache-2.0
7,030,092,911,305,735,000
45.276316
96
0.589423
false
4.423899
false
false
false
hsmade/expenses
expenses/migrations/0001_initial.py
1
3009
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Deposit', fields=[ ('id', models.AutoField(verb...
gpl-2.0
1,071,978,329,737,851,000
41.380282
129
0.549684
false
4.451183
false
false
false
Microvellum/Fluid-Designer
win64-vc/2.78/Python/bin/2.78/scripts/addons/oscurart_tools/oscurart_render.py
1
16832
# ##### 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
-1,883,779,148,697,409,800
33.483607
288
0.573508
false
3.732919
false
false
false
fajran/tempel
src/tempel/settings.py
1
3006
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = 'tempel.db' DATABASE_USER = '' DATABASE_PASSWORD = '' DATABASE_HOST = '' DATABASE_PORT = '' TIME_ZONE = 'Asia/Jakarta' LANGUAGE_CODE = 'en' SITE_ID = 1 USE_I18N = False import os MEDIA_ROOT = os.path.j...
agpl-3.0
2,420,023,313,409,658,000
31.673913
80
0.531936
false
3.204691
false
false
false
fabsx00/chucky-old
tools/functionAnomaly/Ranker.py
1
1907
import pickle from scipy.spatial.distance import squareform import os from mlutils.anomalyDetection.anomalyCalculator import AnomalyCalculator from RankingEntry import RankingEntry class Ranker: def __init__(self, projectRoot): self.projectRoot = projectRoot def loadTermDocMatrix(self): ...
gpl-3.0
-3,632,520,410,175,390,700
30.278689
81
0.643419
false
4.014737
false
false
false
CzechHackathon2014/juice-my-device
jmd/web/views.py
1
2699
from django.shortcuts import render from places.forms import LocationForm # Create your views here. def home(request, tmpl='web/home.html'): data = {} loc_form = LocationForm(request.POST or None) data['locaction_form'] = loc_form return render(request, tmpl, data) # from django.conf import setting...
mit
2,596,081,016,116,069,000
32.75
165
0.587996
false
2.92416
false
false
false
tschaume/pymatgen
pymatgen/core/periodic_table.py
1
49560
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """Module contains classes presenting Element and Specie (Element + oxidation state) and PeriodicTable.""" import re import json import warnings from io import open from pathlib import Path from enum import En...
mit
5,697,098,511,376,204,000
30.466032
106
0.528804
false
3.989936
false
false
false
NewEvolution/python-webapp
pythonapp/settings.py
1
3002
""" Django settings for pythonapp project. Generated by 'django-admin startproject' using Django 1.8.4. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build pa...
mit
2,576,626,741,817,498,600
26.290909
71
0.659227
false
3.586619
false
false
false
indrajitr/ansible
test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py
1
106596
# -*- coding: utf-8 -*- # # Copyright (C) 2015 Matt Martz <matt@sivel.net> # Copyright (C) 2015 Rackspace US, 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 ...
gpl-3.0
4,129,365,761,759,745,000
42.561913
157
0.487542
false
4.810723
false
false
false
updownlife/multipleK
dependencies/biopython-1.65/Tests/test_GACrossover.py
1
18105
#!/usr/bin/env python """Tests different Genetic Algorithm crossover classes. """ # standard library import unittest # biopython from Bio.Seq import MutableSeq from Bio.Alphabet import SingleLetterAlphabet # local stuff from Bio.GA.Organism import Organism from Bio.GA.Crossover.General import SafeFitnessCrossover fro...
gpl-2.0
2,750,946,505,808,609,300
41.006961
87
0.572328
false
3.755445
true
false
false
Titan-C/scikit-learn
examples/cluster/plot_ward_structured_vs_unstructured.py
1
3369
""" =========================================================== Hierarchical clustering: structured vs unstructured ward =========================================================== Example builds a swiss roll dataset and runs hierarchical clustering on their position. For more information, see :ref:`hierarchical_clus...
bsd-3-clause
3,837,792,158,449,737,700
36.021978
79
0.591273
false
3.94959
false
false
false
petebachant/PXL
pxl/tests/test_fdiff.py
1
1436
from __future__ import division, print_function from .. import fdiff from ..fdiff import * import matplotlib.pyplot as plt import pandas as pd import os import numpy as np from uncertainties import unumpy plot = False def test_second_order_diff(): """Test `second_order_diff`.""" # Create a non-equally space...
gpl-3.0
5,033,398,059,606,500,000
31.636364
80
0.598189
false
2.777563
false
false
false
bgaunt/openEcslent
engine/squadAI.py
2
3788
#--------------------------------------------------------------------------- # Copyright 2010, 2011 Sushil J. Louis and Christopher E. Miles, # Evolutionary Computing Systems Laboratory, Department of Computer Science # and Engineering, University of Nevada, Reno. # # This file is part of OpenECSLENT # # OpenECS...
gpl-3.0
-829,340,554,603,509,400
32.821429
106
0.63226
false
4.251403
false
false
false
qwefi/nova
nova/db/api.py
1
59796
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (t...
apache-2.0
1,774,374,017,101,377,300
31.604144
79
0.665897
false
3.846886
false
false
false
chhsiao1981/f6a_tw_crawler
f6a_tw_crawler/main.py
1
2575
#!/usr/bin/env python # -*- coding: utf-8 -*- from f6a_tw_crawler.constants import * import gevent.monkey; gevent.monkey.patch_all() from bottle import Bottle, request, response, route, run, post, get, static_file, redirect, HTTPError, view, template import random import math import base64 import time import ujson ...
mit
-8,639,354,462,411,019,000
25.822917
117
0.667573
false
3.406085
false
false
false
Erotemic/local
git_tools/git_xadd.py
1
4330
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Adds and commits a change to a local branch (but not the current one) """ from __future__ import absolute_import, division, print_function, unicode_literals import git # import sys class CheckoutContext(object): def __init__(self, repo): self.repo = repo ...
gpl-3.0
-8,634,392,987,533,247,000
32.307692
105
0.569746
false
3.831858
false
false
false
gregoil/rotest
tests/api/resource_control/test_lock_resources.py
1
8138
"""Basic unittests for the server resource control operations.""" from __future__ import absolute_import from functools import partial from six.moves import http_client from django.contrib.auth.models import User from django.test import Client, TransactionTestCase from rotest.management.models import DemoComplexReso...
mit
8,388,351,127,183,234,000
35.493274
75
0.53072
false
5.017263
true
false
false
liosha2007/temporary-groupdocs-python-sdk
groupdocs/models/SignatureContactResponse.py
1
1166
#!/usr/bin/env python """ Copyright 2012 GroupDocs. 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,966,642,128,788,468,000
29.684211
77
0.650086
false
4.608696
false
false
false
wbsavage/shinken
shinken/log.py
1
8631
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2009-2012: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you c...
agpl-3.0
-2,778,704,645,423,375,400
31.942748
104
0.594717
false
3.96281
false
false
false
whaleygeek/punchcard_reader
cardreader/arduino.py
1
3715
# arduino.py 20/06/2015 D.J.Whale # # (c) 2015 D.J.Whale # # Read card records from an arduino card reader. #----- CONFIGURATION ----------------------------------------------------------- DEBUG = False USE_EMBEDDED_PYSERIAL = True BAUD = 115200 ENABLE_ERROR_CORRECT = False if US...
mit
5,137,636,407,564,047,000
18.051282
80
0.563392
false
3.340827
false
false
false
bitmazk/django-dynamic-content
dynamic_content/south_migrations/0001_initial.py
1
2962
# flake8: noqa # -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'DynamicContentTranslation' db.create_table...
mit
8,530,690,097,504,096,000
50.068966
178
0.642471
false
3.923179
false
false
false
eldarion/pycon
pycon/sponsorship/managers.py
1
1557
from django.db import models class SponsorManager(models.Manager): def active(self): return self.get_query_set().filter(active=True).order_by("level") def with_weblogo(self): queryset = self.raw(""" SELECT DISTINCT "sponsorship_sponsor"."id", "sponsorship_...
bsd-3-clause
-1,580,691,195,747,468,800
39.973684
120
0.583815
false
3.689573
false
false
false
Fokko/incubator-airflow
tests/contrib/hooks/test_segment_hook.py
1
2012
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
-762,890,311,649,424,400
31.451613
80
0.694334
false
4.007968
true
false
false
ondrokrc/gramps
gramps/gui/utilscairo.py
1
2664
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch # Copyright (C) 2009 Douglas S. Blank # Copyright (C) 2012 Benny Malengier # Copyright (C) 2013 Vassilii Khachaturov # # This program is free software; you can redistribute it and/or modify # it under the...
gpl-2.0
5,053,228,286,535,073,000
32.721519
79
0.588213
false
3.838617
false
false
false
sk1418/passwdmanager
passwdmanager/upgrade.py
1
8922
# PasswdManager -- Password management tool # Copyright (C) 2009 -- 2013 Kai Yuan <kent.yuan@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 of the License, or # (...
gpl-3.0
-305,031,895,678,248,640
33.715953
206
0.6039
false
3.557416
false
false
false
jeremiahyan/odoo
addons/mrp/models/mrp_production.py
1
92112
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import json import datetime import math import re from collections import defaultdict from dateutil.relativedelta import relativedelta from odoo import api, fields, models, _ from odoo.exceptions import AccessError, Us...
gpl-3.0
-4,215,170,603,825,880,000
51.695652
204
0.603059
false
3.928855
false
false
false
Zolomon/pos-hidden-markov
noise_channel.py
1
4279
from corpus import Corpus import processing __author__ = 'bengt' import argparse def main(): parser = argparse.ArgumentParser() parser.add_argument('train', help='Path to training corpus.') parser.add_argument('corpus', help='Path to corpus.') parser.add_argument('n', help='Tag sentences shorter than...
mit
6,255,098,241,318,718,000
41.376238
116
0.550362
false
3.553987
false
false
false
icea-dev/atn-sim-ng
configs/core/home/myservices/cyber_attack.py
1
2197
# # CORE # Copyright (c)2010-2012 the Boeing Company. # See the LICENSE file included in this distribution. # ''' Sample user-defined service. ''' import os from core.service import CoreService, addservice from core.misc.ipaddr import IPv4Prefix, IPv6Prefix class CyberAttack(CoreService): ''' This is a sample u...
gpl-3.0
3,616,359,763,887,543,000
32.8
130
0.631771
false
3.673913
false
false
false
jlev/ballistic-missile-range
plot.py
1
68191
#----------------------------------------------------------------------------- # Name: wx.lib.plot.py # Purpose: Line, Bar and Scatter Graphs # # Author: Gordon Williams # # Created: 2003/11/03 # RCS-ID: $Id: plot.py,v 1.13 2005/05/09 19:59:34 RD Exp $ # Copyright: (c) 2002 # Licence: Use...
mit
579,583,106,644,383,400
38.30317
141
0.574416
false
3.732607
false
false
false
khchine5/lino-welfare
lino_welfare/modlib/pcsw/fixtures/std.py
1
4085
# -*- coding: UTF-8 -*- # Copyright 2011,2013 Luc Saffre # This file is part of Lino Welfare. # # Lino Welfare 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 y...
agpl-3.0
-564,761,152,002,856,900
35.097345
109
0.685217
false
3.106626
false
false
false
roessland/PRST
prst/utils/__init__.py
1
22249
# -*- coding: utf-8 -*- from __future__ import print_function, division import copy __all__ = ["rldecode", "rlencode", "units", "mcolon", "recursive_diff", "gridtools"] import prst.utils.gridtools import numpy as np import scipy.sparse from scipy.sparse import csr_matrix import scipy.sparse as sps class Struct(dict...
gpl-3.0
1,775,324,393,358,209,500
29.311989
101
0.499573
false
3.29566
false
false
false
dondamage/SPyTS
tmp/TsPacket.py
1
2806
import TsPacketError class TsPacket(object): """ A wrapper class to represent an MPEG2-TS packet. """ TS_PKT_LEN_188 = 188 TS_PKT_LEN_204 = 204 def __init__(self, pkt): if isinstance(pkt, bytes): if len(pkt) in (TsPacket.TS_PKT_LEN_188, TsPacket.TS_PKT_LEN_204): self._content = pkt ...
gpl-2.0
1,291,673,668,577,762,300
26.792079
80
0.572701
false
2.988285
false
false
false
WilliamDASILVA/TheMysteryOfSchweitzer
interfaces/DialogInterface.py
1
1998
from engine import Global; from engine.Interface import Interface; from engine.render.image import Image; from engine.render.text import Text; from engine.render.sprite import Sprite; # --------------------------------------------------- *\ # [class] DialogInterface() # # * The dialog interface * # # --------------...
mit
1,338,667,157,344,302,000
32.864407
76
0.560561
false
3.25938
false
false
false
madscatt/sasmol
src/python/test_sasmol/test_sassubset/test_intg_sassubset_Mask_get_dihedral_subset_mask.py
1
15098
''' SASMOL: Copyright (C) 2011 Joseph E. Curtis, Ph.D. 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. ...
gpl-3.0
-5,796,164,659,144,685,000
33.158371
178
0.647437
false
3.20552
true
false
false
barjacks/pythonrecherche
07 Selenium, more beautifulsoup/zh_wie_neu.py
1
1387
# coding: utf-8 from bs4 import BeautifulSoup import pandas as pd import requests import time import progressbar bar = progressbar.ProgressBar() lst = [] lst_pass = [] for elem,i in zip(range(1697,13000), bar((range(1697,13000)))): url = "https://www.zueriwieneu.ch/report/" + str(elem) response = requests....
mit
-5,546,033,929,979,838,000
37.194444
114
0.599273
false
2.852697
false
false
false
ActiveState/code
recipes/Python/223610_Yet_another_way_use_fields/recipe-223610.py
1
2458
import types class FieldNameError(Exception): def __init__(self, value): self.value = value def __str__(self): return `"""Field name '%s' does not exist""" % self.value` class fRow(tuple): # class for each row def __getattr__(self,i): return tuple.__getitem__(self,self.__Field2Index__(i)) d...
mit
9,081,782,035,038,960,000
26.931818
91
0.635883
false
3.588321
false
false
false
geduldig/TweetBase
TweetBase/TweetCouch.py
1
5890
import couchdb from couchdb.design import ViewDefinition class TweetCouch(object): def __init__(self, dbname, url=None): try: self.server = couchdb.Server(url=url) self.db = self.server.create(dbname) self._create_views() except couchdb.http.PreconditionFailed: self.db = self.server[dbname] def _cr...
mit
-2,338,989,167,631,813,600
40.478873
171
0.589643
false
2.967254
false
false
false
itucsdb1612/itucsdb1612
Authors.py
1
3560
import psycopg2 as dbapi2 class Author: def __init__(self,id, name, lastname, birthdate, nationality, penname,description,picture): self.id= id self.name= name self.lastname=lastname self.birthdate=birthdate self.nationality=nationality self.penname = penname ...
gpl-3.0
7,379,727,859,289,970,000
44.628205
187
0.676785
false
3.590313
false
false
false
yokiwhh/bookLab7
bookapp/models.py
1
1024
from django.db import models from django.contrib import admin # Create your models here. # -*- coding: utf-8 -*- def decode(info): return info.decode('utf-8') class Book(models.Model): class Meta: verbose_name = 'book' verbose_name_plural = verbose_name ISBN = models.CharField('ISBN',max_l...
mit
-702,074,715,538,148,600
33.133333
71
0.669922
false
3.618375
false
false
false
vladimirdolzhenko/gflogger
scripts/calc-report.py
1
5526
#!/usr/bin/python import sys; def sortedKeys(dict): keys = dict.keys() keys.sort() return keys if __name__ == '__main__': i = 0 width = 1200 height = 600 reader = open(sys.argv[1], "r") jsname = '%s.js' % sys.argv[1] jswriter = open(jsname, "w") htmlwriter = open(sys.argv[1] + '.html', "w") charts = ...
apache-2.0
-6,747,957,376,518,885,000
24.702326
108
0.549946
false
2.66185
false
false
false
jtraver/dev
python/hex/hex2.py
1
1148
#!/usr/bin/python def main(): # hex1() hex2() def hex1(): # ba1 = bytearray.fromhex("0x69") ba1 = bytearray.fromhex("69") print "ba1 = %s" % str(ba1) def hex2(): strings = [] strings.append("asclient.connection.recv 1037 BYTE = 0x21 33 '!'") strings.append("asclient.connection.recv 10...
mit
4,119,470,077,678,726,000
36.032258
71
0.627178
false
2.997389
false
false
false
latticelabs/Mitty
mitty/benchmarking/misalignment_plot.py
1
9184
"""Prepare a binned matrix of misalignments and plot it in different ways""" import click import pysam import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt from matplotlib.path import Path import matplotlib.patches as patches from matplotlib.colors import LogNorm import numpy as np def we_have_too...
gpl-2.0
1,032,870,527,477,394,600
44.470297
145
0.643728
false
2.902655
false
false
false
idf/scipy_util
scipy_util/image/color_kmeans.py
1
2314
# USAGE # python color_kmeans.py --image images/jp.png --clusters 3 # Author: Adrian Rosebrock # Website: www.pyimagesearch.com # import the necessary packages from sklearn.cluster import KMeans import matplotlib.pyplot as plt import numpy as np import argparse import cv2 def centroid_histogram(clt): # grab the...
bsd-3-clause
-5,846,669,147,645,297,000
27.9375
73
0.687554
false
3.495468
false
false
false
amigocloud/amigocloud_samples
python/recordhistory.py
1
3281
# Script to query record_history across all AmigoCloud projects and export results to a CSV # Must have AmigoCloud Account # All projects must have a record_history dataset (no projects older than 2017) from amigocloud import AmigoCloud import csv # AmigoCloud variables - change based on user # token found at ap...
mit
5,019,500,417,981,999,000
46.550725
230
0.673575
false
3.53556
false
false
false
bugsduggan/locust
locust/stats.py
1
26840
import hashlib import time from collections import namedtuple, OrderedDict from copy import copy from itertools import chain import gevent import six from six.moves import xrange from . import events from .exception import StopLocust from .log import console_logger STATS_NAME_WIDTH = 60 """Default interval for how ...
mit
5,510,569,928,374,752,000
35.517007
187
0.609277
false
3.832096
false
false
false
robogen/CMS-Mining
RunScripts/es_mainreduce.py
1
20005
from elasticsearch import Elasticsearch import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from matplotlib.dates import AutoDateLocator, AutoDateFormatter import numpy as np import datetime as dt import math import json with open('sites.json', 'r+') as txt: sitesArray = json.load(...
mit
398,106,286,063,834,500
43.85426
102
0.389803
false
4.524994
false
false
false
atumanov/ray
python/ray/rllib/optimizers/multi_gpu_optimizer.py
1
9886
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging import math import numpy as np from collections import defaultdict import ray from ray.rllib.evaluation.metrics import LEARNER_STATS_KEY from ray.rllib.policy.tf_policy import TFPolicy from ray....
apache-2.0
-4,175,666,945,924,557,000
42.743363
79
0.556039
false
4.335965
false
false
false
jgosmann/psyrun
psyrun/pspace.py
1
9919
"""Construction of parameter spaces.""" import collections import itertools from six import string_types from psyrun.utils.doc import inherit_docs def dict_concat(args): """Concatenates elements with the same key in the passed dictionaries. Parameters ---------- args : sequenece of dict Di...
mit
5,030,411,892,395,405,000
26.940845
79
0.556104
false
4.186999
false
false
false
lablup/backend.ai-manager
src/ai/backend/manager/models/alembic/versions/e35332f8d23d_add_modified_at_to_users_and_kernels.py
1
3049
"""add_modified_at_to_users_and_kernels Revision ID: e35332f8d23d Revises: da24ff520049 Create Date: 2020-07-01 14:02:11.022032 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql from sqlalchemy.sql.expression import bindparam from ai.backend.manager.models.base import conv...
lgpl-3.0
236,808,993,664,304,350
38.089744
93
0.625451
false
3.664663
false
false
false
psci2195/espresso-ffans
samples/lb_profile.py
1
2856
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
gpl-3.0
-3,930,206,780,037,609,000
30.384615
93
0.719188
false
2.824926
false
false
false
openaps/openaps
openaps/vendors/units.py
1
2534
""" Units - units tool for openaps """ from openaps.uses.use import Use from openaps.uses.registry import Registry from openaps.glucose.convert import Convert as GlucoseConvert import json import argparse def set_config (args, device): return device def display_device (device): return '' use = Registry( ) ...
mit
3,989,318,095,668,751,400
27.47191
82
0.66614
false
3.261261
false
false
false
henriquegemignani/randovania
randovania/game_connection/nintendont_backend.py
1
10056
import asyncio import dataclasses import struct from asyncio import StreamReader, StreamWriter from typing import List, Optional, Dict from randovania.game_connection.backend_choice import GameBackendChoice from randovania.game_connection.connection_backend import ConnectionBackend, MemoryOperation, MemoryOperationExc...
gpl-3.0
-8,874,167,788,248,815,000
34.408451
119
0.584029
false
4.202257
false
false
false
iceman1989/Check_mk
web/htdocs/htmllib.py
1
58082
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
-4,768,458,956,842,692,000
37.618351
124
0.534847
false
3.818672
false
false
false
Jajcus/pyxmpp
pyxmpp/objects.py
1
6158
# # (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
lgpl-2.1
1,634,089,275,262,912,500
35.874251
91
0.592563
false
4.127346
false
false
false
tere-valdivia/icy_tower_tarea
ControladorPlataforma.py
1
1051
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Oct 14 15:26:23 2017 @author: terevaldivia """ import os from CC3501Utils_personal import * import numpy as np from Plataforma import * class ControladorPlataforma: def __init__(self): self.lista = [] self.generar() def gen...
mit
-6,942,142,383,207,466,000
27.432432
84
0.58706
false
3.204268
false
false
false
coin-or/Dip
Dip/src/dippy/examples/bpp/mdbin_pack_func.py
1
2645
from builtins import range from builtins import object import sys from pulp import LpVariable, lpSum, LpBinary, LpStatusOptimal try: import path except ImportError: pass try: import dippy except ImportError: try: import src.dippy as dippy except ImportError: import coinor....
epl-1.0
-8,794,339,438,024,126,000
28.719101
82
0.517958
false
3.404118
false
false
false
fperez/sympy
sympy/series/order.py
1
8346
from sympy.core.basic import Basic, S, C, sympify from sympy.core import oo, Rational, Pow from sympy.core.cache import cacheit class Order(Basic): """ Represents O(f(x)) at the point x = 0. Definition ========== g(x) = O(f(x)) as x->0 if and only if |g(x)|<=M|f(x)| near x=0 ...
bsd-3-clause
4,637,688,196,921,517,000
28.701068
107
0.472682
false
3.683142
false
false
false
sporto/rails_go_to_spec
rails_go_to_spec.py
1
1760
import sublime, sublime_plugin, os import RailsGoToSpec.resolver import re class RailsGoToSpecCommand(sublime_plugin.WindowCommand): def run(self): sublime.status_message('Running Rails Go To Spec') win = self.window view = win.active_view() current_file = view.file_name() # remove the root dir root_pat...
mit
-6,015,399,855,885,229,000
23.109589
80
0.680682
false
2.943144
false
false
false
zozo123/buildbot
master/buildbot/test/fake/fakemaster.py
1
5314
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-3.0
-5,274,690,665,599,939,000
27.265957
79
0.666353
false
3.945063
true
false
false
Yarichi/Proyecto-DASI
Malmo/Python_Examples/MazeRunner.py
1
9848
# ------------------------------------------------------------------------------------------------ # Copyright (c) 2016 Microsoft Corporation # # 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 Softw...
gpl-2.0
2,658,488,039,185,188,400
41.768889
201
0.625
false
3.771735
false
false
false
igemsoftware2017/USTC-Software-2017
biohub/abacus/views.py
1
1421
from rest_framework import views, permissions, parsers from rest_framework.exceptions import ValidationError from rest_framework.response import Response from .handlers import get_handler, query from .result import AbacusAsyncResult from .security import validate_signature class StartView(views.APIView): permiss...
gpl-3.0
5,578,610,467,308,912,000
29.234043
74
0.679099
false
4.216617
false
false
false
edison7500/django-leancloud-sms
leancloud/sms.py
1
2259
# coding=utf-8 import re import requests import json import logging from django.conf import settings from .exceptions import LeanCloudException, PhoneNumberException logger = logging.getLogger(__name__) headers = getattr(settings, 'LEANCLOUD_HEADERS') class LeanCloudSMS(object): cell_phone_match = re.compile('...
gpl-3.0
-8,270,872,587,978,459,000
32.179104
113
0.605488
false
3.484326
false
false
false
PaddlePaddle/models
PaddleCV/tracking/pytracking/admin/environment.py
1
2051
import importlib import os class EnvSettings: def __init__(self): pytracking_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) self.results_path = '{}/tracking_results/'.format(pytracking_path) self.network_path = '{}/networks/'.format(pytracking_path) self.dat...
apache-2.0
5,295,043,297,320,136,000
38.442308
110
0.575329
false
3.784133
false
false
false
ShaolongHu/Nitrate
tcms/testplans/tests.py
1
4490
# -*- coding: utf-8 -*- import unittest from django.test.client import Client class PlanTests(unittest.TestCase): def setUp(self): self.c = Client() self.plan_id = 2256 self.status_codes = [301, 302] def test_plans(self): response = self.c.get('/plans/') try: ...
gpl-2.0
3,678,989,214,991,336,400
33.015152
73
0.608018
false
4.063348
true
false
false
czhengsci/veidt
veidt/utils/data_selection.py
1
4503
# coding: utf-8 # Copyright (c) Materials Virtual Lab # Distributed under the terms of the BSD License. from __future__ import division, print_function, unicode_literals, \ absolute_import import random import numpy as np import pandas as pd from copy import copy from pymatgen import Structure class MonteCarloS...
bsd-3-clause
-7,386,989,554,089,515,000
34.464567
88
0.593826
false
4.304971
false
false
false
rolandgeider/wger
wger/manager/migrations/0010_auto_20210102_1446.py
1
1206
# Generated by Django 3.1.3 on 2021-01-02 13:46 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('manager', '0009_auto_20201202_1559'), ] operations = [ migrations.AlterField( model_name='setting', name='rir', ...
agpl-3.0
8,143,447,409,504,964,000
37.903226
95
0.360697
false
3.902913
false
false
false
vrsys/avangong
examples/sound/openal/openal-test.py
1
4058
# -*- Mode:Python -*- ########################################################################## # # # This file is part of AVANGO. # # ...
lgpl-3.0
-8,545,645,918,670,794,000
35.232143
76
0.62691
false
3.682396
false
false
false
fccoelho/jogos_vorazes
estrategias/LeoRodrigues.py
1
2061
# -*- coding: utf8 -*- from .jogadores import Jogador class MeuJogador(Jogador): def percent(self,data,percentil): data = sorted(data) n = len(data) if n == 0: pass #print ("Lista vazia") else: return int(round(percentil*n+1)) ...
mit
8,636,253,855,674,421,000
47.571429
197
0.594608
false
2.869198
false
false
false
dwadler/QGIS
python/plugins/processing/algs/qgis/PointDistance.py
1
13351
# -*- coding: utf-8 -*- """ *************************************************************************** PointDistance.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
gpl-2.0
4,954,009,398,125,861,000
46.176678
197
0.565126
false
4.837319
false
false
false
JohanComparat/pySU
spm/bin_spiders/spiders_last_burst_vs_radius.py
1
5578
import astropy.cosmology as co aa=co.Planck15 import astropy.io.fits as fits import astropy.units as u from astropy.coordinates import angles #import AngularSeparation from astropy import coordinates as coord import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as p import numpy as n import os import sys ...
cc0-1.0
-8,053,327,241,965,627,000
32.202381
166
0.661527
false
2.250101
false
false
false
OpenDataPolicingNC/Traffic-Stops
traffic_stops/base_views.py
1
3014
from django.core.exceptions import ImproperlyConfigured from django.shortcuts import redirect, Http404 from django.views.generic import DetailView, ListView, TemplateView from django.views.generic.edit import ProcessFormView, FormMixin from traffic_stops.utils import get_chunks from collections import defaultdict cla...
mit
6,739,473,892,686,787,000
36.675
86
0.639681
false
3.904145
false
false
false
alfredodeza/execnet
execnet/gateway_bootstrap.py
1
3067
# -*- coding: utf-8 -*- """ code to initialize the remote side of a gateway once the io is created """ import inspect import os import execnet from execnet import gateway_base from execnet.gateway import Gateway importdir = os.path.dirname(os.path.dirname(execnet.__file__)) class HostNotFound(Exception): pass ...
mit
8,197,248,749,936,590,000
27.137615
79
0.580698
false
3.537486
false
false
false
CaptainDesAstres/Blender-Render-Manager
TaskList/TaskLog/FrameLog.py
1
1368
#!/usr/bin/python3.4 # -*-coding:Utf-8 -* '''module to manage task Frame log''' import xml.etree.ElementTree as xmlMod import datetime from usefullFunctions import * class FrameLog: '''class to manage task frame log''' def __init__(self, xml = None, frame = None, date = None, computingTime = Non...
mit
1,593,360,718,712,065,800
19.358209
69
0.629765
false
3.216981
false
false
false
ctberthiaume/keggannot
keggannot/annot.py
1
16296
import os, sys from decimal import Decimal import gzip from collections import OrderedDict import logging def blast_result_iterator(blast_file): _ = blast_file.readline() # burn header for line in blast_file: if not line.startswith("#"): yield BlastHit(line) class BlastHit(object): ""...
apache-2.0
2,386,312,616,748,014,000
37.8
100
0.510371
false
3.819077
false
false
false
ryanpbrewster/SciVis-2015
examples/sdf_example.py
1
2689
""" The Example is from http://darksky.slac.stanford.edu/scivis2015/examples.html """ from sdfpy import load_sdf from thingking import loadtxt prefix = "../data/" # Load N-body particles from a = 1.0 dataset. Particles have positions with # units of proper kpc, and velocities with units of km/s. particles = load_sdf...
mit
9,184,363,794,019,417,000
43.081967
83
0.706582
false
2.716162
false
false
false
rhcarvalho/kombu
kombu/tests/async/http/test_curl.py
1
5102
# -*- coding: utf-8 -*- from __future__ import absolute_import from kombu.async.http.curl import READ, WRITE, CurlClient from kombu.tests.case import ( HubCase, Mock, call, patch, case_requires, set_module_symbol, ) @case_requires('pycurl') class test_CurlClient(HubCase): class Client(CurlClient): ...
bsd-3-clause
-1,647,547,606,994,934,000
37.074627
78
0.555076
false
3.396804
true
false
false
Azure/azure-sdk-for-python
sdk/graphrbac/azure-graphrbac/azure/graphrbac/models/application_create_parameters.py
1
8780
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-113,552,795,501,562,910
53.875
114
0.685877
false
4.116268
false
false
false
diamondman/pys3streamer
s3streamer/streamer.py
1
4416
from __future__ import unicode_literals from __future__ import print_function from boto.s3.connection import S3Connection class S3Streamer(object): #def __init__(self, bucket_name, *key_names, s3_connection=None, key_is_prefix=False): def __init__(self, bucket_name, *key_names, **kwargs): """Create a...
mit
-8,990,907,671,535,923,000
34.328
305
0.55933
false
4.032877
false
false
false
Duroktar/cookbook
AIML Files/ALICE/ALICE_bot.py
1
1830
# - LINKS - ALICE Bot # # By: traBpUkciP (2016) import aiml # AI-Markup Language library import datetime import time import urllib # library for dealing with web stuff through Python import sys, os path = os.path.dirname(os.path.abspath(sys.argv[0])) BRAIN_FILE = path + "/bot_brain_ALICE.brn" k = aiml.Kerne...
gpl-3.0
-182,710,782,391,264,220
18.0625
114
0.553005
false
3.465909
false
false
false
opadron/girder
girder/api/v1/resource.py
1
21286
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright 2013 Kitware 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 cop...
apache-2.0
4,512,090,057,241,301,500
44.482906
80
0.558677
false
4.741813
false
false
false
twiindan/selenium_lessons
01_Introducción/02_tools_and_environment.py
1
2414
#=============================================================================== # - CPython is the real name of default standard Python implementation # - Implemented in C # - There are Python implementations in other languages: # - Jython: Python 2.5 interpreter written in Java which runs bytecode in the JVM # ...
apache-2.0
-6,505,159,516,177,435,000
44.566038
99
0.42792
false
5.816867
false
false
false
wangyang59/tf_models
video_prediction/prediction_train_flo_learn_ip_sintel_test.py
1
30243
# # 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 # Copyright 2016 The TensorFlow Authors All Rights Reserved. # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
5,854,912,422,827,126,000
44.753404
173
0.606289
false
2.994653
false
false
false
andrewsomething/digitalocean-indicator
digitalocean_indicator/__init__.py
1
1487
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- ### BEGIN LICENSE # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by the Free Software Foundation. # # This program is distributed in the hop...
gpl-3.0
8,986,540,471,270,268,000
31.326087
75
0.702757
false
3.923483
false
false
false
vandorjw/django-template-project
project/project_name/views.py
1
1288
from django.views.generic import TemplateView from django.views.generic.edit import FormView from blog.models import Article from django.core.mail import send_mail from {{project_name}}.forms import ContactForm class HomePageView(TemplateView): template_name="index.html" def get_context_data(self, **kwargs): ...
mit
2,950,621,827,330,681,000
32.025641
76
0.697205
false
3.722543
false
false
false
a25kk/aha
src/aha.sitecontent/aha/sitecontent/browser/pagesection.py
1
7060
# -*- coding: utf-8 -*- """Module providing views for a contentpage section""" from AccessControl import Unauthorized from Acquisition import aq_inner from Acquisition import aq_parent from plone import api from plone.api.exc import InvalidParameterError from plone.protect.utils import addTokenToUrl from Products.CMFPl...
mit
-960,660,328,584,240,100
31.837209
77
0.585694
false
4.235153
false
false
false
dylanninin/schema
test_schema.py
1
18858
from __future__ import with_statement from collections import defaultdict, namedtuple from operator import methodcaller import os from pytest import raises from schema import Schema, Use, And, Or, Optional, SchemaError, JSONSchema try: basestring except NameError: basestring = str # Python 3 does not have ...
mit
-8,319,315,173,465,126,000
33.039711
99
0.561724
false
3.521569
true
false
false
arashn/senior-project
server/create_mission.py
1
2187
# This is a script to create a mission from a start # location to an end location and upload the mission # to the vehicle. The script uses the Google Maps # Directions API to obtain directions from the start # location to the end location, and uses the points # received as waypoints in the mission. import googlemaps fr...
gpl-3.0
8,425,306,509,460,994,000
39.5
150
0.692273
false
3.169565
false
false
false
j08lue/poppy
poppy/ts_flux_budget.py
1
6682
import numpy as np import warnings from oceanpy.fluxbudget import budget_over_region_2D from oceanpy.stats import central_differences def _fill0(a): return np.ma.filled(a,0.) def _warn_virtual_salt_flux_units(): warnings.warn('Output units are kg SALT s-1!',) warnings.filterwarnings("once") def fluxbudge...
gpl-2.0
-7,507,726,245,566,721,000
32.41
98
0.564801
false
2.856776
false
false
false
tkem/mopidy-podcast-itunes
mopidy_podcast_itunes/__init__.py
1
4677
import pathlib import pkg_resources from mopidy import config, ext, httpclient __version__ = pkg_resources.get_distribution("Mopidy-Podcast").version CHARTS = ["podcasts", "audioPodcasts", "videoPodcasts"] COUNTRIES = [ "AD", "AE", "AF", "AG", "AI", "AL", "AM", "AO", "AQ", "...
apache-2.0
-5,865,417,700,428,691,000
13.707547
70
0.39876
false
2.963878
true
false
false
FlightGear/flightgear
utils/Modeller/yasim_import.py
1
30696
#!BPY # """ # Name: 'YASim (.xml)' # Blender: 245 # Group: 'Import' # Tooltip: 'Loads and visualizes a YASim FDM geometry' # """ __author__ = "Melchior FRANZ < mfranz # aon : at >" __url__ = ["http://www.flightgear.org/", "http://cvs.flightgear.org/viewvc/source/utils/Modeller/yasim_import.py"] __version__ = "0.2" __...
gpl-2.0
1,149,373,334,458,743,400
36.117291
139
0.627769
false
2.725142
true
false
false
sahat/bokeh
examples/plotting/server/remote_image.py
1
1468
import numpy as np from bokeh.plotting import * from bokeh.objects import Range1d, ServerDataSource """ In order to run this example, you have to execute ./bokeh-server -D remotedata the remote data directory in the bokeh checkout has the sample data for this example In addition, you must install ArrayManagement from...
bsd-3-clause
-9,210,181,709,916,321,000
27.784314
84
0.50545
false
3.598039
false
false
false
utkarsh-goswami/erpnext
erpnext/accounts/doctype/pricing_rule/pricing_rule.py
1
13027
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # For license information, please see license.txt from __future__ import unicode_literals import frappe import json import copy from frappe import throw, _ from frappe.utils import flt, cint from frappe.model.document ...
gpl-3.0
7,289,619,787,295,705,000
34.693151
131
0.68834
false
3.033768
false
false
false
saleemjaveds/https-github.com-openstack-nova
nova/virt/hyperv/driver.py
1
9980
# Copyright (c) 2010 Cloud.com, Inc # Copyright (c) 2012 Cloudbase Solutions Srl # # 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
-6,918,559,753,360,435,000
43.159292
79
0.584469
false
4.507678
false
false
false
prataprc/tayra
tayra/test/stdttl/ref/useinterface.ttl.py
1
2558
import imp from io import StringIO from pluggdapps.plugin import Plugin, implements from tayra import BaseTTLPlugin def __traceback_decorator__( frames ): from copy import deepcopy from os.path import basename def _map2ttl( frame ): filename = frame.fil...
gpl-3.0
4,534,265,095,234,785,000
31.794872
134
0.538702
false
3.475543
false
false
false
asiersarasua/QGIS
python/plugins/db_manager/layer_preview.py
1
5023
# -*- coding: utf-8 -*- """ /*************************************************************************** Name : DB Manager Description : Database manager plugin for QGIS Date : May 23, 2011 copyright : (C) 2011 by Giuseppe Sucameli email : brush.tyler@...
gpl-2.0
151,934,034,634,910,370
36.207407
118
0.516624
false
4.895712
false
false
false
swayf/pyLoad
module/plugins/accounts/FilesonicCom.py
1
2796
# -*- coding: utf-8 -*- """ 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...
agpl-3.0
-295,136,709,200,270,100
38.380282
109
0.620529
false
3.85124
false
false
false
Imperat/SSU-Courses
ssu-formal-languages/pda/pda.py
1
1105
import pda_exceptions as e class PDA(object): def __init__(self, rules, input_alphabet, states, initial_state, terminate_states): self.rules = rules self.input_alphabet = input_alphabet self.states = states self.state = initial_state self.terminate_states =...
apache-2.0
1,192,358,845,135,127,600
30.571429
55
0.540271
false
4.437751
false
false
false
caedesvvv/pynoded
pynoded/graph.py
1
4291
""" Base graph objects """ from evh.base import EvHandler,EvStack from math import * class Drawable(object): """ Base class for drawable objects. """ def __init__(self,x,y,scale=1.0): self.x=x self.y=y self.scale=scale def Draw(self,ctx): ctx.save() ctx.sca...
gpl-3.0
-4,142,430,700,984,500,700
23.66092
87
0.563505
false
3.349727
false
false
false