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
badele/home-assistant
homeassistant/components/http.py
1
16169
""" homeassistant.components.http ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module provides an API and a HTTP interface for debug purposes. For more details about the RESTful API, please refer to the documentation at https://home-assistant.io/developers/api/ """ import json import threading import logging import time import ...
mit
5,275,320,502,228,461,000
32.82636
79
0.604985
false
4.144835
true
false
false
unioslo/cerebrum
consumers/no/uio/consumer_sap.py
1
52276
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 University of Oslo, Norway # # This file is part of Cerebrum. # # Cerebrum 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...
gpl-2.0
215,028,941,222,156,400
38.418552
79
0.571562
false
3.991219
true
false
false
mlocs/lineage-trees-clustering
efficient_metrics/medoid.py
1
1449
# This file is part of the Lineage Tree Clustering project. # Copyright (C) 2014 # Author: Valeriy Khakhutskyy # # Lineage Tree Clustering 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
-488,653,725,553,296,200
31.931818
100
0.741201
false
3.483173
false
false
false
joaquimrocha/Rancho
rancho/file/views.py
1
11145
######################################################################## # Rancho - Open Source Group/Project Management Tool # Copyright (C) 2008 The Rancho Team # # 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 t...
agpl-3.0
-2,726,702,880,086,405,600
39.234657
200
0.636339
false
3.822016
false
false
false
midas-isg/digital-commons
src/scripts/compare_to_results/add_result_access_urls.py
1
2884
import json import sys import os from collections import OrderedDict def ordered(obj): if isinstance(obj, dict): return sorted((k, ordered(v)) for k, v in obj.items()) if isinstance(obj, list): return sorted(ordered(x) for x in obj) else: return obj if len(sys.argv) < 2: print(...
gpl-3.0
8,814,515,196,077,392,000
47.881356
133
0.575936
false
4.430108
false
false
false
srguiwiz/nrvr-commander
src/nrvr/distros/common/ssh.py
1
3744
#!/usr/bin/python """nrvr.distros.common.ssh - Remote commands over ssh to Linux The main class provided by this module is LinuxSshCommand. LinuxSshCommand inherits from nrvr.remote.ssh.SshCommand, including limitations documented there. Idea and first implementation - Leo Baschy <srguiwiz12 AT nrvr DOT com> Publi...
bsd-2-clause
1,240,055,395,670,363,100
34.320755
116
0.614583
false
4.627936
false
false
false
jonobrien/School_Backups
cs1-python/Labs/week 9/skewer.py
1
6382
""" Author: Sean Strout Author: Jon O'Brien Description: A module for representing the skewer functionality and graphics. It interfaces between the main program (kebab.py) and the modules kebab_graphics.py and kebab_spot.py """ import kebab_graphics import skewer_exception import food import kebab_spot def c...
gpl-3.0
-3,530,031,405,439,476,700
30.594059
103
0.646192
false
3.636467
false
false
false
BiznetGIO/horizon
openstack_dashboard/dashboards/project/instances/views.py
1
23725
# 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 # not use this file except in compliance with the...
apache-2.0
2,908,815,368,275,768,300
39.076014
79
0.598567
false
4.366029
false
false
false
parksandwildlife/wastd
conservation/filters.py
1
9552
# -*- coding: utf-8 -*- """Conservation filters.""" from django.contrib.gis.db import models as geo_models from django.contrib.gis.db.models import Extent, Union, Collect # noqa from django.db.models import Q import django_filters from conservation import models as cons_models from conservation import widgets as con...
mit
-2,597,858,450,281,063,000
35.880309
86
0.586579
false
4.162092
false
false
false
rbuffat/pyidf
tests/test_roof.py
1
2469
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.thermal_zones_and_surfaces import Roof log = logging.getLogger(__name__) class TestRoof(unittest.TestCase): def setUp(self): self.fd, self.path = tempfile.mkstemp()...
apache-2.0
-3,457,928,014,582,554,000
32.378378
94
0.63467
false
3.502128
false
false
false
fanhero/thumbor
thumbor/aws/storage.py
1
8994
# coding: utf-8 # Copyright (c) 2015-2016, thumbor-community # Use of this source code is governed by the MIT license that can be # found in the LICENSE file. from json import loads, dumps from os.path import join, splitext from datetime import datetime from dateutil.tz import tzutc from tornado.concurrent import re...
mit
632,949,294,865,751,300
32.559701
119
0.599288
false
4.179368
true
false
false
SamLau95/nbinteract
setup.py
1
2620
""" A Jupyter nbconvert exporter to convert notebooks and their widgets to publicly runnable HTML files. """ # Always prefer setuptools over distutils from setuptools import setup from setuptools.command.test import test as TestCommand # To use a consistent encoding from codecs import open from os import path import s...
bsd-3-clause
6,406,802,574,451,786,000
30.190476
79
0.662214
false
3.830409
true
false
false
Ernir/bjorleitin
beer_search_v2/management/commands/parse_jarn_og_gler_csv.py
1
6022
import csv import re from beer_search_v2.models import Product, ContainerType, ProductType from beer_search_v2.utils import get_alcohol_category_instance from django.core.exceptions import ObjectDoesNotExist from django.core.management.base import BaseCommand from datetime import date class Command(BaseCommand): ...
mit
5,644,113,291,438,670,000
39.38255
113
0.590826
false
4.014009
false
false
false
odeke-em/utils
case_insensitive_dict.py
1
1650
#!/usr/bin/env python3 # Author: Emmanuel Odeke <odeke@ualberta.ca> # Case insensitive dictionary implementation def noop(*args, **kwargs): raise ValueError('noop for this method') def is_callable_attr(obj, attr): retr = getattr(obj, attr, None) if retr is None: return False return hasattr(ret...
mit
-7,941,738,203,729,159,000
30.730769
91
0.626061
false
3.136882
false
false
false
LFUnion/LFOS
tools/multitabreplacerecursive.py
1
2247
# Copyright LFUnion # 2016 # GNU # the effect of this python file # start of this file is tools #includes from os import listdir from os.path import isfile from os.path import isdir from os import chdir from os.path import abspath from os import environ #time from time import sleep #multiprocessing from multiproces...
agpl-3.0
3,948,582,515,878,560,300
15.289855
67
0.668002
false
2.944954
false
false
false
OpenNumismat/open-numismat-tracker
OpenNumismat/Reference/Reference.py
1
12945
from PyQt5 import QtCore, QtSql from PyQt5.QtSql import QSqlDatabase, QSqlQuery from PyQt5.QtCore import Qt, pyqtSignal from PyQt5.QtGui import QPixmap from PyQt5.QtWidgets import * from OpenNumismat.Reference.ReferenceDialog import ReferenceDialog, CrossReferenceDialog class SqlTableModel(QtSql.QSqlTableModel): ...
gpl-3.0
317,356,962,234,915,900
32.277635
98
0.556277
false
4.150369
false
false
false
Feardrop/IMChallenge
Data/VRwRC.py
1
9389
import math from ortools.constraint_solver import pywrapcp from ortools.constraint_solver import routing_enums_pb2 import dataIMC # def distance(x1, y1, x2, y2): # # Manhattan distance # dist = abs(x1 - x2) + abs(y1 - y2) # # return dist # Distance callback class CreateDistanceCallback(object): """Cr...
gpl-3.0
2,988,866,832,512,296,400
34.97318
96
0.593034
false
3.656153
false
false
false
andygotz/qarbon
qarbon/util.py
1
2392
# ---------------------------------------------------------------------------- # This file is part of qarbon (http://qarbon.rtfd.org/) # # Copyright (c) 2013 European Synchrotron Radiation Facility, Grenoble, France # # Distributed under the terms of the GNU Lesser General Public License, # either version 3 of the Lice...
lgpl-3.0
-5,803,495,408,363,355,000
27.47619
78
0.63587
false
3.889431
false
false
false
M1kol4j/helita
helita/sim/ebysus.py
1
10253
""" Set of programs to read and interact with output from Multifluid/multispecies """ import numpy as np import os from .bifrost import BifrostData, Rhoeetab, read_idl_ascii, subs2grph class EbysusData(BifrostData): """ Class to hold data from Multifluid/multispecies simulations in native format. ""...
bsd-3-clause
8,976,357,964,901,967,000
38.894942
119
0.530674
false
3.535517
false
false
false
Arjun-Kiran/ProjectEuler
Scripts/ProjectEuler_Problem22.py
1
1587
# Project Euler Problem 22 # Using names.txt (right click and 'Save Link/Target As...'), a 46K text file containing over five-thousand first names, begin by sorting it into alphabetical order. Then working out the alphabetical value for each name, multiply this value by its alphabetical position in the list to obtain a...
gpl-2.0
5,756,963,966,706,121,000
30.72
305
0.68348
false
2.817052
false
false
false
elsid/mosecom-air
mosecom_air/api/html_parser.py
1
3546
# coding: utf-8 import re from datetime import datetime from pyquery import PyQuery from mosecom_air.api.parser import Substance, Measurement, Result SUBSTANCE_RE = re.compile(r'^(?P<name>[^\s_]*)(?:\s*\((?P<alias>.*?)\))?') STATION_ALIAS_RE = re.compile(ur'«(?P<alias>[^»]*)»') FULL_DATETIME_FORMAT = '%d.%m.%Y %H:%...
mit
3,538,487,331,846,516,700
32.093458
76
0.60209
false
3.654283
false
false
false
KrisCheng/ML-Learning
archive/MOOC/Deeplearning_AI/ImprovingDeepNeuralNetworks/HyperparameterTuning/Tensorflow+Tutorial.py
1
37910
# coding: utf-8 # # TensorFlow Tutorial # # Welcome to this week's programming assignment. Until now, you've always used numpy to build neural networks. Now we will step you through a deep learning framework that will allow you to build neural networks more easily. Machine learning frameworks like TensorFlow, Paddle...
mit
9,030,067,442,998,846,000
34.135436
546
0.622479
false
3.447975
true
false
false
geimer/easybuild-framework
test/framework/sandbox/easybuild/tools/module_naming_scheme/test_module_naming_scheme.py
1
2721
## # Copyright 2013-2014 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
gpl-2.0
-2,730,585,873,317,414,000
38.434783
109
0.667402
false
3.637701
false
false
false
Boshin/workspace
python/genHtml_rasp.py
1
6167
#!/usr/bin/env python #coding:utf-8 import os,sys import shutil imageFormat = ('jpg', 'png', 'gif', 'jpeg') videoFormat = ('mp4', 'm4v', 'avi', 'wmv', 'mov', 'flv', 'mkv', 'swf','webm', 'ogg') delFormat = ('url', 'txt', 'rar', 'html') def getCurPath(): path = sys.path[0] if os.path.isdir(path): retur...
lgpl-3.0
8,811,655,270,157,945,000
42.638298
152
0.570128
false
3.184783
false
false
false
adazey/Muzez
libs/nltk/translate/phrase_based.py
1
7846
# -*- coding: utf-8 -*- # Natural Language Toolkit: Phrase Extraction Algorithm # # Copyright (C) 2001-2016 NLTK Project # Authors: Liling Tan, Fredrik Hedman, Petra Barancikova # URL: <http://nltk.org/> # For license information, see LICENSE.TXT def extract(f_start, f_end, e_start, e_end, alignm...
gpl-3.0
3,316,930,138,803,285,500
42.64
122
0.56554
false
3.339889
false
false
false
sarob/openstack-sarob
openstack-manuals/doc/training-guide/sources/convert_rst_xml.py
1
8254
# Copyright 2013 Yahoo! Inc. All Rights Reserved # Copyright 2013 OpenStack Foundation # 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 (the "License"); you m...
apache-2.0
-4,150,022,341,516,593,700
46.442529
153
0.5378
false
4.036186
false
false
false
skraghu/softlayer-python
SoftLayer/managers/ordering.py
1
6938
""" SoftLayer.ordering ~~~~~~~~~~~~~~~~~~ Ordering Manager :license: MIT, see LICENSE for more details. """ class OrderingManager(object): """Manager to help ordering via the SoftLayer API. :param SoftLayer.API.BaseClient client: the client instance """ def __init__(self, client): ...
mit
5,677,160,778,023,924,000
33.517413
79
0.58648
false
4.758573
false
false
false
jvanasco/facebook_utils
src/facebook_utils/core.py
1
39288
# -*- coding: utf-8 -*- from __future__ import print_function import base64 import cgi import hashlib import hmac import logging import requests try: import simplejson as json except ImportError: import json import time from functools import wraps # pypi import six from six.moves.urllib.parse import urlencod...
bsd-3-clause
-675,921,187,659,642,000
39.378212
199
0.529093
false
4.52262
false
false
false
Shopify/shopify_python_api
test/collection_publication_test.py
1
2624
import shopify import json from test.test_helper import TestCase class CollectionPublicationTest(TestCase): def test_find_all_collection_publications(self): self.fake( "publications/55650051/collection_publications", method="GET", body=self.load_fixture("collection_publ...
mit
2,659,388,937,431,791,600
36.485714
116
0.628049
false
4.165079
true
false
false
gotcha/testcounter
counterpartylib/test/contracts_test.py
1
17901
""" This module test for counterpartyd compability with Ethereum's Smart Contracts. """ """ import os import pytest from pyethereum import tester import serpent import logging logger = logging.getLogger(__name__) logging.basicConfig(level=logging.DEBUG, format='%(message)s') logger = logging.getLogger() # customize V...
mit
-2,577,498,279,167,655,000
27.866129
132
0.590937
false
3.14479
true
false
false
codebuff95/disk_datastructures
account_create.py
1
3478
import btree,bank,datetime,time,shelve,sys from btree_errors import * from random import randint,random def strTimeProp(start, end, format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be strings specifying times formated in the given format (strftime-style),...
gpl-3.0
2,653,502,883,048,934,400
43.589744
169
0.619609
false
2.995693
false
false
false
alepulver/tp-final-incc
book_classification/tests/book_test.py
1
1207
from book_classification import book import os from nose.tools import * path_to_books = os.path.dirname(__file__) def equals_mybook(aBook): aBookPath = os.path.join(path_to_books, "pg1465.txt") contents = open(aBookPath, "rU").read() eq_(aBook.author(), "Charles Dickens") eq_(aBook.title(), "The Wreck of the Gol...
bsd-2-clause
1,377,491,374,116,280,000
30.789474
63
0.746479
false
2.573561
false
false
false
vishsangale/deep-learning
graph-matching/dataset.py
1
2891
import copy import random from typing import Tuple import networkx as nx import numpy as np from torch_geometric.data import Dataset, DataLoader from torch_geometric.utils import from_networkx class SyntheticGraphDataset(Dataset): def __init__(self): self.min_nodes = 19 self.max_nodes = 20 ...
gpl-3.0
68,293,275,379,555,840
28.20202
87
0.555863
false
3.491546
false
false
false
sdalton1/legion
tools/legion_spy_dataflow.py
1
461821
#!/usr/bin/env python # Copyright 2017 Stanford University, NVIDIA Corporation # # 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 r...
apache-2.0
2,908,581,484,942,412,000
42.160841
125
0.517164
false
4.03531
false
false
false
mixmastamyk/yamlweb
yamlweb/utils.py
1
6477
#-*- coding:utf-8 -*- ''' yamlweb - utils Bag of tools. @copyright: 2015 by Mike Miller <mgmiller@studioxps> @license: GNU GPL 3+ ''' import sys, os import logging import yaml log = logging.getLogger(__name__) # figure correct function to import, though used elsewhere try: from ushlex import spl...
gpl-3.0
-9,208,603,570,230,359,000
29.696682
78
0.562143
false
3.96875
false
false
false
saikrishnar/Stress_Analyser_Ubuntu_Python
scripts/energy_calculator.py
1
2396
import wave,time import wave,struct,numpy,numpy.fft import scipy.signal#,matplotlib.pyplot def read_wave(wavefilename): wav = wave.open(wavefilename,'r') fs = wav.getframerate() sig = [] stime = 0 etime = 0 wavnframes = wav.getnframes() sframe = int(stime * fs) ...
gpl-2.0
583,764,512,257,088,000
35.861538
115
0.610184
false
3.467438
false
false
false
izrik/wodehouse
macros/try_.py
1
5004
from wtypes.control import WSetHandlers, WEvalRequired from wtypes.list import WList from wtypes.magic_macro import WMagicMacro from wtypes.symbol import WSymbol class Try(WMagicMacro): def call_magic_macro(self, exprs, scope): # In python, the try statement has two forms: # try/clause/except+/e...
gpl-2.0
6,567,071,081,038,352,000
39.354839
78
0.502198
false
4.420495
false
false
false
alexmgr/scapy-ssl_tls
src/examples/example_sessionctx-sniffer.py
1
3950
#! /usr/bin/env python # -*- coding: UTF-8 -*- # Author : tintinweb@oststrom.com <github.com/tintinweb> ''' server: #> openssl s_server -accept 443 -WWW -debug -cipher AES128-SHA client: #> openssl s_client -connect 192.168.220.131:443 -tls1 ''' if __name__=="__main__": import scapy fro...
gpl-2.0
-7,899,883,211,830,935,000
37.52
116
0.703291
false
2.17511
false
false
false
avoorhis/mbl_sequencing_pipeline
suites/primer.py
1
4109
# -*- coding: utf-8 -*- # name # sequence # direction # domain # dna_region import pipeline.constants as C import pipeline.primer_utils as putils class Primer: """Doc string here..""" Name = "Primer" def __init__(self,name,dir,domain,region,seq): self.name = name self.direction = dir ...
gpl-2.0
7,597,283,672,366,922,000
37.055556
123
0.504989
false
4.032385
false
false
false
mirhampt/sql_interp
sql_interp/__init__.py
1
3144
""" Contains the SQLInterp class. Most of your interaction with sql_interp will be through this class. """ from esc_types import Esc, ListEsc, DictEsc __all__ = ['SQLInterp'] class SQLInterp(object): """ The main sql_interp object. """ def __init__(self, new_types=None): self.type_map = { ...
mit
265,101,497,841,026,620
31.081633
79
0.543257
false
4.153236
false
false
false
googleads/google-ads-python
google/ads/googleads/v7/enums/types/hotel_rate_type.py
1
1186
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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...
apache-2.0
7,993,871,855,612,706,000
29.410256
74
0.689713
false
3.838188
false
false
false
JoinSe7en/pybooter
pyboot.py
1
4375
#!/usr/bin/env python """ # Python Shell Booter - Written by JoinSe7en A friend of mine contacted me with a request to write up a simple shell booter in Python for educational purposes since he's on the path of learning Python. While this is still a very basic form of shell booter with no cool functions or flashy GUI ...
gpl-2.0
-5,151,233,568,184,492,000
31.894737
215
0.6448
false
3.023497
false
false
false
chipx86/cloudplaya
setup.py
1
1168
#!/usr/bin/env python try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages from cloudplaya import VERSION PACKAGE_NAME = 'cloudplaya' setup(name=PACKAGE_NAME, version=VERSION, ...
mit
-609,166,164,788,740,100
26.162791
62
0.592466
false
4.18638
false
false
false
Nymeria8/eggNOG_drinker
eggNOG_flavor.py
1
1516
#SELECT THE FLAVOUT OF YOUR EGGNOGG #The eggNOG database is pretty large, and regularily exists the need #to select a taxonomic group for a more accurate seach. #This script was created to select from the general database the sequences #from a determinated taxID #The selection is made based on the eggNOG.species.txt #I...
gpl-2.0
8,540,147,213,056,145,000
26.071429
94
0.709103
false
2.766423
false
false
false
stuarteberg/lazyflow
tests/testOpSlicedBlockedArrayCache.py
1
30833
############################################################################### # lazyflow: data flow based lazy parallel computation framework # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/o...
lgpl-3.0
1,792,608,867,257,289,200
42.611033
144
0.635034
false
3.934286
true
false
false
cleverhans-lab/cleverhans
cleverhans_v3.1.0/cleverhans/attacks/attack.py
1
14739
""" The Attack interface. """ from abc import ABCMeta import collections import warnings import numpy as np import tensorflow as tf from cleverhans.compat import reduce_max from cleverhans.model import Model from cleverhans import utils _logger = utils.create_logger("cleverhans.attacks.attack") class Attack(objec...
mit
8,389,632,121,916,065,000
39.603306
88
0.598141
false
4.460956
false
false
false
groschovskiy/lerigos_music
Server/API/lib/gcloud/pubsub/test_connection.py
1
3594
# Copyright 2015 Google Inc. 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 applicable law or a...
apache-2.0
783,494,704,664,520,800
33.893204
74
0.621592
false
3.659878
true
false
false
silly-wacky-3-town-toon/SOURCE-COD
toontown/toon/InventoryNewNEW.py
1
61978
from direct.gui.DirectGui import * from panda3d.core import * from toontown.toonbase.ToontownBattleGlobals import * import InventoryBase from toontown.toonbase import TTLocalizer from toontown.quest import BlinkingArrows from direct.interval.IntervalGlobal import * from direct.directnotify import DirectNotifyGlobal fro...
apache-2.0
-2,707,290,639,840,474,000
45.011878
471
0.610378
false
3.655225
false
false
false
emilhetty/home-assistant
homeassistant/components/switch/acer_projector.py
2
4769
""" Use serial protocol of acer projector to obtain state of the projector. This component allows to control almost all projectors from acer using their RS232 serial communication protocol. """ import logging import re from homeassistant.components.switch import SwitchDevice from homeassistant.const import (STATE_ON,...
mit
3,087,282,693,850,367,500
30.375
76
0.577899
false
3.870942
false
false
false
sim1234/Odtwarzacz
player.py
1
11476
import os, wx, threading, vlc, shutil, time class SubProces(threading.Thread): def __init__(self, function, lag = 0, *args, **kwargs): threading.Thread.__init__(self) self.function = function self.a = args self.k = kwargs ...
gpl-3.0
-1,439,763,226,852,332,300
30.956897
105
0.392798
false
4.39257
false
false
false
igemsoftware2017/USTC-Software-2017
biohub/core/plugins/views.py
1
2681
from django.http import HttpResponse, HttpResponseRedirect from django.core.urlresolvers import reverse from rest_framework.decorators import api_view, permission_classes from rest_framework.permissions import IsAuthenticated from rest_framework.response import Response from biohub.core.plugins import plugins from bio...
gpl-3.0
-498,605,019,444,110,700
28.461538
138
0.64379
false
4.150155
false
false
false
benjamincongdon/adept
pluginManager.py
1
1190
import os class PluginManager: """ Manages which plugins are loaded. It should be noted that plugins are not objects themselves. A plugin is not an object implemented in this program. The name plugin refers to any Map, Skill, etc. """ BASE_PATH = [""] # BASE_PATH is a list version of the b...
mit
5,327,669,444,178,465,000
38.666667
91
0.594958
false
4.541985
false
false
false
lokeshjindal15/pd-gem5
configs/common/FSConfig.py
1
42298
# Copyright (c) 2010-2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functiona...
bsd-3-clause
-2,850,799,961,497,253,000
42.968815
140
0.635727
false
3.320615
true
false
false
UASLab/ImageAnalysis
scripts/lib/panda3d.py
1
9687
# routines to support generating panda3d models import subprocess import cv2 import math import numpy as np import os import scipy.spatial from . import camera from .logger import log, qlog def make_textures(src_dir, analysis_dir, image_list, resolution=512): dst_dir = os.path.join(analysis_dir, 'models') if...
mit
5,655,718,255,823,399,000
38.218623
110
0.498606
false
3.233311
false
false
false
keakon/Doodle
doodle/core/models/auth.py
1
1841
# -*- coding: utf-8 -*- from base64 import urlsafe_b64encode from os import urandom import struct import time from redis.exceptions import WatchError from doodle.config import CONFIG from doodle.core.redis_client import redis_cache_client from .base_model import SimpleModel class Auth(SimpleModel): KEY = 'Aut...
mit
9,122,313,579,081,213,000
27.206349
100
0.528419
false
3.922737
false
false
false
Henning-Klatt/Advanced-Feed-mb21
feed.py
1
4276
#! /usr/bin/python3 from urllib.request import * import os import pprint """ =============================================================== Project Name: Advanced Feed Autor: Fabian Geiselhart Erstelldatum: 13.7.15 Zuletzt Bearbeitet: 21.7.15 Typ: Python 3 RSS Feed Klasse D...
gpl-2.0
647,406,533,169,334,500
36.654867
87
0.505053
false
3.043634
false
false
false
svadams/SpinnIOTest
examples/live_packet_output_synfire_chain.py
1
2220
""" Synfirechain-like example """ #!/usr/bin/python import os import spynnaker.pyNN as p import spynnaker_external_devices_plugin.pyNN as q import numpy, pylab p.setup(timestep=1.0, min_delay = 1.0, max_delay = 144.0) nNeurons = 3 # number of neurons in each population max_delay = 50 cell_params_lif = {'cm' ...
gpl-3.0
3,820,939,209,196,637,000
26.75
106
0.631081
false
2.901961
false
false
false
samluescher/django-media-tree
media_tree/fields.py
1
4944
from media_tree import settings as media_types from media_tree import media_types from media_tree.models import FileNode from media_tree.widgets import FileNodeForeignKeyRawIdWidget from media_tree.forms import FileNodeChoiceField, LEVEL_INDICATOR from django.contrib.admin.widgets import ForeignKeyRawIdWidget from djan...
bsd-3-clause
6,917,674,347,013,130,000
47
178
0.687298
false
4.144174
false
false
false
pchmieli/h2o-3
h2o-py/tests/testdir_algos/deeplearning/pyunit_mean_residual_deviance_deeplearning.py
1
1391
import sys, os sys.path.insert(1, os.path.join("..","..")) import h2o from tests import pyunit_utils def deeplearning_mean_residual_deviance(): cars = h2o.import_file(path=pyunit_utils.locate("smalldata/junit/cars_20mpg.csv")) s = cars.runif() train = cars[s > 0.2] valid = cars[s <= 0.2] predictors = ["dis...
apache-2.0
8,540,633,950,018,472,000
43.870968
119
0.650611
false
3.327751
false
false
false
demisto/content
Packs/FortiSIEM/Integrations/FortiSIEM/FortiSIEM.py
1
25204
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests import json import time import re from xml.dom.minidom import Node, Document, parseString # disable insecure warnings requests.packages.urllib3.disable_warnings() USERNAME = demisto.params()['credential...
mit
2,183,178,433,927,649,000
33.620879
120
0.614268
false
3.740021
false
false
false
johncadigan/CategoryGenerator
js_hyponym_trees.py
1
3514
# -*- coding: utf-8 -*- import sys, os, re from uuid import uuid4 from tree import Tree from hyponym_generator import HyponymGenerator CURRENT_DIR = os.path.dirname(__file__) ##### Default Settings DATA_DIR = 'data' COUNTS_FILE = 'word-totals.txt' WHITE_LIST = 'whitelist.csv' DEFAULT_LIMIT = 50000 DEFAULT_DEPTH = ...
mit
-1,125,297,495,379,044,000
32.788462
257
0.643142
false
2.988095
false
false
false
boomsbloom/dtm-fmri
DTM/for_gensim/lib/python2.7/site-packages/matplotlib/backends/backend_webagg_core.py
1
17433
""" Displays Agg images in the browser, with interactivity """ # The WebAgg backend is divided into two modules: # # - `backend_webagg_core.py` contains code necessary to embed a WebAgg # plot inside of a web application, and communicate in an abstract # way over a web socket. # # - `backend_webagg.py` contains a c...
mit
708,698,893,400,165,100
32.460653
78
0.555097
false
3.932551
false
false
false
AtsushiSakai/PythonRobotics
ArmNavigation/n_joint_arm_3d/NLinkArm3d.py
1
6820
""" Class of n-link arm in 3D Author: Takayuki Murooka (takayuki5168) """ import numpy as np import math from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt class Link: def __init__(self, dh_params): self.dh_params_ = dh_params def transformation_matrix(self): theta = self...
mit
-3,614,091,177,848,767,500
31.018779
80
0.495161
false
3.142857
false
false
false
ezralanglois/arachnid
arachnid/core/image/ndimage_filter.py
1
24342
''' Filter 2D or 3D images This module contains both linear Fourier-accelerated filters as well as ramp correction and histogram equalization. The filtering code is performed using Fortran accelerated code from the SPIDER library. SPIDER: http://www.wadsworth.org/spider_doc/spider/docs/spider.html .. Created on Ju...
gpl-2.0
3,767,861,443,594,434,600
30.287918
153
0.560061
false
3.385065
false
false
false
edublancas/sklearn-evaluation
docs/source/nbs/train.py
1
2062
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.5' # jupytext_version: 1.8.0 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # + import importlib from sklearn.datasets import load...
mit
-8,255,414,441,245,247,000
20.479167
90
0.642095
false
2.620076
true
false
false
MaxTyutyunnikov/lino
obsolete/ui_old/base.py
1
14891
## Copyright 2009-2012 Luc Saffre ## This file is part of the Lino project. ## Lino 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
-6,655,749,544,352,117,000
32.462921
96
0.542878
false
4.137538
false
false
false
LaurentClaessens/mazhe
src_yanntricks/yanntricksQOBAooZZZOrl.py
1
1727
from yanntricks import * def QOBAooZZZOrl(): pspicts, fig = MultiplePictures("QOBAooZZZOrl", 3) pspicts[0].mother.caption = u"La grande surface." pspicts[1].mother.caption = u"La surface à soustraire." pspicts[2].mother.caption = u"La surface entre les deux fonctions." for psp in pspicts: ...
gpl-3.0
1,013,303,477,733,565,000
29.280702
71
0.64774
false
2.667697
false
false
false
bulatb/yuno
yuno/core/cli.py
1
1759
"""Command-line interface for Yuno. """ import argparse import sys DESCRIPTION = 'Compiler! Y U NO compile???' USAGE ="yuno.py [-h|--help] [--with key value [value ...]] command" HELP_COMMANDS = ('help', '-h', '--help') def build_arg_parser(): parser = argparse.ArgumentParser( usage=USAGE, add_help=Fa...
mit
-6,863,297,730,427,194,000
27.370968
79
0.592382
false
3.758547
false
false
false
kenrobbins/tardyrush
tardyrush/models/inputs.py
1
2735
from wtforms.widgets import HTMLString from datetime import datetime, timedelta class MatchDateTimeWidget(object): MonthOptions = [ ( 1, u'January'), ( 2, u'February'), ( 3, u'March'), ( 4, u'April'), ( 5, u'May'), ( 6, u'June'), (...
mit
5,998,077,320,386,124,000
35.959459
85
0.483729
false
3.397516
false
false
false
migueldiascosta/pymatgen
pymatgen/symmetry/analyzer.py
1
53664
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals """ An interface to the excellent spglib library by Atsushi Togo (http://spglib.sourceforge.net/) for pymatgen. v1.0 - Now works with both ordered and disorde...
mit
-952,014,178,414,152,000
38.810831
83
0.511143
false
4.006869
true
false
false
hizni/vod-systems
vod_systems/vod/helper_views.py
1
1152
from django.contrib.auth.models import User from django.core import serializers from django.http import JsonResponse, HttpResponse from django.apps import apps from vod.models import Data_Cleansing_Template, Data_Cleansing_Template_Field def validate_username(request): username = request.GET.get('username', None)...
mit
4,287,355,798,069,445,000
35
106
0.725694
false
3.764706
false
false
false
twilight327426371/Leaf
leaf/thing/base.py
1
5496
from leaf.model import Entry, Leaderboard from leaf import db class EntryThingTrait(object): def find(self, lid, eid): data = db.query_one('SELECT eid, lid, score FROM entries WHERE lid=%s AND eid=%s', (lid, eid)) if data: return self._load(data) def find_by_score(self, leaderbo...
mit
-5,662,479,088,489,540,000
36.643836
143
0.57933
false
3.52082
false
false
false
libracore/erpnext
erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py
1
37047
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # -*- coding: utf-8 -*- from __future__ import unicode_literals import frappe, erpnext from frappe.utils import cint, cstr, formatdate, flt, getdate, nowdate from frappe import _, throw import...
gpl-3.0
3,933,757,348,405,595,600
38.792696
194
0.69671
false
3.18
false
false
false
PyOCL/oclInspector
utils.py
1
2703
import os import pyopencl as cl def cls(): os.system('cls' if os.name=='nt' else 'clear') def print_info(data): for row in data: if type(row[2]) == list: print("{0:<2} {1:<40}: {2: >40}".format(row[0], row[1], row[2][0])) for i in range(1, len(row[2])): print("{...
mit
-8,132,973,391,771,207,000
27.452632
79
0.54384
false
3.1875
false
false
false
portante/swift-stress
swift-load.py
1
24973
#!/usr/bin/env python # Copyright (c) 2012-2013 Red Hat, 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 applicab...
apache-2.0
-8,895,396,047,292,570,000
32.838753
173
0.566732
false
3.41068
false
false
false
htmfilho/boust
website/views/contact.py
1
1814
import os import json import requests from django.contrib.auth.models import User from django.shortcuts import render, redirect from django.urls import reverse from django.core.exceptions import ObjectDoesNotExist from django.views.decorators.http import require_POST from website.forms.contact_form import ContactForm...
gpl-3.0
9,206,573,497,093,459,000
30.275862
78
0.672547
false
3.926407
false
false
false
arctelix/django-avatar
avatar/util.py
1
4090
import hashlib import urllib import urlparse from django.conf import settings from django.core.cache import cache from django.utils.encoding import smart_str from django.template.defaultfilters import slugify try: from django.contrib.auth import get_user_model except ImportError: from django.contrib.auth.mode...
bsd-3-clause
415,745,575,327,464,960
33.661017
103
0.637164
false
3.559617
false
false
false
TravelModellingGroup/TMGToolbox
TMGToolbox/src/network_editing/NCS11/validation/check_link_length.py
1
5304
''' Copyright 2014 Travel Modelling Group, Department of Civil Engineering, University of Toronto This file is part of the TMG Toolbox. The TMG Toolbox 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 Fou...
gpl-3.0
1,545,393,066,971,559,200
39.496183
167
0.503582
false
4.423686
false
false
false
project-asap/IReS-Platform
asap-tools/imr-code/imr_workflow_spark/operators/imr_classification.py
1
8617
""" Classification in Spark @author: Chris Mantas @contact: the1pro@gmail.com @since: Created on 2016-02-12 @todo: custom formats, break up big lines @license: http://www.apache.org/licenses/LICENSE-2.0 Apache License """ from pyspark.mllib.classification import \ LogisticRegressionWithLBFGS, LogisticRegressionMod...
apache-2.0
-1,961,473,829,502,099,500
35.512712
79
0.576071
false
4.319298
false
false
false
bejmy/backend
bejmy/accounts/admin.py
1
1047
from django.contrib import admin from bejmy.accounts.models import Account from bejmy.transactions.models import Transaction from bejmy.transactions.admin import TransactionAdminBase class TransactionAdmin(TransactionAdminBase, admin.TabularInline): model = Transaction fk_name = 'source' def has_change_...
mit
2,029,437,985,762,309,000
33.9
87
0.704871
false
3.996183
false
false
false
rihardsk/LatvianStemmer
LatvianStemmer.py
1
4543
__author__ = 'rihards' import fileinput ''' Original Java code can be found in https://github.com/apache/lucene-solr Ported to Python by Rihards Krišlauks with minor modifications * Light stemmer for Latvian. * <p> * This is a light version of the algorithm in Karlis Kreslin's PhD thesis * <i>A stemming algorit...
apache-2.0
7,072,174,151,552,855,000
25.767857
104
0.530798
false
2.777641
false
false
false
fbacchella/ovirtcmd
samples/single_node_cluster.py
1
3574
import ovlib from ovlib.eventslib import event_waiter, EventsCode mac_pool = context.macpools.get("Default") try: dc = context.datacenters.get(host_name) except ovlib.OVLibErrorNotFound: dc = context.datacenters.add(data_center={'name': host_name, 'local': True, 'storage_format': 'V4', 'mac_pool': mac_pool}) ...
apache-2.0
4,707,870,556,535,650,000
38.274725
174
0.627029
false
3.062554
false
false
false
openstack/manila-ui
manila_ui/dashboards/admin/security_services/tables.py
1
2419
# 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 t...
apache-2.0
7,921,727,310,095,102,000
33.557143
77
0.667631
false
4.319643
false
false
false
brunommauricio/domusdome
domusdomegui.py
1
11378
from tkinter import * from tkinter import ttk import serial # # Data describing rooms blueprint # ROOMS = 3 # total number of defined rooms FLOOR_OFFSET = ('2c', '1c', 0)  # displace floor for easier viewing FLOOR_COLORS = {} # colors for various levels, walls and rooms FLOOR_SHAPE = {} # polygon coordinates for basic...
mit
4,360,813,686,330,452,500
33.139159
91
0.564888
false
2.437384
true
false
false
transtats/transtats
transtats/settings/dev.py
1
2909
""" Django settings for transtats project - development env. Generated by 'django-admin startproject' using Django 1.9.5. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/setting...
apache-2.0
4,801,183,583,665,614,000
26.443396
73
0.504297
false
3.868351
false
false
false
linaro-technologies/jobserv
runner/jobserv_runner/jobserv.py
1
5624
# Copyright (C) 2017 Linaro Limited # Author: Andy Doan <andy.doan@linaro.org> import datetime import json import logging import mimetypes import mmap import os import time import urllib.error import urllib.request import urllib.parse from http.client import HTTPException from multiprocessing.pool import ThreadPool ...
agpl-3.0
-5,419,827,009,303,175,000
32.676647
78
0.538585
false
3.883978
false
false
false
uwescience/myria-python
myria/utility/cloudpickle.py
1
27067
""" This class is defined to override standard pickle functionality The goals of it follow: -Serialize lambdas and nested functions to compiled byte code -Deal with main module correctly -Deal with other non-serializable objects It does not include an unpickler, as standard python unpickling suffices. This module wa...
bsd-3-clause
-4,488,458,335,224,512,000
31.968331
92
0.555584
false
4.255818
false
false
false
BAMLCodeJam/codejam
watson.py
1
2082
__author__ = 'Maria' import constants from watson_developer_cloud import ConversationV1 import pprint #API: https://www.ibm.com/watson/developercloud/conversation/api/v1/ class Watson(object): def __init__(self): self.conversation = ConversationV1( username=constants.WATSON['username'], ...
mit
5,599,706,919,934,193,000
32.047619
134
0.679155
false
3.602076
false
false
false
google/or-tools
examples/contrib/photo_problem.py
1
4408
# Copyright 2010 Hakan Kjellerstrand hakank@gmail.com # # 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 ...
apache-2.0
7,954,320,931,995,353,000
27.623377
79
0.631579
false
3.073919
false
false
false
adviti/melange
thirdparty/google_appengine/google/appengine/ext/mapreduce/shuffler.py
1
16428
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
-6,926,973,582,059,493,000
28.6
80
0.66618
false
4.017608
false
false
false
big-pegasus/spark
python/pyspark/shell.py
1
3308
# # 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 us...
apache-2.0
-6,689,565,431,194,000,000
31.752475
90
0.724607
false
3.759091
false
false
false
dcolombo/astrodendro
astrodendro/io/util.py
4
6485
import numpy as np from .. import six from astropy.utils.console import ProgressBar from astropy import log def parse_newick(string): items = {} # Find maximum level current_level = 0 max_level = 0 log.debug('String loading...') for i, c in enumerate(string): if c == '(': ...
mit
-8,737,765,923,606,339,000
32.601036
99
0.581187
false
4.005559
false
false
false
animekita/selvbetjening
selvbetjening/core/events/migrations/0020_auto__del_field_optiongroup_package_price.py
1
18313
# -*- 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): # Deleting field 'OptionGroup.package_price' db.delete_column(u'events_optiongroup', 'package_price') ...
mit
1,353,266,833,820,044,800
83.396313
235
0.557691
false
3.655289
false
false
false
1npo/scripts
wsched.py
1
3520
#!/usr/bin/env python # -*- coding: utf-8 -*- # # wsched.py -- a little script to extract my hours from the brutally hard-to-read # schedule spreadsheet at work. # # sample output: # # ner ~/dev/prj/scripts % python wsched.py ~/schedule.xls 1 # +-----------+-------+-----------+ # | Day | Date | Schedule | # +--...
mit
5,840,252,790,106,837,000
33.851485
91
0.615909
false
3.404255
false
false
false
glenngillen/dotfiles
.vscode/extensions/ms-python.python-2021.5.842923320/pythonFiles/lib/jedilsp/pygls/lsp/types/general_messages.py
1
12129
############################################################################ # Original work Copyright 2017 Palantir Technologies, Inc. # # Original work licensed under the MIT License. # # See ThirdPartyNotices.txt in the project root for license information. # # All modifi...
mit
4,014,441,169,445,041,000
53.882353
110
0.618023
false
5.737465
false
false
false
aljim/deploymentmanager-samples
community/cloud-foundation/templates/target_proxy/target_proxy.py
1
4904
# Copyright 2018 Google Inc. 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 applicable law or a...
apache-2.0
2,226,335,172,747,412,700
28.190476
79
0.613989
false
4.059603
false
false
false
rightscale/cloud-init
cloudinit/config/cc_emit_upstart.py
1
2323
# vi: ts=4 expandtab # # Copyright (C) 2009-2011 Canonical Ltd. # Copyright (C) 2012 Hewlett-Packard Development Company, L.P. # # Author: Scott Moser <scott.moser@canonical.com> # Author: Juerg Haefliger <juerg.haefliger@hp.com> # # This program is free software: you can redistribute it and/or modify # ...
gpl-3.0
-3,235,839,240,728,496,000
32.185714
76
0.643134
false
3.568356
false
false
false
AVSystem/avs_commons
tools/check_license_headers.py
1
5172
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright 2021 AVSystem <avsystem@avsystem.com> # # 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/LICEN...
apache-2.0
-1,465,316,927,961,670,100
32.803922
98
0.58082
false
4.215159
false
false
false
nicmcd/ratesim
batch/search.py
1
2453
#!/usr/bin/env python3 import argparse import math import os import psutil import re import shutil import sys import taskrun from common import * from penalty import * from stats import * def main(args): if args.verbose: print(args) # make batch directory assert os.path.isdir(args.batch) # keep track ...
bsd-3-clause
-7,316,754,538,074,800,000
26.875
70
0.590298
false
3.699849
false
false
false
mov-q/dumpy
discariche/model/comune.py
1
1261
"""Person model""" from sqlalchemy import Column, UniqueConstraint, ForeignKey from sqlalchemy import schema as saschema from sqlalchemy.types import Integer, String, Unicode, Float, UnicodeText, Date, SmallInteger from discariche.model.meta import Base class Comune(Base): __tablename__ = "comune" id = Colum...
gpl-3.0
6,646,260,766,242,527,000
35.028571
93
0.633624
false
3.891975
false
false
false