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
mgunyho/pyspread
pyspread/src/interfaces/test/test_xls.py
1
18810
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright Martin Manns # Distributed under the terms of the GNU General Public License # -------------------------------------------------------------------- # pyspread is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publi...
gpl-3.0
6,034,399,859,841,285,000
33.768946
79
0.570494
false
oas89/iktomi
tests/web/url.py
1
8574
# -*- coding: utf-8 -*- import unittest from urllib import quote from iktomi.web.reverse import URL from iktomi.web.url_templates import UrlTemplate from iktomi.web.url_converters import Converter, ConvertError class URLTests(unittest.TestCase): def test_rendering_without_params(self): 'Url without para...
mit
-3,036,394,043,030,238,000
40.234146
119
0.573169
false
kevinnguyeneng/django-uwsgi-nginx
app/naf_otp/models.py
1
3570
from __future__ import unicode_literals from django.db import models from django.conf import settings # Create your models here. class Department(models.Model): departname = models.CharField(max_length=50 , unique=True) description = models.TextField(max_length=2000) class Meta: db_table = ...
gpl-3.0
-4,462,746,899,875,089,400
29.784483
69
0.632493
false
NoBodyCam/TftpPxeBootBareMetal
nova/compute/manager.py
1
137624
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Justin Santa Barbara # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may #...
apache-2.0
-6,114,641,416,123,004,000
44.737454
79
0.559633
false
narfman0/challenges
codeeval/51/main.py
1
1542
#!/bin/python """ Code challenge https://www.codeeval.com/open_challenges/51/ Description: Credits: Programming Challenges by Steven S. Skiena and Miguel A. Revilla You will be given the x/y co-ordinates of several locations. You will be laying out 1 cable between two of these locations. In order to minimise the cost...
gpl-3.0
-3,160,996,198,653,904,400
31.808511
79
0.61284
false
pytent/pytentd
tentd/tests/blueprints/test_posts.py
1
3921
"""Tests for the entity blueprint""" from flask import url_for, json, current_app from py.test import mark, raises from werkzeug.exceptions import NotFound from tentd.documents.entity import Post from tentd.lib.flask import jsonify from tentd.tests import response_has_link_header from tentd.tests.http import * from t...
apache-2.0
-1,281,310,309,237,000,700
34.972477
73
0.666667
false
cversek/python-FLI
src/FLI/camera.py
1
10870
""" FLI.camera.py Object-oriented interface for handling FLI USB cameras author: Craig Wm. Versek, Yankee Environmental Systems author_email: cwv@yesinc.com """ __author__ = 'Craig Wm. Versek' __date__ = '2012-08-08' import sys, time, warnings, traceback try: from collections import OrderedDict e...
mit
7,518,541,212,597,315,000
41.795276
120
0.583349
false
ifwe/wxpy
setup.py
1
3061
import os.path import shutil import sys import genlisttypes from wxpybuild.wxpyext import build_extension, WXWIN wxpy_extra_sources = '''\ src/PythonUtils.cpp '''.split() wxpy_modules = [ ('_wxcore', ['src/wx.sip'] + wxpy_extra_sources), # TODO: use wxUSE_XXX flags # ('_wxhtml', ['src/html.sip']...
mit
2,911,742,721,961,002,500
26.330357
144
0.557661
false
arielmakestuff/loadlimit
test/unit/core/test_client.py
1
4584
# -*- coding: utf-8 -*- # test/unit/core/test_client.py # Copyright (C) 2016 authors and contributors (see AUTHORS file) # # This module is released under the MIT License. """Test client""" # ============================================================================ # Imports # =====================================...
mit
-3,474,192,120,729,136,600
22.751295
78
0.474258
false
alirizakeles/zato
code/zato-common/src/zato/common/ipaddress_.py
1
3762
# -*- coding: utf-8 -*- """ Copyright (C) 2016 Dariusz Suchojad <dsuch at zato.io> Licensed under LGPLv3, see LICENSE.txt for terms and conditions. """ from __future__ import absolute_import, division, print_function, unicode_literals # stdlib import itertools from urlparse import urlparse # ipaddress from ipaddre...
gpl-3.0
1,681,635,451,517,710,600
33.2
118
0.67597
false
j-po/django-brambling
brambling/utils/payment.py
1
10823
import datetime from decimal import Decimal, ROUND_DOWN import urllib from django.conf import settings from django.core.urlresolvers import reverse from django.utils import timezone from dwolla import constants, transactions, oauth, fundingsources import stripe TEST = 'test' LIVE = 'live' stripe.api_version = '2015-...
bsd-3-clause
-6,460,187,868,179,055,000
33.468153
159
0.641504
false
stackforge/cloudkitty
cloudkitty/rating/pyscripts/db/api.py
1
2787
# -*- coding: utf-8 -*- # Copyright 2015 Objectif Libre # # 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 ...
apache-2.0
-7,936,099,379,153,705,000
26.87
78
0.618586
false
comp-imaging/ProxImaL
proximal/algorithms/problem.py
1
8584
from . import admm from . import pock_chambolle as pc from . import half_quadratic_splitting as hqs from . import linearized_admm as ladmm from proximal.utils.utils import Impl, graph_visualize from proximal.utils.cuda_codegen import PyCudaAdapter from proximal.lin_ops import Variable, CompGraph, est_CompGraph_norm, vs...
mit
-5,781,427,473,584,358,000
38.018182
112
0.491845
false
inonit/wagtail
wagtail/wagtailadmin/views/pages.py
1
30505
from django.http import Http404, HttpResponse from django.shortcuts import render, redirect, get_object_or_404 from django.core.exceptions import PermissionDenied from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from django.utils import timezone from django.utils.t...
bsd-3-clause
-1,392,901,267,819,271,700
37.613924
129
0.625963
false
shub0/algorithm-data-structure
python/detec_cycle.py
1
2155
#! /usr/bin/python ''' Given a linked list, return the node where the cycle begins. If there is no cycle, return null. ''' from node_struct import ListNode class Solution: # @param head, a ListNode # @return a boolean def hasCycle(self, head): """ :type head: ListNode :rtype: bool ...
bsd-3-clause
7,653,884,790,046,726,000
25.280488
95
0.52065
false
ammarkhann/FinalSeniorCode
lib/python2.7/site-packages/google/cloud/resource_manager/client.py
1
7106
# Copyright 2015 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
mit
1,801,050,065,644,024,600
37.619565
86
0.609626
false
creasyw/IMTAphy
documentation/doctools/converter/converter/util.py
2
3086
# -*- coding: utf-8 -*- """ Python documentation conversion utils ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: 2007-2008 by Georg Brandl. :license: BSD. """ import re from docutils.nodes import make_id from .docnodes import TextNode, EmptyNode, NodeList def umlaut(cmd, c): try: if...
gpl-2.0
-978,897,654,169,440,100
29.74
79
0.501952
false
lmazuel/azure-sdk-for-python
azure-servicefabric/azure/servicefabric/models/deployed_service_replica_info.py
1
5136
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
-2,375,160,367,032,204,300
47.914286
230
0.670171
false
tectronics/open-ihm
src/openihm/data/report_settingsmanager.py
1
13974
#!/usr/bin/env python """ This file is part of open-ihm. open-ihm 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. open-ihm is di...
lgpl-3.0
-1,760,976,360,096,739,800
38.155172
238
0.59074
false
berkeleydeeprlcourse/homework
hw4/half_cheetah_env.py
1
2813
import numpy as np import tensorflow as tf from gym import utils from gym.envs.mujoco import mujoco_env class HalfCheetahEnv(mujoco_env.MujocoEnv, utils.EzPickle): def __init__(self): mujoco_env.MujocoEnv.__init__(self, 'half_cheetah.xml', 1) utils.EzPickle.__init__(self) def step(self, action...
mit
2,841,686,418,988,500,500
34.1625
96
0.576609
false
jerryyip/Smart_Decorative_Cloud
main.py
1
1660
#!/usr/bin/env python import os import signal import time from respeaker.bing_speech_api import BingSpeechAPI from respeaker.microphone import Microphone from respeaker.player import Player from worker_weather import Worker BING_KEY = '3560976f779d4095a7109bc55a3b0c79' mic = Microphone() bing = BingSpeechAPI(key=BI...
mit
599,514,478,928,847,100
21.739726
107
0.656627
false
shirtsgroup/pygo
analysis/MBAR_foldingcurve_umbrella.py
1
6397
#!/usr/bin/python2.4 import sys import numpy import pymbar # for MBAR analysis import timeseries # for timeseries analysis import os import os.path import pdb # for debugging from optparse import OptionParser import MBAR_pmfQz import wham import MBAR_pmfQ import cPickle def parse_args(): parser=OptionParser() ...
gpl-2.0
-2,847,963,973,413,007,400
39.487342
146
0.620134
false
llun/wordpress-authenticator
relay-bot/xrepeat.py
1
2396
import os,sys,xmpp currentUser = None xmppClient = None nicks = {} ###### Bot Command def commandNick(): pass def commandHelp(client, user): message = """ !help - See this menu. !nick <new name> - Change nick name. """ client.send(xmpp.Message(user, message)) ###### Bot Logic def parseCommand(client, ...
mit
-5,747,891,795,850,577,000
24.763441
94
0.639816
false
baz1/PyDist
src/PyDist.py
1
7286
#!/usr/bin/env python import modes import GoogleMaps import RATP import time import re import sys lastError = "" unrecognizedAddresses = [] def getDist(mode, origins, destinations, timestamp = None, isArrivalTime = True, googleApiKey = None, useSuggestions = True, optimistic = 0, avoidTolls = False, useRATP ...
mit
-3,398,347,110,724,836,000
38.814208
153
0.562998
false
tsarnowski/hamster
src/hamster/external.py
1
16420
# - coding: utf-8 - # Copyright (C) 2007 Patryk Zawadzki <patrys at pld-linux.org> # Copyright (C) 2008, 2010 Toms Bauģis <toms.baugis at gmail.com> # This file is part of Project Hamster. # Project Hamster is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
gpl-3.0
3,837,535,150,805,021,000
39.641089
122
0.567757
false
jcatw/deep_q_rl
deep_q_rl/launcher.py
1
14655
#! /usr/bin/env python """This script handles reading command line arguments and starting the training process. It shouldn't be executed directly; it is used by run_nips.py or run_nature.py. """ import os import argparse import logging import ale_python_interface import cPickle import numpy as np import theano impor...
bsd-3-clause
-6,642,622,267,706,696,000
49.885417
85
0.502354
false
babble/babble
include/jython/Lib/test/Graph.py
1
1996
from java import awt from math import * from jarray import array class Graph(awt.Canvas): def __init__(self): self.function = None def paint(self, g): if self.function is None: return self.error(g) sz = se...
apache-2.0
-1,696,115,713,915,146,200
31.193548
85
0.429359
false
rcoup/traveldash
traveldash/gtfs/migrations/0007_auto__del_field_trip_inbound__del_field_trip_outbound__add_field_trip_.py
1
15202
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Trip.inbound' db.delete_column('gtfs_trip', 'inbound') # Deleting field 'Trip.outbound...
bsd-3-clause
8,003,651,594,328,572,000
64.809524
160
0.533351
false
plotly/python-api
packages/python/plotly/plotly/graph_objs/scatter/marker/_colorbar.py
1
69628
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "scatter.marker" _path_str = "scatter.marker.colorbar" _valid_props = { "bgcolor", ...
mit
-2,804,840,425,651,556,400
34.853759
100
0.553858
false
dominicmeroux/Reading-In-and-Analyzing-Calendar-Data-by-Interfacing-Between-MySQL-and-Python
Utilization-Report-MySQL.py
1
18653
from __future__ import print_function from icalendar import * from datetime import date, datetime, timedelta import mysql.connector from mysql.connector import errorcode import pickle import csv import pandas from pandas.io import sql import matplotlib.pyplot as plt import xlsxwriter import numpy as np import os import...
mit
-4,022,646,773,599,156,700
33.225688
553
0.630515
false
aburrell/ocbpy
ocbpy/ocb_time.py
1
10827
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2017, AGB & GC # Full license can be found in License.md # ---------------------------------------------------------------------------- """Routines to convert from different file timekeeping methods to datetime """ import datetime as dt import numpy as np ...
bsd-3-clause
-4,191,842,256,253,791,700
25.089157
79
0.555925
false
mjirik/io3d
io3d/outputqt.py
1
3384
from loguru import logger from PyQt5.QtWidgets import ( QGridLayout, QLabel, QPushButton, QLineEdit, QCheckBox, QFileDialog, ) from PyQt5 import QtGui, QtWidgets import os.path as op class SelectOutputPathWidget(QtWidgets.QWidget): def __init__( self, path=None, wid...
mit
-2,384,813,461,928,270,000
29.763636
87
0.584515
false
gviejo/ThalamusPhysio
python/main_pop_pca.py
1
15802
import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io from functions import * import _pickle as cPickle import time import os, sys import ipyparallel import neuroseries as nts data_directory = '/mnt/DataGuillaume/MergedData/' datasets = np.loadtxt(data_directory+'datas...
gpl-3.0
-4,166,674,322,942,041,600
47.621538
185
0.55069
false
cxx-hep/root-cern
interpreter/llvm/src/tools/clang/docs/tools/dump_ast_matchers.py
1
12937
#!/usr/bin/env python # A tool to parse ASTMatchers.h and update the documentation in # ../LibASTMatchersReference.html automatically. Run from the # directory in which this file is located to update the docs. import collections import re import urllib2 MATCHERS_FILE = '../../include/clang/ASTMatchers/ASTMatchers.h' ...
lgpl-2.1
3,276,283,028,801,604,000
36.607558
129
0.556466
false
mattgibb/visualisation
cxxtest/python/cxxtest/cxxtest_parser.py
1
7880
import re #import sys #import getopt #import glob import string from cxxtest_misc import * # Global variables suites = [] suite = None inBlock = 0 options=None def scanInputFiles(files, _options): '''Scan all input files for test suites''' global options options=_options for file in files: sca...
mit
-6,313,189,892,261,555,000
33.26087
107
0.592386
false
Arzie/deluge
deluge/ui/gtkui/mainwindow.py
1
13546
# -*- coding: utf-8 -*- # # Copyright (C) 2007-2009 Andrew Resch <andrewresch@gmail.com> # # This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with # the additional special exception to link portions of this program with the OpenSSL library. # See LICENSE for more details. # i...
gpl-3.0
5,377,143,276,509,596,000
38.608187
113
0.5956
false
evinr/basis-scraper
poc.py
1
3931
import serial def setup(): ser = serial.Serial('/dev/ttyUSB0', timeout=2) ser.setRTS(True) ser.setRTS(False) if ser.isOpen(): ser.close() ser.open() ser.isOpen() print "USB connection established" def read(): rawString = ser.readline() print rawString return (str(rawString)) def write(string...
mit
2,017,220,507,763,002,000
26.117241
135
0.675401
false
boegel/easybuild-framework
test/framework/general.py
1
6823
## # Copyright 2015-2020 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
-3,274,961,761,613,660,000
40.351515
119
0.650447
false
palerdot/calibre
src/calibre/gui2/custom_column_widgets.py
1
38720
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai __license__ = 'GPL v3' __copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from functools import partial from PyQt4.Qt import (QComboBox, QLabel, QSpinBox, QDoubleSpinBox, QDateTimeEdit, QD...
gpl-3.0
-1,996,979,856,631,141,400
34.752539
100
0.5703
false
icgc/icgc-get
icgcget/log_filters.py
1
1451
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2016 The Ontario Institute for Cancer Research. All rights reserved. # # This program and the accompanying materials are made available under the terms of the GNU Public License v3.0. # You should have received a copy of the GNU General Public License along wi...
gpl-3.0
3,442,870,645,632,482,300
42.969697
112
0.743625
false
RPGOne/Skynet
scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/sklearn/utils/__init__.py
2
12026
""" The :mod:`sklearn.utils` module includes various utilities. """ from collections import Sequence import numpy as np from scipy.sparse import issparse import warnings from .murmurhash import murmurhash3_32 from .validation import (as_float_array, assert_all_finite, warn_if_not_float, ...
bsd-3-clause
-1,182,036,154,968,007,700
27.43026
79
0.567936
false
jkandasa/integration_tests
cfme/tests/cli/test_evmserverd.py
1
1948
# -*- coding: utf-8 -*- """This module contains tests that exercise control of evmserverd service.""" import pytest from cfme.utils import version from cfme.utils.wait import wait_for_decorator @pytest.yield_fixture(scope="module") def start_evmserverd_after_module(appliance): appliance.start_evm_service() ap...
gpl-2.0
-4,283,951,062,109,623,300
36.461538
98
0.684292
false
ovnicraft/geospatial
base_geoengine/geo_model.py
1
9109
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
agpl-3.0
3,238,894,645,198,967,000
44.673367
79
0.530861
false
CodeMonkeyJan/hyperspy
hyperspy/tests/model/test_component.py
1
8311
import numpy as np from hyperspy.component import Component from hyperspy.axes import AxesManager from unittest import mock class TestMultidimensionalActive: def setup_method(self, method): self.c = Component(["parameter"]) self.c._axes_manager = AxesManager([{"size": 3, ...
gpl-3.0
2,625,049,015,138,217,000
33.201646
78
0.576224
false
quanvm009/codev7
openerp/addons_quan/lifestyle/model/purchase.py
1
4374
# -*- coding: utf-8 -*- # ##################################################################### # # OpenERP, Open Source Management Solution # Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>). # Copyright (C) 2013 INIT Tech Co., Ltd (http://init.vn). # This program is free software: you can redistribute it and/or...
agpl-3.0
5,902,361,159,857,862,000
46.543478
114
0.587334
false
tttor/csipb-jamu-prj
predictor/connectivity/classifier/selfblm/generateNegativeData.py
1
3174
import csv import sys import json import time import numpy as np sys.path.append('../../utility') import yamanishi_data_util as yam sys.path.append('../cluster/kmedoid') import kmedoid as kmed def main(): if len(sys.argv)!=6: print ("python blmniisvm_experiment.py [e|ic|gpcr|nr] [clustMethod] " ...
mit
2,923,356,411,213,481,500
26.362069
90
0.546629
false
leandrotoledo/python-telegram-bot
tests/test_inlinequeryresultvideo.py
2
6959
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2021 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
lgpl-3.0
-5,285,657,611,861,595,000
43.324841
99
0.672367
false
brigittebigi/proceed
proceed/src/TagPDF/name.py
1
3002
#! /usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | ...
gpl-3.0
-5,171,279,699,594,909,000
30.93617
77
0.425716
false
atom/crashpad
util/mach/mig.py
1
4962
#!/usr/bin/env python # coding: utf-8 # Copyright 2014 The Crashpad 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/LICEN...
apache-2.0
-1,422,665,711,272,995,300
32.855172
80
0.689754
false
Ruide/angr-dev
angr-management/angrmanagement/ui/widgets/qdisasm_statusbar.py
1
1757
from PySide.QtGui import QFrame, QHBoxLayout, QLabel, QPushButton from ..menus.disasm_options_menu import DisasmOptionsMenu class QDisasmStatusBar(QFrame): def __init__(self, disasm_view, parent=None): super(QDisasmStatusBar, self).__init__(parent) self.disasm_view = disasm_view # widg...
bsd-2-clause
591,387,070,138,443,900
23.068493
79
0.613546
false
jessamynsmith/fontbakery
bakery_cli/pipe/copy.py
1
7851
# coding: utf-8 # Copyright 2013 The Font Bakery 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 re...
apache-2.0
-2,528,072,127,931,410,000
32.126582
91
0.567698
false
AstroFloyd/LearningPython
Fitting/scipy.optimize.least_squares.py
1
2724
#!/bin/env python3 # https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.least_squares.html """Solve a curve fitting problem using robust loss function to take care of outliers in the data. Define the model function as y = a + b * exp(c * t), where t is a predictor variable, y is an observation and a,...
gpl-3.0
941,937,446,783,417,300
27.673684
110
0.659692
false
zapbot/zap-mgmt-scripts
vulnerableApp/vulnerableApp_spider_scan.py
1
2701
#!/usr/bin/env python import time, sys, getopt from pprint import pprint from zapv2 import ZAPv2 def main(argv): # ------------------------------------------------------------------------- # Default Configurations - use -z/-zap and -w/-vulnerableApp for different IP addrs # ----------------------------...
apache-2.0
-2,391,996,777,327,397,000
29.348315
107
0.557201
false
CLVsol/odoo_api
clv_abcfarma.py
1
22488
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public Lic...
agpl-3.0
5,908,939,874,946,096,000
35.329564
84
0.571861
false
cmmorrow/sci-analysis
sci_analysis/test/test_correlation.py
1
9050
import unittest import numpy as np import scipy.stats as st from ..analysis import Correlation from ..analysis.exc import MinimumSizeError, NoDataError from ..data import UnequalVectorLengthError, Vector class MyTestCase(unittest.TestCase): def test_Correlation_corr_pearson(self): """Test the Correlation...
mit
6,280,971,397,758,690,000
41.890995
111
0.612818
false
Read-Lab-Confederation/nyc-subway-anthrax-study
data/01-accessing-data-and-controls/extract-pathogens.py
1
2526
#! /usr/bin/env python """ Read supplementary table and extract pathogens. sys.argv[1]: data/DataTable5-metaphlan-metadata_v19.txt Extract the sample id and the columns which pertain to yersinia and anthracis. """ def split_header(header): """ Some headers are really long, return only the last portion. ...
mit
-1,774,640,699,900,862,000
32.236842
138
0.591449
false
zozo123/buildbot
master/buildbot/util/maildir.py
1
6077
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-3.0
4,488,689,082,321,069,000
40.623288
94
0.631562
false
makersauce/web-laser
src/sender.py
1
2239
#!/usr/bin/env python import serial import re import time import sys import argparse # import threading RX_BUFFER_SIZE = 128 def send(job=None,sname='/dev/ttyACM0'): if job == None: yield 'Invalid Job' try: s = serial.Serial(sname,9600) except Exception, e: yield str(e).spl...
mit
-3,086,171,208,495,925,000
27.705128
108
0.531487
false
scikit-monaco/scikit-monaco
skmonaco/benchmarks/bench_uniform.py
1
1374
from __future__ import print_function from numpy.testing import measure from skmonaco import mcquad def run_print(test_list): print() print(" Integrating sum(x**2) -- Uniform Monte Carlo") print(" ============================================") print() print(" ndims | npoints | nprocs | time ") ...
bsd-3-clause
-95,458,390,227,742,830
35.157895
161
0.569869
false
thatguystone/verbinator
word.py
1
28502
# -*- coding: utf-8 -*- # # Copyright (c) 2010 Andrew Stone # # This file is part of of Verbinator. # # Verbinator 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...
gpl-3.0
-4,460,666,863,429,533,700
26.600388
150
0.61748
false
bonzini/rube-gmail
py/gmail-filters.py
1
11406
# gmail-filters.py # # Uses the GMail API to remotely manipulate filters for # mailing lists and the corresponding labels. # # Author: Paolo Bonzini <pbonzini@redhat.com> # License: AGPLv3 from __future__ import print_function import httplib2 import os, sys, io import argparse, copy import mailbox try: from googl...
agpl-3.0
-3,171,581,649,152,842,000
43.905512
133
0.576889
false
dials/dials
algorithms/shadowing/filter.py
1
1446
def filter_shadowed_reflections(experiments, reflections, experiment_goniometer=False): from dxtbx.masking import is_inside_polygon from scitbx.array_family import flex shadowed = flex.bool(reflections.size(), False) for expt_id in range(len(experiments)): expt = experiments[expt_id] im...
bsd-3-clause
-5,117,904,831,205,807,000
40.314286
87
0.531812
false
nikita-moor/morfeusz-wrapper
morfeusz.py
1
8855
#!/usr/bin/env python2 # -*- coding: utf-8 -*- import morfeusz2 import sys, os import getopt reload(sys) sys.setdefaultencoding('utf8') def usage(): print("Use: morfeusz.py przykład") def m_number(f): abbr = { "sg" : ["sing.", "singular"], "pl" : ["pl.", "plural" ], } htm...
bsd-2-clause
8,579,622,904,063,115,000
28.188119
109
0.460764
false
g3rd/django-timetable
timetable/admin.py
1
1781
from timetable.models import Calendar, Classification, Color, Event, EventClassification from django.contrib import admin from django.utils.translation import ugettext_lazy as _ class CalendarAdmin(admin.ModelAdmin): list_display = ('color_display', 'name', ) list_display_links = ('name', ) prepopulated_...
mit
1,769,930,257,953,895,700
30.245614
110
0.636721
false
ben-ng/swift
benchmark/scripts/generate_harness/generate_harness.py
1
3413
#!/usr/bin/env python # ===--- generate_harness.py ---------------------------------------------===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See ...
apache-2.0
-4,840,144,993,802,885,000
36.097826
79
0.595078
false
scienceopen/spectral_analysis
scripts/FilterDesign.py
1
3846
#!/usr/bin/env python """ Design FIR filter coefficients using Parks-McClellan or windowing algorithm and plot filter transfer function. Michael Hirsch, Ph.D. example for PiRadar CW prototype, writing filter coefficients for use by filters.f90: ./FilterDesign.py 9950 10050 100e3 -L 4096 -m firwin -o cwfir.asc Refs: h...
mit
5,234,407,355,728,393,000
30.52459
122
0.626365
false
janbrohl/tometa
tometa.py
1
4373
# -*- coding: utf-8 -*- from urllib.parse import parse_qsl from xml.sax.saxutils import escape, quoteattr import re __version__ = "0.5" def wrap_file(environ, filelike, block_size=8192): # copied from # http://legacy.python.org/dev/peps/pep-3333/#optional-platform-specific-file-handling if 'wsgi.file_wr...
bsd-3-clause
-7,971,749,874,693,538,000
29.158621
90
0.50606
false
alfasin/st2
st2auth/st2auth/gunicorn_config.py
1
1784
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
7,432,891,043,535,158,000
32.660377
97
0.722534
false
SSGL-SEP/t-sne_cruncher
utils/utils.py
1
6152
import os import errno import csv from typing import List, Dict, TypeVar, Any from argparse import Namespace import numpy as np T = TypeVar("T") def all_files(folder_path: str, exts: List[str]) -> str: """ Gather all files conforming to provided extensions. :param folder_path: Path to folder :type...
mit
3,027,253,039,485,006,000
28.295238
91
0.557055
false
hydratk/hydratk-ext-yoda
src/hydratk/extensions/yoda/yoda.py
1
36383
# -*- coding: utf-8 -*- """Providing automated testing functionality .. module:: yoda.yoda :platform: Unix :synopsis: Providing automated testing functionality .. moduleauthor:: Petr Czaderna <pc@hydratk.org> """ """ Events: ------- yoda_before_init_tests yoda_before_append_test_file yoda_before_process_tests ...
bsd-3-clause
2,846,378,673,464,787,000
35.529116
146
0.525987
false
rbrich/keys
tests/test_shell.py
1
6272
import sys import os import time import pexpect import pytest class Expect: def __init__(self, expected, args=None, regex=False): """`expected` is either string or callable with optional `args` Unless `regex` is enabled, the `expected` string is matched as-is (raw). """ self._e...
mit
-8,885,239,719,963,376,000
26.388646
80
0.499203
false
nigelsmall/py2neo
test/test_transaction.py
1
11243
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright 2011-2016, Nigel Small # # 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 # # Unle...
apache-2.0
7,287,058,449,334,668,000
31.970674
115
0.566041
false
lwerdna/alib
py/logic/BoolExpr.py
1
16510
#!/usr/bin/python #------------------------------------------------------------------------------ # # This file is a part of autils. # # Copyright 2011-2016 Andrew Lamoureux # # autils is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fr...
gpl-3.0
-8,923,053,887,063,572,000
23.172767
108
0.650878
false
samphippen/dynpk
config.py
1
1259
import ConfigParser class Config: "Configuration parser" def __init__(self, fname): self.parser = ConfigParser.ConfigParser() self.parser.read( fname ) self.rpms = self._opt_break( "rpms" ) self.local_rpms = self._opt_break( "local_rpms" ) self.files = self._opt_break(...
gpl-3.0
5,883,475,230,444,872,000
34.971429
107
0.590151
false
wasit7/cs426
code/week13_bokeh/a_controller.py
1
1588
# -*- coding: utf-8 -*- """ Created on Wed Apr 22 14:45:42 2015 @author: Wasit """ #sequential import time import numpy as np from six.moves import zip from bokeh.plotting import * def part(n=20, m=3): base = n//m; extra = n-m*(n//m) x=np.ones(m,dtype=np.int32)*base x[0:extra]=base+1 y = [0] c...
mit
8,286,279,619,056,252,000
26.396552
110
0.578715
false
mganeva/mantid
Testing/SystemTests/tests/analysis/SANS2DSearchCentreGUI.py
1
1510
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name from __future_...
gpl-3.0
-4,797,869,511,216,230,000
34.116279
122
0.719205
false
nive-cms/nive
nive/adminview/view.py
1
13829
#---------------------------------------------------------------------- # Copyright 2012, 2013 Arndt Droullier, Nive GmbH. All rights reserved. # # 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, ...
gpl-3.0
1,813,179,962,076,930,600
42.351097
151
0.574734
false
ChainsAutomation/chains
lib/chains/commandline/commands/AmqpSendmany.py
1
1073
from __future__ import absolute_import from __future__ import print_function from chains.commandline.commands import Command import time import sys from six.moves import range class CommandAmqpSendmany(Command): def main(self, number=1000, dotEvery=10, numEvery=100): """ Flood message bus with events """ ...
gpl-2.0
3,591,508,889,539,982,000
33.612903
96
0.54986
false
moccu/django-markymark
markymark/widgets.py
1
1531
from django import forms from django.conf import settings from markymark.renderer import initialize_renderer class MarkdownTextarea(forms.Textarea): """ Extended forms Textarea which enables the javascript markdown editor. """ def __init__(self, *args, **kwargs): """ Sets the require...
mit
-3,816,546,566,576,119,300
29.62
76
0.610059
false
sverrirab/kosningar
kosningar2016.py
1
2895
import itertools MAJORITY = 32 # out of 63 RESULTS = {'A': 4, 'C': 7, 'B': 8, 'D': 21, 'P': 10, 'S': 3, 'V': 10} ALL = "".join(sorted(RESULTS.keys())) def normalize(t): """ Get a sorted list of party letters for inserting into set/hash. :param t: set of letters :return: string with sorted letters ...
mit
555,633,029,896,347,260
27.106796
97
0.578584
false
dmccloskey/SBaaS_thermodynamics
SBaaS_thermodynamics/stage03_quantification_dG_f_postgresql_models.py
1
7971
#SBaaS base from SBaaS_base.postgresql_orm_base import * class data_stage03_quantification_dG0_f(Base): __tablename__ = 'data_stage03_quantification_dG0_f' id = Column(Integer, Sequence('data_stage03_quantification_dG0_f_id_seq'), primary_key=True) reference_id = Column(String(100)) met_name = Column(St...
mit
6,822,437,802,437,045,000
41.404255
131
0.558901
false
drewsonne/aws-autodiscovery-templater
awsautodiscoverytemplater/__init__.py
1
2339
import argparse from awsauthhelper import AWSArgumentParser from awsautodiscoverytemplater.command import TemplateCommand __author__ = 'drews' def parse_cli_args_into(): """ Creates the cli argparser for application specifics and AWS credentials. :return: A dict of values from the cli arguments :rtyp...
gpl-2.0
-4,794,933,421,561,624,000
50.977778
119
0.61864
false
google-research/google-research
ncsnv3/models/ddpm.py
1
4027
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
apache-2.0
-1,091,842,738,284,079,700
31.475806
81
0.664515
false
box/box-python-sdk
boxsdk/object/group.py
1
3892
# coding: utf-8 from __future__ import unicode_literals, absolute_import import json from boxsdk.util.text_enum import TextEnum from .base_object import BaseObject from ..pagination.limit_offset_based_object_collection import LimitOffsetBasedObjectCollection from ..util.api_call_decorator import api_call from ..util....
apache-2.0
2,143,790,637,221,263,600
31.983051
118
0.589671
false
passy/rdreiflask
rdrei/application.py
1
1163
# -*- coding: utf-8 -*- """ application ~~~~~~~~~~~ Main entry point for for rdrei.net. :copyright: 2010, Pascal Hartig <phartig@rdrei.net> :license: GPL v3, see doc/LICENSE for more details. """ from flask import Flask, g, session from rdrei import settings, __version__ app = Flask('rdrei') app.config.from_object(...
gpl-3.0
7,889,844,541,514,751,000
20.943396
69
0.685297
false
ufcg-lsd/python-hpOneView
examples/scripts/get-san-providers.py
1
3990
#!/usr/bin/env python ### # (C) Copyright (2012-2015) Hewlett Packard Enterprise Development LP # # 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 limita...
mit
3,060,862,554,571,726,300
32.529412
105
0.649624
false
hjoliver/cylc
cylc/flow/prerequisite.py
1
11201
# THIS FILE IS PART OF THE CYLC WORKFLOW ENGINE. # Copyright (C) NIWA & British Crown (Met Office) & Contributors. # # 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 Licen...
gpl-3.0
8,367,585,490,118,841,000
38.027875
79
0.599946
false
maqqr/psycho-bongo-fight
load_lib.py
1
1434
# Downloads proprietary bass2.4 audio library import os os.mkdir("lib_dl_temporary") import platform from urllib2 import urlopen, URLError, HTTPError import zipfile def dlfile(url): # Open the url try: f = urlopen(url) print "downloading " + url # Open our local file for writing ...
mit
3,421,218,029,979,973,000
16.487805
61
0.603208
false
b29308188/cs512project
network-embedding/tense-benchmarks/base-line/transD.py
1
9322
#coding:utf-8 import numpy as np import tensorflow as tf import os import time import datetime import ctypes from utils import * from config import * modelName = 'transD-general' ll = ctypes.cdll.LoadLibrary lib = ll("./init.so") deg = 2 class TransDModel(object): def calc(self, e, t, r): return e ...
mit
-1,308,762,378,186,579,500
47.806283
178
0.575842
false
maas/maas
src/maascli/__init__.py
1
1649
# Copyright 2012-2016 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). """The MAAS command-line interface.""" import os import sys from maascli.parser import get_deepest_subparser, prepare_parser def snap_setup(): if "SNAP" in os.environ...
agpl-3.0
-4,936,739,734,815,465,000
31.333333
77
0.58581
false
abdesslem/balbuzard
plugins/trans_sample_plugin.py
1
7589
# This is a sample transform plugin script for bbcrack # All transform plugin scripts need to be named trans*.py, in the plugins folder # Each plugin script should add Transform objects. # First define a new Transform class, inheriting either from Transform_char or # Transform_string: # - Transform_char: for...
gpl-2.0
-7,201,563,091,317,111,000
40.875706
104
0.603373
false
FedoraScientific/salome-paravis
test/VisuPrs/Plot3D/F5.py
1
1491
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library 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; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
lgpl-2.1
-6,299,010,106,508,163,000
37.230769
81
0.731053
false
SKA-ScienceDataProcessor/FastImaging-Python
src/fastimgproto/scripts/casa/simulate_vis.py
1
1700
""" Simulated pipeline run """ import logging import os import astropy.units as u import click from astropy.coordinates import Angle, SkyCoord import fastimgproto.casa.simulation as casa_sim from fastimgproto.pipeline.skymodel import get_spiral_source_test_pattern from fastimgproto.skymodel.helpers import SkyRegion, ...
apache-2.0
7,177,009,272,733,361,000
34.416667
75
0.597059
false
xuweiliang/Codelibrary
nova/virt/block_device.py
1
22007
# 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 agreed to in...
apache-2.0
-5,514,396,370,556,929,000
37.473776
79
0.575999
false
quantiply-fork/schema-registry
docs/conf.py
1
8507
# -*- coding: utf-8 -*- # # Schema Registry documentation build configuration file, created by # sphinx-quickstart on Wed Dec 17 14:17:15 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated fil...
apache-2.0
-4,174,739,586,087,467,000
30.981203
79
0.710121
false
esho/yabl.tap
tap/security/providers.py
1
5781
import requests from datetime import datetime, timedelta from mesh.standard import ForbiddenError, OK from spire.core import Unit, Configuration, Dependency from spire.mesh import MeshDependency from spire.support.logs import LogHelper from scheme.fields import * from tap.security.password import PasswordManager __a...
bsd-3-clause
-4,999,787,152,448,890,000
32.034286
85
0.596783
false
Pouf/CodingCompetition
CG/hard_the-labyrinth.py
1
3623
# Your mission is to: # - find the control room from which you will be able to deactivate the tracker beam # - get back to your starting position once you've deactivated the tracker beam # The structure is arranged as a rectangular maze composed of cells. Within the # maze Kirk can go in any of the following dire...
mit
8,947,254,263,685,032,000
33.194175
84
0.575766
false
hal0x2328/neo-python
neo/VM/ExecutionEngine.py
1
47965
import hashlib import datetime import traceback from neo.VM.OpCode import * from neo.VM.RandomAccessStack import RandomAccessStack from neo.VM.ExecutionContext import ExecutionContext from neo.VM import VMState from neo.VM.InteropService import Array, Struct, CollectionMixin, Map, Boolean from neo.Core.UInt160 import ...
mit
-6,706,989,789,256,568,000
34.164956
159
0.525279
false
meine-stadt-transparent/meine-stadt-transparent
mainapp/tests/main/test_citytools.py
1
1865
import json from unittest import skip import pytest import responses from django.test import TestCase from mainapp.functions.citytools import import_outline, import_streets from mainapp.models import Body, SearchStreet @skip class TestCitytools(TestCase): fixtures = ["initdata"] ags_munich = "09162000" ...
mit
-8,019,267,294,888,462,000
32.872727
118
0.659689
false
citizensense/pasture
database.py
1
12063
#!/usr/bin/python3 import os, sqlite3, json, time # Got some great tips from: # http://www.pythoncentral.io/introduction-to-sqlite-in-python/ # Class to manage all database operations class Database: # Create a new database connection _ def __init__(self, dbfile, dbstruct, ignore='locals'): self.msg =...
gpl-2.0
8,075,983,648,181,608,000
37.053628
159
0.4857
false