repo_name
stringlengths
5
100
path
stringlengths
4
299
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1.03M
license
stringclasses
15 values
hash
int64
-9,223,351,895,964,839,000
9,223,297,778B
line_mean
float64
3.17
100
line_max
int64
7
1k
alpha_frac
float64
0.25
0.98
autogenerated
bool
1 class
akesandgren/easybuild-easyblocks
easybuild/easyblocks/generic/mesonninja.py
2
4665
## # Copyright 2018-2021 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://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
-8,218,191,165,245,638,000
36.620968
99
0.621008
false
nikesh-mahalka/nova
nova/virt/hyperv/vmutils.py
5
35501
# Copyright (c) 2010 Cloud.com, Inc # Copyright 2012 Cloudbase Solutions Srl / Pedro Navarro Perez # 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 # # ...
apache-2.0
-3,523,847,542,262,560,000
41.823884
79
0.574322
false
brutasse/graphite-cyanite
cyanite.py
1
3875
import itertools import time try: from graphite_api.intervals import Interval, IntervalSet from graphite_api.node import LeafNode, BranchNode except ImportError: from graphite.intervals import Interval, IntervalSet from graphite.node import LeafNode, BranchNode import requests def chunk(nodelist, le...
bsd-3-clause
-7,961,674,116,645,386,000
29.753968
74
0.531097
false
ezequielpereira/Time-Line
libs/wx/lib/stattext.py
6
5824
#---------------------------------------------------------------------- # Name: wx.lib.stattext # Purpose: A generic wxGenStaticText class. Using this should # eliminate some of the platform differences in wxStaticText, # such as background colours and mouse sensitivity. # # Author...
gpl-3.0
-7,898,543,669,757,521,000
30.652174
87
0.547218
false
NicovincX2/Python-3.5
Probabilités/Processus stochastique/parameters.py
1
4286
# -*- coding: utf-8 -*- import math import numpy import random import decimal import scipy.linalg import numpy.random as nrand import matplotlib.pyplot as plt class ModelParameters: """ Encapsulates model parameters """ def __init__(self, all_s0, all_time, all_delta, all_sigma, gbm_...
gpl-3.0
-1,243,897,321,032,333,800
34.716667
113
0.589827
false
atagar/ReviewBoard
contrib/tools/templates/extensions/extension/extension.py
2
1347
# {{extension_name}} Extension for Review Board. from django.conf import settings from django.conf.urls.defaults import patterns, include from reviewboard.extensions.base import Extension {%- if dashboard_link is not none %} from reviewboard.extensions.hooks import DashboardHook, URLHook {% endif %} {%- if dashboard_l...
mit
7,088,152,217,563,539,000
34.447368
71
0.610245
false
yanheven/glance
glance/common/rpc.py
5
9265
# Copyright 2013 Red Hat, 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...
apache-2.0
7,369,825,429,521,806,000
32.207885
79
0.575175
false
dantebarba/docker-media-server
plex/IPTV.bundle/Contents/Code/locale_patch.py
4
3262
# -*- coding: utf-8 -*- """ Localization patch for Plex Media Server channels https://bitbucket.org/czukowski/plex-locale-patch/ Copyright: 2015, Korney Czukowski License: MIT """ languages = list() # Translate function override to avoid unicode decoding bug. def L(string): initialize_locale() ...
gpl-3.0
-667,973,978,703,167,900
36.505747
205
0.644083
false
raphv/cardmapper
src/cardapp/migrations/0002_date fix.py
1
1361
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-06-23 09:54 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('cardapp', '0001_initial'), ] operations = [ migrations.AlterField( ...
mit
-6,418,556,618,558,211,000
29.244444
73
0.559882
false
portnov/sverchok
utils/text_editor_submenu.py
3
2474
# ##### 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
-4,420,080,900,627,678,700
28.105882
74
0.681892
false
ipashchenko/ml4vs
ml4vs/svm_final.py
1
4272
import os import numpy as np from sklearn.cross_validation import (StratifiedShuffleSplit, StratifiedKFold, cross_val_score) from sklearn.pipeline import Pipeline from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import Imputer from sklearn.svm import SVC ...
mit
1,784,097,725,569,974,800
38.555556
94
0.606742
false
Tithen-Firion/youtube-dl
youtube_dl/extractor/amp.py
3
3633
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, parse_iso8601, mimetype2ext, determine_ext, ExtractorError, ) class AMPIE(InfoExtractor): # parse Akamai Adaptive Media Player feed def _extract_feed_info(self, url...
unlicense
1,595,772,301,398,573,300
38.064516
106
0.527663
false
paulojamorim/invesalius3
invesalius/gui/task_navigator.py
5
98510
#-------------------------------------------------------------------------- # Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas # Copyright: (C) 2001 Centro de Pesquisas Renato Archer # Homepage: http://www.softwarepublico.gov.br # Contact: invesalius@cti.gov.br # License: GNU ...
gpl-2.0
275,369,215,335,656,960
44.27114
194
0.588407
false
pytroll/satpy
satpy/tests/writer_tests/test_utils.py
1
1241
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2019 Satpy developers # # This file is part of satpy. # # satpy 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
2,265,708,713,553,989,400
35.5
79
0.644641
false
okor/thumbor
tests/handlers/test_upload_api.py
3
14343
#!/usr/bin/python # -*- coding: utf-8 -*- # thumbor imaging service # https://github.com/thumbor/thumbor/wiki # Licensed under the MIT license: # http://www.opensource.org/licenses/mit-license # Copyright (c) 2011 globo.com thumbor@googlegroups.com from shutil import rmtree import tempfile import re from preggy imp...
mit
5,535,279,842,212,091,000
37.764865
120
0.650003
false
EmreAtes/spack
var/spack/repos/builtin/packages/r-cellranger/package.py
5
1774
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
4,760,725,381,321,043,000
44.487179
79
0.673619
false
timj/scons
test/File.py
1
2021
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
mit
-4,071,899,227,670,189,600
26.310811
73
0.70856
false
gx1997/chrome-loongson
chrome/test/gpu/generate_webgl_conformance_test_list.py
6
3335
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Auto-generates the WebGL conformance test list header file. Parses the WebGL conformance test *.txt file, which contains a list...
bsd-3-clause
-1,629,094,933,993,838,800
29.87963
77
0.652774
false
pdogg/ctfmanager
ctfmanager/settings.py
1
5269
# Django settings for ctfmanager project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. ...
bsd-3-clause
-4,864,696,140,094,106,000
34.126667
120
0.687797
false
aacole/ursula-monitoring
sensu/plugins/metrics-process-usage.py
3
3957
#!/usr/bin/env python # # metrics-process-usage.py # # PLATFORMS: # Linux # # DEPENDENCIES: # Python 2.7+ (untested on Python3, should work though) # Python module: psutil https://pypi.python.org/pypi/psutil # # USAGE: # # metrics-process-usage.py -n <process_name> -w <cpu_warning_pct> -c <cpu_critical_pct> -W <m...
apache-2.0
4,757,682,871,734,637,000
31.434426
173
0.664392
false
johanherman/arteria-packs
actions/lib/check_summary_report_modtime.py
2
3009
#!/usr/bin/python """ Usage: check_summary_report_modtime.py </path/with/runfolders> <summary report time age in seconds> This script will search a the give root directory for runfolder and return a json array of all runfolders which which have a summary report file that is older than the given time in seconds. """ ...
mit
-2,863,697,152,162,887,700
37.088608
121
0.69126
false
imouren/django-wiki
wiki/plugins/attachments/models.py
13
7440
# -*- coding: utf-8 -*- from __future__ import print_function, unicode_literals from __future__ import absolute_import import os.path from django.db import models from django.utils.translation import ugettext from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import python_2_unicode_com...
gpl-3.0
3,964,162,408,002,230,000
32.818182
104
0.619624
false
DocketAlarm/pacer-api
api/client.py
1
11985
import pprint import base64 import urllib.request, urllib.parse, urllib.error import urllib.request, urllib.error, urllib.parse import json import shelve __version__ = '1.1' ''' Docket Alarm Python API Client Example Usage: token = call_api("login", "POST", username="user@example.com", ...
apache-2.0
-458,155,346,470,452,860
29.733333
86
0.651481
false
glennhickey/hal
liftover/halLiftoverStatus.py
1
20969
#!/usr/bin/env python3 #Copyright (C) 2013 by Ngan Nguyen (nknguyen@soe.ucsc.edu) # Copyright (C) 2012-2019 by UCSC Computational Genomics Lab # #Released under the MIT license, see LICENSE.txtimport unittest ''' Check liftover status Input: bed_file (1 entry per element, e.g 1 line per gene) hal_file q...
mit
-4,100,937,656,637,816,300
35.091222
149
0.549049
false
spennihana/h2o-3
h2o-py/tests/testdir_parser/pyunit_separator.py
6
4116
from builtins import str import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils def separator_test(): """Test parsing of csv files having different separator characters.""" # Test tab separated files by giving separator argument path_tab = "smalldata/parser/tabs.tsv" tab_test...
apache-2.0
7,092,311,872,023,976,000
59.529412
120
0.706997
false
abligh/xen4.2-minideb
tools/xm-test/lib/XmTestLib/Xm.py
42
6036
#!/usr/bin/python """ Copyright (C) International Business Machines Corp., 2005 Author: Dan Smith <danms@us.ibm.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; under version 2 of the Licen...
gpl-2.0
7,654,133,770,707,412,000
23.636735
74
0.571902
false
KDB2/veusz
veusz/utils/formatting.py
3
7908
# Copyright (C) 2010 Jeremy S. Sanders # Email: Jeremy Sanders <jeremy@jeremysanders.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # ...
gpl-2.0
-4,821,300,512,050,054,000
31.146341
79
0.570182
false
yaoxuanw007/forfun
leetcode/python/textJustification.py
1
1833
# https://oj.leetcode.com/problems/text-justification/ class Solution: # @param words, a list of strings # @param L, an integer # @return a list of strings def fullJustify(self, words, L): count, line, lines = 0, [], [] for word in words: count += len(word) if count > L: count -= le...
mit
-2,375,941,334,285,857,000
25.565217
88
0.585379
false
strogo/djpcms
djpcms/utils/unipath/test.py
1
19686
#!/usr/bin/env python """Unit tests for unipath.py and unipath_purist.py Environment variables: DUMP : List the contents of test direcories after each test. NO_CLEANUP : Don't delete test directories. (These are not command-line args due to the difficulty of merging my args with unittest's.) IMPORTANT: Tests ...
bsd-3-clause
8,344,402,886,396,129,000
31.974874
102
0.5414
false
jorik041/CrackMapExec
cme/modules/bloodhound.py
1
6435
from cme.helpers.powershell import * from cme.helpers.misc import validate_ntlm from cme.helpers.logger import write_log from sys import exit class CMEModule: ''' Executes the BloodHound recon script on the target and retreives the results onto the attackers' machine 2 supported modes : ...
bsd-2-clause
-7,558,939,601,482,193,000
54.482759
196
0.605905
false
shanot/imp
modules/em/test/test_pad_margin.py
2
1482
from __future__ import print_function import os import IMP import IMP.em import IMP.test import IMP.core class Tests(IMP.test.TestCase): """Class to test EM correlation restraint""" def load_density_maps(self): mrw = IMP.em.MRCReaderWriter() self.scene = IMP.em.read_map( self.get...
gpl-3.0
-3,142,320,444,239,026,700
28.058824
74
0.593117
false
tseaver/gcloud-python
spanner/google/cloud/spanner_v1/snapshot.py
1
17350
# Copyright 2016 Google LLC All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
apache-2.0
5,522,960,487,971,635,000
36.964989
123
0.620288
false
vadyur/script.media.aggregator
movieapi.py
1
34003
# -*- coding: utf-8 -*- import log from log import debug, print_tb import json, re, base, filesystem import urllib2, requests from bs4 import BeautifulSoup user_agent = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.100' def copy_files(src, dst, pattern): from backg...
gpl-3.0
-896,833,385,007,039,600
24.823933
174
0.631475
false
opalytics/opalytics-ticdat
ticdat/lingo.py
1
14369
from ticdat.utils import verify, containerish, stringish, find_duplicates_from_dict_ticdat from ticdat.utils import find_case_space_duplicates import ticdat.utils as tu from ticdat.ticdatfactory import TicDatFactory import os, subprocess, inspect, time, uuid, shutil from collections import defaultdict from ticdat.jsont...
bsd-2-clause
-1,763,562,608,612,621,800
41.895522
125
0.608393
false
stevemontana1980/coala
coalib/bearlib/languages/documentation/DocumentationExtraction.py
2
11010
import re from coalib.bearlib.languages.documentation.DocstyleDefinition import ( DocstyleDefinition) from coalib.bearlib.languages.documentation.DocumentationComment import ( DocumentationComment) from coalib.results.TextRange import TextRange def _extract_doc_comment_simple(content, line, column, markers):...
agpl-3.0
6,445,702,230,881,130,000
37.904594
79
0.607902
false
bsmedberg/socorro
socorro/processor/support_classifiers.py
1
14965
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """ This module creates the classfications.support part of the processed crash. All the support classifcation rules live...
mpl-2.0
4,439,334,082,690,474,000
42.376812
79
0.522285
false
guedou/scapy-python2.5
scapy/asn1/mib.py
6
28459
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## Modified by Maxence Tury <maxence.tury@ssi.gouv.fr> ## This program is published under a GPLv2 license """ Management Information Base (MIB) parsing """ import re from ...
gpl-2.0
3,225,902,543,449,037,300
49.015817
110
0.398995
false
teury/django-friendship
friendship/tests/tests.py
2
21163
import os from django.contrib.auth.models import User from django.core.cache import cache from django.core.exceptions import ValidationError from django.db import IntegrityError from django.core.urlresolvers import reverse from django.test import TestCase from friendship.exceptions import AlreadyExistsError from frien...
bsd-3-clause
7,800,063,079,491,069,000
43.460084
126
0.66758
false
blueboxgroup/neutron
neutron/tests/unit/test_router_processing_queue.py
27
4074
# Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 requir...
apache-2.0
1,159,734,980,378,708,200
38.941176
79
0.678203
false
maithreyee/python-koans
python2/koans/about_asserts.py
8
2283
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutAsserts(Koan): def test_assert_truth(self): """ We shall contemplate truth by testing reality, via asserts. """ # Confused? This video should help: # # http://bit.ly/about_assert...
mit
-2,227,563,967,843,542,800
27.898734
83
0.573368
false
uw-it-aca/mdot-rest
mdot_rest/migrations/0011_auto_20200528_1858.py
1
1540
# Generated by Django 2.1.15 on 2020-05-28 18:58 from django.db import migrations, models import django.db.models.deletion import mdot_rest.optimizedpngfield class Migration(migrations.Migration): dependencies = [ ('mdot_rest', '0010_auto_20150917_2154'), ] operations = [ migrations.Alt...
apache-2.0
7,037,338,330,995,369,000
34.813953
139
0.601299
false
kcarnold/autograd
examples/sinusoid.py
3
1098
from __future__ import absolute_import from __future__ import print_function import autograd.numpy as np import matplotlib.pyplot as plt from autograd import grad from builtins import range, map def fun(x): return np.sin(x) d_fun = grad(fun) # First derivative dd_fun = grad(d_fun) # Second derivative x = np.l...
mit
-1,790,430,366,374,978,300
23.4
79
0.619308
false
DOAJ/doaj
portality/migrate/st2cl/cluster2.py
1
7506
from lxml import etree from copy import deepcopy import csv IN = "/home/richard/Dropbox/Documents/DOAJ/data/journals" OUT = "/home/richard/tmp/doaj/equiv.csv" def extract_issns(element): issn = j.find("issn").text nissn = j.find("nextIssn").text pissn = j.find("previousIssn").text eissn = j.find...
apache-2.0
-4,878,603,315,626,738,000
26.903346
134
0.593125
false
android-ia/platform_external_chromium_org
mojo/public/tools/bindings/generators/mojom_java_generator.py
25
17838
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates java source files from a mojom.Module.""" import argparse import ast import contextlib import os import re import shutil import tempfile import...
bsd-3-clause
5,533,580,926,936,481,000
34.819277
80
0.693127
false
czervenka/gapi
gapi/api/reports.py
1
2192
# Copyright 2013 Lukas Marek <lukas.marek@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 o...
apache-2.0
955,231,716,949,358,300
32.212121
101
0.645529
false
sechacking/MITMf
core/ferretng/SSLServerConnection.py
28
4133
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # 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...
gpl-3.0
8,449,833,640,115,345,000
41.608247
146
0.649891
false
mintuhouse/shotfactory
build/lib.linux-x86_64-2.6/shotfactory04/gui/linux/iceweasel.py
2
1088
# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl <johann@browsershots.org> # # Browsershots 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 ...
gpl-3.0
-2,403,643,058,900,670,500
31.969697
70
0.724265
false
galaxyproject/tools-iuc
data_managers/data_manager_fetch_ncbi_taxonomy/data_manager/data_manager.py
9
4462
import argparse import datetime import json import os import shutil import tarfile import zipfile from urllib.request import Request, urlopen def url_download(url, workdir): file_path = os.path.join(workdir, 'download.dat') if not os.path.exists(workdir): os.makedirs(workdir) src = None dst = ...
mit
5,852,440,613,730,094,000
32.298507
143
0.597042
false
django-ch/olympus-project
src/migrations/versions/8d62dbc19154_.py
1
1096
"""empty message Revision ID: 8d62dbc19154 Revises: 19e3c7b51037 Create Date: 2017-03-04 20:18:51.833788 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '8d62dbc19154' down_revision = '19e3c7b51037' branch_labels = None depends_on = None def upgrade(): # ...
gpl-2.0
2,678,023,165,994,155,500
31.235294
100
0.666971
false
zbarge/zeex
zeex/core/ui/project/main_ui.py
1
6501
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'C:/Users/Zeke/Google Drive/dev/python/zeex/zeex/core/ui/project/main.ui' # # Created: Mon Nov 13 22:57:18 2017 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import ...
mit
-8,549,020,228,185,598,000
62.116505
138
0.742809
false
MicrosoftGenomics/WarpedLMM
warpedlmm/util/transformations.py
2
1592
import numpy as np _exp_lim_val = np.finfo(np.float64).max _lim_val = 36.0 epsilon = np.finfo(np.float64).resolution class Exponent(object): def f(self, x): return np.where(x<_lim_val, np.where(x>-_lim_val, np.exp(x), np.exp(-_lim_val)), np.exp(_lim_val)) def finv(self, x): return np.log(x) ...
apache-2.0
-3,212,006,392,889,784,300
27.428571
106
0.535804
false
timrae/anki
oldanki/errors.py
20
1139
# -*- coding: utf-8 -*- # Copyright: Damien Elmes <oldanki@ichi2.net> # License: GNU GPL, version 3 or later; http://www.gnu.org/copyleft/gpl.html """\ Errors ============================== """ __docformat__ = 'restructuredtext' class Error(Exception): def __init__(self, message="", **data): self.data = d...
agpl-3.0
5,725,692,757,608,717,000
22.244898
76
0.628622
false
jankim/deepnl
deepnl/embeddings.py
1
4634
# -*- coding: utf-8 -*- """ Load word embeddings from different representations. """ import os import numpy as np import logging from itertools import izip # local from word_dictionary import WordDictionary # ---------------------------------------------------------------------- class Plain(object): @classmet...
gpl-3.0
7,357,621,401,348,060,000
30.100671
87
0.528917
false
pajlada/pajbot
pajbot/modules/basic/emotes.py
2
10421
import logging from pajbot.managers.emote import BTTVEmoteManager, FFZEmoteManager, TwitchEmoteManager from pajbot.models.command import Command from pajbot.models.command import CommandExample from pajbot.modules import BaseModule from pajbot.modules import ModuleSetting from pajbot.modules.basic import BasicCommands...
mit
-703,860,394,121,829,100
42.60251
211
0.570579
false
edcast-inc/edx-platform-edcast
lms/djangoapps/teams/serializers.py
23
3821
"""Defines serializers used by the Team API.""" from django.contrib.auth.models import User from rest_framework import serializers from openedx.core.lib.api.serializers import CollapsedReferenceSerializer from openedx.core.lib.api.fields import ExpandableField from .models import CourseTeam, CourseTeamMembership from ...
agpl-3.0
8,853,858,381,622,441,000
32.226087
96
0.622088
false
prasanna08/oppia
core/storage/feedback/gae_models.py
1
28683
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
907,305,869,170,521,900
35.632184
80
0.627654
false
BukGet/devfiles
jarparse.py
1
1481
#!/usr/bin/env python from zipfile import ZipFile from cStringIO import StringIO import yaml import sys def find_plugin_yaml(dataobj): ''' ''' yml = False try: # The first thing we are going to try to do is create a ZipFile # object with the StringIO data that we...
mit
4,808,092,771,281,465,000
36.05
79
0.518569
false
jheretic/operator
plsync/planetlab/session.py
6
5328
#!/usr/bin/env python import ConfigParser import getpass import os import sys import xmlrpclib import ssl API_URL = "https://boot.planet-lab.org/PLCAPI/" PLC_CONFIG="/etc/planetlab.conf" SESSION_DIR=os.environ['HOME'] + "/.ssh" SESSION_FILE=SESSION_DIR + "/mlab_session" api = None def setup_global_session(url, debu...
apache-2.0
-6,156,578,141,638,329,000
29.272727
80
0.588589
false
sakura-internet/saklient.python
saklient/cloud/models/model_license.py
1
4572
# -*- coding:utf-8 -*- # This code is automatically transpiled by Saklient Translator import six from ..client import Client from .model import Model from ..resources.resource import Resource from ..resources.license import License from ...util import Util import saklient str = six.text_type # module saklient.cloud....
mit
-4,517,385,638,724,693,000
28
99
0.632543
false
Nolan330/CS292
mavgenerate.py
9
7288
#!/usr/bin/env python """\ generate.py is a GUI front-end for mavgen, a python based MAVLink header generation tool. Notes: ----- * 2012-7-16 -- dagoodman Working on Mac 10.6.8 darwin, with Python 2.7.1 * 2012-7-17 -- dagoodman Only GUI code working on Mac 10.6.8 darwin, with Python 3.2.3 Working on Windo...
lgpl-3.0
5,586,866,063,895,823,000
32.897674
198
0.608946
false
phisiart/tvm
topi/python/topi/mali/conv2d.py
1
22691
# pylint: disable=invalid-name,unused-variable,unused-argument,no-else-return """conv2d schedule on ARM Mali GPU""" from __future__ import absolute_import as _abs import numpy as np import tvm from .. import generic from .. import util from .. import tag from ..nn import pad from ..nn.conv2d import conv2d from ..nn....
apache-2.0
-604,978,453,412,319,400
32.467552
99
0.533692
false
UAA-EQLNES/ARTF-Data-Receiver
cmd_tester.py
1
1328
#! /usr/bin/env python import argparse from gpio import enableUart from serial import Serial from sim900 import Sim900 from time import sleep def main(): parser = argparse.ArgumentParser(description='Run Sim900 AT Command Tester.') parser.add_argument('-p', '--port', help='Serial port', default='/dev/ttyS1') ...
unlicense
-2,414,242,593,420,755,500
26.102041
107
0.619729
false
ttfseiko/openerp-trunk
openerp/addons/auth_oauth/auth_oauth.py
70
1057
from openerp.osv import osv, fields class auth_oauth_provider(osv.osv): """Class defining the configuration values of an OAuth2 provider""" _name = 'auth.oauth.provider' _description = 'OAuth2 provider' _order = 'name' _columns = { 'name' : fields.char('Provider name'), # Na...
agpl-3.0
50,888,191,929,221,530
43.041667
115
0.578051
false
googleapis/python-analytics-data
google/analytics/data_v1alpha/__init__.py
1
3544
# -*- 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
-6,338,435,351,210,538,000
32.433962
74
0.775395
false
rajul/ginga
ginga/util/toolbox.py
3
2919
# # toolbox.py -- Goodies for enhancing a Ginga viewer # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # class ModeIndicator(object): """ This class adds a mode status indicator to a viewer's lower right-hand corner. Usage: Instantiate ...
bsd-3-clause
-5,227,700,311,220,240,000
30.728261
74
0.539226
false
Affix/fas
fas/__init__.py
4
1997
# -*- coding: utf-8 -*- # # Copyright © 2008 Ricky Zhou # Copyright © 2008 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope tha...
gpl-2.0
-2,755,481,522,752,891,000
32.813559
79
0.722306
false
Lorquas/dogtail
dogtail/utils.py
2
14664
# -*- coding: utf-8 -*- """ Various utilities Authors: Ed Rousseau <rousseau@redhat.com>, Zack Cerza <zcerza@redhat.com, David Malcolm <dmalcolm@redhat.com> """ __author__ = """Ed Rousseau <rousseau@redhat.com>, Zack Cerza <zcerza@redhat.com, David Malcolm <dmalcolm@redhat.com> """ import os import sys import subpro...
gpl-2.0
6,725,907,460,787,986,000
36.218274
158
0.628819
false
nemesiscodex/sugar
tests/views/activitieslist.py
11
1715
# Copyright (C) 2013, Daniel Narvaez # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed i...
gpl-2.0
5,076,711,548,262,022,000
26.66129
76
0.714869
false
dbarsam/python-vsgen
tests/integration/test_package_integration.py
1
2129
# -*- coding: utf-8 -*- """ This module provides all integration test for the package functionality. """ import sys import os import importlib import shutil import unittest import logging def setUpModule(): """ The module specific setUp method """ logging.disable(logging.CRITICAL) def tearDownModule...
mit
1,753,113,812,343,618,000
27.77027
115
0.622828
false
regular/pyglet-avbin-optimizations
pyglet/gl/glu_info.py
5
5637
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
bsd-3-clause
6,305,670,326,180,828,000
34.23125
78
0.646443
false
ltucker/melk.util
tests/test_idict.py
1
1949
from melk.util.idict import idict def test_idict(): foo = idict() foo['bar'] = 'quux' assert len(foo) == 1 assert foo['bar'] == 'quux' assert foo['BaR'] == 'quux' assert 'bar' in foo assert foo.has_key('bar') assert 'bAr' in foo assert foo.has_key('bAr') assert not 'buhlo...
gpl-2.0
7,594,771,713,812,477,000
22.768293
57
0.539251
false
jcmgray/xarray
asv_bench/benchmarks/dataset_io.py
1
15612
from __future__ import absolute_import, division, print_function import numpy as np import pandas as pd import xarray as xr from . import randn, randint, requires_dask try: import dask import dask.multiprocessing except ImportError: pass class IOSingleNetCDF(object): """ A few examples that be...
apache-2.0
338,617,318,366,091,800
37.358722
78
0.522483
false
weylin/CloudBot
plugins/google.py
3
1653
import random from cloudbot.util import http, formatting def api_get(kind, query): """Use the RESTful Google Search API""" url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \ 'v=1.0&safe=moderate' return http.get_json(url % kind, q=query) # @hook.command("googleimage", "gis", "image...
gpl-3.0
-9,151,805,508,851,293,000
34.934783
96
0.639443
false
svisser/palabra
tests/test_editor.py
1
38885
# This file is part of Palabra # # Copyright (C) 2009 - 2011 Simeon Visser # # Palabra 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
-653,624,900,040,475,500
42.544233
108
0.60252
false
motkeg/Deep-learning
examples/estimator-example-iris/iris_data.py
4
2863
import pandas as pd import tensorflow as tf TRAIN_URL = "http://download.tensorflow.org/data/iris_training.csv" TEST_URL = "http://download.tensorflow.org/data/iris_test.csv" CSV_COLUMN_NAMES = ['SepalLength', 'SepalWidth', 'PetalLength', 'PetalWidth', 'Species'] SPECIES = ['Setosa', 'Versicolor',...
apache-2.0
-7,948,249,070,987,107,000
29.784946
77
0.66818
false
opencorato/write-it
contactos/migrations/0003_auto__add_field_contact_owner.py
2
5781
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Contact.owner' db.add_column(u'contactos_contact', 'owner', self.gf('d...
gpl-3.0
5,110,749,738,202,768,000
63.244444
187
0.547829
false
EDUlib/edx-platform
openedx/core/djangoapps/service_status/test.py
4
1342
"""Test for async task service status""" import json import unittest from django.test.client import Client from django.urls import reverse class CeleryConfigTest(unittest.TestCase): """ Test that we can get a response from Celery """ def setUp(self): """ Create a django test client...
agpl-3.0
-7,473,054,767,539,127,000
25.84
66
0.611773
false
mitsei/dlkit
dlkit/abstract_osid/assessment/query_inspectors.py
1
37418
"""Implementations of assessment abstract base class query_inspectors.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' a...
mit
-1,241,202,665,486,583,600
28.48621
127
0.651264
false
gavinandresen/bitcoin-git
contrib/devtools/symbol-check.py
52
6191
#!/usr/bin/python2 # Copyright (c) 2014 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' A script to check that the (Linux) executables produced by gitian only contain allowed gcc, glibc and libstdc++ ve...
mit
8,518,517,211,503,953,000
36.75
142
0.641415
false
lowwalker/ansible-modules-core
cloud/azure/azure.py
6
24078
#!/usr/bin/python # This file is part of Ansible # # Ansible 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. # # Ansible is distributed...
gpl-3.0
-7,997,537,051,547,410,000
38.472131
289
0.609145
false
scotwk/cloud-custodian
tools/c7n_sphere11/c7n_sphere11/handler.py
4
1871
# Copyright 2017 Capital One Services, 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 agreed to in...
apache-2.0
1,467,757,836,904,320,500
26.925373
74
0.693212
false
VerosK/django-dbbackup
dbbackup/tests/storages/test_filesystem.py
4
2548
import os import tempfile import shutil from io import BytesIO from mock import patch from django.test import TestCase from django.conf import settings from django.core.exceptions import ImproperlyConfigured from dbbackup.storage.filesystem_storage import Storage as FileSystemStorage class FileSystemStorageTest(TestC...
bsd-3-clause
-3,269,493,144,050,323,500
34.887324
76
0.666797
false
googleapis/googleapis-gen
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/feed_item_set_service/client.py
1
22845
# -*- 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
-877,402,544,972,360,700
43.794118
168
0.621536
false
tm1249wk/WASHLIGGGHTS-3.3.x
python/examples/pizza/dump.py
36
40308
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html # Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories # # Copyright (2005) Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains # certain rights in this software. This software is...
gpl-2.0
3,068,057,503,537,038,300
31.797396
79
0.548253
false
quantopian/zipline
tests/test_api_shim.py
1
19024
import warnings from mock import patch import numpy as np import pandas as pd from pandas.core.common import PerformanceWarning from zipline.finance.trading import SimulationParameters from zipline.testing import ( MockDailyBarReader, create_daily_df_for_asset, create_minute_df_for_asset, str_to_secon...
apache-2.0
2,449,032,300,358,231,600
32.730496
79
0.539687
false
google/framework-for-osdu
osdu-r2/os-dags/other-log-ingest.py
1
1161
# 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 agreed to in writ...
apache-2.0
6,901,343,015,972,973,000
29.552632
75
0.722653
false
calee88/ParlAI
parlai/agents/drqa_msmarco/layers.py
1
17185
# Copyright (c) 2017-present, Facebook, Inc. # All rights reserved. # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. import torch import torch.n...
bsd-3-clause
-1,450,149,187,795,908,400
34.360082
164
0.526622
false
EricssonResearch/scott-eu
simulation-ros/src/turtlebot2i/turtlebot2i_warehouse/src/simple_object_extractor.py
1
1874
#!/usr/bin/env python from SceneObjectExtractor import SceneObjectExtractor import time import vrep # Update rate in seconds rate = 0.1 extractor = SceneObjectExtractor('127.0.0.1', 19997) # List of object names to retrieve information # For now it is hardcoded extractor.set_static_obj_names(['fake_obj', 'stairs...
apache-2.0
809,577,537,197,511,800
33.072727
96
0.680896
false
Xaltotun/conan
conans/test/generators/cmake_test.py
1
2742
import re import unittest from conans.model.settings import Settings from conans.model.conan_file import ConanFile from conans.client.generators.cmake import CMakeGenerator from conans.model.build_info import DepsCppInfo from conans.model.ref import ConanFileReference class CMakeGeneratorTest(unittest.TestCase): ...
mit
-7,118,005,159,781,577,000
40.545455
85
0.675419
false
bbc/kamaelia
Sketches/THF/Packages/Kamaelia/Community/THF/Kamaelia/UI/OpenGL/TexPlane.py
12
5411
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License...
apache-2.0
-6,426,957,485,463,028,000
34.136364
136
0.608945
false
yngcan/patentprocessor
lib/argconfig_parse.py
6
4419
#!/usr/bin/env python """ Copyright (c) 2013 The Regents of the University of California, AMERICAN INSTITUTES FOR RESEARCH All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source co...
bsd-2-clause
-1,561,995,159,197,825,000
40.688679
96
0.651957
false
tnadeau/pybvc
samples/sampleopenflow/demos/demo35.py
4
13745
#!/usr/bin/python # Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC # All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright n...
bsd-3-clause
4,864,706,703,511,868,000
32.442822
78
0.575773
false
balloob/home-assistant
homeassistant/components/flo/device.py
6
7349
"""Flo device object.""" import asyncio from datetime import datetime, timedelta import logging from typing import Any, Dict, Optional from aioflo.api import API from aioflo.errors import RequestError from async_timeout import timeout from homeassistant.helpers.typing import HomeAssistantType from homeassistant.helpe...
apache-2.0
-6,069,660,303,512,820,000
34.331731
88
0.629609
false
frankyrumple/smc
static/scheduler/start_misc_scheduler.py
1
1998
#!/usr/bin/python import sys, os import subprocess # Get the current folder folder = os.path.abspath(__file__) folder = os.path.dirname(folder) # Change to static folder folder = os.path.dirname(folder) # Change to app folder folder = os.path.dirname(folder) # Get app name app_name = folder.split(os.sep)[-1] # Change...
mit
8,902,003,102,001,837,000
25.64
124
0.648148
false
WQuanfeng/wagtail
wagtail/wagtailredirects/views.py
10
4821
from django.shortcuts import render, redirect, get_object_or_404 from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.utils.translation import ugettext as _ from django.views.decorators.vary import vary_on_headers from django.core.urlresolvers import reverse from wagtail.wagtailadmin.ed...
bsd-3-clause
6,852,152,495,657,133,000
37.261905
129
0.675586
false
twaugh/docker-registry-client
tests/test_dockerregistryclient.py
1
3833
from __future__ import absolute_import from docker_registry_client import DockerRegistryClient from docker_registry_client.Repository import BaseRepository import pytest from requests import HTTPError from tests.mock_registry import (mock_registry, mock_v2_registry, ...
apache-2.0
8,955,497,881,568,592,000
39.347368
78
0.603183
false
sestrella/ansible
lib/ansible/plugins/doc_fragments/k8s_scale_options.py
41
1314
# -*- coding: utf-8 -*- # Copyright: (c) 2018, Red Hat | Ansible # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Options used by scale modules. class ModuleDocFragment(object): DOCUMENTATION = r''' options: replicas: description: - The desired number ...
gpl-3.0
719,762,491,698,220,500
32.692308
118
0.684932
false
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/azure/ai/formrecognizer/_form_recognizer_client.py
1
45361
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ # pylint: disable=protected-access from typing import Any, IO, Union, List, TYPE_CHECKING from azure.core.tracing.decorator import distributed_trace fro...
mit
2,438,171,152,693,971,500
49.569677
117
0.628183
false
gladk/woodem
scripts/test-OLD/clump.py
3
1095
from woo.core import* from woo.dem import * O.scene.engines=[ ForceResetter(), InsertionSortCollider([ Bo1_Sphere_Aabb(), Bo1_Box_Aabb(), ]), InteractionLoop( [Ig2_Sphere_Sphere_ScGeom(),Ig2_Box_Sphere_ScGeom()], [Ip2_FrictMat_FrictMat_FrictPhys()], [Law2_ScGeom_FrictPhys_CundallStrack()] ), GravityEngi...
gpl-2.0
-6,718,273,865,120,026,000
33.21875
159
0.679452
false
JustinPead/card_authenticator
leds.py
1
1280
import RPi.GPIO as GPIO import time import logging class LEDs: def __init__(self, logger=logging.getLogger(__name__)): self.logger = logger GPIO.setmode(GPIO.BOARD) #GPIO.setwarnings(False) #success LED GPIO.setup(13,GPIO.OUT) GPIO.output(13,0) #B...
mit
-5,834,391,912,933,659,000
23.64
59
0.505469
false