repo_name
stringlengths
5
92
path
stringlengths
4
232
copies
stringclasses
19 values
size
stringlengths
4
7
content
stringlengths
721
1.04M
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
15
997
alpha_frac
float64
0.25
0.97
autogenerated
bool
1 class
m3z/HT
openstack_dashboard/dashboards/admin/instances/tests.py
1
6158
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
apache-2.0
-3,204,556,978,701,150,700
42.985714
78
0.603118
false
QualiSystems/Azure-Shell
package/cloudshell/cp/azure/domain/common/vm_details_provider.py
1
5896
from azure.mgmt.compute.models import StorageAccountTypes from cloudshell.cp.core.models import VmDetailsProperty, VmDetailsData, VmDetailsNetworkInterface from cloudshell.cp.azure.domain.vm_management.operations.deploy_operation import get_ip_from_interface_name class VmDetailsProvider(object): def __init__(sel...
apache-2.0
8,312,419,053,083,852,000
53.100917
150
0.61652
false
fengjian/libinjection
src/sqlparse2c.py
3
3800
#!/usr/bin/env python # # Copyright 2012, 2013 Nick Galbreath # nickg@client9.com # BSD License -- see COPYING.txt for details # """ Converts a libinjection JSON data file to a C header (.h) file """ import sys def toc(obj): """ main routine """ print """ #ifndef LIBINJECTION_SQLI_DATA_H #define LIBINJEC...
bsd-3-clause
-4,710,446,708,618,401,000
27.787879
73
0.604211
false
inconvergent/differential-cloud
modules/helpers.py
1
1866
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function def get_args(): import argparse parser = argparse.ArgumentParser() parser.add_argument( '--procs', type=int, default=4, help='number of processors.' ) parser.add_argument( '--nearl', type=float, de...
mit
-6,956,966,956,868,832,000
14.55
59
0.546088
false
SpaceHotDog/Flask_API
test_bucketlist.py
1
3171
# test_bucketlist.py import unittest import os import json from app import create_app, db class BucketlistTestCase(unittest.TestCase): """This class represents the bucketlist test case""" def setUp(self): """Define test variables and initialize app.""" self.app = create_app(config_name="testi...
unlicense
-8,130,678,617,017,852,000
37.670732
79
0.600442
false
apacha/OMR-Datasets
omrdatasettools/OmrDataset.py
1
11026
from enum import Enum, auto from typing import Dict class OmrDataset(Enum): """ The available OMR datasets that can be automatically downloaded with Downloader.py """ #: The Audiveris OMR dataset from https://github.com/Audiveris/omr-dataset-tools, Copyright 2017 by Hervé Bitteur under AGPL-3.0 l...
mit
-4,851,323,977,944,946,000
58.551351
319
0.699737
false
khrapovs/datastorage
datastorage/compustat.py
1
2589
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Short interest dynamics """ from __future__ import print_function, division import os import zipfile import datetime as dt import pandas as pd import matplotlib.pyplot as plt import seaborn as sns path = os.getenv("HOME") + '/Dropbox/Research/data/Compustat/data/' #...
mit
2,111,269,302,578,816,300
24.382353
73
0.596756
false
Yethiel/re-volt-addon
io_revolt/parameters_in.py
1
4567
""" Name: parameters_in Purpose: Importing cars using the parameters.txt file Description: Imports entire cars using the carinfo module. """ if "bpy" in locals(): import imp imp.reload(common) imp.reload(carinfo) imp.reload(prm_in) import os import bpy import bmesh from mathutil...
gpl-3.0
5,301,716,076,450,188,000
30.390071
76
0.611999
false
wolcomm/rptk
rptk/base.py
1
3743
# Copyright (c) 2018 Workonline Communications (Pty) Ltd. All rights reserved. # # The contents of this file are licensed under the Apache License version 2.0 # (the "License"); you may not use this file except in compliance with the # License. # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
8,040,617,203,420,518,000
32.720721
79
0.606733
false
platinhom/DailyTools
scripts/ESES_ElementArea.py
1
3679
#! /usr/bin/env python # -*- coding: utf8 -*- # Author: Platinhom; Last Updated: 2015-09-10 # Calculate each element surface area by MS_Intersection and also match the atomic area results to the pqr file. # Usage: python ESES_ElementArea.py file.pqr # # Need: MS_Intersection (partition version) # Note: Only for PQR fo...
gpl-2.0
-1,598,104,058,107,988,000
32.144144
112
0.65969
false
ea4gja/mrig
mrig/mrig.py
1
1349
#!/usr/bin/env python # # File: mrig.py # Version: 1.0 # # mrig: main program # Copyright (c) 2016 German EA4GJA # # 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 Licen...
gpl-2.0
-2,723,161,411,879,875,600
27.104167
67
0.749444
false
Lujeni/ansible
lib/ansible/modules/cloud/amazon/aws_ssm_parameter_store.py
1
7817
#!/usr/bin/python # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], 'supported_by': '...
gpl-3.0
6,053,639,846,693,307,000
28.609848
126
0.643214
false
SanPen/GridCal
src/GridCal/Engine/Simulations/LinearFactors/linear_analysis_ts_driver.py
1
10126
# This file is part of GridCal. # # GridCal 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. # # GridCal is distributed in the hope that...
gpl-3.0
-3,750,878,709,547,375,600
36.783582
111
0.567351
false
googleapis/googleapis-gen
google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise-v1beta1-py/google/cloud/recaptchaenterprise_v1beta1/services/recaptcha_enterprise_service_v1_beta1/transports/base.py
1
9862
# -*- 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
-3,883,420,898,301,742,000
37.980237
161
0.614683
false
ge0rgi/cinder
cinder/tests/unit/api/v2/test_limits.py
1
29139
# Copyright 2011 OpenStack Foundation # 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 requ...
apache-2.0
-5,903,511,170,793,343,000
34.929716
79
0.529874
false
thesgc/cbh_datastore_ws
runtests.py
1
1190
import sys try: from django.conf import settings from django.test.utils import get_runner settings.configure( DEBUG=True, USE_TZ=True, DATABASES={ "default": { "ENGINE": "django.db.backends.sqlite3", } }, ROOT_URLCONF="cbh_dat...
mit
-6,751,464,929,567,952,000
20.25
71
0.553782
false
kylelutz/chemkit
tests/auto/plugins/mmff/analyze.py
1
3504
#!/usr/bin/python # this script compares the mmff94.expected and mmff94.actual files # and outputs the differences import os import sys import xml.dom.minidom COLORS_ENABLED = False class AtomResults: def __init__(self, type, charge): self.type = type self.charge = charge class MoleculeResults...
bsd-3-clause
8,729,999,212,681,322,000
32.371429
124
0.631849
false
MAECProject/maec-to-oval
cybox_oval_mappings.py
1
10331
#MAEC -> OVAL Translator #v0.94 BETA #Generic mappings class #Generates OVAL tests/objects/states from a CybOX Defined Object import oval57 as oval class cybox_oval_mappings(object): def __init__(self, id_namespace): self.test_id_base = 0 self.obj_id_base = 0 self.ste_id_base = 0 s...
bsd-3-clause
-8,493,995,175,343,858,000
58.37931
180
0.597425
false
CylonicRaider/websocket-server
websocket_server/exceptions.py
1
1127
# websocket_server -- WebSocket/HTTP server/client library # https://github.com/CylonicRaider/websocket-server """ Exceptions. """ __all__ = ['WebSocketError', 'ProtocolError', 'InvalidDataError', 'ConnectionClosedError'] class WebSocketError(Exception): """ Base class for all exceptions. """ ...
mit
-2,971,920,080,136,131,600
25.209302
70
0.657498
false
enckse/system-viewer
bottle.py
1
146747
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Bottle is a fast and simple micro-framework for small web applications. It offers request dispatching (Routes) with url parameter support, templates, a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and template engines - all in a single f...
mit
-874,936,976,201,851,400
38.50483
108
0.566328
false
ifduyue/sentry
src/sentry/models/user.py
1
10584
""" sentry.models.user ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logging import warnings from bitfield import BitField from django.contrib.auth.models import AbstractBas...
bsd-3-clause
7,035,034,941,226,481,000
32.283019
106
0.595333
false
jelly/calibre
src/calibre/gui2/dbus_export/tray.py
1
7237
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' # Implement the StatusNotifierItem spec for creating a system tray icon in #...
gpl-3.0
-3,887,124,722,416,218,000
29.407563
115
0.637833
false
kjiang8/Ardustat
Deprecated_Unsupported/Python_Client/galvanostat_with_connect.py
1
1837
import numpy import ardustat_library_simple as ard import time import subprocess import os import glob import sys ##Guess a serial port port = "" if os.name == "posix": #try os x if len(glob.glob("/dev/tty.u*")) > 0: port = glob.glob("/dev/tty.u*")[0] elif len(glob.glob("/dev/ttyUSB*")) > 0: port = glob.glob("...
bsd-2-clause
1,281,744,079,879,438,600
17.938144
87
0.672836
false
manhg/tokit
tokit/postgres.py
1
4462
import logging import shortuuid import uuid import momoko import momoko.exceptions import psycopg2 from psycopg2.extras import DictCursor, DictRow, register_uuid import psycopg2.extensions from tornado.gen import coroutine, sleep from tornado.web import HTTPError import tokit logger = tokit.logger class DictLogCur...
mit
4,795,081,817,502,400,000
27.240506
94
0.586732
false
sserrot/champion_relationships
venv/Lib/site-packages/networkx/algorithms/shortest_paths/tests/test_weighted.py
1
27666
import pytest import networkx as nx from networkx.utils import pairwise def validate_path(G, s, t, soln_len, path): assert path[0] == s assert path[-1] == t if not G.is_multigraph(): computed = sum(G[u][v].get('weight', 1) for u, v in pairwise(path)) assert soln_len == computed else:...
mit
-4,608,623,554,818,168,000
44.279869
100
0.493855
false
google/makani
gs/monitor2/apps/plugins/layouts/motor_layout.py
1
2241
# Copyright 2020 Makani Technologies 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...
apache-2.0
-8,440,971,093,229,201,000
34.015625
77
0.685408
false
fishtown-analytics/dbt
test/unit/test_linker.py
1
6077
import os import tempfile import unittest from unittest import mock from dbt import linker try: from queue import Empty except ImportError: from Queue import Empty def _mock_manifest(nodes): manifest = mock.MagicMock(nodes={ n: mock.MagicMock(unique_id=n) for n in nodes }) manifest.expect...
apache-2.0
-9,025,431,726,065,684,000
30.984211
80
0.586803
false
bumper-app/bumper-bianca
bianca/analyzer/bugfinder.py
1
3624
""" file: bugfinder.py author: Christoffer Rosen <cbr4830@rit.edu> date: November 2013 description: Links changes that introduces bugs by identifying changes that fix problems. """ import re from orm.commit import * from caslogging import logging from analyzer.git_commit_linker import * import json class BugFinder: ...
mit
9,136,406,733,710,434,000
30.241379
88
0.737307
false
danielpalomino/gem5
configs/common/Options.py
1
10060
# Copyright (c) 2006-2008 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this ...
bsd-3-clause
-2,901,236,696,301,935,600
54.274725
85
0.633996
false
BILS/agda
agda/species_geo_coder/views.py
1
2551
import time #from django.shortcuts import render from django.views.generic import TemplateView, FormView from django.shortcuts import redirect, render from django.db import transaction from agda.views import package_template_dict from jobs.models import (JOB_STATUS_LEVEL_ACCEPTED, JOB_STATUS_...
mit
1,003,078,452,284,598,300
38.246154
99
0.681693
false
lowRISC/manticore
util/license-checker.py
2
17721
#!/usr/bin/env python3 # # Copyright lowRISC contributors. # Licensed under the Apache License, Version 2.0, see LICENSE for details. # SPDX-License-Identifier: Apache-2.0 import argparse import fnmatch import logging import re import subprocess from pathlib import Path from types import SimpleNamespace import hjson ...
apache-2.0
-6,870,868,201,439,118,000
33.276596
100
0.596524
false
jithinbp/vLabtool-v0
v0/utilitiesClass.py
1
2985
import time,random,functools import numpy as np from PyQt4 import QtCore, QtGui import pyqtgraph as pg import pyqtgraph.opengl as gl class utilitiesClass(): """ This class contains methods that simplify setting up and running an experiment. """ timers=[] viewBoxes=[] plots3D=[] plots2D=[] axisItems=[] t...
gpl-3.0
-7,986,475,858,903,219,000
25.651786
92
0.710218
false
devilry/devilry-django
devilry/apps/core/tests/test_groupinvite.py
1
24874
from django.core import mail from django.core.exceptions import ValidationError from django.test import TestCase from django.utils import timezone from django.utils.timezone import timedelta from django.urls import reverse from model_bakery import baker from devilry.apps.core import devilry_core_baker_factories as cor...
bsd-3-clause
-7,695,764,086,700,360,000
48.947791
119
0.659564
false
koduj-z-klasa/python101
docs/webflask/quiz_orm/quiz2_pw/views.py
1
4117
# -*- coding: utf-8 -*- # quiz-orm/views.py from flask import render_template, request, redirect, url_for, abort, flash from app import app from models import Pytanie, Odpowiedz from forms import * @app.route('/') def index(): """Strona główna""" return render_template('index.html') @app.route('/lista') de...
mit
5,689,004,494,325,511,000
30.236641
79
0.611193
false
PyQuake/earthquakemodels
code/runExperiments/histogramMagnitude.py
1
1982
import matplotlib.pyplot as plt import models.model as model import earthquake.catalog as catalog from collections import OrderedDict def histogramMagnitude(catalog_, region): """ Creates the histogram of magnitudes by a given region. Saves the histogram to the follwing path ./code/Zona2/histograms/'+regio...
bsd-3-clause
2,488,482,629,625,943,600
35.036364
140
0.604945
false
Skyscanner/pages
test/utils/hamcrest_matchers.py
1
2357
############################################################################ # Copyright 2015 Skyscanner Ltd # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # you may no...
apache-2.0
-6,174,321,162,460,390,000
39.637931
116
0.517183
false
socrocket/trap-gen
processors/LEON2/LEONCoding.py
1
5555
################################################################################ # # _/_/_/_/_/ _/_/_/ _/ _/_/_/ # _/ _/ _/ _/_/ _/ _/ # _/ _/ _/ _/ _/ _/ _/ # _/ _/_/_/ _/_/_/_/ _/_/_/ # _/ _/ _/ _/ _/ _/ # ...
gpl-3.0
6,424,995,192,659,470,000
45.680672
142
0.576598
false
bdang2012/taiga-back-casting
taiga/projects/milestones/api.py
1
6149
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
812,098,269,733,922,800
41.986014
109
0.650887
false
DStauffman/dstauffman
dstauffman/estimation/kalman.py
1
8438
r""" Functions related to Kalman Filter analysis. Notes ----- #. Written by David C. Stauffer in April 2019. """ #%% Imports import doctest import unittest from dstauffman import HAVE_NUMPY from dstauffman.numba import ncjit from dstauffman.estimation.linalg import mat_divide if HAVE_NUMPY: import numpy as np...
lgpl-3.0
-4,143,109,021,988,057,000
24.263473
87
0.567907
false
tktrungna/leetcode
Python/range-sum-query-immutable.py
1
1146
""" QUESTION: Given an integer array nums, find the sum of the elements between indices i and j (i < j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1] sumRange(0, 2) -> 1 sumRange(2, 5) -> -1 sumRange(0, 5) -> -3 Note: You may assume that the array does not change. There are many calls to sumRange function. ...
mit
-799,236,257,874,062,700
22.875
101
0.578534
false
stephenliu1989/HK_DataMiner
hkdataminer/Nystrom_code/microToMacroBySHC_v2.0b.py
1
41931
#!/usr/bin/env python ####################################################### #Written by Daniel Silva #Based in the original SHC code from Yuan YAO and Xuhui Huang: # Proceedings of the Pacific Symposium on Biocomputing, 15, 228-239, (2010) # #Intended to be used in the SimTK project #Ver. 1.5b 21/Apr/2011 #########...
apache-2.0
-28,220,316,076,639,290
36.912297
229
0.655434
false
edx/ease
ease/model_creator.py
1
7903
#Provides interface functions to create and save models import numpy import re import nltk import sys from sklearn.feature_extraction.text import CountVectorizer import pickle import os import sklearn.ensemble from itertools import chain base_path = os.path.dirname(__file__) sys.path.append(base_path) from .essay_s...
agpl-3.0
8,545,315,089,119,740,000
35.75814
121
0.690118
false
russellb/nova
nova/ipv6/api.py
1
1342
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Openstack, 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...
apache-2.0
3,333,885,616,564,730,000
29.5
78
0.682563
false
guillaume-philippon/aquilon
lib/aquilon/aqdb/model/operating_system.py
1
2257
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2009,2010,2011,2012,2013,2014,2016 Contributor # # 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...
apache-2.0
-5,904,684,791,283,177,000
39.303571
80
0.673017
false
CaliOpen/CaliOpen
src/backend/tools/py.CLI/caliopen_cli/commands/dump_indexes_mappings.py
1
1108
import json from caliopen_storage.helpers.json import JSONEncoder def dump_indexes(**kwargs): # Discover base core classes from caliopen_main.user.core import User from caliopen_main.contact.objects.contact import Contact from caliopen_main.message.objects.message import Message from caliopen_main...
gpl-3.0
-7,902,594,706,566,011,000
34.741935
77
0.631769
false
Mausy5043/bonediagd
daemon13.py
1
4546
#!/usr/bin/env python # Based on previous work by # Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process) # and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/) # Adapted by M.Hendrix [2015] # daemon13....
mit
-1,613,244,532,009,783,600
29.510067
120
0.604707
false
grigorisg9gr/menpo
menpo/image/test/image_basics_test.py
1
4345
import warnings import numpy as np from numpy.testing import assert_allclose from nose.tools import raises from pathlib import Path import menpo from menpo.image import Image, MaskedImage, BooleanImage from menpo.shape import PointCloud from menpo.transform import UniformScale, Translation def test_image_as_masked(...
bsd-3-clause
-8,169,848,640,593,623,000
28.557823
67
0.650403
false
myfreecomm/fixofx
test/ofxtools_qif_converter.py
1
9183
# Copyright 2005-2010 Wesabe, 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 or agreed to in ...
apache-2.0
-6,239,589,236,136,788,000
27.255385
74
0.556354
false
simsong/grr-insider
lib/artifact.py
1
15969
#!/usr/bin/env python """Base classes for artifacts.""" import logging from grr.lib import aff4 from grr.lib import artifact_lib from grr.lib import config_lib from grr.lib import flow from grr.lib import rdfvalue from grr.lib import registry from grr.lib import utils class AFF4ResultWriter(object): """A wrapper ...
apache-2.0
2,216,893,775,539,972,600
40.157216
80
0.6904
false
tuxxi/OpenBurn
openburn/ui/mainwindow.py
1
3263
from qtpy.QtWidgets import (QWidget, QFrame, QMainWindow, QMenuBar, QStatusBar, QAction, QApplication, QTabWidget, QVBoxLayout) from qtpy.QtGui import QIcon from openburn import RESOURCE_PATH from openburn.ui.dialogs.about import AboutDialog from openburn.ui.designtab import DesignTab cl...
gpl-3.0
-73,988,300,967,120,670
34.086022
102
0.592706
false
nicproulx/mne-python
mne/time_frequency/tests/test_psd.py
2
7360
import numpy as np import os.path as op from numpy.testing import assert_array_almost_equal, assert_raises from nose.tools import assert_true from mne import pick_types, Epochs, read_events from mne.io import RawArray, read_raw_fif from mne.utils import requires_version, slow_test, run_tests_if_main from mne.time_freq...
bsd-3-clause
-7,658,759,830,892,655,000
37.736842
77
0.588179
false
ewongbb/stem
stem/prereq.py
1
4914
# Copyright 2012-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Checks for stem dependencies. We require python 2.6 or greater (including the 3.x series), but note we'll be bumping our requirements to python 2.7 in stem 2.0. Other requirements for complete functionality are... * ...
lgpl-3.0
-1,769,451,857,329,862,700
27.241379
211
0.712658
false
ME-ICA/me-ica
meica.libs/mdp/parallel/pp_support.py
1
13771
""" Adapters for the Parallel Python library (http://www.parallelpython.com). The PPScheduler class uses an existing pp scheduler and is a simple adapter. LocalPPScheduler includes the creation of a local pp scheduler. NetworkPPScheduler includes the management of the remote slaves via SSH. """ from __future__ impor...
lgpl-2.1
7,051,554,097,536,873,000
39.622419
90
0.584053
false
nikolay-fedotov/networking-cisco
networking_cisco/tests/unit/ml2/drivers/cisco/nexus/test_cisco_nexus.py
1
7977
# Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
-1,957,225,653,470,041,300
35.591743
79
0.598471
false
alfa-addon/addon
plugin.video.alfa/lib/python_libtorrent/python_libtorrent/functions.py
1
10908
#-*- coding: utf-8 -*- ''' python-libtorrent for Kodi (script.module.libtorrent) Copyright (C) 2015-2016 DiMartino, srg70, RussakHH, aisman 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 t...
gpl-3.0
4,003,463,386,131,299,000
50.201878
127
0.530992
false
h4ck3rm1k3/ansible
v2/ansible/parsing/mod_args.py
1
10144
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # 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 ve...
gpl-3.0
-3,236,003,832,605,205,000
35.489209
149
0.605185
false
sgraham/nope
tools/telemetry/telemetry/value/__init__.py
1
12490
# 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. """ The Value hierarchy provides a way of representing the values measurements produce such that they can be merged across runs, grouped by page, and output t...
bsd-3-clause
4,884,086,111,514,157,000
36.172619
80
0.703283
false
loadimpact/loadimpact-server-metrics
li_metrics_agent_service.py
1
2556
#!/usr/bin/env python # coding=utf-8 """ Copyright 2012 Load Impact 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 la...
apache-2.0
-4,460,066,151,057,241,600
30.170732
77
0.687402
false
alexliyu/CDMSYSTEM
firewall.py
1
1273
#!/usr/bin/python # -*- coding:utf-8 -*- """ 主程序入口 @author:alex @date:15-2-13 @time:上午11:44  @contact:alexliyu2012@gmail.com """ __author__ = 'alex' import sys import os import ConfigParser import uuid from subprocess import Popen, PIPE from utils.heartbeat import HeartBeatManager from utils.tools import * ...
mit
-4,446,706,550,151,536,000
21.62963
83
0.60311
false
jadecastro/LTLMoP
src/lib/handlers/motionControl/RRTController.py
1
37133
#!/usr/bin/env python """ =================================================================== RRTController.py - Rapidly-Exploring Random Trees Motion Controller =================================================================== Uses Rapidly-exploring Random Tree Algorithm to generate paths given the starting p...
gpl-3.0
-7,881,769,386,482,705,000
45.484655
300
0.529798
false
conda/kapsel
examples/quote_api/quote.py
1
4575
from argparse import ArgumentParser import falcon import gunicorn.app.base import json import multiprocessing import sys # A Falcon resource that returns the same quote every time class QuoteResource(object): def on_get(self, req, resp): """Handles GET requests""" quote = {'quote': 'I\'ve always b...
bsd-3-clause
-1,188,982,769,034,152,700
41.757009
120
0.65071
false
parpg/parpg
tools/utilities/convert_dialogue.py
1
3506
#!/usr/bin/env python """Convert YAML dialogue files from the Techdemo1 format to the new Techdemo2 format. @author: M. George Hansen <technopolitica@gmail.com> """ import os.path import sys sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), os....
gpl-3.0
1,915,518,116,129,695,200
34.77551
79
0.617513
false
hoaibang07/Webscrap
transcripture/sources/crawler_chuongthieu.py
1
7017
# -*- encoding: utf-8 -*- import io from bs4 import BeautifulSoup from bs4 import SoupStrainer import urllib2 import urlparse from selenium import webdriver from selenium.webdriver.common.keys import Keys import time from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expecte...
gpl-2.0
-8,064,880,054,819,888,000
35.936842
282
0.619353
false
tonnrueter/pymca_devel
PyMca/EPDL97/GenerateEADLShellNonradiativeRates.py
1
6235
__doc__= "Generate specfiles with EADL97 shell transition probabilities" import os import sys import EADLParser Elements = ['H', 'He', 'Li', 'Be', 'B', 'C', 'N', 'O', 'F', 'Ne', 'Na', 'Mg', 'Al', 'Si', 'P', 'S', 'Cl', 'Ar', 'K', 'Ca', 'Sc', 'Ti', 'V', 'Cr', 'Mn', 'Fe', ...
gpl-2.0
4,806,273,130,956,564,000
42.601399
87
0.455654
false
mangaki/mangaki
mangaki/mangaki/factories.py
1
1591
import factory from factory.django import DjangoModelFactory, mute_signals from .models import Profile, Work, Category from django.contrib.auth.models import User from django.db.models.signals import post_save class ProfileFactory(DjangoModelFactory): class Meta: model = Profile user = factory.SubFac...
agpl-3.0
-2,614,688,259,151,753,700
29.018868
118
0.688875
false
Azure/azure-sdk-for-python
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2019_08_01/operations/_jobs_operations.py
1
4882
# 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 may ...
mit
-2,191,556,967,445,919,200
43.381818
188
0.65383
false
j91321/rext
modules/exploits/allegrosoft/misfortune_auth_bypass.py
1
22767
# Name:Misfortune Cookie vulnerability authentication bypass # File:misfortune_auth_bypass.py # Author:Ján Trenčanský # License: GNU GPL v3 # Created: 22.9.2016 # Description: PoC based on 31C3 presentation, # exploit based on Marcin Bury and Milad Doorbash routersploit module. import core.Exploit import interface.uti...
gpl-3.0
3,007,073,380,054,384,600
67.972727
120
0.39326
false
Ebag333/Pyfa
eos/db/gamedata/effect.py
1
2320
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, ...
gpl-3.0
-5,116,466,407,913,318,000
45.4
113
0.625
false
dwayne-randle-sr/various-snippets
centos/6/usr/local/bin/ps_mem.py
1
17569
#!/usr/bin/env python # Try to determine how much RAM is currently being used per program. # Note per _program_, not per process. So for example this script # will report RAM used by all httpd process together. In detail it reports: # sum(private RAM for program processes) + sum(Shared RAM for program processes) # The...
gpl-3.0
-8,928,246,836,031,157,000
34.855102
97
0.575047
false
Azure/azure-sdk-for-python
sdk/testbase/azure-mgmt-testbase/azure/mgmt/testbase/aio/operations/_test_summaries_operations.py
1
9021
# 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 may ...
mit
-5,264,327,462,107,151,000
48.839779
212
0.652478
false
RalfJung/lilass
qt_frontend.py
1
7267
# DSL - easy Display Setup for Laptops # Copyright (C) 2012-2015 Ralf Jung <post@ralfj.de> # # 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...
gpl-2.0
-1,890,211,412,476,436,700
45.583333
169
0.624329
false
RulersOfAsgard/ALAMO-worker
alamo_worker/plugins/tests/test_evaluate.py
1
14081
# -*- coding: utf-8 -*- from collections import OrderedDict from unittest.case import TestCase from unittest import mock from alamo_common.test.utils import override_settings from alamo_worker.plugins.druid import DruidResult from alamo_worker.plugins.evaluate import ResultEvaluator from alamo_worker.plugins.http_che...
apache-2.0
7,516,206,015,066,631,000
36.251323
79
0.550884
false
vladsaveliev/bcbio-nextgen
bcbio/pipeline/main.py
1
27548
"""Main entry point for distributed next-gen sequencing pipelines. Handles running the full pipeline based on instructions """ from __future__ import print_function from collections import defaultdict import copy import os import sys import resource import tempfile import toolz as tz from bcbio import log, heterogen...
mit
4,928,597,947,818,260,000
50.204461
130
0.619864
false
BichenWuUCB/squeezeDet
src/dataset/kitti.py
1
10284
# Author: Bichen Wu (bichen@berkeley.edu) 08/25/2016 """Image data base class for kitti""" import cv2 import os import numpy as np import subprocess from dataset.imdb import imdb from utils.util import bbox_transform_inv, batch_iou class kitti(imdb): def __init__(self, image_set, data_path, mc): imdb.__init_...
bsd-2-clause
-1,532,657,115,107,445,500
33.743243
82
0.550661
false
blaiseli/p4-phylogenetics
p4/nexussets.py
1
69575
import os import sys import string import array import types import copy from var import var # Don't bother with NexusToken2, cuz sets blocks are small from nexustoken import nexusSkipPastNextSemiColon, safeNextTok import func from p4exceptions import P4Error # [Examples from the paup manual, # but note the bad charp...
gpl-2.0
7,514,382,857,311,807,000
41.579559
123
0.453856
false
AndrewGYork/tools
zaber.py
1
8750
import time import serial class Stage: """Zaber stage(s), attached through the (USB?) serial port.""" def __init__( self, port_name, # For example, 'COM3' on Windows timeout=1, verbose=True, very_verbose=False): """port_name: which serial port the stage is connec...
gpl-2.0
8,001,192,624,062,251,000
37.377193
84
0.56
false
jfunez/scielo-manager
scielomanager/journalmanager/tests/modelfactories.py
1
7014
# coding: utf-8 import factory import datetime from journalmanager import models class ArticleFactory(factory.Factory): FACTORY_FOR = models.Article front = { 'default-language': 'en', 'title-group': { 'en': u'Article Title', 'pt': u'Título do Artigo', } ...
bsd-2-clause
7,171,025,614,157,088,000
29.806167
429
0.680967
false
rbharvs/mnd-learning
supervised.py
1
8636
import sys import parsetags import numpy as np from sklearn.feature_extraction.text import CountVectorizer from sklearn.feature_extraction.text import TfidfTransformer from sklearn.naive_bayes import MultinomialNB from sklearn import svm from sklearn.decomposition import PCA as PCA from mpl_toolkits.mplot3d import Axes...
mit
4,742,825,620,163,231,000
33.544
104
0.683997
false
sburnett/seattle
seattlegeni/website/html/tests/ut_html_test_get_resources.py
1
5863
""" <Program> test_get_resources.py <Started> 8/30/2009 <Author> Jason Chen jchen@cs.washington.edu <Purpose> Tests that the get_resources view function handles normal operation and exceptions correctly. <Notes> See test_register.py for an explanation of our usage of the Django test...
mit
-4,059,790,173,869,409,300
29.196809
98
0.696572
false
daGrevis/squirrel
ware.py
1
2640
import inspect class MiddlewareDuplicationError(Exception): def __init__(self, middleware_name, middleware_names): message = ("Middleware `{}` was already found in `{}` middlewares!" .format(middleware_name, middleware_names)) super().__init__(message) class MiddlewareMissing...
mit
-4,876,543,742,609,040,000
33.285714
76
0.6
false
ejekt/rigging-system
Modules/System/groupSelected.py
1
9019
import maya.cmds as mc from functools import partial import os import System.utils as utils class GroupSelected: def __init__(self): self.objectsToGroup = [] def showUI(self): # build the grouping GUI self.findSelectionToGroup() if len(self.objectsToGroup) == 0: return self.dUiElement...
mit
-222,559,346,205,777,180
29.98227
144
0.684777
false
ai-se/parGALE
algorithms/serial/gale/gale.py
1
6295
from __future__ import print_function, division import sys, os sys.path.append(os.path.abspath(".")) from utils.lib import * from algorithms.serial.algorithm import Algorithm from where import Node, sqrt __author__ = 'panzer' def default_settings(): """ Default Settings for NSGA 3 :return: default settings ""...
unlicense
-9,061,544,763,114,333,000
28.980952
95
0.581732
false
intake/filesystem_spec
fsspec/implementations/tests/test_ftp.py
1
3434
import os import subprocess import sys import time import pytest import fsspec from fsspec import open_files from fsspec.implementations.ftp import FTPFileSystem here = os.path.dirname(os.path.abspath(__file__)) @pytest.fixture() def ftp(): pytest.importorskip("pyftpdlib") P = subprocess.Popen( [sy...
bsd-3-clause
1,466,260,043,482,891,300
25.015152
84
0.586488
false
google/importlab
importlab/import_finder.py
1
5424
# NOTE: Do not add any dependencies to this file - it needs to be run in a # subprocess by a python version that might not have any installed packages, # including importlab itself. from __future__ import print_function import ast import json import os import sys # Pytype doesn't recognize the `major` attribute: # h...
apache-2.0
7,626,106,175,522,213,000
31.285714
80
0.599742
false
automl/paramsklearn
tests/test_classification.py
1
31256
import os import resource import sys import traceback import unittest import mock import numpy as np import sklearn.datasets import sklearn.decomposition import sklearn.cross_validation import sklearn.ensemble import sklearn.svm from sklearn.utils.testing import assert_array_almost_equal from HPOlibConfigSpace.config...
bsd-3-clause
5,577,714,242,644,063,000
44.762811
106
0.551766
false
Drvanon/Game
venv/lib/python3.3/site-packages/sqlalchemy/sql/visitors.py
1
10003
# sql/visitors.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Visitor/traversal interface and library functions. SQLAlchemy schema and expressio...
apache-2.0
6,985,493,977,411,155,000
30.755556
84
0.615615
false
tedlaz/pyted
tests/pyappgen/pyappgen/qtreports.py
1
3002
# -*- coding: utf-8 -*- ''' Created on 2014-01-24 @author: tedlaz ''' from PyQt4 import QtGui, Qt class rptDlg(QtGui.QDialog): def __init__(self,html=u'Δοκιμή',title='Document1',parent=None): super(rptDlg, self).__init__(parent) self.setAttribute(Qt.Qt.WA_DeleteOnClose) ...
gpl-3.0
1,066,857,860,350,338,000
32.104651
71
0.574207
false
libvirt/autotest
client/common_lib/magic.py
1
58623
#!/usr/bin/python """ Library used to determine a file MIME type by its magic number, it doesn't have any external dependencies. Based on work of Jason Petrone (jp_py@jsnp.net), adapted to autotest. Command Line Usage: Running as 'python magic.py file_path' will print a mime string (or just a description) of t...
gpl-2.0
-6,769,077,660,113,957,000
53.685634
163
0.562151
false
lauromoraes/redes
MyTCPRequestHandler.py
1
1443
import logging import socket import threading import SocketServer import time from recvall import * from calc import * logging.basicConfig( level = logging.DEBUG, format = "%(name)s: %(message)s", ) class MyTCPRequestHandler(SocketServer.BaseRequestHandler): def __init__(self, request, client_address, server): se...
gpl-2.0
-1,314,863,412,308,185,900
29.0625
91
0.699931
false
youfou/wxpy
tests/api/messages/test_message.py
1
2800
from datetime import datetime from tests.conftest import wait_for_message from wxpy import * def sent_message(sent_msg, msg_type, receiver): assert isinstance(sent_msg, SentMessage) assert sent_msg.type == msg_type assert sent_msg.receiver == receiver assert sent_msg.bot == receiver.bot assert se...
mit
-5,514,851,197,585,937,000
33.65
89
0.618326
false
ensemblr/llvm-project-boilerplate
include/llvm/projects/compiler-rt/lib/asan/scripts/asan_symbolize.py
1
18097
#!/usr/bin/env python #===- lib/asan/scripts/asan_symbolize.py -----------------------------------===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===----------------------------------------...
mit
6,929,749,312,844,605,000
34.139806
95
0.62375
false
wazo-pbx/xivo-auth
wazo_auth/services/email.py
1
4200
# Copyright 2018-2020 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later import time import smtplib from collections import namedtuple from email import utils as email_utils from email.mime.text import MIMEText from wazo_auth.services.helpers import BaseService EmailDestination = n...
gpl-3.0
9,150,577,829,045,108,000
37.53211
86
0.621429
false
yoseforb/lollypop
src/fullscreen.py
1
9247
#!/usr/bin/python # Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # 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 opti...
gpl-3.0
6,808,737,461,966,250,000
35.988
77
0.571753
false
vfuse/nixstatsagent
nixstatsagent/plugins/mdstat.py
2
1272
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import plugins import json class Plugin(plugins.BasePlugin): __name__ = 'mdstat' def run(self, config): ''' Monitor software raid status using mdadm pip install mdstat ''' data = os.popen('sudo mdjson').read() ...
bsd-3-clause
1,352,827,415,557,494,500
26.652174
59
0.474843
false
mcheatham/computationalEnvironmentODP
bin/kernels.py
1
3923
#!/usr/bin/env python3 from bs4 import BeautifulSoup from requests import get from bs4.element import Tag ignore = {'Lisp Machines, Inc.', 'Symbolics', 'Texas Instruments', 'Xerox'} levels = {} levels['Apple Inc.'] = {3} levels['On S/360, S/370, and successor mainframes'] = {3} levels['On other hardware platforms']...
mit
-7,770,033,104,525,160,000
29.889764
129
0.647973
false
dariox2/CADL
test/testyida6b.py
1
4901
# # test shuffle_batch - 6b # # generates a pair of files (color+bn) # pending: make the tuple match # print("Loading tensorflow...") import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import os from libs import utils import datetime tf.set_random_seed(1) def create_input_pipeline_yida(f...
apache-2.0
4,011,695,546,058,428,000
29.823899
98
0.64293
false
CartoDB/cartoframes
cartoframes/viz/layout.py
1
9384
from . import constants from .map import Map from .html import HTMLLayout from ..utils.utils import get_center, get_credentials from ..utils.metrics import send_metrics from .kuviz import KuvizPublisher class Layout: """Create a layout of visualizations in order to compare them. Args: maps (list of :...
bsd-3-clause
7,968,791,184,678,179,000
36.090909
117
0.586104
false
alphacsc/alphacsc
examples/csc/plot_lfp_data.py
1
3791
""" ============================== CSC to learn LFP spiking atoms ============================== Here, we show how CSC can be used to learn spiking atoms from Local Field Potential (LFP) data [1]. [1] Hitziger, Sebastian, et al. Adaptive Waveform Learning: A Framework for Modeling Variability in Neurophysiolo...
bsd-3-clause
-4,877,237,652,640,226,000
34.101852
79
0.512002
false
AlessioCasco/gandi-dyndns
gandi-dyndns.py
1
9763
#!/usr/bin/env python # -*- coding: utf-8 -*- """ gandi-dyndns @author: AlessioCasco """ from bottle import route, run, request, response from optparse import OptionParser import logging as log import xmlrpclib import json import sys import re gandi_fqdn_ip = {} @route('/ping', method=['GET', 'POST']) def ping(): ...
mit
-3,330,188,730,535,708,700
40.021008
151
0.597767
false
gappleto97/Senior-Project
common/peers.py
1
16088
from multiprocessing import Queue import multiprocessing, os, pickle, select, socket, sys, time, rsa, traceback from common.safeprint import safeprint from common.bounty import * global ext_port global ext_ip global port global myPriv global myPub global propQueue ext_port = -1 ext_ip = "" port = 44565 myPub, myPriv =...
mit
-2,676,792,061,939,969,500
34.203501
150
0.599018
false