code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
try: import mkl have_mkl = True print("Running with MKL Acceleration") except ImportError: have_mkl = False print("Running with normal backends") import pickle import numpy as np import matplotlib.pyplot as plt import matplotlib.colors as mcolors import sys outputDirectory = "outputMultiProj/" im...
wilmerhenao/Tomotherapy-Without-Pulse
ResultTomo.py
Python
mit
23,605
# Methods for generating Region Adjacency Graphs import networkx as nx import numpy as np # Generates the Region Adjacency Graph def generate_rag(im, linear): G=nx.Graph() if linear == True: (max_diff, min_diff) = get_diff_range(im) scale_factor = 1/(max_diff - min_diff) x = 0 for col...
Upward-Spiral-Science/uhhh
code/Graph Analysis/ragGen.py
Python
apache-2.0
2,992
# Copyright (C) 2012 Agustin Zubiaga <aguz@sugarlabs.org> # Copyright (C) 2013 Sugar Labs # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option)...
quozl/sugar
extensions/cpsection/background/view.py
Python
gpl-3.0
7,204
""" Django settings for msgvis 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/ """ import sys import os from path import path import dj_database_url # Normal...
hds-lab/textvisdrg
msgvis/settings/common.py
Python
mit
12,664
import csv from gff3 import Gff3 import gff3 gff3.gff3.logger.setLevel(100) import io, re from urllib import parse SNPEFF_REGEX = re.compile(r"(\w+)\((.+)\)") def parse_genes(gff3_file, go_terms_file): """parses the genes from gff3 and enriches it with additional information""" go_map = _get_go_map(go_terms_f...
1001genomes/AraGWAS
aragwas_server/gwasdb/parsers.py
Python
mit
6,179
# -*- coding: utf-8 -*- # A fix encapsulating class, based on the AGTL Fix class from datetime import datetime class Fix(): BEARING_HOLD_EPD = 90 # arbitrary, yet non-random value last_bearing = 0 # tracking the minimum difference between a received fix time and # our current internal time. min_ti...
M4rtinK/modrana
core/fix.py
Python
gpl-3.0
2,174
#!/usr/bin/env python # -*- coding: utf-8 -*- import omero from omero.rtypes import * from omero_sys_ParametersI import ParametersI def getProjects(query_prx, username): return query_prx.findAllByQuery( "select p from Project p join fetch p.datasetLinks dil join fetch dil.child where p.details.owner.om...
jballanc/openmicroscopy
examples/TreeList/AllProjects.py
Python
gpl-2.0
394
#!/usr/bin/env ccp4-python ''' Created on 29 Dec 2015 @author: jmht ''' import os import sys from ample.constants import SHARE_DIR from ample.testing import test_funcs from ample.testing.integration_util import AMPLEBaseTest INPUT_DIR = os.path.join(SHARE_DIR, "examples", "transmembrane.3LBW", "input") TEST_DICT = ...
linucks/ample
examples/transmembrane.3LBW/test_cases.py
Python
bsd-3-clause
1,743
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf.urls import patterns, include, url from classe import views urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^listar_ajax$', views.listar_ajax, name='listar_ajax'), url(r'^excluir_ajax$', views.excluir_ajax, n...
renanaugustom/Ferramenta-de-transformacao-de-requisitos-para-arquitetura-de-tres-camadas
Projeto/classe/urls.py
Python
mit
649
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap import Pixmap from Components.ConfigList import ConfigListScreen from Components.config import getConfigListEntry, config, ConfigYesNo, ConfigT...
BlackPole/bp-dvbapp
lib/python/Screens/BpSet.py
Python
gpl-2.0
22,903
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE from opus_core.variables.variable import Variable from variable_functions import my_attribute_label class total_sqft_for_non_home_based_jobs(Variable): """Sum of sqft for jobs that aren't ...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/urbansim/gridcell/total_sqft_for_non_home_based_jobs.py
Python
gpl-2.0
1,961
# Copyright 2015, Cisco Systems. # 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 agr...
devananda/ironic
ironic/tests/unit/drivers/modules/ucs/test_power.py
Python
apache-2.0
15,219
# -*- encoding: utf-8 -*- from django.contrib import admin from .models import ZoteroExtractorLog ### ZoteroExtractorLogAdmin #################################################################################################### class ZoteroExtractorLogAdmin(admin.ModelAdmin): model = ZoteroExtractorLog ...
morelab/labman_ud
labman_ud/extractors/zotero/admin.py
Python
gpl-3.0
970
import IMP import IMP.algebra import IMP.core import IMP.atom import IMP.test class Tests(IMP.test.TestCase): """Tests for SurfaceMover.""" def test_init(self): """Test creation of surface mover.""" m = IMP.Model() surf = IMP.core.Surface.setup_particle(IMP.Particle(m)) surf....
shanot/imp
modules/core/test/test_surface_mover.py
Python
gpl-3.0
2,528
""" Copyright 2010 Jason Chu, Dusty Phillips, and Phil Schalm 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 agre...
pnomolos/greatbigcrane
greatbigcrane/buildout_manage/buildout_config_tests.py
Python
apache-2.0
5,956
from .base import * # Debugging DEBUG = True # Installed Apps INSTALLED_APPS += ( 'debug_toolbar', ) # Authentication AUTHENTICATION_BACKENDS = ( 'django.contrib.auth.backends.ModelBackend', ) # Media Files MEDIA_URL = '/media/' MEDIA_ROOT = os.path.join(BASE_DIR, os.pardir, 'media') SENDFILE_BACKEN...
wbg-optronix-lab/emergence-lab
wbg/settings/development.py
Python
mit
356
#!/usr/bin/env python import sys import tidexapi if len(sys.argv) < 2: print("Usage: print-trans-history.py <key file>") print(" key file - Path to a file containing key/secret/nonce data") sys.exit(1) key_file = sys.argv[1] # NOTE: In future versions, resaveOnDeletion will default to True. with tidex...
lromanov/tidex-api
samples/print-trans-history.py
Python
mit
1,309
#The idea behind this code is relatively simple: #Branching out from one Wikipedia article (for example, Compton Scattering), list #all article hrefs. Query if they are physics related, then continue iterating over the list. #When the page is complete, move to the next page and do the same thing. #For r...
OrderFromChaos/wikibrowse
crawler.py
Python
mit
5,805
# Copyright 2017 - ZTE Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
openstack/vitrage
vitrage/evaluator/equivalence_repository.py
Python
apache-2.0
1,907
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@gmail.com> # 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 = {'metadata_version': '1.0', ...
fernandezcuesta/ansible
lib/ansible/modules/network/illumos/dladm_etherstub.py
Python
gpl-3.0
4,178
#!/usr/bin/env python3 # tsuserver3, an Attorney Online server # # Copyright (C) 2016 argoneus <argoneuscze@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the ...
AttorneyOnlineVidya/tsuserver3
start_server.py
Python
agpl-3.0
896
total = 0 numbers = range(1,21) for num in numbers: if num % 2 == 0: total = total + num elif num % 5 == 0: print "Checkpoint %d" %num print total, "- Total"
chrisortman/CIS-121
k0799343/quiz1again.py
Python
mit
206
""" Mappings from VT100 (ANSI) escape sequences to the corresponding prompt_toolkit keys. We are not using the terminfo/termcap databases to detect the ANSI escape sequences for the input. Instead, we recognize 99% of the most common sequences. This works well, because in practice, every modern terminal is mostly Xter...
jonathanslenders/python-prompt-toolkit
prompt_toolkit/input/ansi_escape_sequences.py
Python
bsd-3-clause
13,271
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-10 14:59 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('conversion', '0003_auto_20160528_2219'), ] operations = [ migrations.AddFiel...
geometalab/osmaxx-frontend
osmaxx/conversion/migrations/0004_parametrization_detail_level.py
Python
mit
545
#!/usr/bin/python from utils import * def obv(price,volume): """On Balance Volume""" dprice=var(price) idx=((dprice>0)*1+(dprice<0)*(-1))*volume[1:] return idx.cumsum() def retxvol(price,volume): idx=percentvar(price)*volume[1:] return idx.cumsum() def retxvarvol(price,volume): ...
atilaromero/finance
finance/obv.py
Python
agpl-3.0
384
# pvtol_lqr.m - LQR design for vectored thrust aircraft # RMM, 14 Jan 03 # # This file works through an LQR based design problem, using the # planar vertical takeoff and landing (PVTOL) aircraft example from # Astrom and Murray, Chapter 5. It is intended to demonstrate the # basic functionality of the python-control p...
roryyorke/python-control
examples/pvtol-lqr.py
Python
bsd-3-clause
6,908
# encoding: utf-8 import os import subprocess import mongoengine as db def generic_backend(): """Allow Python to handle the details of load average discovery. This is the fastest method, but may not be portable everywhere. Testing on a Linux 2.6.35 Rackspace Cloud server: 17µsec. """ ...
marrow/monitor.collector
marrow/monitor/collector/ext/load.py
Python
mit
1,855
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
kartoza/geonode
geonode/geoserver/ows.py
Python
gpl-3.0
4,612
from django.core.management.base import NoArgsCommand from crashmanager.models import Bug, BugProvider from django.conf import settings from crashmanager.management.common import mgmt_lock_required import warnings class Command(NoArgsCommand): help = "Check the status of all bugs we have" @mgmt_lock_required ...
cihatix/FuzzManager
server/crashmanager/management/commands/bug_update_status.py
Python
mpl-2.0
2,587
### # Copyright (c) 2005, Daniel DiPaolo # Copyright (c) 2010, James McCoy # 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 no...
tecan/xchat-rt
plugins/scripts/encryption/supybot-code-6361b1e856ebbc8e14d399019e2c53a35f4e0063/plugins/Anonymous/test.py
Python
gpl-2.0
3,262
from os import getcwd from os.path import join, basename from ocdev.plugins.plugin import Plugin from tarfile import open as tar_open from xml.etree import ElementTree import requests from ocdev.plugins.appstore.infoparser import InfoParser class Arguments: def __construct__(self, archivedir, action='release')...
mmattel/ocdev
ocdev/plugins/appstore/appstore.py
Python
gpl-3.0
4,462
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 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.0 # ...
sileht/deb-openstack-nova
nova/db/sqlalchemy/migrate_repo/versions/025_add_uuid_to_instances.py
Python
apache-2.0
1,414
from matplotlib import pyplot import ternary def plot_dictionary(s, ax=None): """ Plot two or three dimensional dictionary on a simplex partition, such as a stationary distribution. """ num_types = len(s.keys()[0]) N = sum(s.keys()[0]) if not ax: fig, ax = pyplot.subplots() ...
marcharper/stationary
stationary/utils/plotting.py
Python
mit
689
#!/usr/bin/env python # This is the MIT License # http://www.opensource.org/licenses/mit-license.php # # Copyright (c) 2007,2008 Nick Galbreath # # 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 Softw...
diogobaeder/pystatsd
pystatsd/gmetric.py
Python
bsd-2-clause
7,425
"""Use proper type and FK for blocking created_by_id Revision ID: 6b0f87a586c Revises: 297a1656fc2 Create Date: 2015-05-07 09:25:17.068950 """ import sqlalchemy as sa from alembic import op # revision identifiers, used by Alembic. revision = '6b0f87a586c' down_revision = '297a1656fc2' def upgrade(): op.execut...
belokop/indico_bare
migrations/versions/201505070925_6b0f87a586c_use_proper_type_and_fk_for_blocking_.py
Python
gpl-3.0
1,029
#!/usr/bin/env python3 import subprocess from flask import Flask from two1.wallet import Wallet from two1.bitserv.flask import Payment app = Flask(__name__) wallet = Wallet() payment = Payment(app, wallet) # machine-payable endpoint that returns fortune if payment made @app.route('/buy') @payment.required(1000) d...
fredzannarbor/pagekicker-community
scripts_python_3/bitcoin/fortune/pk21server.py
Python
apache-2.0
700
# Python imports import os # Tornado imports import tornado.auth import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from tornado.options import define, options from tornado.web import url # Sqlalchemy imports from sqlalchemy import create_engine from sqlalchemy.orm import scope...
ptphp/PyLib
src/tornado/demos/sqlalchemy/app.py
Python
apache-2.0
1,988
#!/usr/bin/python2 # vim: sts=4 sw=4 et import _hal, hal, gobject import linuxcnc import sys import os import time import zmq import uuid import gtk.gdk import gobject import glib import socket from servicediscovery import ServiceDiscovery import avahi from machinetalk.protobuf.message_pb2 import Container from mac...
strahlex/machinekit
lib/python/hal_glib.py
Python
lgpl-2.1
27,116
# -*- coding: utf-8 -*- """ *************************************************************************** FieldsCalculatorDialog.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com **...
wonder-sk/QGIS
python/plugins/processing/algs/qgis/ui/FieldsCalculatorDialog.py
Python
gpl-2.0
9,650
#!/usr/bin/env python #------------------------------------------------------------ # # Ciro D. Santilli # # Prints a list of paths which are files followed by their inodes and sha1 sums. # # Useful to make a backup of paths names before mass renaming them, # supposing your files are distinct by SHA1 and that SHA1 ha...
cirosantilli/python-utils
bin/find_path_sha1.py
Python
mit
2,436
#!/usr/bin/env python # Script to test reading a sms from twilio import os, os.path, sys import socket if __name__ == "__main__": PROJECT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..',)) print "PROJECT_ROOT=", PROJECT_ROOT sys.path.append(PROJECT_ROOT) # Add virtualenv di...
warnes/irrigatorpro
irrigator_pro/testing/test-receive-sms.py
Python
mit
1,437
# pylint: skip-file from __future__ import print_function import mxnet as mx from mxnet import gluon from mxnet.gluon import nn import numpy as np import logging from common import get_data from mxnet import autograd logging.basicConfig(level=logging.DEBUG) # define network def get_net(): net = nn.Sequential() ...
hotpxl/mxnet
tests/python/train/test_autograd.py
Python
apache-2.0
2,949
# Author: Eric Larson <larson.eric.d@gmail.com> # # License: BSD-3-Clause import os.path as op import re import shutil import zipfile import numpy as np import pooch import pytest from mne.io.constants import (FIFF, FWD, _coord_frame_named, _ch_kind_named, _ch_unit_named, _ch_unit_mul_n...
wmvanvliet/mne-python
mne/io/tests/test_constants.py
Python
bsd-3-clause
14,637
#!/usr/bin/env python import sys, json, os from pycmef.iterators import * class DataIterator: iterators = [ SequentialIterator, RandomIterator, RandomGroup ] def __init__(self, sub, sets = 1, iterations = 1, order = None, dataset = None, data = None ): self.subsection = sub ...
zv1n/pycmef
pycmef/data_iterator.py
Python
bsd-2-clause
2,451
#!/usr/bin/env python from distutils.core import setup CLASSIFIERS = [ 'Intended Audience :: Developers', 'License :: OSI Approved :: Apache Software License', ] long_desc = 'coming soon.' setup(name='Octo', version='0.2', description='uPortal Log reader', long_description=long_desc, author='Toben Archer', ...
Narcolapser/bookish-octo-computing-machine
depricated/setup.py
Python
apache-2.0
577
from django.conf.urls import patterns, include, url from django.contrib import admin from site_ctf import views from site_ctf import views_admin from django.views.defaults import page_not_found from django.contrib.auth.decorators import login_required admin.autodiscover() handler404 = 'templates.404' admin_patterns =...
Crypt0-M3lon/k6
site_ctf/urls.py
Python
mit
2,166
from networkx.algorithms.assortativity import * from networkx.algorithms.asteroidal import * from networkx.algorithms.boundary import * from networkx.algorithms.bridges import * from networkx.algorithms.chains import * from networkx.algorithms.centrality import * from networkx.algorithms.chordal import * from networkx....
SpaceGroupUCL/qgisSpaceSyntaxToolkit
esstoolkit/external/networkx/algorithms/__init__.py
Python
gpl-3.0
6,055
# Copyright 2012 Cloudbase Solutions Srl # # 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 ...
nkrinner/nova
nova/tests/virt/hyperv/test_hypervapi.py
Python
apache-2.0
73,418
import sys import hypergraph import data import plot def main(): a = [] if sys.argv[1] == "plot": plot.scatter2d(data.read()) elif sys.argv[1] == "plot3d": plot.scatter3d(data.read()) else: for i in sys.argv[1:]: a.append(int(i)) hypergraph.gen_dataset(a[0],a[1],a[2],a[3],a[4]) if __nam...
aybchan/coordination-games
hypergraph/__main__.py
Python
mit
349
# Copyright 2015 Intel Corporation. # 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 requir...
nuagenetworks/nuage-openstack-neutron
nuage_neutron/plugins/nuage_ml2/nuage_port_ext_driver.py
Python
apache-2.0
2,064
from __future__ import absolute_import try: from collections.abc import Mapping, MutableMapping except ImportError: from collections import Mapping, MutableMapping try: from threading import RLock except ImportError: # Platform-specific: No threads available class RLock: def __enter__(self): ...
RalfBarkow/Zettelkasten
venv/lib/python3.9/site-packages/pip/_vendor/urllib3/_collections.py
Python
gpl-3.0
10,792
import argparse import os from config import * def main(): parser = argparse.ArgumentParser(prog=os.path.basename(__file__)) globals().update(load_config(parser)) parser.add_argument('--dataset', choices=datasets, required=False) args = parser.parse_args() # override default values if args....
dsibournemouth/autoweka
scripts/launch_default_experiments.py
Python
gpl-3.0
782
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('polls', '0040_delete_all_polls_results_and_counts'), ] operations = [ migrations.AlterIndexTogether( name='pollr...
xkmato/ureport
ureport/polls/migrations/0041_auto_20160510_0757.py
Python
agpl-3.0
432
import os import unittest def load_tests(loader, tests, pattern): readme_rst = "../../README.rst" readme_rst_relative = os.path.join(os.path.dirname(__file__), readme_rst) if os.path.isfile(readme_rst_relative): import doctest tests.addTests(doctest.DocFileSuite(readme_rst)) ret...
llazzaro/bookkeeper
swingtix/bookkeeper/test_docdocstrings.py
Python
agpl-3.0
467
from django.conf.urls import patterns, include, url from django.conf import settings from django.views.generic import ListView from django.views.generic.detail import DetailView from foo.hotel.models import Hotel from foo.hotel.views import HotelLimitListView from foo.hotel.views import HotelLimitNoOrderListView urlp...
rodo/django-perf
foo/hotel/urls.py
Python
gpl-3.0
544
# 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. # pylint: disable=W0401,W0614 from telemetry.page import page as page_module from telemetry.page import page_set as page_set_module class SkiaBuildbotDesk...
DiamondLovesYou/skia-sys
tools/skp/page_sets/skia_twitter_desktop.py
Python
bsd-3-clause
1,252
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-08 01:17 from __future__ import unicode_literals from django.db import migrations, models import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('translations', '0002_auto_20160207_0907'), ] oper...
placeB/translation-service
server/translations/migrations/0003_auto_20160208_0117.py
Python
mit
1,521
# coding:utf-8 import time import unittest import ddt from pageobject.account.Page_Account import Page_Account from selenium import webdriver from pageobject.Page_Login import Page_Login from utils.config import Config from utils.log1 import Log from pageobject.account.Page_Account_CEO_ADD import Page_Account_CEO_ADD f...
uyaly/test
testcase/1_del/Case16_CEO_del.py
Python
gpl-2.0
2,848
#!/usr/bin/env python3 import arrow import requests import pandas import dateutil def fetch_production(zone_key='TW', session=None, target_datetime=None, logger=None): if target_datetime: raise NotImplementedError('This parser is not yet able to parse past dates') url = 'http://data.taipower.com.tw/o...
tmrowco/electricitymap
parsers/TW.py
Python
gpl-3.0
2,941
from django.core.management.base import AppCommand class Command(AppCommand): help = 'Test Application-based commands' requires_model_validation = False args = '[appname ...]' def handle_app(self, app, **options): print('EXECUTE:AppCommand app=%s, options=%s' % (app, sorted(options.items())))...
rogerhu/django
tests/admin_scripts/management/commands/app_command.py
Python
bsd-3-clause
321
#!/usr/bin/env python # JDownloader/src/jd/controlling/LinkGrabberPackager.java import re from urlparse import urlparse def matchFirst(string, *args): """ matches against list of regexp and returns first match""" for patternlist in args: for pattern in patternlist: r = pattern.search(stri...
manuelm/pyload
module/common/packagetools.py
Python
gpl-3.0
4,869
# Copyright 2008 Armin Ronacher. # Licensed to PSF under a Contributor Agreement. """Fixer that cleans up a tuple argument to isinstance after the tokens in it were fixed. This is mainly used to remove double occurrences of tokens as a leftover of the long -> int / unicode -> str conversion. eg. isinstance(x, (int,...
teeple/pns_server
work/install/Python-2.7.4/Lib/lib2to3/fixes/fix_isinstance.py
Python
gpl-2.0
1,609
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-08-31 17:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('AutoGrade', '0009_auto_20170831_2214'), ] operations = [ migrations.AlterFi...
BilalZaib/AutoGrader
AutoGrade/migrations/0010_auto_20170831_2218.py
Python
mit
608
# -*- coding: utf-8 -*- import urllib3 from .exceptions import * from .api import use, follower from .log import logger urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) __version__ = "0.22.0" __author__ = "shidenggui"
msincenselee/vnpy
vnpy/api/easytrader/__init__.py
Python
mit
240
# # Author: Endre Karlson <endre.karlson@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
billingstack/python-fakturo
fakturo/core/cli/base.py
Python
apache-2.0
3,279
# # Copyright (C) 2013 Stanislav Bohm # # This file is part of Kaira. # # Kaira 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 3 of the License, or # (at your option) any later versi...
mec059/kaira
ptp/gencpp/checker.py
Python
gpl-3.0
7,739
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de> # # nexdatas is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the ...
nexdatas/writer
test/EFieldReshapeH5Cpp_test.py
Python
gpl-3.0
171,438
import SensorMonitor class SensorFactory: def __init__(self, sensor_cls, factory_if): self.sensor_cls = sensor_cls self.factory_if = factory_if def create(self, **kwargs): sensor_if = self.factory_if.create(**kwargs) return self.sensor_cls(sensor_if) class Sensor: def __...
Nzbuu/SensorMonitor
SensorMonitor/sensor.py
Python
mit
1,304
import warnings from collections import Sequence import rply from rply import ParserGenerator from mochi import __version__ name_seq = 0 def get_temp_name(): global name_seq name_seq += 1 name_symbol = Symbol('_gs%s' % name_seq) return name_symbol class ParsingError(Exception): def __init__(s...
i2y/mochi
mochi/parser/parser.py
Python
mit
33,959
import numpy as np import matplotlib.pyplot as plt #import matplotlib.animation as animation import scipy.constants as sc from matplotlib.widgets import Slider, Button, RadioButtons from matplotlib.figure import Figure from matplotlib import colors from Tkinter import * from matplotlib.backends.backend_agg import F...
ingelectronicadj/FisicaConPython
FisicaCuantica/Soluciones de la ecuacion de Schrodinger/Escalon.py
Python
gpl-3.0
2,001
import sys __author__ = "ilausuch" __date__ = "$13-jun-2017 20:05:19$" sys.path.append( "../Addons" ) from Client import Client from Timer import Timer count=1000 def test1(): print ("Test 1: Multiple entry set same connection (count={0})".format(count)) client = Client("localhost", 10001) t...
ilausuch/CacheServer
src/test/testServer_speed.py
Python
mit
1,247
from _mysql import OperationalError import datetime from serviceinfo import arnu, common, iff, service_store import unittest class ArnuServiceStoreTests(unittest.TestCase): # These tests use the special unit test database # Service date for all tests: service_date = datetime.date(year=2015, month=2, day...
geertw/rdt-serviceinfo
tests/test_arnu_service_store.py
Python
gpl-3.0
2,519
#!/usr/bin/env python import os import importlib import re from config import SECRET, CREDENTIALS, QUERIES, PROJECT_ID import bigquery if __name__ == '__main__': service = bigquery.build_service(SECRET, CREDENTIALS) for f in os.listdir('./' + QUERIES): if re.match('q[0-9]*\.py$', f): modul...
apassant/deezer-bigquery
query.py
Python
mit
517
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
zpao/buck
tools/release/releases.py
Python
apache-2.0
11,288
""" oauthlib ~~~~~~~~ A generic, spec-compliant, thorough implementation of the OAuth request-signing logic. :copyright: (c) 2011 by Idan Gazit. :license: BSD, see LICENSE for details. """ __author__ = 'Idan Gazit <idan@gazit.me>' __version__ = '1.0.3' import logging try: # Python 2.7+ ...
jlcarmic/producthunt_simulator
venv/lib/python2.7/site-packages/oauthlib/__init__.py
Python
mit
520
#!/usr/bin/python # -*- coding: utf-8 -*- # pm_ctl_stop.py : Script of stop pacemaker in target node # # Copyright (C) 2011 NIPPON TELEGRAPH AND TELEPHONE CORPORATION # # 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 Fr...
linux-ha-japan/pm_ctl
pm_ctl_stop.py
Python
gpl-2.0
4,045
# coding: utf-8 """ MasterMind Service Manager No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 1.0.0 Contact: gaea@zhaw.ch Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future...
icclab/MasterMind-ServiceManager
client/test/test_network.py
Python
apache-2.0
911
# Open Modeling Framework (OMF) Software for simulating power systems behavior # Copyright (c) 2015, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundatio...
geomf/omf-fork
omf/filesystem.py
Python
gpl-2.0
954
import os from urllib import urlopen from bs4 import BeautifulSoup data = urlopen("http://comics.nate.com/webtoon/detail.php?btno=64925&bsno=370600").read() soup = BeautifulSoup(data) webtoon= soup.select('div.toonView'): item('img')
mindoool/-FlaskProject-smlwy27
test.py
Python
apache-2.0
235
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Ldak(Package): """LDAK is a software package for analyzing GWAS data""" homepage = "h...
iulian787/spack
var/spack/repos/builtin/packages/ldak/package.py
Python
lgpl-2.1
1,380
# ActivitySim # See full license in LICENSE.txt. from builtins import range import logging from math import ceil import numpy as np import pandas as pd from . import logit from . import tracing from . import chunk from .simulate import set_skim_wrapper_targets from . import interaction_simulate from . import pipel...
synthicity/activitysim
activitysim/core/interaction_sample.py
Python
agpl-3.0
19,800
# # queue.py: factory for creating communications channels # # Copyright (C) 2013 Red Hat, Inc. 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; either version 2 of the L...
atodorov/anaconda
pyanaconda/queuefactory.py
Python
gpl-2.0
2,734
# 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 ...
lmazuel/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/compute_long_running_operation_properties.py
Python
mit
964
# Copyright 2017-present Adtran, 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...
opencord/voltha
voltha/adapters/adtran_olt/test/resources/__init__.py
Python
apache-2.0
593
#!/usr/bin/python # -*- coding: utf-8 -*- # This file is part of <%= package.name %>. # <%= package.url %> # Licensed under the <%= package.license %> license: # http://www.opensource.org/licenses/<%= package.license%>-license # Copyright (c) <%= package.created.year %> <%= package.author.name %> <%= package.author.e...
heynemann/generator-tornado
app/templates/_root_init.py
Python
mit
381
class BeanstalkDispatchError(Exception): pass ARGS = 'args' FUNCTION = 'function' KWARGS = 'kwargs'
Sonblind/orchestra
beanstalk_dispatch/__init__.py
Python
apache-2.0
105
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 MicroEra s.r.l. # (<http://www.microera.it>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
appendif/microera
product_auto_ean/__openerp__.py
Python
agpl-3.0
1,477
import socket import threading import time s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.bind(('127.0.0.1',9999)) s.listen(5) print('listen to connection...') def tcplink(sk, ad): print('accept new connection from %s:%s...' % ad) sk.send(b'welcome') while True: data = sk.recv(1024) ...
sallyyoo/ced2
py/server.py
Python
mit
659
"""Tests for the input_datetime component."""
PetePriority/home-assistant
tests/components/input_datetime/__init__.py
Python
apache-2.0
46
# Copyright (C) 2020 Christopher Gearhart # chris@bblanimation.com # http://bblanimation.com/ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opt...
feureau/Small-Scripts
Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/ui/view_3d/model_settings.py
Python
gpl-3.0
2,899
# Authors: Denis A. Engemann <denis.engemann@gmail.com> # simplified BSD-3 license import numpy as np from ..utils import read_str def _unpack_matrix(fid, rows, cols, dtype, out_dtype): """Unpack matrix.""" dtype = np.dtype(dtype) string = fid.read(int(dtype.itemsize * rows * cols)) out =...
adykstra/mne-python
mne/io/bti/read.py
Python
bsd-3-clause
2,984
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2011, Martín Raúl Villalba # # 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 So...
SamyCookie/python-ant
src/ant/core/message.py
Python
mit
18,153
import platform class SystemDetector: def __init__(self): self._system = platform.system() @property def linux(self): return self._system == 'Linux' @property def windows(self): return self._system == 'Windows' @property def macos(self): return self._syst...
vivanov1410/pifarmer-python
system_detector.py
Python
gpl-3.0
334
class SensorType(): TEMPERATURE = "TEMPERATURE" # Celsius degree (C) HUMIDITY = "HUMIDITY" # percent (%) TEMP_HUM = "TEMP_HUM" LUX = "LUX" # lux MOTION = "MOTION" # boolean DISTANCE = "DISTANCE" # centimeter (cm) POWER = "POWER" # Watt (W) CURRENT = "CURRENT" # Amper...
egottcha/AHEaD
node/sensor/sensor_type.py
Python
apache-2.0
326
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
Fokko/incubator-airflow
airflow/lineage/entities.py
Python
apache-2.0
3,110
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
tensorflow/graphics
tensorflow_graphics/datasets/features/pose_feature.py
Python
apache-2.0
2,003
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
datalogics/scons
test/Alias/Alias.py
Python
mit
5,273
class Solution: def search(self, nums, target): """ :type nums: List[int] :type target: int :rtype: bool """ if not nums: return False low = 0 high = len(nums) - 1 while low <= high: mid = (low + high) //...
MingfeiPan/leetcode
array/81.py
Python
apache-2.0
926
#!/usr/bin/env python # cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free So...
jackjansen/cerbero
cerbero/tools/libtool.py
Python
lgpl-2.1
4,532
# neubot/raw_srvr.py # # Copyright (c) 2012 Simone Basso <bassosimone@gmail.com>, # NEXA Center for Internet & Society at Politecnico di Torino # # This file is part of Neubot <http://www.neubot.org/>. # # Neubot is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
neubot/neubot-client
neubot/raw_srvr.py
Python
gpl-3.0
10,088