code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
""" """ from DIRAC import S_OK, S_ERROR from DIRAC.Core.Utilities.CFG import CFG from DIRAC.Core.Utilities import List from DIRAC.ConfigurationSystem.Client.Helpers.Operations import Operations from DIRAC.Core.Utilities.JDL import loadJDLAsCFG, dumpCFGAsJDL from DIRAC.WorkloadManagementSystem.Agent.SiteDirector import...
andresailer/DIRAC
WorkloadManagementSystem/Client/JobState/JobManifest.py
Python
gpl-3.0
8,502
import os import argparse from logger import HoneyHornetLogger from threading import BoundedSemaphore import threading import logging from datetime import date, datetime from termcolor import colored import http.client import re import time class ViewChecker(HoneyHornetLogger): def __init__(self, config=None): ...
ajackal/honey-hornet
honeyhornet/viewchecker.py
Python
gpl-3.0
5,097
# Copyright (C) 2016 The BET Development Team # -*- coding: utf-8 -*- # This demonstrates how to use BET in serial to sample a serial external model. # run by calling "python serial_serial.py" import os import subprocess import scipy.io as sio import bet.sampling.basicSampling as bsam def lb_model(input_data): ...
smattis/BET-1
examples/parallel_and_serial_sampling/serial_serial.py
Python
gpl-3.0
927
# # Copyright (c) 2009, 2011, 2012 Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # # $Revision: 1046 $ # $Author: tkeffer $ # $Date: 2013-02-21 06:38:26 -0800 (Thu, 21 Feb 2013) $ # """Almanac data This module can optionally use PyEphem, which offers high quality astr...
hoevenvd/weewx_poller
bin/weewx/almanac.py
Python
gpl-3.0
17,450
#lib/ontologies/com/usefulinc/ns
h4ck3rm1k3/gcc-ontology
lib/ontologies/com/usefulinc/ns/__init__.py
Python
gpl-3.0
32
# -*- coding: UTF-8 -*- #auther mengskysama import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web import tornado.httpclient import lcs from urllib import quote from urllib import unquote from tornado import gen import ttlrcdump listen_port = 38439 def ChooiseItem(xml, artist): ...
mengskysama/FoobarTTLyric
lrcserv.py
Python
gpl-3.0
8,866
#!/usr/bin/python # -*- coding: utf-8 -*- from edu.umd.rhsmith.diads.tools.sentiment import ISentimentAnalyzer import pickle import re import os import sys import time import traceback import nltk from nltk.corpus import stopwords class SentimentAnalyzerP(ISentimentAnalyzer, object): ''' Sentiment Analyzer Utility ...
rmachedo/MEater
py/SentimentAnalyzerP.py
Python
gpl-3.0
5,719
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest from cron_status import * class TestChangeDetection(unittest.TestCase): """Test if the change detection is operational.""" # Please note that status_history_list is backwards, # i.e., newest entry first. def test_all_okay(self): ...
fau-fablab/kastenwesen
test_cron.py
Python
gpl-3.0
4,191
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-11 22:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateM...
himanshusahay/resume-drop
mysite/resumedrop/migrations/0001_initial.py
Python
gpl-3.0
2,237
#!/usr/bin/env python import os import sys def usage(): print "{0} <feed>".format(os.path.basename(__file__)) if __name__ == '__main__': kmotion_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) sys.path.append(kmotion_dir) from core.camera_lost import CameraLost feed = '' ...
dvor85/kmotion
bin/reboot_cam.py
Python
gpl-3.0
523
# Do not edit this file, pipeline versioning is governed by git tags __version__="1.0.1"
bennahugo/RFIMasker
RFIMasker/version.py
Python
gpl-3.0
88
""" Root finding methods ==================== Routines in this module: bisection(f, a, b, eps=1e-5) newton1(f, df, eps=1e-5) newtonn(f, J, x0, eps=1e-5) secant(f, x0, x1, eps=1e-5) inv_cuadratic_interp(f, a, b, c, eps=1e-5) lin_fracc_interp(f, a, b, c, eps=1e-5) broyden(f, x0, B0, eps=1e-5) """ import numpy as np '...
carlosb/scicomp
scicomp/rootfind/rootfindpack.py
Python
gpl-3.0
11,013
#!/usr/bin/env python ''' Copyright (C) 2014 Janina Mass 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 dist...
gglyptodon/tmp
Pysickle/pysickle/pysickle.py
Python
gpl-3.0
24,572
from emburse.resource import ( EmburseObject, Account, Allowance, Card, Category, Company, Department, Label, Location, Member, SharedLink, Statement, Transaction ) class Client(EmburseObject): """ Emburse API Client API enables for the creation of ...
MarcFord/Emburse-python
emburse/client.py
Python
gpl-3.0
4,177
from django.conf.urls import url from . import views urlpatterns = [ url(r'^([a-zA-Z0-9_\-]+)/$', views.poll, name='poll'), url(r'^([a-zA-Z0-9_\-]+).csv$', views.poll, {'export': True}, name='poll_export_csv'), url(r'^([a-zA-Z0-9_\-]+)/comment/$', views.comment, name='poll_comment'), url(r'^([a-zA-Z0-...
fsinfuhh/Bitpoll
bitpoll/poll/urls.py
Python
gpl-3.0
2,082
# TODO.TXT-CLI-python test script # Copyright (C) 2011-2012 Sigmavirus24, Jeff Stein # # 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) an...
MinchinWeb/wm_todo
tests/test_append.py
Python
gpl-3.0
1,200
import json from django.http import HttpResponse from django.contrib.auth.models import User from django.shortcuts import get_object_or_404 from apps.exercises.models import Attempts from apps.maps.models import Graphs from apps.ki.utils import performInference from apps.research.utils import getParticipantByUID, st...
danallan/octal-application
server/apps/ki/views.py
Python
gpl-3.0
1,125
#!/usr/bin/env python # vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0: # -*- coding: UTF8 -*- # # A sword KJV indexed search module. # Copyright (C) 2012 Josiah Gordon <josiahg@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...
zepto/biblesearch.web
sword_search.old/search.py
Python
gpl-3.0
146,124
# -*- coding: utf-8 -*- from .common_settings import * DEBUG = True TEMPLATE_DEBUG = DEBUG # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'dz(#w(lfve24ck!!yrt3l7$jfdoj+fgf+ru@w)!^gn9aq$s+&y' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME...
Mustapha90/IV16-17
tango_with_django_project/dev_settings.py
Python
gpl-3.0
375
#!/usr/bin/python # Copyright (C) 2009 The Android Open Source Project # # 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 require...
s20121035/rk3288_android5.1_repo
cts/tools/utils/buildCts.py
Python
gpl-3.0
16,411
#!/usr/bin/env python #-*- coding: utf-8 -*- ''' # This file is part of Matching Pursuit Python program (python-MP). # # python-MP 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 ...
tspus/python-matchingPursuit
data/signalGenerator.py
Python
gpl-3.0
6,621
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2007-2011 Tualatrix Chou <tualatrix@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 2 of the License, ...
wzguo/youker-assistant
backends/youker-assistant-daemon/src/beautify/common.py
Python
gpl-3.0
6,224
# -*- coding: utf-8 -*- # # Copyright (C) 2005, TUBITAK/UEKAE # # 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. # # Plea...
examachine/pisi
pisi/exml/autoxml.py
Python
gpl-3.0
31,161
# urllib3/util.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from __future__ import absolute_import from base64 import b64encode from socket import error as So...
ryfx/modrana
core/backports/urllib3_python25/util.py
Python
gpl-3.0
11,071
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: Janice Cheng import boto3 # Get the service resource sqs = boto3.resource('sqs') # Get the queue. This returns an SQS.Queue instance queue = sqs.get_queue_by_name(QueueName='test') # You can now access identifiers and attributes print(queue.url) print(queue.at...
jcchoiling/learningPython
aws/sqs/use_queue.py
Python
gpl-3.0
349
import cryspy.numbers import cryspy.geo class Goniometer: def __init__(self, motiontype, axis, direction, parametername): assert motiontype in ["translation", "rotation"], \ "First parameter for creating a Goniometer " \ "must be one of the strings " \ "'translation' or ...
tobias-froehlich/cryspy
cryspy/lab.py
Python
gpl-3.0
6,803
# Orbotor - arcade with orbit mechanics # Copyright (C) 2014 mr555ru # # 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) an...
mr555ru/orbotor
orbotor/gameprofile.py
Python
gpl-3.0
8,679
## Unquill: Copyright (C) 2003 Janez Demsar ## ## During development I peeked a lot at Unquill from John Elliott, 1996-2000. ## ## 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...
janezd/kontrabant
kontrabant.py
Python
gpl-3.0
40,758
#!/usr/bin/env python import unittest from app.md5py import MD5 class TddInPythonExample(unittest.TestCase): def test_object_program(self): m = MD5() m.update("1234") hexdigest = m.hexdigest() self.assertEqual("81dc9bdb52d04dc20036dbd8313ed055", hexdigest) if __name__ == ...
davidam/python-examples
security/md5/test/test_md5py.py
Python
gpl-3.0
352
from django.db.models import Q from django.forms.fields import CharField, MultiValueField from django.forms.widgets import MultiWidget, TextInput from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django_filters.filters import DateFilter, MethodFilter, ModelChoiceFilter from ...
vitalti/sapl
sapl/api/forms.py
Python
gpl-3.0
7,717
#!/usr/bin/env python # -*- coding: utf-8 -*- import re try: from setuptools import setup, find_packages except ImportError: from ez_setup import use_setuptools use_setuptools() from setuptools import setup, find_packages PYPI_RST_FILTERS = ( # Replace code-blocks (r'\.\.\s? code-block::\s*(\...
badele/serialkiller-plugins
setup.py
Python
gpl-3.0
1,664
T = input() if T%2==0: print T/2 else: print ((T-1)/2)-T
Dawny33/Code
Code_Forces/Contest 277/A.py
Python
gpl-3.0
66
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2007-2013 by Erwin Marsi and TST-Centrale # # This file is part of the DAESO Framework. # # The DAESO Framework 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...
emsrc/timbl-tools
setup.py
Python
gpl-3.0
3,905
from setuptools import setup, find_packages import sys, os version = '1.3' long_description = """The raisin.restyler package is a part of Raisin, the web application used for publishing the summary statistics of Grape, a pipeline used for processing and analyzing RNA-Seq data.""" setup(name='raisin.restyler', v...
rna-seq/raisin.restyler
setup.py
Python
gpl-3.0
1,531
# # Utility functions # import sys from functools import partial from uuid import UUID from hashlib import sha1 from os import path, listdir from zipfile import ZipFile from subprocess import Popen, TimeoutExpired import nacl.utils import nacl.secret def isValidUUID(uid): """ Validate UUID @param uid: UU...
cbrunker/quip
lib/Utils.py
Python
gpl-3.0
4,795
''' ' configurationGui.py ' Author: Iker Pedrosa ' ' License: ' This file is part of orderedFileCopy. ' ' orderedFileCopy 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 Lice...
ikerexxe/orderedFileCopy
configurationGui.py
Python
gpl-3.0
5,243
# -*- coding:utf-8 -*- # @auth ivan # @time 2016-10-14 16:36:15 # @goal test Abstract Factory Pattern class Shape: def __init__(self): return def draw(self): return # Circle Rectangle Square class Circle(Shape): def draw(self): print("Inside Circle::draw() method.") class Rec...
IvanaXu/Test_Class_GOF
tPatterns/Creational_Patterns/test_Abstract_Factory_Pattern.py
Python
gpl-3.0
2,597
import mutagen import os import re import sys from optparse import OptionParser music_file_exts = ['.mp3', '.wav', '.ogg'] seconds_re = re.compile('(\d+)(\.\d+)? seconds') def main(argv): (options, args) = build_parser().parse_args(argv) validate_options(options) print('playlist(s) will be written to ', ...
mangosmoothie/dnla-playlists
dnla-playlists/playlists.py
Python
gpl-3.0
7,175
"""Configuration for a load testing using Locust. To start load testing, run `make server` and `make test-load`. """ import random from json.decoder import JSONDecodeError from django.urls import reverse from locust import HttpLocust, TaskSet, task class SolvingTaskBehavior(TaskSet): """Describes interaction of ...
adaptive-learning/robomission
backend/learn/tests/locustfile.py
Python
gpl-3.0
3,918
# -*- coding: utf-8 -*- # Copyright (c) 2004 - 2015 Detlev Offenbach <detlev@die-offenbachs.de> # """ Module implementing templates for the documentation generator (lists style). """ from __future__ import unicode_literals ################################################# ## Common templates for index and docu fil...
testmana2/test
DocumentationTools/TemplatesListsStyle.py
Python
gpl-3.0
7,017
from flask import render_template from app import app, db, models import json @app.route('/') @app.route('/index') def index(): # obtain today's words # words = models.Words.query.all() # words = list((str(word[0]), word[1]) for word in db.session.query(models.Words, db.func.count(models.Words.id).label("t...
matbra/radio_fearit
app/views.py
Python
gpl-3.0
670
''' Copyright 2015 Travel Modelling Group, Department of Civil Engineering, University of Toronto This file is part of the TMG Toolbox. The TMG Toolbox 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 Fou...
TravelModellingGroup/TMGToolbox
TMGToolbox/src/analysis/traffic/Export_Count_Station_Location.py
Python
gpl-3.0
5,176
""" Compatibility module. This module contains duplicated code from Python itself or 3rd party extensions, which may be included for the following reasons: * compatibility * we may only need a small subset of the copied library/module """ import _inspect import py3k from _inspect import getargspec, f...
beiko-lab/gengis
bin/Lib/site-packages/numpy/compat/__init__.py
Python
gpl-3.0
434
#!/bin/python # -*- coding: utf-8 -*- # #################################################################### # gofed-ng - Golang system # Copyright (C) 2016 Fridolin Pokorny, fpokorny@redhat.com # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public Lice...
gofed/gofed-ng
scenarios/golangDepsUpdate.py
Python
gpl-3.0
3,711
""" matstat docstrings """ # from supergame import supergame # from supergametools import supergame
btengels/supergametools
__init__.py
Python
gpl-3.0
101
# log moments (mean, variance, skewness, kurtosis) and quantiles # why am I spending time creating a complex quantile and histogram # estimator when I only need average, so far from math import sqrt from bisect import bisect_left import scipy.stats as st maxlong = 9223372036854775807 class RunningStat(object): '...
PillowLounge/lolibot
hardcoded/statistics.py
Python
gpl-3.0
3,782
#!/usr/bin/env python # # Author: Pablo Iranzo Gomez (Pablo.Iranzo@redhat.com) # # Description: Script for monitoring host Memory status and VM's rhevm-sdk # api and produce NAGIOS valid output # # Requires rhevm-sdk to work # # This program is free software; you can redistribute it and/or modify # it under the terms o...
DragonRoman/rhevm-utils
monitoring/rhev-nagios-table-host-mem.py
Python
gpl-3.0
2,283
def get_perm_argparser(self, args): args = args.split(" ") if args[0] == "nick": self.conman.gen_send("Permission level for %s: %s" % (args[1], self.permsman.get_nick_perms(args[1]))) elif args[0] == "cmd": if args[1].startswith("."): args[1] = args[1][1:] self.conman.gen...
vsquare95/JiyuuBot
modules/permissions.py
Python
gpl-3.0
1,361
from .base import BaseInterface import eventlet from watchdog.observers import Observer from watchdog.events import PatternMatchingEventHandler from flask import Flask, render_template, session, request, send_from_directory from flask_socketio import SocketIO, emit, join_room, leave_room, close_room, rooms, disconnect ...
Hemisphere-Project/HPlayer2
core/interfaces/regie.py
Python
gpl-3.0
10,996
#!/usr/bin/env python # -*- coding: utf-8 -*- import re from pyquery import PyQuery from novel import serial, utils BASE_URL = 'http://www.sto.cc/{}-1/' PAGE_URL = 'http://www.sto.cc/{}-{}/' class StoTool(utils.Tool): def __init__(self): super().__init__() word_list = ( 's思s兔s網s文...
wangjiezhe/FetchNovels
novel/sources/sto.py
Python
gpl-3.0
2,128
#!/afs/bx.psu.edu/project/pythons/py2.7-linux-x86_64-ucs4/bin/python2.7 """ Convert wiggle data to a binned array. This assumes the input data is on a single chromosome and does no sanity checks! usage: %prog score_file out_file < wiggle_data -c, --comp=type: compression type (none, zlib, lzo) """ from __future_...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/EGG-INFO/scripts/wiggle_to_binned_array.py
Python
gpl-3.0
1,461
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2019-06-24 23:35 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_depende...
sio2project/oioioi
oioioi/problems/migrations/0019_algorithmtagproposal_difficultyproposal.py
Python
gpl-3.0
1,893
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-28 15:17 from __future__ import unicode_literals import DjangoUeditor.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blogadmin', '0006_auto_20170827_1142'), ] operations = ...
baike21/blog
blogadmin/migrations/0007_auto_20170828_2317.py
Python
gpl-3.0
3,940
from twisted.trial import unittest from rtpmidi.engines.midi.recovery_journal_chapters import * class TestNote(unittest.TestCase): def setUp(self): self.note = Note() def test_note_on(self): #simple note_to_test = self.note.note_on(100, 90) #Testing type assert(type(n...
avsaj/rtpmidi
rtpmidi/test/test_recovery_journal_chapters.py
Python
gpl-3.0
22,784
#!/usr/bin/env python # This file is part of nexdatas - Tango Server for NeXus data writer # # Copyright (C) 2014-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/selector
nxsselector/Data.py
Python
gpl-3.0
3,391
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # 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 versio...
PhilLidar-DAD/geonode
geonode/geoserver/helpers.py
Python
gpl-3.0
61,811
#!/usr/bin/python # -*- coding: utf-8 -*- # # This would be a lot easier with a shellscript. # Will probably just do this in bash, once I make this work. # In this case we're doing it for educational purposes. # Expect future revisions to be faster and more efficient. # Started with working code, broke it to fit my nee...
steakwipe/ytdl-namer
mp3gen.py
Python
gpl-3.0
1,558
import gzip import os import pickle import matplotlib import matplotlib.pyplot as plt import numpy as np matplotlib.use('TKagg') def show_attention(): # Load attentions print('Loading attentions to pickle file') with gzip.open( os.path.join('training_results', 'torch_train', 'attentions.pkl.gz'), ...
albertaparicio/tfg-voice-conversion
attention_graphs.py
Python
gpl-3.0
905
# -*- coding: utf-8 -*- import datetime from kivy.app import App from kivy.uix.widget import Widget import random from kivy.clock import Clock from kivy.properties import StringProperty, NumericProperty from webScrape import webScraper class MirrorWindow(Widget): dayPrint = ['Sön', 'Mån', 'Tis', 'Ons', 'Tors', ...
jwesstrom/cleverMirror
main.py
Python
gpl-3.0
1,864
from unittest import TestCase from gnomon import MagneticField class MockG4ThreeVector(): x = 0 y = 0 z = 0 class TestWandsToroidField(TestCase): def setUp(self): self.field_minus = MagneticField.WandsToroidField('-') self.field_plus = MagneticField.WandsToroidField('+') self...
nuSTORM/gnomon
tests/test_MagneticField.py
Python
gpl-3.0
1,406
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. import errno import logging import os import...
pavels/pootle
pootle/apps/pootle_app/project_tree.py
Python
gpl-3.0
16,304
# # BitBox02 Electrum plugin code. # import hid from typing import TYPE_CHECKING, Dict, Tuple, Optional, List, Any, Callable from electrum_grs import bip32, constants from electrum_grs.i18n import _ from electrum_grs.keystore import Hardware_KeyStore from electrum_grs.transaction import PartialTransaction from electr...
GroestlCoin/electrum-grs
electrum_grs/plugins/bitbox02/bitbox02.py
Python
gpl-3.0
27,314
# BSD 3-Clause License # # Copyright (c) 2016-19, University of Liverpool # 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 notic...
fsimkovic/cptbx
conkit/io/_parser.py
Python
gpl-3.0
3,072
#-*- coding: utf- -*- import os import sys import random import time import json import wikiquote import tuitear from threading import Thread CONGIG_JSON = 'bots.json' # Variable local, para modificar el intervalo real cambiar la configuración INTERVALO = 1 stop = False def start_bot(bot): """ Hilo que inicia ...
sh4r3m4n/twitter-wikiquote-bot
bot.py
Python
gpl-3.0
1,879
# Copyright (C) 2013 Canonical Ltd. # Copyright 2019 Joyent, Inc. # # Author: Ben Howard <ben.howard@canonical.com> # # This file is part of cloud-init. See LICENSE file for license information. '''This is a testcase for the SmartOS datasource. It replicates a serial console and acts like the SmartOS console does in ...
larsks/cloud-init
tests/unittests/test_datasource/test_smartos.py
Python
gpl-3.0
41,930
import os import logging import tornado.options as opt from motherbrain.base import conf from motherbrain.base.conf import get_config SITE_CONF = conf.site_conf(os.getcwd()) DATADIR = SITE_CONF.get('env.motherbrain_data', '/tmp') API_URL = SITE_CONF.get('env.api_url') WEBCLIENT_URL = SITE_CONF.get('env.webclient_url...
urlist/urlist
motherbrain/api_server/conf.py
Python
gpl-3.0
2,842
#This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import imp from flask.config import ConfigAttribute, Config as ConfigBase # noqa class Config(ConfigBase): "Configuration without the root_path" def __init__...
NaN-tic/nereid
nereid/config.py
Python
gpl-3.0
1,087
""" Here, we need some documentation... """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys import os import types import threading import time import six from DIRAC import gLogger from DIRAC.Core.Utilities.DIRACSingleton import DIRACSingleton @...
yujikato/DIRAC
src/DIRAC/Core/Utilities/Devloader.py
Python
gpl-3.0
2,365
#!/usr/bin/env python #-*- coding: utf-8 -*- # # Copyright (c) 2010 Jean-Baptiste Denis. # # This is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License version 3 and superior as published by the Free # Software Foundation. # # A copy of the license has been inclu...
jbd/treewatcher
examples/monitor-threaded.py
Python
gpl-3.0
4,149
#!/usr/bin/env python3 import sys import os import argparse import zipfile import tarfile def make_zipfile(outname, filenames, prefix): with zipfile.ZipFile(outname, "w", zipfile.ZIP_DEFLATED) as z: for filename in filenames: z.write(filename, prefix+filename) def make_tarfile(outname, filenam...
pinobatch/thwaite-nes
tools/zipup.py
Python
gpl-3.0
2,608
# This file is part of the "upq" program used on springfiles.com to manage file # uploads, mirror distribution etc. It is published under the GPLv3. # #Copyright (C) 2011 Daniel Troeder (daniel #at# admin-box #dot# com) # #You should have received a copy of the GNU General Public License #along with this program. If n...
springfiles/upq
jobs/download.py
Python
gpl-3.0
1,078
# -*- coding: utf-8 -*- from bdchecker.api import NewDatabaseTaskChecker from bdcheckerapp.autograding.zaj5.unit5.utils import Zaj5TaskChecker, UserList class TaskChecker(NewDatabaseTaskChecker): display_stdout = True class TestSuite(Zaj5TaskChecker): def test_has_procedure(self): self....
jbzdak/data-base-checker
bdcheckerapp/autograding/zaj5/unit5/task3.py
Python
gpl-3.0
1,459
#! /usr/bin/python3 import os import requests canary = 'mwtask111' serverlist = ['mw101', 'mw102', 'mw111', 'mw112', 'mw121', 'mw122'] def check_up(server: str) -> bool: headers = {'X-Miraheze-Debug': f'{server}.miraheze.org'} req = requests.get('https://meta.miraheze.org/w/api.php?action=query&meta=siteinfo...
miraheze/puppet
modules/mediawiki/files/bin/mwupgradetool.py
Python
gpl-3.0
2,456
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 Hou Shaohui # # Author: Hou Shaohui <houshao55@gmail.com> # Maintainer: Hou Shaohui <houshao55@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the ter...
hillwoodroc/deepin-music-player
src/nls.py
Python
gpl-3.0
1,379
#!/usr/bin/env python """Module for calling Artist related last.fm web services API methods""" __author__ = "Abhinav Sarkar <abhinav@abhinavsarkar.net>" __version__ = "0.2" __license__ = "GNU Lesser General Public License" __package__ = "lastfm" from lastfm.base import LastfmBase from lastfm.mixin import mix...
scaidermern/topTracks2playlist
lastfm/artist.py
Python
gpl-3.0
15,646
__author__ = 'shahbaz' # ############################################################################### # Utility functions # # ############################################################################### import sys from functools import wraps from logg...
NetASM/PyDatapath
pydatapath/utils/__init__.py
Python
gpl-3.0
5,607
# Irish Dictionary GUI app # saved as qt_gui.py # Last edit by Davis Sandefur 15.07.2015 import sys import os from PyQt5 import QtCore, QtWidgets, QtGui, QtMultimedia from PyQt5 import QtNetwork from irish_dictionary import irish_dictionary, gaeilge_gaeilge from audio_grabber import entry_search, related_matches cla...
davissandefur/Irish-Dictionary-with-GUI
Irish-Dictionary-GUI/qt_gui.py
Python
gpl-3.0
12,607
# -*- coding: UTF-8 -*- from HowOldWebsite.estimators.estimator_sex import EstimatorSex from HowOldWebsite.models import RecordSex __author__ = 'Hao Yu' def sex_estimate(database_face_array, feature_jar): success = False database_record = None try: n_faces = len(database_face_array) re...
jinyu121/HowOldAreYou
HowOldWebsite/process/process_estimate_sex.py
Python
gpl-3.0
1,099
from FaustBot.Communication import Connection from FaustBot.Model.RemoteUser import RemoteUser from FaustBot.Modules.MagicNumberObserverPrototype import MagicNumberObserverPrototype from FaustBot.Modules.ModuleType import ModuleType from FaustBot.Modules.PingObserverPrototype import PingObserverPrototype from FaustBot....
SophieBartmann/Faust-Bot
FaustBot/Modules/WhoObserver.py
Python
gpl-3.0
1,729
__all__ = ['pleth_analysis', 'ekg_analysis']
drcgw/bass
modules/__init__.py
Python
gpl-3.0
44
# -*- coding: utf-8 -*- # HORTON: Helpful Open-source Research TOol for N-fermion systems. # Copyright (C) 2011-2015 The HORTON Development Team # # This file is part of HORTON. # # HORTON is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by th...
eustislab/horton
horton/io/test/test_molecule.py
Python
gpl-3.0
3,917
from pyrocko import pz, io, trace from pyrocko.example import get_example_data # Download example data get_example_data('STS2-Generic.polezero.txt') get_example_data('test.mseed') # read poles and zeros from SAC format pole-zero file zeros, poles, constant = pz.read_sac_zpk('STS2-Generic.polezero.txt') # one more ze...
pyrocko/pyrocko
examples/trace_restitution_pz.py
Python
gpl-3.0
1,069
# $Id$ # installer for pmon # Copyright 2014 Matthew Wall from setup import ExtensionInstaller def loader(): return ProcessMonitorInstaller() class ProcessMonitorInstaller(ExtensionInstaller): def __init__(self): super(ProcessMonitorInstaller, self).__init__( version="0.2", na...
sai9/weewx-gitsvn
extensions/pmon/install.py
Python
gpl-3.0
1,514
from distutils.core import setup import py2exe import os, sys from glob import glob import PyQt5 data_files=[('',['C:/Python34/DLLs/sqlite3.dll','C:/Python34/Lib/site-packages/PyQt5/icuuc53.dll','C:/Python34/Lib/site-packages/PyQt5/icudt53.dll','C:/Python34/Lib/site-packages/PyQt5/icuin53.dll','C:/Python34/Lib/site-pa...
dedichan/ChemDB
setup_win.py
Python
gpl-3.0
1,223
from django.core.cache import cache from django.conf import settings from django.template.loader import render_to_string from tendenci.apps.navs.cache import NAV_PRE_KEY def cache_nav(nav, show_title=False): """ Caches a nav's rendered html code """ keys = [settings.CACHE_PRE_KEY, NAV_PRE_KEY, str(n...
alirizakeles/tendenci
tendenci/apps/navs/utils.py
Python
gpl-3.0
866
from Estructura import espaceado class Arbol_Sintactico_Abstracto: def __init__(self,alcance,hijos): self.hijos = hijos self.alcance = alcance self.cont = 1 def imprimir(self,tabulacion): if (len(self.hijos) > 1): print tabulacion + "SECUENCIA" for hijo in self.hijos: hijo.nivel = 1 hijo.imprimir...
danmt/NEO
Codigo_Fuente/etapa4/Instrucciones/Arbol_Sintactico_Abstracto.py
Python
gpl-3.0
428
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
vertigo235/Sick-Beard-XEM
sickbeard/providers/generic.py
Python
gpl-3.0
15,171
#!/usr/bin/env python # encoding: utf-8 """ Functional tests of the RabbitMQ Workers """ import mock import json import unittest import ADSDeploy.app as app from ADSDeploy.pipeline.workers import IntegrationTestWorker, \ DatabaseWriterWorker from ADSDeploy.webapp.views import MiniRabbit from ADSDeploy.models imp...
adsabs/ADSDeploy
ADSDeploy/tests/test_functional/test_integration_tester.py
Python
gpl-3.0
5,702
from __future__ import unicode_literals import datetime from django.db import models from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible # Create your models here. @python_2_unicode_compatible # only if you need to support Python 2 class Question(models.Model): questio...
Chasego/nie
proj/libdemo/django/mysite/polls/models.py
Python
gpl-3.0
910
# Definition for binary tree with next pointer. # class TreeLinkNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: # @param root, a tree link node # @return nothing def connect(self, root): def ...
YiqunPeng/Leetcode-pyq
solutions/117PopulatingNextRightPointersInEachNodeII.py
Python
gpl-3.0
1,205
x0 = 1.0 y0 = 0.1 b = 1.0 p = 1.0 r = 1.0 d = 1.0 T = 30 dt = 0.01 noise = 0.1 import modex log = modex.log() import random t=0 x=x0 y=y0 while t<T: f = b - p*y + random.gauss(0, noise) g = r*x - d + random.gauss(0, noise) x += x*f*dt y += y*g*dt if x<0: x = 0 if y<0: y = 0 t+=dt ...
tcstewar/model-explorer
examples/prey/prey.py
Python
gpl-3.0
369
class Word: def __init__(self, data, index): self.data = data self.index = index def printAnagrams(arr): dupArray = [] size = len(arr) for i in range(size): dupArray.append(Word(arr[i], i)) for i in range(size): dupArray[i].data = ''.join(sorted(dupArray[i].data)) dupArray = sorted(dupArray, key=lambd...
ruchikd/Algorithms
Python/FindAnagrams/anagrams.py
Python
gpl-3.0
521
from optparse import make_option from optparse import OptionParser import logging #import os #import sys import contextlib #import hashlib import datetime from django.core.management.base import BaseCommand from django.conf import settings #from django.db.models import Q import dateutil import netCDF4 from lizard_ne...
lizardsystem/lizard-neerslagradar
lizard_neerslagradar/management/commands/create_geotiffs.py
Python
gpl-3.0
2,139
class DrawingDimensioningWorkbench (Workbench): # Icon generated using by converting linearDimension.svg to xpm format using Gimp Icon = ''' /* XPM */ static char * linearDimension_xpm[] = { "32 32 10 1", " c None", ". c #000000", "+ c #0008FF", "@ c #0009FF", "# c #000AFF", "$ c ...
ulikoehler/FreeCAD_drawing_dimensioning
InitGui.py
Python
gpl-3.0
3,832
import os, shutil, xbmc, xbmcgui pDialog = xbmcgui.DialogProgress() dialog = xbmcgui.Dialog() Game_Directories = [ "E:\\Games\\", "F:\\Games\\", "G:\\Games\\", "E:\\Applications\\", "F:\\Applications\\", "G:\\Applications\\", "E:\\Homebrew\\", "F:\\Homebrew\\", "G:\\Homebrew\\", "E:\\Apps\\", "F:\\Apps\\", "G:\\Apps...
Rocky5/XBMC-Emustation
Mod Files/emustation/scripts/not used/Other/Remove _Resources.py
Python
gpl-3.0
1,405
# Copyright (C) 2012 Alex Nitz, Josh Willis, Andrew Miller # # 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 p...
tdent/pycbc
pycbc/waveform/bank.py
Python
gpl-3.0
39,353
""" scraping the utility functions for the actual web scraping """ import ssl import datetime import requests import re # this is the endpoint that my new version of this program will # abuse with possible store ids. this is a much more reliable "darts at the wall" # technique than the previous location-based one QUE...
cfh294/WawaGeoScraper
utils/scraping/__init__.py
Python
gpl-3.0
5,149
#! /usr/bin/env python # -*- coding: UTF-8 -*- # --------------------------------------------------------------------------- # ___ __ ___ ___ ____ ____ __ # | \ | \ | | / | | | \ Automatic # |__/ |__/ | | | |__ |__ | | Conference # | ...
brigittebigi/proceed
proceed/src/TagPDF/name.py
Python
gpl-3.0
3,002
# -*- coding: utf-8 -*- #+---------------------------------------------------------------------------+ #| 01001110 01100101 01110100 01111010 01101111 01100010 | #| | #| Netzob : Inferring communication protocol...
nagyistoce/netzob
test/src/test_netzob/test_Common/test_Type/test_Endianess.py
Python
gpl-3.0
2,233
""" Copyright (C) 2013 Stanislav Bobovych 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 h...
sbobovyc/GameTools
TSW/src/rdbdata.py
Python
gpl-3.0
1,836