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) 2013-2014 Fox Wilson, Peter Foley, Srijay Kasturi, Samuel Damashek and James Forcier # # 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 y...
sckasturi/saltlake
commands/stopwatch.py
Python
gpl-2.0
3,644
#!/usr/bin/python #~ from pprint import pprint import getopt import sys import signal import yaml import socket from dnslib import * def usage (progName): """ Print the program's usage and then sys.exit() """ print ("Usage: %s -c <configuration file> -l <listening address> -p <listening port> -r <remote resolver IP...
SK-011/AF_DNS
AF_DNS.py
Python
gpl-2.0
7,971
from django.shortcuts import get_object_or_404, render_to_response from django.http import HttpResponseRedirect, HttpResponse from django.core.urlresolvers import reverse from django.template import RequestContext from django.utils import simplejson from django.conf import settings from models import * from functions i...
AWegnerGitHub/IRVING
irving/dashboard/views.py
Python
gpl-2.0
14,966
# -*- coding: utf-8 -*- # Copyright 2008-2012 Jaap Karssenberg <jaap.karssenberg@gmail.com> '''This module supports dumping to HTML''' # TODO paragraph indenting using margin CSS ? # TODO use global CSS for checkboxes instead of inline style - needs also support from tempalte etc import re import string from zim.f...
gdw2/zim
zim/formats/html.py
Python
gpl-2.0
5,384
import json #import jsonical import time import socket from twisted.protocols.basic import LineOnlyReceiver from twisted.internet import defer, reactor, error from twisted.python.failure import Failure #import services import stats import signature import custom_exceptions import connection_registry import settings ...
oxagast/hashnet
stratum/stratum/protocol.py
Python
gpl-2.0
13,461
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 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 ## ...
EUDAT-B2SHARE/invenio-old
modules/miscutil/lib/mailutils.py
Python
gpl-2.0
17,746
# Lazygal, a lazy static web gallery generator. # Copyright (C) 2011-2012 Alexandre Rossi <alexandre.rossi@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 Li...
Konubinix/lazygal
lazygaltest/test_conf.py
Python
gpl-2.0
4,698
#!/usr/bin/env python import glob def main(): module = AnsibleModule( argument_spec=dict( command=dict(required=True, default=None, type='str'), image=dict(required=True, default=None, type='str'), volumes=dict(required=False, default=[], type='list'), envir...
olgamelnichuk/NGSPyEasy
examples/trivial/library/dockercmd.py
Python
gpl-2.0
2,283
import logging.config # logging.basicConfig(level=logging.INFO) import logging,sys formatter = logging.Formatter('%(filename)s:%(lineno)s :: %(message)s') stdout_handler = logging.StreamHandler(sys.stdout) stdout_handler.setFormatter(formatter) logger=logging.getLogger('') logger.addHandler(stdout_handler) logger.set...
jagleeso/calm
src/python/logconfig.py
Python
gpl-2.0
454
from edc_base.model_managers import HistoricalRecords from edc_base.model_mixins import BaseUuidModel from edc_base.sites import CurrentSiteManager from edc_search.model_mixins import SearchSlugModelMixin, SearchSlugManager from ..managers import AliquotManager from .model_mixins import AliquotModelMixin, AliquotIdent...
botswana-harvard/edc-lab
edc_lab/models/aliquot.py
Python
gpl-2.0
1,273
import tkinter as tk from tkinter import messagebox import dialogs.logindialog as logindialog from pages.selectshowpage import SelectShowPage as SelectShowPage from pages.subtitleselectionpage import SubtitleSelectionPage as SubtitleSelectionPage from pages.downloadpage import DownloadPage as DownloadPage _...
anderswb/addic7ed_fetcher
mvc/view.py
Python
gpl-2.0
3,084
from secret_sharing_modif import secret_sharing from secret_sharing_c_modif import secret_sharing_c S = secret_sharing("The quick brown fox jumps over the lazy dog", 100, 15) s = secret_sharing_c() print S.share_random() s.add_share(S.share_random()) s.add_share(S.share_random()) s.add_share(S.share_random()) s.add_s...
ioniATX/DHT_oblivion
Blocs/III_Shamirs_Block/Code/demomodif.py
Python
gpl-2.0
705
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <phil@secdev.org> ## This program is published under a GPLv2 license """ RTP (Real-time Transport Protocol). """ from kamene.packet import * from kamene.fields import * _rtp_payload_types ...
phaethon/scapy
kamene/layers/rtp.py
Python
gpl-2.0
1,435
#!/usr/bin/env python # -*- coding: iso-8859-1 # 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 dist...
gboysko/shuffle-db
src/python/rebuild_db.py
Python
gpl-2.0
19,670
# encoding: utf-8 from yast import import_module import_module('UI') from yast import * class CheckBoxFrame1Client: def main(self): UI.OpenDialog( VBox( MarginBox( 1, 0.5, CheckBoxFrame( "E&xpert Settings", True, ...
yast/yast-python-bindings
examples/CheckBoxFrame1.py
Python
gpl-2.0
729
# $Id$ # Copyright (C) 2004 Igor Belyi <belyi@users.sourceforge.net> # Copyright (C) 2002 John Goerzen <jgoerzen@complete.org> # # 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; e...
malb/pyme
pyme/errors.py
Python
gpl-2.0
1,710
# This software is Copyright (C) 2004-2008 Bristol University # and is released under the GNU General Public License version 2. import unittest from math import sqrt from Polynomial import Polynomial from EigenSystem import EigenSystem from Diagonal import Diagonalizer, Complexifier from SystemBath import * imag_h...
Peter-Collins/NormalForm
src/py/SystemBathTest.py
Python
gpl-2.0
8,061
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011, 2012, 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 optio...
switowski/invenio
invenio/modules/submit/models.py
Python
gpl-2.0
19,892
import sys import pyperclip import math def encrypt(key, message): ciphertext = [''] * key for col in range(key): pointer = col while pointer < len(message): ciphertext[col] += message[pointer] pointer += key return ''.join(ciphertext) def decrypt(key, ciphe...
zach-king/Python-Miscellaneous
Cryptography/transpositionCipher.py
Python
gpl-2.0
1,466
#! /usr/bin/python import os from gps import * import time import threading from log import Logging TAG = 'GPS' gpsd = None #seting the global variable class GpsScan(threading.Thread): def __init__(self, logging, gps_dict, gps_timed_dict, gps_coord_list): threading.Thread.__init__(self) global g...
dejavu1988/blueproximity-plus-deb
blueproximity-plus/usr/share/blueproximity-plus/gps_worker.py
Python
gpl-2.0
2,531
''' Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, m...
morfeokmg/maurrepo
src/Examples/CmdClient.py
Python
gpl-2.0
4,875
from __future__ import absolute_import from scrapy.spiders import Spider from scrapy.selector import Selector from scrapy import Request import sys from Schoogle.items import O_Item from sys import getsizeof from datetime import datetime import time import re mport string def reduce(text): return "".join([c for c in...
dwt2c/Schoogle
Schoogle/Schoogle/spiders/O_Spider.py
Python
gpl-2.0
3,037
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # $Id: ogr_sxf.py 26513 2013-10-02 11:59:50Z bishop $ # # Project: GDAL/OGR Test Suite # Purpose: Test OGR SXF driver functionality. # Author: Dmitry Baryshnikov <polimax@mail.ru> # ########...
nextgis-extra/tests
lib_gdal/ogr/ogr_sxf.py
Python
gpl-2.0
2,553
""" Model based on CONMIN test. """ from openmdao.main.api import Assembly, Component, set_as_top from openmdao.lib.casehandlers.api import ListCaseRecorder from openmdao.main.datatypes.api import Array, Float from openmdao.lib.drivers.conmindriver import CONMINdriver from openmdao.lib.drivers.slsqpdriver import SLSQP...
HyperloopTeam/FullOpenMDAO
lib/python2.7/site-packages/openmdao.test-0.13.0-py2.7.egg/openmdao/test/rosen_suzuki.py
Python
gpl-2.0
3,349
# Please do not change this hardware control module for Quisk. # It provides USB control of SoftRock hardware. import struct, threading, time, traceback, math from quisk_hardware_model import Hardware as BaseHardware import _quisk as QS # All USB access is through control transfers using pyusb. # byte_array = ...
JeremyGrosser/quisk
src/softrock/hardware_usb.py
Python
gpl-2.0
8,270
data = ( 'Ming ', # 0x00 'Sheng ', # 0x01 'Shi ', # 0x02 'Yun ', # 0x03 'Mian ', # 0x04 'Pan ', # 0x05 'Fang ', # 0x06 'Miao ', # 0x07 'Dan ', # 0x08 'Mei ', # 0x09 'Mao ', # 0x0a 'Kan ', # 0x0b 'Xian ', # 0x0c 'Ou ', # 0x0d 'Shi ', # 0x0e 'Yang ', # 0x0f 'Zheng ', # 0...
avian2/unidecode
unidecode/x077.py
Python
gpl-2.0
4,673
# vim: set fileencoding=utf-8 : """ Forms module """
SabatierBoris/CecileWebSite
pyramidapp/forms/__init__.py
Python
gpl-2.0
53
import irclib import urllib import BeautifulSoup import HTMLParser import thread import os class nowplaying: def __init__(self): if not os.path.exists("modules/pubmsg/lastfmprofile"): open("modules/pubmsg/lastfmprofile", 'w').close() self.nickDict = dict() self.getUsernames() ...
013/BigBen
modules/pubmsg/nowplaying.py
Python
gpl-2.0
3,100
from bs4 import BeautifulSoup import os PATH = '/home/arj/arj_projects/imp_dump/kv_advanced/course_material/Advanced_Python_Course_(KV_October_2019)' VID_DIR = 'advanced_videos' LESSON_VID_MAP = { # 'AD_-_Decorators_2': '29B_Decorators.webm', # 'AD_-_Introduction': '01_Introduction.webm', # 'AD_-_Exercise1': '04_Ex...
ankitjavalkar/algosutra
yaksh_video_replacer/replacer.py
Python
gpl-2.0
2,250
import re, os, os.path import Media, VideoFiles, Stack, Utils import time # # this is a start to get to learn how to write scanners # debugfile = '/tmp/enigma2_movie_debug.log' debug = True def Scan(path, files, mediaList, subdirs, language=None, root=None, **kwargs): def strip_name_from_ts_file(tsfile): ...
witjoh/enigma2_dreambox_scanner
Scanners/Movies/Enigma2 Debug Scanner.py
Python
gpl-2.0
7,163
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
v-a/check_mk
web/htdocs/prediction.py
Python
gpl-2.0
11,287
# -*- coding: utf-8 -*- """ Created on Sun Apr 2 09:34:30 2017 @author: rstreet """ from django.core.management.base import BaseCommand from django.contrib.auth.models import User from events.models import ObsRequest from scripts import query_db class Command(BaseCommand): args = '' help = '' def _...
ytsapras/robonet_site
events/management/commands/fetch_tap_list.py
Python
gpl-2.0
535
# -*- coding: iso-8859-1 -*- # # Copyright (C) 2001 - 2020 Massimo Gerardi all rights reserved. # # Author: Massimo Gerardi massimo.gerardi@gmail.com # # Copyright (c) 2020 Qsistemi.com. All rights reserved. # # Viale Giorgio Ribotta, 11 (Roma) # 00144 Roma (RM) - Italy # Phone: (+39) 06.87.163 # # # Si veda ...
phasis/phasis
phasis/base/srctblcf.py
Python
gpl-2.0
5,891
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 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 t...
PXke/invenio
invenio/legacy/docextract/utils.py
Python
gpl-2.0
1,606
#------------------------------------------------------------------------ # # Register Gramplet # #------------------------------------------------------------------------ register(GRAMPLET, id="Data Entry Gramplet", name=_("Data Entry Gramplet"), description = _("Gramplet for quick data entr...
gramps-project/addons-source
DataEntryGramplet/DataEntryGramplet.gpr.py
Python
gpl-2.0
761
import mcpi.minecraft as minecraft import mcpi.block as block mc = minecraft.Minecraft.create() mc.setBlocks(-150,0,-150,150,80,150,block.AIR)# Air above mc.setBlocks(-150,0,-150,150,-1,150,block.WATER)# Water below mc.player.setTilePos(0, 1, 0) mc.setBlock(0,0,0,block.DIRT)# Dirt mc.postToChat("Waterworld created")
tommybobbins/minecraft_flashcards
scripts/flatten_planet.py
Python
gpl-2.0
318
""" Django settings for website project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) im...
WeakGroup/twitter-rec
interface/website/website/settings.py
Python
gpl-2.0
2,100
#!/usr/bin/python #-*-coding:utf-8-*- from urlparse import urlparse from scrapy.http import Request from scrapy.utils.python import WeakKeyCache class GoogleCacheMiddleware(object): """ this middleware allow spider to crawl the spicific domain url in google caches. you can define the GOOGLE_CACHE...
eromoe/tianqi_history
tianqi_history/contrib/downloadmiddleware/google_cache.py
Python
gpl-2.0
2,487
#!/usr/bin/env python3 import os import sys import subprocess ######## GLOBALS ######### MAINPREFIX = "z" PREFIX = "potato_" ########################## def tryHemttBuild(projectpath): hemttExe = os.path.join(projectpath, "hemtt.exe") if os.path.isfile(hemttExe): os.chdir(projectpath) ret = su...
BourbonWarfare/POTATO
tools/build.py
Python
gpl-2.0
2,898
"""Module to load py_mem_dump records into RunSnakeRun memory_dump: https://launchpad.net/pymemorydump Produces memory overviews very similar to the run-time overviews of cProfile. This module maps the memory-dump information into the recursive records that RunSnakeRun needs to display properly. """ import psta...
AusTac/parma
b3/lib/runsnakerun/memdumploader.py
Python
gpl-2.0
9,715
# -*- coding: utf-8 -*- # Copyright (C) 2012-2018 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed ...
jhdulaney/dnf
tests/support.py
Python
gpl-2.0
20,691
# # This is the container for the palettes. To change them # simply edit this. # from numpy import * NTSC = array([ [0x00,0x00,0x00],[0x40,0x40,0x40],[0x6C,0x6C,0x6C],[0x90,0x90,0x90], [0xB0,0xB0,0xB0],[0xC8,0xC8,0xC8],[0xDC,0xDC,0xDC],[0xEC,0xEC,0xEC], [0x44,0x44,0x00],[0x64,0x64,0x10],[0x...
asterick/pytari
Palettes.py
Python
gpl-2.0
5,212
import optparse from math import sqrt, pi import numpy as np from ase.dft.kpoints import monkhorst_pack def str2dict(s, namespace={}, sep='='): """Convert comma-separated key=value string to dictionary. Examples: >>> str2dict('xc=PBE,nbands=200,parallel={band:4}') {'xc': 'PBE', 'nbands': 200, 'par...
alexei-matveev/ase-local
ase/tasks/calcfactory.py
Python
gpl-2.0
6,674
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'zappyk' import os, sys from lib_zappyk import _setup project = 'FindNameSend' name = __import__(project).get_project() description = __import__(project).get_description() version = __import__(project).get_version() author = _setup.AUTH...
zappyk-github/zappyk-python
src/src_zappyk/findNameSend/setup.py
Python
gpl-2.0
2,984
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'ui_fiscal_icfencerrar.ui' # # Created: Mon Nov 24 22:25:43 2014 # by: pyside-uic 0.2.15 running on PySide 1.2.2 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui from PySide.QtGui import QMessage...
edineicolli/daruma-exemplo-python
scripts/fiscal/ui_fiscal_icfencerrar.py
Python
gpl-2.0
6,436
# -*- coding: utf-8 -*- """ * Copyright (C) 2010-2014 Loic BLOT <http://www.unix-experience.fr/> * * 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 op...
nerzhul/Z-Eye
service/WebApp/Z_Eye/engine/Switches/API/__init__.py
Python
gpl-2.0
3,146
# coding: utf-8 from django.contrib.auth.decorators import login_required from django.shortcuts import render from django.shortcuts import render_to_response,redirect from models import Article from block.views import Demo from django.contrib.auth.models import User from django.template.context import RequestContext f...
soul-F/forumdemo
article/views.py
Python
gpl-2.0
2,005
from roads import Roads import csv import qlearningAgents def main(TimeToSimulate,TStep): wrtFile1= open("road1.csv",'w') wrtFile2= open("road2.csv",'w') #specsFile1 = open("road1_specs.csv",'rb') #specsFile2 = open("road2_specs.csv",'rb') roads = Roads([[wrtFile1,TStep,500,"road1_specs.csv","Red"...
the-archer/ai-project
TrafficModel/main.py
Python
gpl-2.0
1,779
#!/usr/bin/python import os import psycopg2 import sys file = open("/home/" + os.getlogin() + "/.pgpass", "r") pgpasses = [] for line in file: pgpasses.append(line.rstrip("\n").split(":")) file.close() for pgpass in pgpasses: #print str(pgpass) if pgpass[0] == "54.236.235.110" and pgpass[3] == "geonode": sr...
DOE-NEPA/geonode_2.0_to_2.4_migration
migrate_base_topiccategory.py
Python
gpl-2.0
1,677
#条件过滤的要点是综合语句的构造。利用 if 剔除掉非字符串的元素。e.g:而列表生成式则可以用一行语句代替循环生成上面的list: #>>> [x * x for x in range(1, 11)] #[1, 4, 9, 16, 25, 36, 49, 64, 81, 100] def toUppers(L): return [x.upper() for x in L if isinstance(x,str)] print (toUppers(['Hello', 'world', 101]))
quietcoolwu/learn-python3-master
imooc/10_3.py
Python
gpl-2.0
365
# -*- coding: utf-8 -*- """ RED Plugin Copyright (C) 2014 Ishraq Ibne Ashraf <ishraq@tinkerforge.com> Copyright (C) 2014 Olaf Lüke <olaf@tinkerforge.com> Copyright (C) 2014-2015 Matthias Bolte <matthias@tinkerforge.com> red_tab_settings_brickd.py: RED settings brickd tab implementation This program is free software; ...
Tinkerforge/brickv
src/brickv/plugin_system/plugins/red/red_tab_settings_brickd.py
Python
gpl-2.0
14,059
import traceback, socket, os, time, smtplib, re, sys, getpass, logging try: import autotest.common as common except ImportError: import common from autotest_lib.client.common_lib import global_config CONFIG_SECTION = 'SCHEDULER' CONFIG_SECTION_SMTP = 'SERVER' class EmailNotificationManager(object): def _...
libvirt/autotest
scheduler/email_manager.py
Python
gpl-2.0
3,273
import os import boto from boto.s3.key import Key # The secret key is available as a secure environment variable # on travis-ci to push the build documentation to Amazon S3. AWS_ACCESS_KEY_ID = os.environ['AWS_ACCESS_KEY_ID'] AWS_SECRET_ACCESS_KEY = os.environ['AWS_SECRET_ACCESS_KEY'] BUCKET_NAME = 'msmbuilder.org' b...
mpharrigan/msmbuilder
tools/ci/push-docs-to-s3.py
Python
gpl-2.0
802
import __init__ import math import numpy as np class Point: '''Point at 3D. Some method for it. ''' def __init__ (self, x=0.0, y=0.0 ,z=0.0): self.x=x self.y=y self.z=z def coors(self): coor=(self.x,self.y,self.z) return coor def dist_to(self,a...
platinhom/CADDHom
python/basic/HHGeometry.py
Python
gpl-2.0
2,547
# Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 Nick Hall # # 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 late...
pmghalvorsen/gramps_branch
gramps/plugins/gramplet/repositorydetails.py
Python
gpl-2.0
5,196
#!/usr/bin/python3 # -*- coding: utf-8 -*- import os import pkg_resources import html from PyQt5.QtCore import Qt from PyQt5.QtCore import QTextCodec from PyQt5.QtCore import pyqtSlot from PyQt5.QtGui import QKeySequence from PyQt5.QtGui import QIcon from PyQt5.QtWidgets import QWidget from PyQt5.QtWidgets import QVB...
lheido/Mojuru
modules/core/ace_editor/ace_editor.py
Python
gpl-3.0
6,210
import pycurl import cStringIO import random import HTMLParser def generate_TAXII_header(xml, ssl=True): headers = { "Content-Type": "application/xml", "Content-Length": str(len(xml)), "User-Agent": "TAXII Client Application", "Accept": "application/xml", "X-TAXII-Accept": "urn:taxii...
hazmalware/sharephish
taxiigenerator.py
Python
gpl-3.0
3,968
from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE VARCHAR2 = VARCHAR class CCommodityFuturesEODPrices(BaseModel): """ 4.182 中国商品期货日行情 Attributes ---------- object_id: VARCHAR2(100) 对象ID s_info_windcode: VARCHAR2(40) ...
SnowWalkerJ/quantlib
quant/data/wind/tables/ccommodityfutureseodprices.py
Python
gpl-3.0
1,944
import logging from logging import config import paramiko import os from read_config import * class FileDownloader(object): ip = None port = None user = None password = None local_file_path = None remote_file_path = None abs_file_list = [] ssh = None logger = None...
10177591/BnB-bot
utils/FileDownloader.py
Python
gpl-3.0
2,539
#!/usr/bin/env python """ Copyright (c) 2006-2016 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import os import re from lib.controller.action import action from lib.controller.checks import checkSqlInjection from lib.controller.checks import checkDynParam from lib.cont...
undefinedv/Jingubang
sqlmap/lib/controller/controller.py
Python
gpl-3.0
30,449
import sys, os, os.path, re, xml.dom.minidom, xml.dom, optparse def usage(): print """ usage: checkcase.py -f [fzp folder] -s [svg folder] ensure all fzp files case-sensitively match svg file names """ def main(): parser = optparse.OptionParser() parser.add_optio...
rmelo19/rmelo19-arduino
fritzing/fritzing.0.9.2b.64.pc/parts/part-gen-scripts/misc_scripts/checkcase.py
Python
gpl-3.0
3,904
# ============================================================================= # Copyright (C) 2010 Diego Duclos # # This file is part of pyfa. # # pyfa 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 ...
DarkFenX/Pyfa
gui/builtinStatsViews/resistancesViewFull.py
Python
gpl-3.0
9,855
# -*- coding: utf-8 -*- """ """ # Copyright (C) 2015 ZetaOps Inc. # # This file is licensed under the GNU General Public License v3 # (GPLv3). See LICENSE.txt for details. from pyoko import Model from pyoko.fields import Integer, String, Date from zengine.lib.translation import gettext as _ from zengine.lib.translat...
zetaops/ulakbus
ulakbus/models/akademik_faaliyet.py
Python
gpl-3.0
2,297
# 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 hope that it will be useful, # bu...
cmr/cmr_rrt
src/map.py
Python
gpl-3.0
2,764
import discord, os, logging from discord.ext import commands from .utils import checks from .utils.dataIO import dataIO from .utils.chat_formatting import pagify, box #The Tasty Jaffa #Requested by Freud def get_role(ctx, role_id): roles = set(ctx.message.server.roles) for role in roles: if role.id ==...
The-Tasty-Jaffa/Tasty-Jaffa-cogs
say/say.py
Python
gpl-3.0
6,218
from django.db import models # Create your models here. class Collage(models.Model): name = models.CharField(max_length=50) slug = models.SlugField(unique=True) no_of_students = models.IntegerField() year_estd = models.IntegerField() def __str__(self): return self.name class Faculty(mo...
ayys/collegesearch
main/models.py
Python
gpl-3.0
507
''' Task Coach - Your friendly task manager Copyright (C) 2004-2013 Task Coach developers <developers@taskcoach.org> Task Coach 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 ...
TaskEvolution/Task-Coach-Evolution
taskcoach/taskcoachlib/persistence/autosaver.py
Python
gpl-3.0
2,170
#!/usr/bin/python3 from scale import scale from putchar import putchar
Irides-Chromium/python_modules
modules/__init__.py
Python
gpl-3.0
71
# Generates some automatic tags based on the value of other tags or information # available. import math from pylux import reference def tag_fixture_colour(fixture): if 'gel' in fixture.data: try: fixture.data['colour'] = reference.gel_colours[fixture.data['gel']] except KeyError: ...
jackdpage/pylux
pylux/lib/tagger.py
Python
gpl-3.0
1,597
"""Peter's re-write of word completion for GNU readline The foundation for this is the wonderful rlcompleter module that comes with Python. It has been re-written to make it more informative. When you import this module, it does this for you: readline.parse_and_bind("tab: complete") which makes the tab key the c...
supertree-toolkit/stk
stk/p4/p3rlcompleter.py
Python
gpl-3.0
19,120
# -*- 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/cache.py
Python
gpl-3.0
14,592
#------------------------------------------------------------------------------- # Copyright (c) 2012 Gael Honorez. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0 # which accompanies this distribution, and is available at # htt...
IDragonfire/modular-client
src/fa/replayserver.py
Python
gpl-3.0
8,647
import bones.event from bones.bot import Module class NickServ(Module): def __init__(self, *args, **kwargs): Module.__init__(self, *args, **kwargs) self._disabled = False if not self.settings.get("services", "nickserv.password"): self.log.error( "Configuration d...
404d/Bones-IRCBot
bones/modules/services.py
Python
gpl-3.0
3,923
from mock import patch import mock from kiwi.storage.subformat.vhdx import DiskFormatVhdx class TestDiskFormatVhdx: @patch('platform.machine') def setup(self, mock_machine): mock_machine.return_value = 'x86_64' xml_data = mock.Mock() xml_data.get_name = mock.Mock( return_...
b1-systems/kiwi
test/unit/storage/subformat/vhdx_test.py
Python
gpl-3.0
1,314
import time import recordlib if __name__ == "__main__": recordlib.initialize() print("waiting for input") recordlib.logging.info("waiting for input") try: # define interrupt, get rising signal, debounce pin recordlib.GPIO.add_event_detect( recordlib.TASTER_1, rec...
benjaminhabbel/motion_recorder
old/button_loop.py
Python
gpl-3.0
770
''' generic library functions ''' import re # urllib works different in python 2 and 3 try catch to get the correct one try: import urllib.request as urllib2 except ImportError: import urllib2 import urllib.request import pywikibot import json from unidecode import unidecode def load_from_url(url): """ ...
infobliss/sibutest2
libraries/utils.py
Python
gpl-3.0
5,431
from databaseObject import * from nntrainer import * from nnbuilder import * import os import xml.etree.ElementTree import time import Queue import multiprocessing import numpy as np import sys THREADS = 5 NEWONLY = 0 class testingHandler: def __init__(self, fileName): self.openSchema(fileName) def ...
iistyler/TreeBeard-IDS
testingHandlerMultithreaded.py
Python
gpl-3.0
8,901
# -*- coding: utf-8 -*- # # (c) Copyright 2001-2008 Hewlett-Packard Development Company, L.P. # # 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 opt...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/hplip/ui4/makecopiesdialog.py
Python
gpl-3.0
2,669
from PySide2 import QtGui, QtCore, QtWidgets from design import SidUi, DdUi from ServersData import ServersDownloadThread, servers import sys class SpeedInputDialog(QtWidgets.QDialog, SidUi): def __init__(self): QtWidgets.QDialog.__init__(self) self.setupUi() def get_data(self)...
ZeX2/TWTools
CustomDialogs.py
Python
gpl-3.0
3,155
# -*- coding: utf-8 -*- # # sgl documentation build configuration file, created by # sphinx-quickstart on Sat Mar 12 15:33:34 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All c...
m48/sgl
docs/source/conf.py
Python
gpl-3.0
11,475
# -*- coding: utf-8 -*- # # Copyright (c) 2014 Toshio Kuratomi # License: GPLv3+ # # This file is part of Mondegreen. # # Mondegreen 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...
abadger/mondegreen
mondegreen/config.py
Python
gpl-3.0
3,476
# Note: run this server by using python2.7 instead of python3.2 from asyncore import dispatcher from asynchat import async_chat import socket, asyncore IP = '' PORT = 5555 SEP = '\n' class ChatSession(async_chat): """ A simple chat session corresponding to a client """ def __init__(self,sock): async_chat.__init...
justasabc/python_tutorials
project/chat/chatserver.py
Python
gpl-3.0
1,221
# -*-coding: utf-8 -*- import colander from . import ( SelectInteger, ResourceSchema, BaseForm, BaseSearchForm, ) from ..resources.leads_offers import LeadsOffersResource from ..models.lead_offer import LeadOffer from ..models.currency import Currency from ..models.supplier import Supplier from ..mode...
mazvv/travelcrm
travelcrm/forms/leads_offers.py
Python
gpl-3.0
1,762
# -*- coding: utf8 -*- import json import os import shlex import subprocess # command line test def test_cmdline_help(): """Must produce an error is no url was given""" result = subprocess.Popen(shlex.split('./bin/sms-shell-parser --help'), stdout=subprocess.PIPE) stdout, stderr = result.communicate() ...
Turgon37/SMSShell
tests/test_cmdline_parser.py
Python
gpl-3.0
2,168
#!/usr/bin/python # -*- coding: utf-8 -*- #Copyright (C) 2008-2014 Nestor Arocha def matchFun(myinput): from collections import Iterable if isinstance(myinput, Iterable): myinput = "".join([str(x) for x in myinput]) strnumber = str(myinput) try: number = int(strnumber) except Val...
nesaro/pydsl
pydsl/contrib/grammar/DayOfMonth.py
Python
gpl-3.0
437
""" this file is the test module for the log module """ from logging import CRITICAL, DEBUG, ERROR, INFO, NOTSET, WARNING from easywall.log import Log from easywall.utility import delete_file_if_exists from tests import unittest class TestLog(unittest.TestCase): """ this class contains all test functions for...
KingJP/EasyWall
tests/easywall/test_log.py
Python
gpl-3.0
1,439
''' Time Variant/Incremental Ensemble of FTS methods ''' import numpy as np import pandas as pd from pyFTS.common import FuzzySet, FLR, fts, flrg from pyFTS.partitioners import Grid from pyFTS.models import hofts from pyFTS.models.ensemble import ensemble class IncrementalEnsembleFTS(ensemble.EnsembleFTS): """ ...
petroniocandido/pyFTS
pyFTS/models/incremental/IncrementalEnsemble.py
Python
gpl-3.0
3,809
from django.urls import reverse from oppia.test import OppiaTestCase from reports.models import DashboardAccessLog class ContextProcessorTest(OppiaTestCase): fixtures = ['tests/test_user.json', 'tests/test_oppia.json', 'tests/test_quiz.json', 'tests/test_permissio...
DigitalCampus/django-oppia
tests/oppia/test_context_processors.py
Python
gpl-3.0
2,547
# -*- coding: utf-8 -*- # # Created on Oct 15, 2013 # @authors: Jiri Spilka # http://people.ciirc.cvut.cz/~spilkjir # @2015, CIIRC, Czech Technical University in Prague # # Licensed under the terms of the GNU GENERAL PUBLIC LICENSE # (see CTGViewer.py for details) import sys from PyQt4.QtGui import QApplication, QWidg...
spilkjir/CTGViewer
src/ClinInfoForm.py
Python
gpl-3.0
7,448
import os import rootpy.compiled as C C.register_code( """ #include <map> int get_bin(double pt_mev) { if (pt_mev < 30000.) return 0; else if (pt_mev > 30000. && pt_mev < 40000.) return 1; else if (pt_mev > 40000. && pt_mev < 50000.) return 2; else if (pt_mev > 50000. && pt_mev < 60000.) return 3; else if (pt_mev > ...
qbuat/tauperf
tauperf/extern/cuttable.py
Python
gpl-3.0
4,751
import string import time import bluetooth #if you get an import error, then "sudo apt-get install python-bluez" import dtc def send_recv(cmd, respSize): #send cmd parameter and return dongle response (ignores echoes) sock.send(cmd + "\r\n") time.sleep(0.005) resp1 = "" while(1): if respSize ==...
WebsterXC/digidash
src/can/socketrun.py
Python
gpl-3.0
4,103
#!/usr/bin/env python ''' ____ _ _ _ ____ _______ ____ / ___)| | | | | |/ _ \ / _ _ \| _ \ \___ \| | | | | | (_) | | | | | | |_) ) ___) | |_| |_| | ___ | | | | | | __/ (____/ \_______/|_| |_|_| |_| |_|_| Sliding Win...
peterwharrison/SWAMP
SWAMP.py
Python
gpl-3.0
27,840
#!/usr/bin/env python # ELBE - Debian Based Embedded Rootfilesystem Builder # Copyright (C) 2015 emtrion GmbH # Copyright (C) 2014 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 # th...
ferdisdot/elbe
elbepack/updated_monitors.py
Python
gpl-3.0
5,228
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import cStringIO import csv import logging import os.path import re import sys import time from datetime import datetime, timedelta from dateutil.relativedelta import relativedelta import pytz from lxml import etree, b...
ayepezv/GAD_ERP
openerp/tools/convert.py
Python
gpl-3.0
37,832
#!/usr/bin/env python """macro_tests.py: Some macro tests""" from __future__ import absolute_import, division, print_function, unicode_literals __author__ = "Fabien Cromieres" __license__ = "undecided" __version__ = "1.0" __email__ = "fabien.cromieres@gmail.com" __status__ = "Development" # import nmt_chainer.make_dat...
fabiencro/knmt
tests/suite1/training_management_test.py
Python
gpl-3.0
3,928
# -*- coding: utf-8 -*- import scipy.odr from numpy import * from PySide2.QtCore import QObject, Signal class Fit(QObject): finished = Signal() def __init__(self, maxit=1000): QObject.__init__(self) self.maxit = maxit self.ready = False self.x, self.xerr = [], [] se...
wwmm/wwplot
WWplot/fit.py
Python
gpl-3.0
1,679
def main(tick, config, q): return # Drafted, TODO pc = { 'id': 1, 'coords': [0, 0, 0] } ship = { 'coords': [0, 0, 0], 'type': 'freight' or 'settler' or 'corvette' or 'frigate', # Corvette small tank, Frigate big tank, guns similar 'storage': { 'go...
Akuukis/MMO_sim
ships.py
Python
gpl-3.0
599
#!/usr/bin/python """ NaivePlot - A very naive plotting library for the console """ COLORS = True try: from colorama import init from termcolor import colored init() except ImportError: COLORS = False class Point(object): """Just a point You can create it and check the value >>> p1 ...
per9000/naiveplot
src/naiveplot.py
Python
gpl-3.0
17,753
# -*- coding: UTF-8 -*- """ Name: generic_task.py Porpose: Execute a generic task with FFmpeg Compatibility: Python3 (Unix, Windows) Author: Gianluca Pernigotto <jeanlucperni@gmail.com> Copyright: (c) 2018/2022 Gianluca Pernigotto <jeanlucperni@gmail.com> license: GPL3 Rev: Feb.14.2022 Code checker: flake8: --ignor...
jeanslack/Videomass
videomass/vdms_threads/generic_task.py
Python
gpl-3.0
3,294
from django.db import models from django.db.models import Q class FriendshipManager(models.Manager): """ Provides an interface to friends """ def friends_for_user(self, user): """ Returns friends for specific user """ friends = [] qs = self.filter(Q(from_user=...
chrisfranklin/dinnertime
friends/managers.py
Python
gpl-3.0
2,411