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
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
3.380952
false
false
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
3.961987
false
false
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
4.12969
false
false
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
4.41648
false
false
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
4.006734
true
false
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
3.977299
false
false
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
3.971934
true
false
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
4.216868
false
false
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
4.325296
false
false
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
3.531967
false
false
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
2.609375
false
false
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
3.88676
false
false
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
2.915586
true
false
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
3.43833
false
false
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
4.293641
false
false
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
3.567832
false
false
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
3.853229
true
false
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
2.748619
false
false
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
3.737641
true
false
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
2.873596
false
false
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
3.597096
false
false
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
5.079741
false
false
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
2.847258
false
false
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
3.930307
false
false
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
3.318128
true
false
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
3.080645
false
false
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
2.817186
false
false
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
3.715562
false
false
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
3.727778
false
false
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
3.786913
false
false
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
3.73064
false
false
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
3.265805
false
false
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
2.85105
true
false
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
3.546929
true
false
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
3.988998
false
false
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
2.926441
true
false
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
3.921788
false
false
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
4.469653
false
false
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
4.033284
false
false
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
4.283784
false
false
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
4.188464
false
false
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
3.849398
false
false
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
2.909524
false
false
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
3.654463
true
false
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
3.762336
false
false
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
3.926092
false
false
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
3.148048
false
false
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
3.479353
false
false
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
3.788095
false
false
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
4.452975
false
false
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
3.679372
false
false
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
4.452616
true
false
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
4.64345
false
false
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
3.222814
false
false
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
4.457079
false
false
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
3.888889
false
false
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
3.185877
false
false
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
4.306688
false
false
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
3.263025
false
false
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
3.485604
false
false
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
3.15625
true
false
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
3.994109
false
false
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
4.356707
false
false
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
3.468639
false
false
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
2.693082
false
false
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
3.164474
false
false
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
3.463541
false
false
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
3.931548
false
false
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
4.311864
false
false
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
3.666355
false
false
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
3.254316
false
false
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
4
false
false
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
3.837045
false
false
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
3.691115
true
false
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
3.725799
false
false
false
pascalmouret/treeio-achievements
achievements/views.py
1
13734
""" Here are the functions which actually prepare the data and render the pages. Most of the functions here are very similar since tree.io is, more or less, following the CRUD (Create, Retrieve, Update, Delete) pattern. The only thing special are the MassForms, which are quite common in tree.io and I only adapted the c...
bsd-2-clause
7,595,113,110,143,997,000
39.040816
119
0.66754
false
4.232357
false
false
false
gdestuynder/MozDef
alerts/cloudtrail_logging_disabled.py
1
1132
#!/usr/bin/env python # 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/. # Copyright (c) 2017 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.que...
mpl-2.0
-3,568,129,083,789,123,600
32.294118
97
0.671378
false
3.903448
false
false
false
Thortoise/Super-Snake
Blender/animation_nodes-master/operators/profiling.py
1
2009
import bpy import cProfile from bpy.props import * from io import StringIO from contextlib import redirect_stdout class ProfileAnimationNodes(bpy.types.Operator): bl_idname = "an.profile" bl_label = "Profile" function = StringProperty() output = StringProperty() sort = StringProperty() def ex...
gpl-3.0
-5,066,411,222,461,000,000
28.115942
65
0.645595
false
4.185417
false
false
false
eepgwde/pyeg0
eg/dispatch0.py
1
1483
## @file dispatch0.py # @author weaves # @brief Demonstrate extrinisc visitor pattern. # # The visitor pattern (or double dispatch) is well-known. In languages # that support reflection you can use a single dispatch like this # method. # # You can test this package on the command-line with # <code>python dispatch0.py</...
gpl-3.0
-5,117,124,997,730,889,000
30.553191
70
0.727579
false
3.370455
false
false
false
allenlavoie/tensorflow
tensorflow/contrib/distributions/python/kernel_tests/distribution_test.py
1
11315
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
-136,941,286,766,181,460
37.486395
80
0.62563
false
3.703764
true
false
false
aamirmajeedkhan/P4-conference-central
main.py
1
2470
#!/usr/bin/env python import webapp2 from google.appengine.api import app_identity from google.appengine.api import mail,memcache from conference import ConferenceApi,MEMCACHE_FEATURED_SPEAKER_KEY from google.appengine.ext import ndb from models import Session, Speaker class SetAnnouncementHandler(webapp2.RequestHandl...
apache-2.0
-3,581,929,336,231,128,000
40.881356
98
0.639271
false
4.151261
false
false
false
yuwen41200/biodiversity-analysis
utils/roadkill-packer/htmlGenerator.py
1
4419
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import csv html_beginning = '''<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-table/1.11.0/bootstrap-table.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitt...
gpl-3.0
-7,277,954,826,530,736,000
48.1
133
0.505318
false
3.845953
false
false
false
grupodyd/python-filapp
setup.py
1
1785
#!/usr/bin/env python # # Copyright 2015 DyD Dinámica y Desarrollo SAS # # 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 ap...
apache-2.0
4,565,196,317,821,026,300
32.660377
74
0.67657
false
3.929515
false
false
false
wtsi-hgi/CoGS-Webapp
cogs/db/interface.py
1
14479
""" Copyright (c) 2017, 2018 Genome Research Ltd. Authors: * Christopher Harrison <ch12@sanger.ac.uk> * Simon Beal <sb48@sanger.ac.uk> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either v...
agpl-3.0
-7,453,707,756,658,393,000
33.889157
114
0.558602
false
4.411639
false
false
false
sloria/osf.io
api/nodes/permissions.py
1
9092
# -*- coding: utf-8 -*- from rest_framework import permissions from rest_framework import exceptions from addons.base.models import BaseAddonSettings from osf.models import ( AbstractNode, Contributor, DraftRegistration, Institution, Node, NodeRelation, OSFUser, PreprintService, Pri...
apache-2.0
-5,648,631,933,092,123,000
39.408889
232
0.66366
false
4.088129
false
false
false
rbn920/feebb
feebb/test.py
1
1640
from feebb import * import matplotlib.pyplot as plt pre = Preprocessor() pre.load_json('ex_json/test2.json') elems = [Element(elem) for elem in pre.elements] print(pre.supports) beam = Beam(elems, pre.supports) post = Postprocessor(beam, 10) print(max(post.interp('moment'))) print(min(post.interp('moment'))) plt.plot(...
mit
-3,904,780,058,405,213,000
25.885246
48
0.714634
false
2.827586
false
false
false
sradanov/flyingpigeon
setup.py
1
1385
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.rst')).read() requires = [ 'cdo', 'bokeh', 'ocgis', 'pandas', 'nose', ] classifiers=[ ...
apache-2.0
871,063,087,530,311,400
29.108696
81
0.607942
false
3.524173
false
false
false
apurtell/phoenix
bin/psql.py
1
2718
#!/usr/bin/env python ############################################################################ # # 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 A...
apache-2.0
-4,959,389,883,573,509,000
37.28169
126
0.654157
false
3.10984
false
false
false
BenWiederhake/House-Of-Tweets
backend/vomit.py
1
1212
#!/usr/bin/env python3 import json import mq from sys import argv from time import sleep def pull(filename): with open(filename, 'r') as fp: return json.load(fp) def check(tweets): assert len(tweets) > 0 first_batch = tweets[0] assert len(first_batch) > 0 first_tweet = first_batch[0] ...
gpl-3.0
2,856,715,746,268,283,000
24.25
99
0.626238
false
3.320548
false
false
false
zzqcn/wireshark
tools/make-plugin-reg.py
1
5547
#!/usr/bin/env python3 # # Looks for registration routines in the plugins # and assembles C code to call all the routines. # import os import sys import re # # The first argument is the directory in which the source files live. # srcdir = sys.argv[1] # # The second argument is either "plugin", "plugin_wtap" or "plugi...
gpl-2.0
3,218,243,372,919,853,000
29.478022
103
0.628989
false
3.05957
false
false
false
alphagov/notifications-api
app/dao/api_key_dao.py
1
1564
import uuid from datetime import datetime, timedelta from sqlalchemy import func, or_ from app import db from app.dao.dao_utils import autocommit, version_class from app.models import ApiKey @autocommit @version_class(ApiKey) def save_model_api_key(api_key): if not api_key.id: api_key.id = uuid.uuid4() ...
mit
3,697,148,109,029,428,000
29.076923
96
0.686061
false
3.146881
false
false
false
moreati/pydgin
scripts/build.py
1
4989
#!/usr/bin/env python #========================================================================= # build.py #========================================================================= # Builds pydgin. import multiprocessing import os import shutil import sys import subprocess import distutils.spawn usage = """Usage: ...
bsd-3-clause
-7,807,380,443,629,281,000
26.871508
74
0.588495
false
3.679204
false
false
false
alpodrezov/ordering_lunch
xavchik/settings.py
1
2241
""" Django settings for xavchik project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
unlicense
-7,114,326,989,939,682,000
23.637363
95
0.720214
false
3.192308
false
false
false
splotz90/urh
src/urh/signalprocessing/SimulatorItem.py
1
2278
class SimulatorItem(object): protocol_manager = None expression_parser = None def __init__(self): self.__parentItem = None self.__childItems = [] self.logging_active = True self.is_valid = True def check(self): return True def get_pos(self): if self...
gpl-3.0
3,334,993,551,861,423,000
21.79
69
0.53863
false
4.172161
false
false
false
JacobFischer/Joueur.py
games/anarchy/building.py
1
3963
# Building: A basic building. It does nothing besides burn down. Other Buildings inherit from this class. # DO NOT MODIFY THIS FILE # Never try to directly create an instance of this class, or modify its member variables. # Instead, you should only be reading its variables and calling its functions. from games.anarch...
mit
-4,873,034,364,806,907,000
30.452381
146
0.633611
false
4.189218
false
false
false
gento/dionaea
modules/python/scripts/pptp/include/packets.py
1
4630
#******************************************************************************** #* Dionaea #* - catches bugs - #* #* #* #* Copyright (C) 2015 Tan Kean Siong #* #* This program is free software; you can redistribute it and/or #* modify it under the terms of the...
gpl-2.0
-748,663,431,541,799,300
31.605634
82
0.700432
false
3.012362
false
false
false
dmilith/SublimeText3-dmilith
Packages/pyte/all/pyte/graphics.py
1
3441
# -*- coding: utf-8 -*- """ pyte.graphics ~~~~~~~~~~~~~ This module defines graphic-related constants, mostly taken from :manpage:`console_codes(4)` and http://pueblo.sourceforge.net/doc/manual/ansi_color_codes.html. :copyright: (c) 2011-2012 by Selectel. :copyright: (c) 2012-2017 by pyte ...
mit
1,003,358,980,977,163,300
22.09396
78
0.561465
false
2.681995
false
false
false
BrainTech/openbci
obci/logic/logic_speller_peer.py
1
1099
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: # Mateusz Kruszyński <mateusz.kruszynski@gmail.com> # import time from obci.utils import tags_helper from multiplexer.multiplexer_constants import peers, types from obci.logic import logic_helper from obci.logic.logic_decision_peer import LogicDecision from ob...
gpl-3.0
-3,186,616,234,418,498,600
33.3125
73
0.711293
false
3.409938
false
false
false
kevinsung/OpenFermion
src/openfermion/utils/_testing_utils.py
1
13228
# 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 # distribu...
apache-2.0
2,406,659,572,818,670,000
35.541436
79
0.590036
false
3.914768
true
false
false
kdart/pycopia
core/pycopia/stringmatch.py
1
4548
#!/usr/bin/python2.7 # -*- coding: utf-8 -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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
-7,621,170,586,221,871,000
28.921053
125
0.599824
false
3.867347
false
false
false