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
# Copyright (C) 2018 The Electrum developers # Copyright (C) 2015-2018 The Lightning Network Developers # # 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 withou...
GroestlCoin/electrum-grs
electrum_grs/tests/test_lnchannel.py
Python
gpl-3.0
42,899
# Generated by Django 3.1.1 on 2020-10-19 12:17 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), migrations.swappable_dependency(se...
soynatan/django-easy-audit
easyaudit/migrations/0015_auto_20201019_1217.py
Python
gpl-3.0
5,081
# This file reads the checkpoint files, computes CLVs, call charles.exe for 0 step, # and genereate the flow field solution for state variables: rho, rhoE, rhoU from __future__ import division import os import sys import time import shutil import string import tempfile import argparse import subprocess from multiproc...
qiqi/fds
apps/charles_cylinder3D/draw_shadowing_djds/drawshadowing.py
Python
gpl-3.0
4,773
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-07-20 20:35 from __future__ import unicode_literals import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ...
emrehayirci/deps
profiles/migrations/0002_auto_20170720_2335.py
Python
gpl-3.0
4,046
#!/usr/bin/env python ## ## Biskit, a toolkit for the manipulation of macromolecular structures ## Copyright (C) 2004-2018 Raik Gruenberg & Johan Leckner ## ## 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 Softwar...
graik/biskit
archive_biskit2/Biskit/Dock/FixedList.py
Python
gpl-3.0
2,706
#!/usr/bin/env python # # ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (C) 2013 Linutronix GmbH # # This file is part of ELBE. # # ELBE 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, eithe...
silvio/elbe
elbepack/show.py
Python
gpl-3.0
3,354
#!/usr/bin/python -u # # # This source code is part of tcga, a TCGA processing pipeline, written by Ivana Mihalek. # Copyright (C) 2014-2016 Ivana Mihalek. # # 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...
ivanamihalek/tcga
tcga/01_somatic_mutations/032_gene_vs_TP53_background.py
Python
gpl-3.0
19,181
import click from flask_migrate import Migrate from views.api import json_api as app from ext import db migrate = Migrate(app, db) from models import * # noqa @app.cli.command() def initdb(): db.session.commit() db.drop_all() db.create_all() click.echo('Init Finished!')
dongweiming/wechat-admin
manager.py
Python
gpl-3.0
293
# Copyright 2019-2020 by Christopher C. Little. # This file is part of Abydos. # # Abydos 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 versio...
chrislit/abydos
tests/distance/test_distance_sokal_michener.py
Python
gpl-3.0
5,132
# -*- coding: utf-8 -*- """ Created on Sat Apr 15 20:52:38 2017 @author: kevin This is a simple client for getting HD-RGB data from the Kinect v2 DOES NOT WORK :( """ # Python TCP Client A import socket import numpy as np import cv2 import binascii import time host = socket.gethostbyname(socket.gethostname()) p...
kevinkit/Camera2TCP
deprecated/clientC.py
Python
gpl-3.0
1,829
# sameName.py taken from automatetheboringstuff.com/chapter3/ def spam(): global eggs eggs = 'spam' eggs = 'global' spam() print(eggs)
ir0nb8t/tutorials
automateTheBoringStuff/chapter3/sameName2.py
Python
gpl-3.0
145
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/spacecat/AutonomousFlight/simulation/simulation_ws/src/rotors_simulator/rotors_model/include;/usr/include/eigen3".split(';') if "/home/spacecat/AutonomousFlight/simulation/simulation_ws/src/rotor...
chickonice/AutonomousFlight
simulation/simulation_ws/build/rotors_simulator/rotors_model/catkin_generated/pkg.develspace.context.pc.py
Python
gpl-3.0
644
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-10-11 13:38 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scoping', '0132_project_role'), ] operations = [ migrations.AlterField( ...
mcallaghan/tmv
BasicBrowser/scoping/migrations/0133_auto_20171011_1338.py
Python
gpl-3.0
446
#!/usr/bin/env/python3 # Remember to make it executable if you want dbus to launch it # It works with both Python2 and Python3 import datetime import sys from gi.repository import GLib import threading import dbus import json import dbus.service from dbus.mainloop.glib import DBusGMainLoop from docker import Client f...
maidstone-hackspace/dockyard
dockyard_daemon.py
Python
gpl-3.0
6,505
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contests', '0001_initial'), ] operations = [ migrations.CreateModel( name='OISubmitExtraData', field...
sio2project/oioioi
oioioi/oisubmit/migrations/0001_initial.py
Python
gpl-3.0
1,131
import math # calculate the heat flows through the building envelope for every zone # heat flow to the zone is counted positive d2r = math.pi/180 # sun position azimut, altitude = sh.sun.pos() azimut = azimut-180*d2r num_zones = 3 for zone in sh.building.zones: # set the operational temperature T_op = sh.return_i...
BrechtBa/smarthome
logics/calculate_heatflows.py
Python
gpl-3.0
5,628
from copy import copy from sysproduction.reporting.data.rolls import ALL_ROLL_INSTRUMENTS class reportConfig(object): def __init__(self, title, function, output="console", **kwargs): assert output in ["console", "email", "file"] self.title = title self.function = function self.out...
robcarver17/pysystemtrade
sysproduction/reporting/report_configs.py
Python
gpl-3.0
2,760
# # Copyright (C) 2009, 2010 JAGSAT Development Team (see below) # # This file is part of JAGSAT. # # JAGSAT 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 ...
arximboldi/jagsat
src/core/task.py
Python
gpl-3.0
9,703
from rest_framework import serializers class BaseSerializer(serializers.Serializer): """ """ pk = serializers.IntegerField(default=1, min_value=1) def validate(self, data: dict) -> dict: """ :param data: :return: """ view = self.context['view'] items ...
gmork2/django-soap-connector
soap_connector/serializers/base.py
Python
gpl-3.0
1,133
#!/bin/env python from sqlalchemy import * def main(): # Connecting engine =create_engine("mysql+mysqldb://root:tm@192.168.17.153/test",pool_size=20, max_overflow=0,pool_timeout=8) from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() # Declare ...
dungeonsnd/test-code
dev_examples/pyserver/examples/sqlalchemy_test.py
Python
gpl-3.0
943
######################################################################### # # 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 version 3 of the License, or #...
mishravikas/geonode-cas
geonode/catalogue/backends/generic.py
Python
gpl-3.0
16,042
from distutils.core import setup setup( name='pybugger', version='1.0', packages=['pybugger', 'pybugger'], package_data={'pybugger': ['*.txt']}, url='https://github.com/fareskalaboud/pybugger', license='GNU General Public License v3.0', author='fareskalaboud', author_email='fares.alabou...
fareskalaboud/pybugger
setup.py
Python
gpl-3.0
428
import numpy as np import scipy as sp import scipy.stats import csv from collections import defaultdict import os import time def load_csv(filename): transDict = defaultdict(list) with open(filename,'rb') as f: reader = csv.reader(f, delimiter=',', quotechar='"' ) for row in reader: valuesList = row values...
corpusmusic/billboardcorpus
OutputClusterizedData/confidenceClusters.py
Python
gpl-3.0
3,654
# Generated by Django 2.0.13 on 2019-03-05 10:00 import autoslug.fields import courselib.json_fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('coredata', '0022_add_new_visit_data'), ('advisornotes', '0006...
sfu-fas/coursys
advisornotes/migrations/0007_add_new_visit_data_null_autoslug.py
Python
gpl-3.0
1,974
import squeakspace.common.util as ut import squeakspace.common.util_http as ht import squeakspace.proxy.server.db_sqlite3 as db import squeakspace.common.squeak_ex as ex import config def post_handler(environ): query = ht.parse_post_request(environ) cookies = ht.parse_cookies(environ) user_id = ht.get_re...
eek6/squeakspace
www/proxy/scripts/proxy/user.py
Python
gpl-3.0
3,533
# -*- coding: utf-8 -*- # vim: ts=4 ### # # Copyright (c) 2009-2011 J. Félix Ontañón # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation # # This program is distributed in the hope that i...
GNOME/wiican
wiican/utils.py
Python
gpl-3.0
4,073
# A Magento 2 module generator library # Copyright (C) 2016 Maikel Martens # # This file is part of Mage2Gen. # # Mage2Gen 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 # ...
dheesbeen/Mage2Gen
mage2gen/snippets/__init__.py
Python
gpl-3.0
1,526
# Found on http://rest.elkstein.org/2008/02/using-rest-in-python.html #GET import urllib2 url = 'http://www.acme.com/products/3322' response = urllib2.urlopen(url).read() #POST import urllib import urllib2 url = 'http://www.acme.com/users/details' params = urllib.urlencode({ 'firstName': 'John', 'lastName': 'Do...
sebasmannem/koios
REST_client.py
Python
gpl-3.0
374
from scapy.all import * import socket import re import os import json class Scan: """ Class in development """ def __init__(self, mask): """ """ self.net = [] #self.interface = interface self.mask = mask self.gw = '' self.mac = '' self.ro...
Dudesons/pydevops
pydevops/scan.py
Python
gpl-3.0
2,371
# -*- encoding: utf-8 -*- """ Usage: hammer job-invocation [OPTIONS] SUBCOMMAND [ARG] ... Parameters: SUBCOMMAND subcommand [ARG] ... subcommand arguments Subcommands: create Create a job invocation info Show job invocation list List job invocations ...
sthirugn/robottelo
robottelo/cli/job_invocation.py
Python
gpl-3.0
510
from unittestcompat import TestCase, TestArgs from typeconv import path, boolext from typeconv import floatnullable from typeconv import intnullable from typeconv import extracredentials class PathTest(TestCase): def test_path(self): p = path('/tmp') self.assertIsNotNone(p) self.assertI...
maxkoryukov/headphones
headphones/config/typeconv_test.py
Python
gpl-3.0
4,831
from django.conf import settings from django.shortcuts import render from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.contrib import messages from django.contrib.auth.decorators import login_req...
sshkm/django-sshkm
sshkm/views/permission.py
Python
gpl-3.0
3,151
#/usr/bin/python # This file is part of PARPG. # PARPG 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. # PARPG is distri...
orlandov/parpg-game
scripts/popups.py
Python
gpl-3.0
11,488
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault( "DJANGO_SETTINGS_MODULE", "sdnctl_controller.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reaso...
luisza/sdn_control
controller_manage.py
Python
gpl-3.0
879
#!/usr/bin/python # Author: James Campbell # What: Runs the run.sh installer script and copies the zsh file into place import sys import os from subprocess import call os.environ['PHONE'] = str(sys.argv[1]) call(["./run.sh"]) call(["mv", "$HOME/.zshrc", "$HOME/.zshrc-backup"]) call(["cp", "./configs/zshrc", "$HOME/.zsh...
jamesacampbell/fresh-osx
installer.py
Python
gpl-3.0
396
a = {} a[...] = "Happy New Year 2014" print(a)
sheerluck/andrew
hny.py
Python
gpl-3.0
47
""" WSGI config for locomotive project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJANGO_S...
pinballwizard/locomotive
locomotive/wsgi.py
Python
gpl-3.0
398
# -*- coding: utf-8 -*- """ Created on Fri Dec 18 14:11:31 2015 @author: Martin Friedl wrt v1.0: - Pitches are smaller 200, 400, 600, 800nm - Changed holes to only include larger ones wrt v1.2: - Fixed pitch to only 750nm - Added skews, which stretch the shapes in the x direction by various amounts to see if this he...
Martin09/E-BeamPatterns
111 Wafers - 1.2cm Triangles/111A Nanowires/v1.4/Gen_111A_Nanowires_v1.4.py
Python
gpl-3.0
19,923
#!/usr/bin/python3 # Challenger # - Challenge a LUSAS licence server until a licence is gained. # Copyright (C) 2011 - 2013 thomas michael wallace # < www.thomasmichaelwallace.co.uk > # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Pu...
thomasmichaelwallace/challenger
challenger.py
Python
gpl-3.0
10,517
class VqUtils(object): @staticmethod def whiten(obs): """ care about null standard deviation """ mean = obs.mean(axis=0) stdDev = obs.std(axis=0) stdDev[stdDev==0] = 1 return (obs-mean)/stdDev
charanpald/sandbox
sandbox/util/VqUtils.py
Python
gpl-3.0
276
from yadtminionutils import (get_files_by_template, get_systemd_overrides, is_sysv_service, could_be_sysv_service) import os import shutil from textwrap import dedent import unittest2 as unittest from mock import patch, Mock from te...
yadt/yadt-minion
src/integrationtest/python/yadtminionutils_tests.py
Python
gpl-3.0
5,425
__author__ = "William Batista Aguiar Motta" __email__ = "william.b.motta@aluno.unb.br" __license__ = "GPL" import matricula_web_web_crawler as MT import sys if len(sys.argv)>1: for a in sys.argv[1:]: # print('\n') D = MT.Disciplina(a) print(D.codigo) print(D.nome) print(...
cisalhante/matricula-o-matic
test_bench_disciplina.py
Python
gpl-3.0
1,134
# insert copyleft license here import numpy as np import tools import external_data # import plotly.offline as py # import plotly.graph_objs as go import matplotlib.pyplot as plt def print_data_tabulars(): [dat, voltage, current, N, R, b, K_r] = external_data.read_data() print("Voltage and current") vo...
AgenttiX/fys-1010
specific_charge_of_electron/specific_charge.py
Python
gpl-3.0
2,993
import uncertainties from uncertainties import ufloat import math import numpy import numpy import pylab from scipy.optimize import curve_fit import math import scipy.stats import uncertainties from uncertainties import unumpy def linear(x, a, b): return a*(x-b)**2 INPUT = "/home/federico/Laboratorio...
fedebell/Laboratorio3
relazione5/parabolaPlot.py
Python
gpl-3.0
1,036
# -*- coding: utf-8 -*- # ### # Application: wah!cade # File: win_scrsaver.py # Description: screen saver window # Copyright (c) 2005-2010 Andy Balcombe <http://www.anti-particle.com> ### # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public Lic...
sairuk/wahcade
win_scrsaver.py
Python
gpl-3.0
9,815
#!/usr/bin/env python class SumpError(StandardError): '''Errors raised by the SUMP client.''' class IdError(SumpError): '''The wrong string was returned by an ID request.''' class FlagsError(SumpError): '''Illegal combination of flags.''' class TriggerEnableError(SumpError): '''Illegal trigger e...
braingram/pysump
sump/errors.py
Python
gpl-3.0
475
# Code for the misc class # # DISCLAIMER: # This file is part of ruediPy, a toolbox for operation of RUEDI mass spectrometer systems. # # ruediPy 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...
brennmat/ruediPy
python/classes/misc.py
Python
gpl-3.0
9,991
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2017-01-24 11:53 from __future__ import unicode_literals from django.core.management import call_command from django.db import migrations def load_initial_data(apps, schema_editor): call_command('loaddata', "initial_data", app_label='Database',) class Migra...
tousix/tousix-manager
tousix_manager/Database/migrations/0004_auto_20170124_1153.py
Python
gpl-3.0
625
import unittest import unittest.mock as mock from unittest.mock import sentinel from import_anything.utils import complete_blocks class TestCompleteBlocks(unittest.TestCase): def test_empty_block(self): """ complete_blocks() should append 'pass' to empty blocks """ @complet...
lincheney/import_anything
tests/utils/test_complete_blocks.py
Python
gpl-3.0
1,387
x = input("name var: ") print ("x + 100 = ", x+"t")
tohoanglinh/study_bufferbloat
p_bb_amr_fb_matlab/po_aqm/po_aqm.py
Python
gpl-3.0
54
__author__ = 'CQC' #-*- coding:utf-8 -*- import re #处理页面标签类 class Tool: #去除img标签,1-7位空格,&nbsp; removeImg = re.compile('<img.*?>| {1,7}|&nbsp;') #删除超链接标签 removeAddr = re.compile('<a.*?>|</a>') #把换行的标签换为\n replaceLine = re.compile('<tr>|<div>|</div>|</p>') #将表格制表<td>替换为\t replaceTD= re.co...
smile921/scrapyNotes
spider/taobao-mm/tool.py
Python
gpl-3.0
1,024
#!/usr/bin/python # -*- coding: utf-8 -*- from domogik.tests.common.testdevice import TestDevice from domogik.common.utils import get_sanitized_hostname import traceback import sys if __name__ == "__main__": # set up the plugin name name = "karotz" # load the test devices class td = TestDevice() ...
tikismoke/domogik-plugin-karotz
tests/003_deldevices.py
Python
gpl-3.0
672
import logging import os import sys from collections import namedtuple from unittest import main, TestCase from unittest.mock import patch import requests sys.path.append(os.path.join(os.path.dirname(__file__), '../ticketutil/')) import servicenow logging.disable(logging.CRITICAL) TICKET_ID = 'PNT9999999' TEST_URL...
dmranck/ticketutil
tests/test_servicenow.py
Python
gpl-3.0
16,569
# Natural Language Toolkit: code_cascaded_chunker import nltk grammar = r""" NP: {<DT|JJ|NN.*>+} # Chunk sequences of DT, JJ, NN PP: {<IN><NP>} # Chunk prepositions followed by NP VP: {<VB.*><NP|PP|CLAUSE>+$} # Chunk verbs and their arguments CLAUSE: {<NP><VP>} # Chunk NP, VP ...
davidam/python-examples
nlp/nltk/extracting-information/code_cascaded_chunker.py
Python
gpl-3.0
531
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from __future__ import (absolute_import, divi...
mganeva/mantid
Framework/PythonInterface/test/python/plugins/algorithms/CylinderPaalmanPingsCorrection2Test.py
Python
gpl-3.0
11,368
x = int(raw_input("Input a number:")) epsilon = 0.01 step = epsilon ** 3 numGuesses = 0 ans = 0 while abs(ans**2 - x) >= epsilon and ans <= x: ans += step numGuesses += 1 print "numGuesses = ", numGuesses if abs(ans**2 - x) >= epsilon: print "Failed on square root of ", x else: print ans, " is close ...
Rjerk/snippets
python/ICPUP/穷举法寻找近似平方根.py
Python
gpl-3.0
342
# -*- coding: utf-8 -*- # ++ This file `import_routes.py` is generated at 4/9/16 6:11 AM ++ import os import glob import json import tempfile from django.utils import six from django.apps import apps from django.conf import settings from django.core import serializers from django.utils.encoding import smart_text from d...
nazrulworld/django-hybrid-access-control-system
hacs/management/commands/import_routes.py
Python
gpl-3.0
13,818
from __future__ import unicode_literals, absolute_import from lscharts.embed import EmbedChartSettings, DEFAULT_COLORS def get_colors_with_overrides(*colors): new_colors = DEFAULT_COLORS[:] for i, color in enumerate(colors): new_colors[i] = color return new_colors COLOR_DURING_ATA = '1D976B' COL...
aptivate/atanigeriatool
django/website/main/charts.py
Python
gpl-3.0
14,294
''' Created on Sep 28, 2015 ''' import thread import time from Pad import Pad from ThreadFetcher import ThreadFetcher from PostReply import PostReply from TermImage import TermImage from Autism import Autism from Subtitle import Subtitle from RelayChat import RelayChat import re class BoardPad(Pad): ''' classdocs ...
yottu/yottu
lib/BoardPad.py
Python
gpl-3.0
15,510
''' @author Michele Tomaiuolo - http://www.ce.unipr.it/people/tomamic @license This software is free - http://www.gnu.org/licenses/gpl.html 3.5 Interpolazione * Leggere da un file una serie di numeri reali e memorizzarli in un vettore * Es. dati dall'esercizio 3.2 * Suppore che i numeri rappresentino il valore di un...
Pio1962/fondinfo
exercises/e3_2011_5_interpolation.py
Python
gpl-3.0
963
# -*- coding: utf-8 -*- import pytest from consumerlib import TimeoutMessage @pytest.fixture def timeout_handler(): return TimeoutMessage(1000, 5) @pytest.mark.parametrize( ('generation', 'ttl'), [ (0, 1*1000), (1, 4*1000), (2, 9*1000), (3, 16*1000), (4, 25*1000),...
riyad/python-consumerlib
tests/unit/test_timeout_message_queue_next_message_ttl.py
Python
gpl-3.0
1,063
import logging from pathlib import Path from typing import Callable, List from infection_monkey.ransomware.consts import README_FILE_NAME, README_SRC from infection_monkey.ransomware.ransomware_config import RansomwareConfig from infection_monkey.telemetry.file_encryption_telem import FileEncryptionTelem from infectio...
guardicore/monkey
monkey/infection_monkey/ransomware/ransomware_payload.py
Python
gpl-3.0
2,282
# Copyright (C) 2105 wysiwyng # # 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 d...
wysiwyng/sr13
lift.py
Python
gpl-3.0
6,285
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: tab; tab-width: 2 -*- ### BEGIN LICENSE # Copyright (C) 2010 <Atreju Tauschinsky> <Atreju.Tauschinsky@gmx.de> # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License version 3, as published # by ...
magchips/labalyzer
labalyzer/helpers.py
Python
gpl-3.0
5,277
#!/usr/bin/env python3 from sys import exit from WgetTest import HTTPTest, WgetFile """ This test ensures that Wget parses the Content-Disposition header correctly and creates the appropriate file when the said filename exists. """ TEST_NAME = "Content Disposition Clobber" ############# File Definitions ######...
2manysecrets/parallel-wget
testenv/Test-Content-disposition-2.py
Python
gpl-3.0
1,393
""" RESTx: Sane, simple and effective data publishing and integration. Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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...
jbrendel/RESTx
src/python/restx/render/baserenderer.py
Python
gpl-3.0
4,560
__doc__ = """ An easy to use app that provides Stack Overflow style badges with a minimum ammount of effort in django See the README file for details, usage info, and a list of gotchas. """ from setuptools import setup setup( name='django-badges', version='0.1.6', author='James Robert', author_email=...
SpreadBand/django-badges
setup.py
Python
gpl-3.0
1,161
# -------------------------------------------------------------------------------------------------- # - We define two use-cases for this script: # -------------------------------------------------------------------------------------------------- # 1. We are interested in deriving weights for unrepresentative dataset...
IftachSadeh/ANNZ
examples/scripts/annz_rndReg_weights.py
Python
gpl-3.0
13,901
#!/usr/bin/env python # -*- coding: utf-8 -*- # Largely insipired from https://github.com/esc/git-big-picture (GPL v3 or later) # Targets python 2.6 (RHEL 6.4) # NB: OrderedDict appeared in python 2.7. A backport (MIT license) is available here: http://code.activestate.com/recipes/576693/ # Small testing: cf http:...
iksnalybok/git-history-overview
git_history_overview.py
Python
gpl-3.0
22,609
"""Invite user email sender model.""" from . import EmailSender __all__ = ['InviteUserEmailSender'] MAXIMUM_INSTITUTION_NAME = 29 MAXIMUM_USER_NAME = 26 class InviteUserEmailSender(EmailSender): """Entity responsible for send invite user's email.""" def __init__(self, **kwargs): """The class constr...
eciis/web
backend/send_email_hierarchy/invite_user_email_sender.py
Python
gpl-3.0
1,264
import threading from PySide.QtCore import QObject class PositionToAudioTransformerProxy(QObject): """ Provides a generator-like object for the AudioServer, allowing requests for audio samples to be proxied as requests for position samples, which are then transformed through the PositionToAudioTransformer....
PeachyPrinter/peachytoolchain
src/calibrate/transformer_proxy.py
Python
gpl-3.0
932
""" Basic string formatting to take a new set of style rules and create a layer specific SLD in XML format """ if __name__=='__main__': import os, sys DJANGO_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.append(DJANGO_ROOT) os.environ['DJANGO_SETTINGS_MODULE'] = 'geonode.s...
mbertrand/cga-worldmap
geonode/contrib/dataverse_styles/style_rules_formatter.py
Python
gpl-3.0
6,600
import sys sys.path.append('./') from optparse import OptionParser from jarbas_models.tf_colorize.solver import Solver from jarbas_models.tf_colorize.solver_multigpu import SolverMultigpu from jarbas_models.tf_colorize.utils import process_config parser = OptionParser() parser.add_option("-c", "--conf", dest="configur...
JarbasAI/JarbasAI
jarbas_models/tf_colorize/tools/train.py
Python
gpl-3.0
871
#!/usr/bin/python # This file is part of Networklore's snmp library for Ansible # 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.1', ...
mheap/ansible
lib/ansible/modules/net_tools/snmp_facts.py
Python
gpl-3.0
15,052
# -*- coding: utf-8 -*- """ Created on Thu Jan 26 02:19:03 2017 @author: Shabaka """ # Import insert and select from sqlalchemy from sqlalchemy import insert, select # Build an insert statement to insert a record into the data table: stmt stmt = insert(data).values(name='Anna', count=1, amount=1000.00, va...
qalhata/Python-Scripts-Repo-on-Data-Science
SQL_Arbitrary_Insert_Row.py
Python
gpl-3.0
670
from utils.exceptions import ErrorKeyDoesntExistError _response_errors = { "NOT_LOGGED": "You need to login", "WRONG_EMAIL": "Wrong email or password", "EMAIL_ALREADY_REGISTERED": "This email is already registered", "NOT_AN_EMAIL": "Not an email", "CANT_BE_EMPTY": "Can't be empty" } def get_respo...
yamila-moreno/api-example
src/errors/errors.py
Python
gpl-3.0
570
#!/usr/bin/env python3 """ In this module you'll practice using the IR Remote using event callbacks. You'll find the process works the same as buttons. There are 6 buttons (up, down, left, right, enter, and back) and 16 IR remote buttons (4 buttons * 4 channels). We will only use lambda callbacks for this example si...
Rosebotics/cwc-projects
lego-ev3/sandbox/m1/digital_inputs/m3_ir_events_with_the_screen.py
Python
gpl-3.0
8,825
#!/usr/bin/env python3 # # Copyright (C) 2014 Matthias Klumpp <mak@debian.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
tanglu-org/rapidumo
rapidumo/config.py
Python
gpl-3.0
2,486
class Dependency: """ Dependency class represents the Projects in the System """ def __init__(self, id, name, version, permissions): self.id = id self.name = name self.version = version self.permissions = permissions
Crystal-SDS/dashboard
crystal_dashboard/dashboards/crystal/filters/dependencies/models.py
Python
gpl-3.0
270
#!/usr/bin/python3 import random import rsa # Set 6, challenge 41: Implement unpadded message recovery oracle. # Implements our "bad" server for the challenge. It stores all # ciphertexts it sees and raises an error if asked to decrypt # a ciphertext more than once. class Oracle(object): def __init__(self, privateK...
shainer/matasano
set6/ch41.py
Python
gpl-3.0
2,572
# Copyright 2011 Robert Spanton # # 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 t...
russdill/pcbcons
render_pcb.py
Python
gpl-3.0
5,417
### # Copyright (c) 2013, KG-Bot # 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 condition...
kg-bot/SupyBot
plugins/Pars/test.py
Python
gpl-3.0
1,759
# -*- coding: utf-8 -*- __project_name__ = 'GmailURLParser' __author__ = 'Erdinç Yılmaz' __date__ = '11/15/14' from oauth2client.file import Storage # from client import Credentials from oauth2client.file import Credentials from enc import SaltedAESString ############################################################...
erdinc-me/GmailURLParser
sub/encryptedStorage.py
Python
gpl-3.0
2,064
from gi.repository import Gtk from database import Database import os # ############################ Initializing ################################################# # reading credentials db = Database() cursor = db.execute("SELECT * FROM Settings") myList = cursor.fetchone() check_updates = "" login_url = "" user_id =...
kumarasinghe/moodle-monitor
MoodleMonitor/usr/share/moodle-monitor/settings/main.py
Python
gpl-3.0
6,836
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """Subclassing Thread to create your own thread types. """ #end_pymotw_header import threading import logging logging.basicConfig(level=logging.DEBUG, format='(%(threadName)-10s) %(message)s', ...
qilicun/python
python2/PyMOTW-1.132/PyMOTW/threading/threading_subclass.py
Python
gpl-3.0
493
import utils import os import shutil from functools import partial # Indexing reference file using Bowtie2 def indexSequenceBowtie2(referenceFile, threads): if os.path.isfile(str(referenceFile + '.1.bt2')): run_successfully = True else: command = ['bowtie2-build', '--threads', str(threads), referenceFile, refer...
dorbarker/INNUca
modules/pilon.py
Python
gpl-3.0
5,036
#!/usr/bin/env python import pcons, render_pcb from decimal import Decimal as D pad_size = ( D("0.55"), D("1.5") ) hole_diam = D("0.8") des = pcons.Design("example socket") # Default clearance between copper and pad des.clearance = D("0.2") # Default clearance between copper and soldermask des.mask_clearance = D("0...
russdill/pcbcons
socket_example.py
Python
gpl-3.0
1,580
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-30 20:43 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('assets', '0006_auto_20160130_1439'), ] operations = [...
nocarryr/AV-Asset-Manager
avam/assets/migrations/0007_auto_20160130_1443.py
Python
gpl-3.0
3,469
# coding=utf-8 # This file is part of SickRage. # # URL: https://sick-rage.github.io # Git: https://github.com/Sick-Rage/Sick-Rage.git # # SickRage 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...
Arcanemagus/SickRage
tests/sickrage_tests/show/show_tests.py
Python
gpl-3.0
4,713
#!/usr/bin/env python import sys # For debug, preference local install over all else if "DEBUG" in sys.argv: sys.path.insert(0, "../") sys.path.insert(0, "../../") # For mvtest sys.path.insert(0, ".") sys.argv.remove("DEBUG") from libgwas import bed_parser from libgwas.boundary import BoundaryCheck fro...
torstees/MVtest
meanvar/tests/test_analyze_bed.py
Python
gpl-3.0
8,631
from setuptools import setup, find_packages import os def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() long_description = ( read('README.rst') + '\n' + read('CHANGES.rst') ) install_requires = [ 'grok', 'iso3166', 'requests', 'setuptools',...
ulif/megrok.paypal
setup.py
Python
gpl-3.0
1,709
# -*- coding: utf-8 -*- from django.contrib import admin from images.models import Image, ImageLabel class ImageAdmin(admin.ModelAdmin): list_display = ('filename', 'project', 'updated', ) readonly_fields = ('preview',) class ImageLabelAdmin(admin.ModelAdmin): list_display = ('image', 'user', 'updated'...
marisn/timlab
src/images/admin.py
Python
gpl-3.0
433
# -*- coding: utf-8 -*- import os import uuid from datetime import datetime import exceptions from importlib import import_module import json import re from PIL import Image, ImageOps import magic import subprocess from django.db import models from django.contrib.auth.models import User from django.dispatch import rec...
RedeMocambos/baobaxia
app/django-bbx/media/models.py
Python
gpl-3.0
15,539
# ################################################################ # # Active Particles on Curved Spaces (APCS) # # Author: Silke Henkes # # ICSMB, Department of Physics # University of Aberdeen # Author: Rastko Sknepnek # # Division of Physics # School of Engineering, Physics and Mathem...
sknepneklab/SAMoS
analysis/batch_polar/batch_analyze_J0.1_0702.py
Python
gpl-3.0
4,514
# -*- coding: utf-8 -*- # Time-stamp: <2012-03-09 15:36:52 armin> import os import re import time import unittest import xml.etree.ElementTree as ET from memacs.sms import SmsMemacs class TestSmsMemacs(unittest.TestCase): def setUp(self): self._test_file = os.path.join( os.path.dirname(os.p...
novoid/Memacs
memacs/tests/sms_test.py
Python
gpl-3.0
1,339
#!/bin/env python import os from setuptools import setup def find_xdg_data_files(syspath, relativepath, pkgname, data_files=[]): for (dirname, _, filenames) in os.walk(relativepath): if filenames: syspath = syspath.format(pkgname=pkgname) subpath = dirname.split(relativepath)[1] ...
eliostvs/tomate-statusicon-plugin
setup.py
Python
gpl-3.0
1,378
import os import platform import _ctypes from ctypes import ( cdll, c_double, c_int, c_char_p, c_bool, c_char, c_float, c_void_p, ARRAY, Structure, POINTER, byref, CFUNCTYPE ) def load_library(path): """Return the native library, loaded with """ library_dir = os.path.dirname(path) library...
Deltares/dhydrology-lib
python/dhydrology-py/dhydrology.py
Python
gpl-3.0
1,225
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' *This introductory sentence should state the intent and goal of the tutorial. Keep it brief. This next block should state any assumptions that you the writer are making. Present them in list form.* Let us start with ... .. math:: \nabla\cdot( A \cdot \nabla u ) ...
florian-wagner/gimli
doc/tutorial/modelling.py
Python
gpl-3.0
3,082
# -*- coding: utf-8 -*- from __future__ import division '''Classes to store limit state control variables (internal forces, strains, stresses,...) calculated in the analysis. THESE CLASSES ARE INTENDED TO REPLACE THE PROPERTIES DEFINED IN def_vars_control.py WICH MUST DISSAPEAR. ''' __author__= "Luis C. Pére...
lcpt/xc
python_modules/postprocess/control_vars.py
Python
gpl-3.0
43,169
#!/usr/bin/env python # -*- encoding: utf-8 -*- import click import json import logging from sys import exit from strephit.commons.wikidata import get_property_ids, get_entities, get_labels_and_aliases logger = logging.getLogger(__name__) def compute_exact_matches(corpus_frames, wikidata_properties): """ C...
Wikidata/StrepHit
strephit/corpus_analysis/map_fes_to_wd_props.py
Python
gpl-3.0
3,366