code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "rospy;tf2".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "tf2_py" PROJECT_SPACE_DIR = ...
UnbDroid/robomagellan
Codigos/Raspberry/desenvolvimentoRos/build/tf2_py/catkin_generated/pkg.installspace.context.pc.py
Python
gpl-3.0
395
# -*- coding: utf-8 -*- ##Copyright (C) [2003-2004] [Jürgen Hamel, D-32584 Löhne] ##This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as ##published by the Free Software Foundation; either version 3 of the License, or (at your option) any later v...
CuonDeveloper/cuon
cuon_server/src/cuon/Reports/report_list_of_residue.py
Python
gpl-3.0
2,948
# coding: utf-8 # Copyright 2014-2015 Álvaro Justen <https://github.com/turicas/rows/> # # 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 yo...
tilacog/rows
rows/cli.py
Python
gpl-3.0
4,322
#!/usr/bin/python ''' oscilloscope for the vLabtool - version 0. \n Also Includes XY plotting mode, and fitting against standard Sine/Square functions\n ''' import os os.environ['QT_API'] = 'pyqt' import sip sip.setapi("QString", 2) sip.setapi("QVariant", 2) from PyQt4 import QtCore, QtGui import time,sys from v0.t...
jithinbp/vLabtool-v0
v0/apps/scope.py
Python
gpl-3.0
18,018
""" @file SimpleWebSocketServer.py @author Dave Pallot @date 2013 @version $Id: SimpleWebSocketServer.py 22608 2017-01-17 06:28:54Z behrisch $ A web socket server implementation to be used by the osm server.py Originally distributed under the MIT license at https://github.com/dpallot/simple-websocket-server/tre...
702nADOS/sumo
tools/webWizard/SimpleWebSocketServer.py
Python
gpl-3.0
23,861
import logging from sklearn.metrics import classification_report from sklearn.metrics import confusion_matrix from sklearn.metrics import explained_variance_score from sklearn.metrics import mean_absolute_error from sklearn.metrics import mean_squared_error from sklearn.metrics import r2_score import matplotlib.pyplo...
motasay/twitter-sentiment
src/evaluation.py
Python
gpl-3.0
1,524
# coding=utf-8 # Copyright (C) Duncan Macleod (2015) # # This file is part of the GW DetChar python package. # # GW DetChar 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 #...
lscsoft/gwdetchar
gwdetchar/io/datafind.py
Python
gpl-3.0
7,423
from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Activation, Flatten from keras.layers import Convolution2D, MaxPooling2D from keras.utils import np_...
srslynow/legal-text-mining
bow_cnn.py
Python
gpl-3.0
2,108
from .base import BaseInterface from time import sleep from pyre import Pyre from pyre import zhelper import zmq class ZyreNode (): def __init__(self, interface, netiface=None): self.interface = interface # Peers book self.book = {} self.topics = [] # Publisher ...
Hemisphere-Project/HPlayer2
core/interfaces/pyre.py
Python
gpl-3.0
2,225
''' Copyright 2013 Jonathan Morgan This file is part of http://github.com/jonathanmorgan/conv2wp. conv2wp 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 3 of the License, or (at your optio...
jonathanmorgan/conv2wp
b2e/b2e_importer.py
Python
gpl-3.0
77,772
from datetime import datetime from django import forms from django.utils.translation import ugettext_lazy as _ from tendenci.apps.base.fields import SplitDateTimeField from tendenci.apps.payments.models import Payment, PaymentMethod PAYMENT_METHODS = PaymentMethod.objects.filter().values_list( 'machine_name', 'hum...
alirizakeles/tendenci
tendenci/apps/payments/forms.py
Python
gpl-3.0
2,831
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-07-20 16:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('scoping', '0120_auto_20170720_1653'), ] operations = [ migrations.RemoveField( ...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0121_auto_20170720_1656.py
Python
gpl-3.0
482
# fileset.py - file set queries for mercurial # # Copyright 2010 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import parser, error, util, merge, re from i18n import _ elements = { "(": (20, (...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/mercurial-2.2.3-py2.7-linux-x86_64-ucs4.egg/mercurial/fileset.py
Python
gpl-3.0
13,728
#!/usr/bin/env python # This file is part of reddit_api. # # reddit_api 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. # # reddit_api...
tmelz/reddit_api
reddit/reddit_test.py
Python
gpl-3.0
32,366
from time import sleep import math __author__ = 'sergio' ## @package clitellum.endpoints.channels.reconnectiontimers # Este paquete contiene las clases para los temporizadores de reconexion # ## Metodo factoria que crea una instancia de un temporizador # instantaneo def CreateInstantTimer(): return InstantRecon...
petxo/clitellum
clitellum/endpoints/channels/reconnectiontimers.py
Python
gpl-3.0
3,471
from __future__ import print_function import argparse import sys from scipy import * from scipy.sparse import * __author__ = 'Sean M. Ryno' __copyright__ = 'Copyright 2017, Sean M. Ryno' __credits__ = 'Sean M. Ryno' __license__ = 'GPL v3.0' __version__ = '0.1' __maintainer__ = 'Sean M. Ryno' __email__ = ...
sryno/rynosm
topology_script/makeITP.py
Python
gpl-3.0
47,357
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Sep 18 16:28:59 2017 @author: hase 2. Credit Card Number Check Suppose you have been hired by MeisterCard to write a function which checks if a given credit card number is valid. Your function check(card_number) should take a string card_number as in...
pandastrail/InfoEng
scripting/exercises/p06_2.py
Python
gpl-3.0
1,641
#!/usr/bin/env python # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import (division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Derek Broughton <auspex@pointerstop.ca>' __docformat__ = 'restructuredtext en' from calibre.ebooks.oeb.iterator.book import EbookI...
auspex/sonyutilities
iterator.py
Python
gpl-3.0
1,536
#!/usr/bin/env python import urllib import re from site_fetch import * #importing everything from site_fetch module def testUrl(url, payloads, check): # to split the url and try the append payloads in every parameter value. opener = urllib.urlopen(url) ...
souviik/NetSecure
vulnerability.py
Python
gpl-3.0
4,720
# This file is part of cloud-init. See LICENSE file for license information. from __future__ import print_function import functools import httpretty import logging import os import random import shutil import string import sys import tempfile import time import mock import six import unittest2 from unittest2.util im...
larsks/cloud-init
cloudinit/tests/helpers.py
Python
gpl-3.0
17,816
#!/usr/bin/python3.3 # Copyright (C) 2015-2017 Harold Grovesteen # # This file is part of SATK. # # SATK 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 # (a...
s390guy/SATK
asma/asmbase.py
Python
gpl-3.0
85,139
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
kilon/sverchok
nodes/modifier_change/polygons_to_edges.py
Python
gpl-3.0
2,844
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
DavidAndreev/indico
indico/util/suggestions.py
Python
gpl-3.0
6,250
import datetime import json import os import psycopg2 as dbapi2 import re from werkzeug.exceptions import NotFound, Forbidden from flask import Flask, app, render_template from common import * from config import * import jinja app = Flask(__name__) # jinja-python functions @app.context_processor def processor(): ...
torshid/foodnow
server.py
Python
gpl-3.0
2,035
import numpy as np import numpy.random as nr def draw_bg(size=(1,), snr_min=5.5, snr_std=2): bgs = nr.normal(loc=snr_min, scale=snr_std, size=size) sel = bgs < snr_min while np.count_nonzero(sel) > 0: bgs[sel] = nr.normal(loc=snr_min, scale=snr_std, size=np.count_nonzero(sel)) sel = bgs < ...
farr/LIGOHamlet
test.py
Python
gpl-3.0
685
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-01 13:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('...
igemsoftware2017/USTC-Software-2017
biohub/forum/migrations/0005_auto_20171001_2105.py
Python
gpl-3.0
799
# Copyright (C) 2009, 2010, 2011 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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...
linostar/timeline-clone
test/specs/data/Backend.py
Python
gpl-3.0
3,752
#!/usr/bin/python import sys, os, time from itertools import count import logging import tkp.database.database as database import tkp.database.dataset as ds import tkp.database.dbregion as reg import tkp.database.utils as dbu import monetdb.sql from tkp.sourcefinder import image from tkp.config import config from tkp....
jjdmol/LOFAR
CEP/GSM/src/ms3_script.py
Python
gpl-3.0
2,005
from django.core.management.base import BaseCommand, CommandError from survey.models import Record from fuzzywuzzy import fuzz class Command(BaseCommand): help = 'Finds fuzzy name matches and allows to alter their relation' def add_arguments(self, parser): parser.add_argument('start', nargs='?', type=...
simonspa/django-datacollect
datacollect/survey/management/commands/edit_relations.py
Python
gpl-3.0
2,980
# This file is part of Trackma. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
mutilx9/trackma
trackma/lib/libanilist.py
Python
gpl-3.0
15,331
""" A collection of modules for collecting, analyzing and plotting financial data. User contributions welcome! """ import contextlib, os, sys, warnings from urllib.request import urlopen if sys.version_info[0] < 3: from hashlib import md5 else: import hashlib md5 = lambda x: hashlib.md5(x.encode()) im...
alephu5/Soundbyte
environment/lib/python3.3/site-packages/matplotlib/finance.py
Python
gpl-3.0
23,591
""" This module provides functions to generate demographic events for "isolation-with-migration", or IM, models. """ import attr import numpy as np from fwdpy11.class_decorators import (attr_add_asblack, attr_class_pickle, attr_class_to_from_dict) @attr_add_asblack # @attr_class_...
molpopgen/fwdpy11
fwdpy11/demographic_models/IM.py
Python
gpl-3.0
6,028
#!/usr/bin/python3 # -*- coding: utf-8 -*- from window import MainWindow win = MainWindow()
CrackedP0t/ponyplayer
ponyplayer.py
Python
gpl-3.0
94
# Copyright (C) 2017 Martin Nilsson # This file is part of the Memtran compiler. # # The Memtran compiler 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 # ...
LJMNilsson/memtran
src/tokens.py
Python
gpl-3.0
12,189
# -*- coding: utf-8 -*- # Copyright (C) 2015 mulhern <amulhern@redhat.com> # 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 la...
schlizbaeda/yamuplay
pyudev/src/pyudev/_ctypeslib/__init__.py
Python
gpl-3.0
974
# Copyright (C) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
cs-au-dk/Artemis
WebKit/Tools/Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py
Python
gpl-3.0
7,573
#!/usr/bin/env python import sys import logging import argparse from gff3 import feature_lambda, feature_test_type from CPT_GFFParser import gffParse, gffWrite logging.basicConfig(level=logging.INFO) log = logging.getLogger(__name__) def safe_qualifiers(quals): unsafe_quals = ("ID", "Parent", "Name") new_qua...
TAMU-CPT/galaxy-tools
tools/gff3/fix_ncbi.py
Python
gpl-3.0
1,293
""" The "travel from home to the park" example from my lectures. Author: Dana Nau <nau@cs.umd.edu>, May 31, 2013 This file should work correctly in both Python 2.7 and Python 3.2. """ import pyhop import random import sys from utils_plan import * from util_plot import * # state variables state1 = pyhop.State('state'...
mdasifhasan/Experiments_HTN_Planner
PyHop/exp_1.py
Python
gpl-3.0
6,445
from maya import OpenMaya __all__ = [ "getSoftSelection" ] def getSoftSelection(): """ Query the soft selection in the scene. If no soft selection is made empty lists will be returned. The active selection will be returned for easy reselection. The data structure of the soft selection weight is ...
robertjoosten/rjSkinningTools
scripts/skinningTools/utils/api/selection.py
Python
gpl-3.0
1,916
def agts(queue): iron = queue.add('iron.py', ncpus=8, walltime=8 * 60) queue.add('iron.agts.py', deps=[iron], creates=['Fe_conv_k.png', 'Fe_conv_h.png']) if __name__ == '__main__': import numpy as np import pylab as plt from ase.utils.eos import EquationOfState from ase.io import ...
qsnake/gpaw
doc/tutorials/lattice_constants/iron.agts.py
Python
gpl-3.0
1,569
#!/usr/bin/python # logging.basicConfig # Messages on screen or file like object - StreamHandlers # logging.Formatter # man date/https://docs.python.org/2/library/time.html#time.strftime import logging logging.basicConfig(filename="disk.log",filemode='a',level=logging.DEBUG,format='%(asctime)s - %(name)s - %(levelnam...
tuxfux-hlp-notes/python-batches
archieves/batch-56/logging/second.py
Python
gpl-3.0
1,002
from mock import Mock from unittest import TestCase import keywords_from_fr as fr class FRTests(TestCase): """Tests keywords_from_fr""" def test_normalize_name(self): for old, new in ( ('United States African Development Foundation', 'AFRICAN DEVELOPMENT FOUNDATION'), ...
sunlightlabs/foia-data
new/new-more/foia-master/contacts/tests/keywords_from_fr_tests.py
Python
gpl-3.0
2,306
#!/usr/bin/python ### Static3.py #------------------------- class Callable ---------------------------- class Callable: #(A) def __init__( self, anycallable ): #(B) self.__call__ = anycallable ...
acabey/acabey.github.io
projects/demos/engineering.purdue.edu/scriptingwithobjects/swocode/chap7/Static4.py
Python
gpl-3.0
1,295
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response, get_object_or_404 from django.template.context import RequestContext from django.http import Http404, HttpResponseRedirect from django.utils.translation import ugettext_lazy as _ import time, datetime, calendar import simplejson as json from char...
pielgrzym/django-minishop
chartstats/chart.py
Python
gpl-3.0
4,294
from PyQt4 import QtCore, QtGui class Task(QtCore.QThread): messageAdded = QtCore.pyqtSignal(QtCore.QString) def __init__(self, mainWindow, parent = None): super(Task, self).__init__(parent) self.mainWindow = mainWindow self.finished.connect(self.postRun) self.terminated.connec...
karelklic/flashfit
task.py
Python
gpl-3.0
695
# -*- coding: utf-8 -*- """ Test for the pseudo-form implementation (odoo.tests.common.Form), which should basically be a server-side implementation of form views (though probably not complete) intended for properly validating business "view" flows (onchanges, readonly, required, ...) and make it easier to generate sen...
t3dev/odoo
odoo/addons/test_testing_utilities/tests/test_form_impl.py
Python
gpl-3.0
16,663
# Copyright (c) 2014, Sven Thiele <sthiele78@gmail.com> # # This file is part of shogen. # # shogen 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)...
bioasp/shogen
setup.py
Python
gpl-3.0
1,416
#!/usr/bin/env python3 import argparse import struct import sys SPC_START_OFFSET = 0x100 SPC_RAM_SIZE = 0x10000 INST_TBL = 0x6C00 INST_ENTRY_LEN = 0x6 SAMPLE_TBL = 0x6D00 SAMPLE_ENTRY_LEN = 0x4 SAMPLE_MAX_ID = 0x4F # completely arbitrary limit class InstrEntry (object): srcn = None adsr = N...
softglow/samplecheck
samplecheck.py
Python
gpl-3.0
1,713
#!/usr/bin/python3 # -*- coding: utf-8 -*- r"""Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwa...
jjgomera/pychemqt
lib/EoS/Cubic/SRK.py
Python
gpl-3.0
13,006
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Class in Python 2.7 for incorporation of the RPi.GPIO module to control the GPIO channels of Raspberry Pi. """ import RPi.GPIO as GPIO __author__ = "" __copyright__ = "" __email__ = "" __status__ = "Prototype" class PinsGPIO(object): gpi...
pat-odoo/TwoRC522_RPi2-3
module/gpio.py
Python
gpl-3.0
391
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # Copyright 2017-2018 Imran Sobir # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public Li...
forkbong/qutebrowser
tests/unit/browser/test_qutescheme.py
Python
gpl-3.0
9,143
# -*- coding: utf-8 -*- """Module to provide a common base ``TestCase``.""" from __future__ import absolute_import, unicode_literals import dbusmock class HamsterDBusManagerTestCase(dbusmock.DBusTestCase): """ Common testcase for storage backend unittests. This test case makes sure tests are run agai...
projecthamster/hamster-dbus
tests/storage/common.py
Python
gpl-3.0
748
#!/usr/bin/env python3 """ Python half of the pollution monitor. This bit is the brains, such that they are. The arduino will be pretty dumb just driving the lights and display and also reading the rotary encoders. Arduino sends Lnn - Where nn is a number from 00 to 99 for locations. Tnn - Where nn is a number for t...
yorkhackspace/pollution_graph
test_server.py
Python
gpl-3.0
3,182
print "loading arcpy" import arcpy import os inFolder = r"C:\temp\shapes" intersectFolder = os.path.join(inFolder, "int") gridFile = r"C:\Users\Jonah\Documents\ArcGIS\Default.gdb\grid" arcpy.env.workspace = r"C:\Users\Jonah\Documents\ArcGIS\Default.gdb" layerName = r"C:\Users\Jonah\Documents\ArcGIS\Default.gdb...
MACBIO/GIS-Scripts
EnvDatabaseFields.py
Python
gpl-3.0
2,669
# -*- coding: utf-8 -*- # Copyright (c) 2011-14, Walter Bender # Copyright (c) 2011 Paulina Clares, Chris Rowe # Ported to GTK3 - 2012: # Ignacio Rodríguez <ignaciorodriguez@sugarlabs.org> # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
walterbender/fractionbounce
FractionBounceActivity.py
Python
gpl-3.0
21,894
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ Copyright (C) 2014 Technische Universität Berlin, Fakultät IV - Elektrotechnik und Informatik, Fachgebiet Regelungssysteme, Einsteinufer 17, D-10587 Berlin, Germany This file is part of PaPI. PaPI is free software: you can redistribute it and/or modify it under the term...
TUB-Control/PaPI
papi/plugin/visual/HTMLViewer/HTMLViewer.py
Python
gpl-3.0
4,716
from django.contrib import admin from models import Content # Register your models here. admin.site.register(Content)
agvergara/Python
X-Serv-XML-ContentApp-Barrapunto/barrapunto/contentApp/admin.py
Python
gpl-3.0
118
from rest_framework.serializers import ModelSerializer from ..models import BackScratcher class ProductsSerializer(ModelSerializer): class Meta: model = BackScratcher fields = ['id', 'name', 'description', 'price', 'sizes']
agustin380/scratchbling
src/products/api/serializers.py
Python
gpl-3.0
247
import utils import os from functools import partial import sys from itertools import groupby as itertools_groupby mlst_timer = partial(utils.timer, name='MLST') def get_species_scheme_map_version(mlst_folder): species_scheme_map_version = 1 mlst_db_path = os.path.join(os.path.dirname(os.path.dirname(mlst_...
B-UMMI/INNUca
modules/mlst.py
Python
gpl-3.0
7,916
''' Created on Feb 2, 2012 @author: Pasieka Manuel , mapa17@posgrado.upv.es Copyright (C) 2012 Pasieka Manuel , mapa17@posgrado.upv.es 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 Foundatio...
mapa17/Eruliaf
nodes/Node.py
Python
gpl-3.0
1,182
import io try: import requests except ImportError: print("Requests module not installed, sync functions unavailable!") class ResponseError(BaseException): pass class Route: def __init__(self, base_url, path, cdn_url=None, method="GET", headers=None): self.base_url = base_url self.path...
swannobi/Red-DiscordBot
cogs/utils/sync.py
Python
gpl-3.0
1,715
"""General tests for Buoyant library.""" import datetime import unittest from io import BytesIO import buoyant from buoyant import buoy sampledata = [ { "latitude (degree)": "39.235", "sea_surface_wave_peak_period (s)": "13.79", "polar_coordinate_r1 (1)": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;...
fitnr/buoyant
tests/test_buoyant.py
Python
gpl-3.0
5,408
import numpy as np import matplotlib.pyplot as plt import spm1d #(0) Load dataset: dataset = spm1d.data.mv1d.cca.Dorn2012() Y,x = dataset.get_data() #A:slow, B:fast print( dataset ) #(0a) Create region of interest(ROI): roi = np.array([False]*Y.shape[1]) roi[20:50] = True roi[60:90] = True ...
0todd0000/spm1d
spm1d/examples/stats1d_roi/ex_cca_Dorn2012.py
Python
gpl-3.0
541
# coding=utf-8 import logging from MissionBoard.ATBridge import ATBridge from MissionBoard.State import Init logger = logging.getLogger() class EventManager(ATBridge): """Main Class to deal with the different loops, queue, state and bridge with the AT tiny""" def __init__(self, loops, states): """Create the ma...
thilaire/missionBoard
src/MissionBoard/EventManager.py
Python
gpl-3.0
2,031
# ADDING ALL NUMBERS IN A STRING. st = input("Enter a string: ") a = "" total = 0 for i in st: if i.isdigit(): a += i else: total += int(a) a = "0" print(total + int(a)) # INPUT: # Enter a string: 567hdon2 # OUTPUT: # 569
OpenGenus/cosmos
tree/master/code/string_algorithms/sum_of_numbers_string/sum_of_numbers_string.py
Python
gpl-3.0
258
from threading import Thread, Event from time import sleep from ardas.sampler import W1Sampler from ardas.sensor_tools import TempSensor, generate_w1temp_sensors from ardas.samples_conditioners import generate_w1temp_sensor_samples_conditioners from ardas.records_loggers import generate_w1temp_sensor_records_loggers fr...
UMONS-GFA/ardas
ardas/logger.py
Python
gpl-3.0
2,773
from django.core.exceptions import ValidationError from django.utils.deconstruct import deconstructible from django.utils.translation import gettext_lazy as _ from django.core import validators @deconstructible class SkypeValidator: message = _('Enter a valid URL.') code = 'invalid' ...
bronycub/sugarcub
users/validators.py
Python
gpl-3.0
1,069
# Test the support for SSL and sockets import sys import unittest from test import support import socket import select import errno import subprocess import time import gc import os import errno import pprint import urllib.parse, urllib.request import shutil import traceback import asyncore import weakref from http.s...
mancoast/CPythonPyc_test
fail/314_test_ssl.py
Python
gpl-3.0
52,209
class Solution(object): def thirdMax(self, nums): """ :type nums: List[int] :rtype: int """ new_nums = set(nums) if len(new_nums)<3: return max(new_nums) new_nums.remove(max(new_nums)) new_nums.remove(max(new_nums)) return max(new_n...
saicoco/leetcode
array/414_Third_Max_Num.py
Python
gpl-3.0
325
from __future__ import division import hashlib import random import warnings import p2pool from p2pool.util import math, pack import struct def hash256(data): return pack.IntType(256).unpack(hashlib.sha256(hashlib.sha256(data).digest()).digest()) def hash160(data): if data == '04ffd03de44a6e11b9917f3a29f944...
bitmaintech/p2pool
p2pool/bitcoin/data.py
Python
gpl-3.0
10,333
import numpy as np import pandas as pd import argiope mesh = argiope.indentation.sample_mesh_2D("gmsh", "./workdir/") #argiope.mesh.write_inp(mesh, "workdir/mesh.inp") element_map = {"Tri3": "CAX3", "Quad4": "CAX4", } mesh.to_inp(path = "workdir/mesh.inp", element_map = element_map)
lcharleux/argiope
doc/examples/mesh/Mesh-write_inp.py
Python
gpl-3.0
302
from setuptools import setup, find_packages from helga_github_meta import __version__ as version setup( name='helga-github-meta', version=version, description=('Provide information for github related metadata'), classifiers=[ 'Development Status :: 4 - Beta', 'Topic :: Communications :...
narfman0/helga-github-meta
setup.py
Python
gpl-3.0
1,198
import sys import os.path from beesly._logging import structured_log from beesly.config import ConfigError, initialize_config from beesly.views import app, rlimiter def create_app(): """ Initializes the Flask application. """ structured_log(level='info', msg="Starting beesly...") try: s...
bincyber/beesly
beesly/__init__.py
Python
gpl-3.0
910
from rest_framework import serializers class PluginSerializer(serializers.Serializer): name = serializers.CharField(read_only=True) author = serializers.CharField(read_only=True) title = serializers.CharField(read_only=True) description = serializers.CharField(read_only=True) js_url = serializers...
igemsoftware2017/USTC-Software-2017
biohub/core/plugins/serializers.py
Python
gpl-3.0
391
from __future__ import print_function from __future__ import division from builtins import str from past.utils import old_div import logging from datetime import datetime , time ,timedelta import _strptime import hardwaremod import os import subprocess import emailmod import interruptdbmod import sensordbmod import act...
Hydrosys4/Master
interruptmod.py
Python
gpl-3.0
29,482
# (C) British Crown Copyright 2010 - 2016, Met Office # # This file is part of Iris. # # Iris 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 3 of the License, or # (at your option) any l...
zak-k/iris
lib/iris/analysis/_interpolate_private.py
Python
gpl-3.0
35,306
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 nu """ supervisor event listenner for generic script launching launches a script (passed as $1+) and communicates with supervisor """ import sys import pathlib import datetime import subprocess def to_supervisor(text): # only event...
openzim/zimfarm
dispatcher/backend/supervisor-listener.py
Python
gpl-3.0
1,917
import requests import yaml import ujson as json import logging import os import time import hashlib import httpagentparser import urllib2 from .config import get_shareabouts_config from django.shortcuts import render from django.conf import settings from django.core.cache import cache from django.core.mail import Emai...
CrowdSpot/shareabouts
src/sa_web/views.py
Python
gpl-3.0
15,185
#!/usr/bin/env python2 # vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai from __future__ import with_statement __license__ = 'GPL v3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from functools import partial from PyQt5.Qt import ( QAbstractListModel, Qt, QK...
timpalpant/calibre
src/calibre/gui2/shortcuts.py
Python
gpl-3.0
11,451
import sys from codecs import StreamReader from io import StringIO from typing import Optional, TextIO, Union stdout: Optional[Union[TextIO, StreamReader]] = None class Test: def setUp(self) -> None: global stdout # pylint: disable=global-statement self.real_stdout = sys.stdout sys.stdou...
asciinema/asciinema
tests/test_helper.py
Python
gpl-3.0
415
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
nagyistoce/netzob
src/netzob/Common/Models/L3NetworkMessage.py
Python
gpl-3.0
4,102
"""helpers.py -- supporting routines for PyBlaster project @Author Ulrich Jansen <ulrich.jansen@rwth-aachen.de> """ suffixes = ['B', 'KB', 'MB', 'GB', 'TB', 'PB'] def humansize(nbytes): if nbytes == 0: return '0 B' i = 0 while nbytes >= 1024 and i < len(suffixes)-1: nbytes /= 1024. ...
ujac81/PiBlaster
Pi/PyBlaster/src/helpers.py
Python
gpl-3.0
541
import numpy as np import calcFeatures import calcAuthor import AUTHORS from classifiers import neural debug = True authors = ["Jane Austen", "Walter Scott", "Arthur Conan Doyle", "Charles Dickens", "Mark Twain", "Louisa Alcott"] #Index coresponds to authors array textDirs = ["texts/Jane_Austen", "texts/Walter_Scott", ...
darksteelcode/authorship
mainNeuralClassifier.py
Python
gpl-3.0
1,669
# -*- coding: utf-8 -*- # Author : Repubic of Korea, Seoul, JungSan HS 31227 Lee Joon Sung # Author_Helper : Republic of Korea, KyungGido, Kim Min Seok # youtube : anonymous0korea0@gmail.com ;;;; tayaka # Email : miho0_0@naver.com import hashlib import logging #from FoxDBinfor import DB_Pattern def M...
miho030/FoxVc
versions - 1.2.x/FoxVc Ver 1.2.7/Foxcore/matchingHashValue.py
Python
gpl-3.0
1,103
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'addfilename.ui' # # Created by: PyQt5 UI code generator 5.6 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_Addfilename(object): def setupUi(self, Addfilename): Addfi...
eufarn7sp/egads-gui
ui/Ui_filenamewindow.py
Python
gpl-3.0
8,132
import unittest from sandypython.spec import getsattr from sandypython.core import add_default_builtins, reset from sandypython.utils import ActivateSandbox class TestGetsattr(unittest.TestCase): def setUp(self): add_default_builtins() def test_getsattr(self): def f(): pass ...
matsjoyce/sandypython
tests/test_getsattr.py
Python
gpl-3.0
841
# -*- coding: utf-8 -*- """Flask application for publishing changes.""" __version__ = "0.0.1" from cis_change_service import api from cis_change_service import common from cis_change_service import exceptions from cis_change_service import idp from cis_change_service import profile __all__ = [api, common, exceptions...
mozilla-iam/cis
python-modules/cis_change_service/cis_change_service/__init__.py
Python
mpl-2.0
349
from django.conf.urls import url from django_jinja_ref.superadvanced import views urlpatterns = [ url(r'^$', views.django, name='django'), url(r'^jinja$', views.jinja, name='jinja'), ]
rlr/django_jinja_ref
django_jinja_ref/superadvanced/urls.py
Python
mpl-2.0
195
from allauth.account.utils import user_display from allauth.socialaccount import providers from allauth.socialaccount.templatetags.socialaccount import get_providers from allauth.utils import get_request_param from django.conf import settings from django.contrib import admin from django.utils.translation import ugettex...
jgmize/kuma
kuma/users/templatetags/jinja_helpers.py
Python
mpl-2.0
5,220
from django.conf import settings import mock from nose.tools import eq_ from test_utils import RequestFactory from commonware.request.middleware import (SetRemoteAddrFromForwardedFor, is_valid) mw = SetRemoteAddrFromForwardedFor() def get_req(): req = RequestFactory(...
mozilla/captain
vendor/lib/python/commonware/request/tests.py
Python
mpl-2.0
2,104
from django.http import HttpResponseRedirect from django.shortcuts import render from kuma.core.utils import urlparams from .exceptions import ReadOnlyException from .jobs import DocumentZoneURLRemapsJob class ReadOnlyMiddleware(object): """ Renders a 403.html page with a flag for a specific message. ""...
openjck/kuma
kuma/wiki/middleware.py
Python
mpl-2.0
2,332
from . import error from . import protocol from . import transport from urllib import parse as urlparse def command(func): def inner(self, *args, **kwargs): if hasattr(self, "session"): session = self.session else: session = self if session.session_id is None: ...
KiChjang/servo
tests/wpt/web-platform-tests/tools/webdriver/webdriver/client.py
Python
mpl-2.0
26,422
import json, uuid from six import PY3 from wptserve.utils import isomorphic_decode def main(request, response): response.headers.set(b'Access-Control-Allow-Origin', b'*') response.headers.set(b'Access-Control-Allow-Methods', b'OPTIONS, GET, POST') response.headers.set(b'Access-Control-Allow-Headers', b'C...
asajeffrey/servo
tests/wpt/web-platform-tests/html/cross-origin-opener-policy/reporting/resources/report.py
Python
mpl-2.0
1,458
from apero_imac.models import * from django.shortcuts import render_to_response from datetime import datetime def home(request): return render_to_response('home.html', locals()) def about(request): return render_to_response('about.html', locals())
Elfhir/apero-imac
apero_imac/views.py
Python
mpl-2.0
255
# Copyright (C) 2013 Renato Lima - Akretion <renato.lima@akretion.com.br> # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from odoo import api, fields, models from ..constants.fiscal import CEST_SEGMENT from ..tools import misc class Cest(models.Model): _name = "l10n_br_fiscal.cest" _inher...
OCA/l10n-brazil
l10n_br_fiscal/models/cest.py
Python
agpl-3.0
2,047
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # Thinkopen Brasil # Copyright (C) Thinkopen Solutions Brasil (<http://www.tkobr.com>). # # This ...
bmya/tkobr-addons
tko_point_of_sale_discount_cards/__openerp__.py
Python
agpl-3.0
2,070
# -*- coding: utf-8 -*- # Copyright (c) 2013 - 2018 CoNWeT Lab., Universidad Politécnica de Madrid # This file belongs to the business-charging-backend # of the Business API Ecosystem. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License...
FIWARE-TMForum/business-ecosystem-charging-backend
src/settings.py
Python
agpl-3.0
8,784
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # 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 version 3 of the # License, or (at your option) any later ver...
taigaio/taiga-back
tests/integration/resources_permissions/test_users_resources.py
Python
agpl-3.0
9,432
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import loggi...
petrjasek/superdesk-server
apps/auth/db/reset_password.py
Python
agpl-3.0
4,394
from flask import g import re from sqlalchemy import and_ from sqlalchemy.orm.exc import NoResultFound from newparp.model import ( CharacterTag, Tag, ) special_char_regex = re.compile("[\\ \\./]+") underscore_strip_regex = re.compile("^_+|_+$") def name_from_alias(alias): # 1. Change to lowercase. #...
MSPARP/newparp
newparp/helpers/tags.py
Python
agpl-3.0
1,613