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
# -*- coding: utf-8 -*- """ This test is a combination of unit and integration test. It makes a connection with google spreadsheets to get a dummy test version of the houseprint sheet. The sheet is called "unit and integration test houseprint" Open that sheet to check some of the tests. Created on Mon Dec 30 02:37:2...
EnergyID/opengrid
tests/test_houseprint.py
Python
gpl-2.0
5,610
# -*- coding: utf-8 -*- # vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4 ############################################################################### # OpenLP - Open Source Lyrics Projection # # ------------------------------------------------------...
crossroadchurch/paul
tests/functional/openlp_plugins/bibles/test_lib.py
Python
gpl-2.0
5,304
#!/usr/bin/python import os from setuptools import setup, find_packages import progressbar # TODO: I don't believe this should be in here. This should be done on package # creation only try: readme = 'README.txt' info = 'progressbar/__init__.py' if (not os.path.exists(readme) or os.stat(inf...
henrythasler/TileGenerator
docs/progressbar-2.3/setup.py
Python
gpl-2.0
1,821
#!/usr/bin/env python # -*- coding:gbk -*- import sys import re import os import string import urllib import urllib2 import datetime import binascii import shutil #from openpyxl import Workbook #from openpyxl.reader.excel import load_workbook #from internal.common import * #from internal.ts_common import * from inter...
yudingding6197/fin_script
fupai.py
Python
gpl-2.0
1,247
#!/usr/bin/python # # Remote DOS exploit code for IBM Lotus Domino Server 6.5. Tested on windows # 2000 server SP4. The code crashes the IMAP server. Since this is a simple DOS # where 256+ (but no more than 270) bytes for the username crashes the service # this is likely to work on other windows platform aswell. Maybe...
knightmare2600/d4rkc0de
exploits/070329.py
Python
gpl-2.0
1,818
#!/usr/bin/env python """ Checks Debian packages from Incoming @contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2000, 2001, 2002, 2003, 2004, 2005, 2006 James Troup <james@nocrew.org> @copyright: 2009 Joerg Jaspert <joerg@debian.org> @copyright: 2009 Mark Hymers <mhy@debian.org> @copyright: 2009 Fran...
purism/pdak
dak/process_upload.py
Python
gpl-2.0
20,073
from pyglet.graphics import TextureGroup from pyglet import image from pyglet.gl import * glEnable(GL_CULL_FACE) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST) glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST) tex = TextureGroup(image.load('modules\\icon.png').get_texture()) class N...
SVRobots/Minecraft
modules/api.py
Python
gpl-2.0
1,424
# Copyright (C) 2006, Red Hat, Inc. # Copyright (C) 2009, One Laptop Per Child Association Inc # # 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...
puneetgkaur/backup_sugar_shell_for_cordova
src/jarabe/main.py
Python
gpl-2.0
11,951
# -*- coding: utf-8 -*- """Skript to test the InProcessShell that is used in the psyplot gui""" import sys import six import unittest from itertools import chain import _base_testing as bt import psyplot.project as psy from psyplot.compat.pycompat import range from psyplot_gui.compat.qtcompat import ( QTest, Qt, QS...
Chilipp/psyplot_gui
tests/test_plot_creator.py
Python
gpl-2.0
15,647
# -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import socket import types from xml.etree.ElementTree import Element from nassl._nassl import WantReadError from sslyze.plugins import plugin_base from sslyze.plugins.plugin_base import PluginScanResult from sslyze....
krount/sslyze
sslyze/plugins/openssl_ccs_injection_plugin.py
Python
gpl-2.0
7,894
# Vatsal Shah # ECE-C433 Mini-Project 2 # gmailPy - A terminal gmail client # Tested on Python 2.7.3 # imapclient is not a part of the standard python library # install using sudo pip install imapclient import getpass from imapclient import IMAPClient import operator import email import optparse import sys class gma...
hornedbull/gmailPy
gmailPy.py
Python
gpl-2.0
13,792
#!/usr/bin/env python3 # -*- coding: utf-8, vim: expandtab:ts=4 -*- import sys import xml.sax import synset DEBUG = False class WNXMLParserException(Exception): def __init__(self, message): self.message = message def __str__(self): return repr(self.message) class WNXMLParserErrorHandler(xml...
ppke-nlpg/pywnxml
WNXMLParser.py
Python
gpl-2.0
12,898
#! /usr/bin/env python # -*- coding: iso-8859-1 -*- # chimera - observatory automation system # Copyright (C) 2006-2007 P. Henrique Silva <henrique@astro.ufsc.br> # 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 S...
wschoenell/chimera_imported_googlecode
src/chimera/core/chimeraobject.py
Python
gpl-2.0
6,427
import os import sys # Pool type enum class PoolType: BRACKET = 1 ROUND_ROBIN = 2 # Load functions. def ParseConfigLine(line, config_types): split_line = line.split() for i in xrange(len(split_line)): split_line[i] = split_line[i].strip() split_line = filter(None, split_line) if not len(split_line) ==...
aalberg/regional-seeding
src/util.py
Python
gpl-2.0
3,895
""" Copyright (c) 2015 Tim Waugh <tim@cyberelk.net> ## 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 progra...
twaugh/journal-brief
tests/util.py
Python
gpl-2.0
1,376
# -*- coding: utf-8 -*- import unittest from unittest.mock import MagicMock import os from blivetgui.i18n import _, P_ from blivetgui.list_actions import ListActions @unittest.skipUnless("DISPLAY" in os.environ.keys(), "requires X server") class ListActionsTest(unittest.TestCase): buttons_state = None act...
rhinstaller/blivet-gui
tests/blivetgui_tests/list_actions_test.py
Python
gpl-2.0
3,259
#!/usr/bin/env python # MusicLibraryPy - Tools to analyse and repair/update music libraries # Copyright © 2016 Rob Hardwick # # 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...
robhardwick/music-library-py
setup.py
Python
gpl-2.0
1,122
# copyright 2003-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
pylint-bot/astroid-unofficial
astroid/objects.py
Python
gpl-2.0
6,789
from Screen import Screen from Components.ChoiceList import ChoiceEntryComponent, ChoiceList from Components.Sources.StaticText import StaticText from Components.ActionMap import ActionMap, NumberActionMap from Components.Label import MultiColorLabel, Label from Components.config import ConfigIP, NoSave, configfile, co...
pli3/enigma2-git
lib/python/Screens/TestMenu.py
Python
gpl-2.0
43,638
#!/usr/bin/python # Creator: Daniel Wooten # NE255 HW4 P3 MC Code import logging as logging import time as time import sys as sys import numpy as np import math as math import pylab as pl import csv as csvreader import mpmath as mp #This sets the precision for mpmath (extended precision python) mp.dis = 70 # Functio...
ddwooten/NE255
HW4/4.py
Python
gpl-2.0
26,177
# Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def removeElements(self, head, val): """ :type head: ListNode :type val: int :rtype: ListNode """ nod...
xinqiu/My-LeetCode-Notes
Leetcode/203.py
Python
gpl-2.0
543
""" This file is part of OpenSesame. OpenSesame 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. OpenSesame is distributed in the hope that ...
esdalmaijer/opensesame_eyetracker
eyetracker_drift_correct/eyetracker_drift_correct.py
Python
gpl-2.0
5,207
#!/usr/bin/env python # Use this script instead of running lupdate directly in order to prune some # phrases from the Qt translation files that lupdate insists on adding to the # PortaBase translation files (because they're used directly in the code). from os import listdir, system from os.path import join import re ...
jmbowman/portabase
packaging/update_translations.py
Python
gpl-2.0
803
import os import sys from PyQt5.QtQuick import QQuickView # to make sure cxFreeze includes it from fsbc.application import app from fsui.qt import QUrl class GameCenterView(QQuickView): def __init__(self, parent=None): QQuickView.__init__(self, parent) if getattr(sys, "frozen", ""): ...
FrodeSolheim/fs-uae-launcher
fsgamesys/ui/qwindow.py
Python
gpl-2.0
1,580
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # Copyright 2014 faisal oead <fafagold@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or #...
faisal-oead/conky-arabic-support
conkyar/rtl.py
Python
gpl-2.0
1,028
# encoding=utf-8 # pykarta/maps/layers/osm_svg.py # Copyright 2013--2018, Trinity College # Last modified: 22 October 2018 import os import math import re #import gzip from pykarta.maps.layers.base import MapLayer from pykarta.misc.http import simple_urlopen from pykarta.misc import file_age_in_days, SaveAtomically ...
david672orford/pykarta
pykarta/maps/layers/osm_svg.py
Python
gpl-2.0
5,567
import unittest from nose.tools import assert_equals from dojo.taxonomy.maps import RefseqAssemblyMap class RefseqAssemblyMapTest(unittest.TestCase): def test(self): refseq_map = RefseqAssemblyMap() assert_equals(None, None)
knights-lab/NINJA-DOJO
dojo/tests/test_refseq_assembly_map.py
Python
gpl-2.0
248
# Copyright (C) 2009 Abdelhalim Ragab <abdelhalim@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; version 3 # of the License or (at your option) any later version of # the License...
abdelhalim/gits3
src/gits3/gits3.py
Python
gpl-2.0
3,102
#!/usr/bin/env python """ author: Guillaume Bouvier email: guillaume.bouvier@ens-cachan.org creation date: 01 10 2013 license: GNU GPL Please feel free to use and modify this, but keep the above information. Thanks! """ import IO import numpy import itertools import scipy.spatial import scipy.stats import sci...
bougui505/SOM
application/makeVectorsFromdcd_PCA.py
Python
gpl-2.0
2,822
# # Copyright (c) 2015-2020 Bill Madill <wm@wmadill.com> # Derivative of extensions/alarm.py, credit to Tom Keffer <tkeffer@gmail.com> # # See the file LICENSE.txt for your full rights. # """Upload the generated HTML files to an S3 bucket ***********************************************************************...
wmadill/weewx-S3upload
bin/user/S3upload.py
Python
gpl-2.0
8,164
from __future__ import print_function from ImageD11.indexing import ubi_fit_2pks from ImageD11.unitcell import unitcell import numpy as np import time import unittest, cProfile, pstats def make_random_orientations( N ): """ Generate random quaternions and convert to U matrices """ q = np.random.stand...
jonwright/ImageD11
test/test_indexing.py
Python
gpl-2.0
2,698
# -*- coding: utf-8 -*- # Copyright (c) 2012 VMware, Inc. All Rights Reserved. # This file is part of ATOMac. #@author: Nagappan Alagappan <nagappan@gmail.com> #@copyright: Copyright (c) 2009-14 Nagappan Alagappan #@author: Sigbjørn Vik <sigbjorn@opera.com> #@Copyright (C) 2013-14 Opera Software ASA (generatemousee...
pyatom/pyatom
atomac/ldtpd/mouse.py
Python
gpl-2.0
10,473
#!/usr/bin/python2 import glob names = glob.glob("figs/mc/vertices/*--1.dat") bases = [name[:-6] for name in names] info = [] for base in bases: frames = 0 for i in glob.glob(base+"*"): if len(i.split('-')) == 6: #number is positive frames += 1 name = base.split('-') celltype = name[0].split('/')[-1...
droundy/deft
papers/polyhedra/figs/list-frames.py
Python
gpl-2.0
1,462
# -*- coding: UTF-8 -*- import json import re import urllib import urlparse import base64 from resources.lib.modules import cleantitle from resources.lib.modules import client from resources.lib.modules import directstream from resources.lib.modules import dom_parser from resources.lib.modules import source_utils c...
repotvsupertuga/tvsupertuga.repository
script.module.streamtvsupertuga/lib/resources/lib/sources/de/tata.py
Python
gpl-2.0
7,124
# # Copyright (C) 2013- Sean Poyser # # 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. # # This Program is distributed in the ...
JamesLinEngineer/RKMC
addons/plugin.audio.ramfm/default.py
Python
gpl-2.0
15,285
#!/usr/bin/python # Copyright (C) 2014 Red Hat Inc # # 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...
dealnews/gluster-nagios-addons
plugins/memory.py
Python
gpl-2.0
4,532
import cairo import pango import gtk from core.world import TheWorld from ontology.thing import Thing from widgets.primitives import Primitives class NodeTree(Thing): def __init__(self, root_node): Thing.__init__(self) self.root_node = root_node self.x_offset = 0.0 self.y_offset = 0....
antoinevg/survival
widgets/asteditor/nodetree.py
Python
gpl-2.0
4,118
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('links', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='category', options={'v...
udragon/webportal
links/migrations/0002_auto_20150408_2203.py
Python
gpl-2.0
568
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Microservice for making podcast rss feed from vk.com audiogroup's walls and rss feeds for aggregators """ import os import re import sys from datetime import datetime from libs.esvk.esvk import esVKWall from libs.esrss.esrsslite import esRss import libs.server.bottle ...
alive-corpse/esvk2pod
esvk2pod.py
Python
gpl-2.0
13,449
import numpy as np from math import pi # File contains helper functions for priniting various protocols # helper functions for creation of latex tables for the thesis def GenerateLatexPointsIterationTable(diff, out_file): _genDiff(diff, out_file, "Pt. no.") def GenerateLatexPhotosIterationTable(diff, out_file):...
ostepok/grass-gis-bba
src/i.ortho.bba/protocols.py
Python
gpl-2.0
10,236
print "Hello CPP!"
dkleissa/cpp_2014
helloworld.py
Python
gpl-2.0
18
#!/usr/bin/python ''' transpose tsv so that columns headings become row headings ''' import sys import numpy as np data = np.transpose(np.genfromtxt(sys.argv[1],dtype=object,delimiter='\t')) np.savetxt(sys.stdout,data,fmt='%s',delimiter='\t')
eastmallingresearch/crosslink
compare_progs/transpose_tsv.py
Python
gpl-2.0
247
# -*- coding: utf-8 -*- """ (c) 2016-2017 - Copyright Red Hat Inc Authors: Pierre-Yves Chibon <pingou@pingoured.fr> """ from __future__ import unicode_literals, print_function, absolute_import import logging import pygit2 import six import pagure.config import pagure.exceptions import pagure.lib.query impor...
pypingou/pagure
pagure/hooks/default.py
Python
gpl-2.0
12,080
# Portions Copyright (c) Meta Platforms, Inc. and affiliates. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2. # demandimport.py - global demand-loading of modules for Mercurial # # Copyright 2006, 2007 Matt Mackall <mpm@selenic.com> # # This software ...
facebookexperimental/eden
eden/scm/edenscm/hgdemandimport/demandimportpy2.py
Python
gpl-2.0
10,941
# -*- coding: utf-8 -*- # Ocvfw # # Copyright 2009 Flavio Percoco Premoli # # This file is part of Ocvfw. # # Ocvfw is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License v2 as published # by the Free Software Foundation. # # Ocvfw is distributed in the hope that...
lhotchkiss/mousetrap
src/mousetrap/ocvfw/commons.py
Python
gpl-2.0
1,675
# -*- coding: utf-8 -*- # vim: set et sts=4 sw=4 encoding=utf-8: # # This file is part of Warzone 2100. # Copyright (C) 2011 Warzone 2100 Project # # Warzone 2100 is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundatio...
pcdummy/wzlobbyserver-ng
wzlobby/gamedb.py
Python
gpl-2.0
3,626
from django.conf.urls import patterns, url from database import views from djgeojson.views import GeoJSONLayerView from database.models import DatabaseEntry urlpatterns = patterns('', url(r'^$', views.index, name='index'), url(r'^collections/$', views.collections, name='collections'), url(r'^map_json/$', view...
crito/syrianarchive
database/urls.py
Python
gpl-2.0
637
# -*- mode:python; coding:utf-8; -*- # created: 06.07.2010 19:19 # description: Bomberbot radius bonuse representation class Radius(object): def __init__(self, x, y): """ @type x: int @param x: X position. @type y: int @param y: Y position. """ self.x = x...
eugenezamriy/bomberbot
bomberlib/radius.py
Python
gpl-2.0
340
#!/usr/bin/env python """ This file is part of Life Fighter. """ #Import Modules import pygame from pygame.locals import * from sprites import * if not pygame.font: print 'Warning, fonts disabled' if not pygame.mixer: print 'Warning, sound disabled' #Defined values WINDOW_TITLE = "Life Fighter 0.01" width = 800 heig...
jjconti/life-fighter
extra/old/game.py
Python
gpl-2.0
2,468
# -*- coding: latin1 -*- # $Id: CNCPendant.py,v 1.3 2014/10/15 15:04:48 bnv Exp bnv $ # # Author: Vasilis.Vlachoudis@cern.ch # Date: 06-Oct-2014 __author__ = "Vasilis Vlachoudis" __email__ = "Vasilis.Vlachoudis@cern.ch" import os import sys #import cgi import json import threading import urllib try: import urlpars...
mandrav/bCNC
CNCPendant.py
Python
gpl-2.0
4,047
""" $Id: piano.py 852 2014-06-29 22:13:08Z weegreenblobbie $ Nsound is a C++ library and Python module for audio synthesis featuring dynamic digital filters. Nsound lets you easily shape waveforms and write to disk or plot them. Nsound aims to be as powerful as Csound but easy to use. Copyright (c) 2004 to Present N...
weegreenblobbie/nsound
src/examples/piano.py
Python
gpl-2.0
8,172
#!/usr/bin/python import btcpos import threading import Queue identifier='' forwardingaddress='' password='' logfile='' #eg: identifier='6ne3m2m7-6534-2k6l-2h1b-59v2xm0g8yio' # password='mypassword' # forwardingaddress='17yHkgQooxxMdB7iqNbBXDrV8YdMrMes5d' # logfile='/path/to/btcpos.csv' p= btcpos.POS(identif...
WeMeetAgain/btcpos
run.py
Python
gpl-2.0
433
from Vault import Vault from PropertyInterface import PropertyInterface from main.Control import Control from plugin.Interface import Interface from copy import deepcopy # # Wrapper for controls. # class ControlWrapper(object): def __init__(self, control, size): self.__dict__["_ControlWrapper__length"] =...
RaumZeit/gdesklets-core
scripting/ControlWrapper.py
Python
gpl-2.0
8,297
############################################################################# ## ## Copyright (C) 2016 The Qt Company Ltd. ## Contact: https://www.qt.io/licensing/ ## ## This file is part of the test suite of PySide2. ## ## $QT_BEGIN_LICENSE:GPL-EXCEPT$ ## Commercial License Usage ## Licensees holding valid commercial ...
qtproject/pyside-shiboken
tests/samplebinding/newdivision_test.py
Python
gpl-2.0
1,532
from django.conf import settings from django.conf.urls import patterns, include, url from django.core.urlresolvers import reverse from django.views.generic import TemplateView from django.views.generic.base import RedirectView from django.contrib import admin import os import logging logger = logging.getLogger("accoun...
SCPR/accountability-tracker
accountability_tracker/urls.py
Python
gpl-2.0
1,388
# Maked by Mr. Have fun! Version 0.2 print "importing quests: 169: Nightmare Children" import sys from net.sf.l2j.gameserver.model.quest import State from net.sf.l2j.gameserver.model.quest import QuestState from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest CRACKED_SKULL_ID = 1030 PERFECT_SKULL...
Barrog/C4-Datapack
data/jscript/quests/169_NightmareChildren/__init__.py
Python
gpl-2.0
3,977
# Copyright (c) 2009 Upi Tamminen <desaster@gmail.com> # See the COPYRIGHT file for more information # Should be compatible with user mode linux import struct, sys OP_OPEN, OP_CLOSE, OP_WRITE, OP_EXEC = 1, 2, 3, 4 TYPE_INPUT, TYPE_OUTPUT, TYPE_INTERACT = 1, 2, 3 def ttylog_write(logfile, len, direction, stamp, data...
jullrich/dshieldhoneypot
kippo/kippo-0.8/kippo/core/ttylog.py
Python
gpl-2.0
943
from typing import Any from flask import g class ReferenceSystem: @staticmethod def get_all() -> list[dict[str, Any]]: g.cursor.execute(""" SELECT e.id, e.name, e.cidoc_class_code, e.description, e.openatlas_class_name, ...
craws/OpenAtlas
openatlas/database/reference_system.py
Python
gpl-2.0
3,447
#!/usr/bin/env python import roslib; roslib.load_manifest("gki_sickrd_task") import rospy import math import threading from gki_sickrd_task.estop_guard import EstopGuard from gki_sickrd_task.params import Params from std_msgs.msg import Float32 class WorldmodelAgeing(object): def __init__(self): self.worldmodel_a...
GKIFreiburg/gki_sickrd2014
gki_sickrd_task/scripts/worldmodel_ageing.py
Python
gpl-2.0
856
__all__ = [ AttributeAuction, RankedAuction, Round, WinnerTakesAllAuction, ] from google.appengine.ext import ndb from google.appengine.ext.ndb import polymodel from .thronewar import ThroneWar class Round(ndb.Model): """ An auction round in the throne war. A throne war may have multiple ...
svirpridon/labordaythronewar
models/auctions.py
Python
gpl-3.0
2,613
#!/usr/bin/env python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> # Copyright (C) 2014 Ian Lee <ianlee1521@gmail.com> # # Permission is hereby granted, free of c...
alexfalcucc/anaconda
anaconda_lib/linting/pep8.py
Python
gpl-3.0
79,405
#!/usr/bin/python # import the necessary packages from picamera.array import PiRGBArray from picamera import PiCamera import argparse import datetime import imutils import time import cv2 import numpy as np # construct the argument parser and parse the arguments ap = argparse.ArgumentParser() ap.add_argument("-a", "...
chiguire/lilibethsparade
opencv_tests/second_skin_detection.py
Python
gpl-3.0
1,816
#!/usr/bin/env python ######################################################################## # File : dirac-wms-get-queue-cpu-time.py # Author : Federico Stagni ######################################################################## """ Report CPU length of queue, in seconds This script is used by the dirac-pilo...
DIRACGrid/DIRAC
src/DIRAC/WorkloadManagementSystem/scripts/dirac_wms_get_queue_cpu_time.py
Python
gpl-3.0
1,107
""" Copyright 2018 Pablo Castellano This file is part of pmbootstrap. pmbootstrap 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. pmbootst...
postmarketOS/pmbootstrap
pmb/install/file.py
Python
gpl-3.0
1,698
import signal import os import time def receive_signal(signum, stack): print('Received: %s', signum) signal.signal(signal.SIGUSR1, receive_signal) signal.signal(signal.SIGUSR2, receive_signal) print('My PID is: %s', os.getpid()) while True: print('Waiting...') time.sleep(3)
davidam/python-examples
signals/signal_signal.py
Python
gpl-3.0
291
import struct import glob import argparse parser = argparse.ArgumentParser(description="Take a folder with the .AFM files generated by makeBinary.py and compile all the files into one .AFMDATA file") parser.add_argument("-i", "--input_folder", default="input.scan", help="the path to the input .SCAN file (default: %(de...
SINGROUP/readAFM
databaseCode/compileOut.py
Python
gpl-3.0
891
""" Copyright (C) 2018 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/MediaKraken_Deployment
source/main_debug.py
Python
gpl-3.0
2,125
import bpy import dsf.prop_writer class ExportDsfProp (bpy.types.Operator): """export a dsf prop file. """ bl_idname = "export_scene.dsf_prop" bl_label = "Export Dsf Props" filepath = bpy.props.StringProperty\ ('file path', description = 'file path of the .duf file') output_group = bpy.props.StringPr...
millighost/dsf-utils
modules/dsf/export_prop_op.py
Python
gpl-3.0
1,552
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Python Library documentation build configuration file, created by # sphinx-quickstart on Fri Aug 19 21:38:54 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 th...
amanabt/pylib
source/conf.py
Python
gpl-3.0
12,361
#!/usr/bin/env python # coding: utf-8 """ Translate GDAY output file Match the NCEAS format and while we are at it carry out unit conversion so that we matched required standard. Data should be comma-delimited """ import shutil import os import numpy as np import csv import sys #import matplotlib.pyplot as plt import ...
mingkaijiang/quasi_equil_analytical
GDAY/code/scripts/translate_GDAY_output_to_NCEAS_format.py
Python
gpl-3.0
26,132
import pandas import numpy import sys import re filename = "" if len(sys.argv) == 2: filename = sys.argv[1] else: print("usage: ", sys.argv[0], " filename.xlsx") exit(1) df = pandas.read_excel(filename) cn = df.columns print("CN: ", cn) values = numpy.asarray(df[cn[0]].values) print(numpy.mean(values), ...
lstorchi/teaching
basictests/usingpandas.py
Python
gpl-3.0
345
#!/usr/bin/python # -*- coding: utf-8 -*- # import os import glob import sys from distutils.core import setup from distutils.cmd import Command from distutils.command.build import build from distutils.command.install import install from src.constants import const def clear(): os.system("find ./ -iname '*.pyc'...
alierkanimrek/pog
setup.py
Python
gpl-3.0
5,009
from nose.tools import eq_ from pyculiarity import detect_ts, detect_vec from unittest import TestCase import pandas as pd import os class TestVec(TestCase): def setUp(self): self.path = os.path.dirname(os.path.realpath(__file__)) self.raw_data = pd.read_csv(os.path.join(self.path, ...
nicolasmiller/pyculiarity
tests/test_vec.py
Python
gpl-3.0
1,514
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : import data_convertor_ui from data_convertor_ui import _translate from PyQt4 import QtGui, QtCore import sys, os, czelta,locale try: path = os.path.dirname(__file__) except NameError: path = "" path = path+os.sep if path!="" else "" sys_lang = locale.getdef...
Hinogary/czelta-python
miniaplications/data_convertor.py
Python
gpl-3.0
3,370
from django.contrib.auth.decorators import login_required, \ permission_required from django.views.decorators.debug import sensitive_post_parameters from .migration import do_migration, \ openid_migration_method, \ confirm_migration @sensitive_post_parameters('password') @permission_required('openid_migr...
wettenhj/mytardis
tardis/apps/openid_migration/views.py
Python
gpl-3.0
743
''' Supernode wrapper ''' from cmn.n2n_process import N2NProcess from server.supernodep import SupernodeParams class Supernode(N2NProcess): PATH = "supernode" def __init__(self, ip_str): N2NProcess.__init__(self) self.params = SupernodeParams() self.params.foreground.setValu...
lukablurr/n2nsim
src/server/supernode.py
Python
gpl-3.0
330
import main import time import tflearn import numpy as np import pandas as pd import tensorflow as tf from tflearn.callbacks import Callback from sklearn.metrics import accuracy_score from sklearn.metrics import classification_report from keras.layers.local import LocallyConnected2D class MonitorCallback(Callback): ...
jmcjacob/EmotionalExpressionClassifier
classifier.py
Python
gpl-3.0
7,316
__all__ = ['os2']
rocky/pyimport-relative
test/__init__.py
Python
gpl-3.0
18
from setuptools import setup, find_packages setup(name='pcntoolkit', version='0.20', description='Predictive Clinical Neuroscience toolkit', url='http://github.com/amarquand/nispat', author='Andre Marquand', author_email='a.marquand@donders.ru.nl', license='GNU GPLv3', package...
amarquand/nispat
setup.py
Python
gpl-3.0
747
import uuid SECRET_KEY = uuid.uuid4() DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'travis_ci_db', 'USER': 'travis', 'PASSWORD': '', 'HOST': '127.0.0.1', } } MIDDLEWARE_CLASSES = () INSTALLED_APPS = ( 'test_models', )
yavia/django-namedtuples
django_settings.py
Python
gpl-3.0
317
n=int(input())-1 a=1 b=1 i=1 print(a) print(a) while i<n: c=a a=a+b b=c i=i+1 print(a)
ComputersMania/python-stuff
fibonacci.py
Python
gpl-3.0
91
#----------------------------------------------------------------------------- # Copyright (c) 2015-2020, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License (version 2 # or later) with exception for distributing the bootloader. # # The full license is in the file COPYING.txt...
etherkit/OpenBeacon2
client/linux-arm/venv/lib/python3.6/site-packages/PyInstaller/hooks/hook-pyopencl.py
Python
gpl-3.0
722
# Copyright (C) 2011 Equinor ASA, Norway. # # The file 'newconfig.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 Licen...
joakim-hove/ert
ert_gui/newconfig.py
Python
gpl-3.0
3,342
# -*- coding: UTF-8 -*- def frekvencijska_distribucija(sekvenca): rjecnik={} for element in sekvenca: rjecnik[element]=rjecnik.get(element,0)+1 return rjecnik def sortiraj_distribuciju(rjecnik): return sorted(rjecnik.items(),key=lambda x:-x[1]) def opojavnici(niz): import re return re.findall(r'\w+',niz,re...
nljubesi/python-for-linguists
funkcije.py
Python
gpl-3.0
613
class Filter(): ''' A generic filter class defining a base interface for other classes performing filtering operations. ''' pass class BoxFilter(Filter): def __init__(self, box, access_lat, access_lng): ''' :param box: a tuple or Box object defining the area to select ...
austinhartzheim/sift
sift/filter.py
Python
gpl-3.0
1,369
# Copyright (C) 2011-2012 Patrick Totzke <patricktotzke@gmail.com> # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file import os import email import email.charset as charset from email.header import Header from email.iterators import typed_subpart_iterat...
dcbaker/alot
alot/db/utils.py
Python
gpl-3.0
15,715
"""Utiliary classes for testing.""" from financeager import clients, config class Client(clients.LocalServerClient): """Implementation that assigns dummy sinks to consume the client's output. The underlying Proxy is patched to store data in memory instead of in financeager.DATA_DIR. """ def __ini...
pylipp/financeager
test/utils.py
Python
gpl-3.0
531
# -*- coding: utf-8 -*- # Author: Petr Dlouhý <petr.dlouhy@auto-mat.cz> # # Copyright (C) 2017 o.s. Auto*Mat # # 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, o...
auto-mat/klub
apps/aklub/tests/models/test_donor_payment_channel.py
Python
gpl-3.0
18,112
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import sympy import mpmath from math import log from six.moves import range from mathics.core.util import unicode_superscript def get_type(value): if isinstance(value, sympy.Integer): ...
bnjones/Mathics
mathics/core/numbers.py
Python
gpl-3.0
4,474
import numpy as np class Search(object): """ A base class for all searching algorithms on grid """ def __init__(self, grid, start_point, final_point): self.grid = grid self.start_point = start_point self.final_point = final_point class dijkstra(Search): """ A specific...
ruleva1983/udacity-selfdrivingcar
term3/exercises/search_strategies/python/search.py
Python
gpl-3.0
3,546
# # Copyright © 2012–2022 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <https://weblate.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 Licens...
nijel/weblate
weblate/trans/models/__init__.py
Python
gpl-3.0
5,857
# Copyright (C) 2017 Equinor ASA, Norway. # # The file 'test_model_config.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of t...
joakim-hove/ert
tests/libres_tests/res/enkf/test_model_config.py
Python
gpl-3.0
6,704
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2017-2021 Ryan Roden-Corrent (rcorre) <ryan@rcorre.net> # # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
forkbong/qutebrowser
tests/unit/completion/test_completionmodel.py
Python
gpl-3.0
4,440
# # Copyright 2003-2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # any later version...
atzengin/OCC
ocvc-runtime/python/ocvc/oc/__init__.py
Python
gpl-3.0
1,599
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2014 Thomas Voegtlin # # 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 y...
shanew/electrum
lib/network_proxy.py
Python
gpl-3.0
7,926
from . import gui, srv from util.columns import * from util.misc import app_devtypes, app_devdata devdata = lambda: app_devdata('NIO8', get_columns([c_ip_addr, c_serial]), app_devtypes(gui))
ivanovev/nio8
__init__.py
Python
gpl-3.0
194
#!/usr/bin/python # coding=UTF-8 import re # parse broken html from file using lxml.html parser and chardect encoding autodetection def lxmlparse(filepath): import lxml.html import chardet document = open(filepath).read() print('Info: detecting document encoding...') document = document.decode(cha...
shatsky/museion
management/commands/_import_kkre.py
Python
gpl-3.0
14,222
from pathlib import Path from PySide2 import QtCore import FreeCADGui as Gui class CivilShowTorsion: def GetResources(self): menu_text = QtCore.QT_TRANSLATE_NOOP( "civil_torsion", "Torsion") tooltip = QtCore.QT_TRANSLATE_NOOP( "civil_torsion", "G...
ebrahimraeyat/civilTools
gui_civiltools/gui_show_torsion.py
Python
gpl-3.0
1,522
from setuptools import setup, find_packages import sys, os version = '1.1' setup(name='raisin.mysqldb', version=version, description="", long_description="""\ """, classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers keywords='', author='', ...
rna-seq/raisin.mysqldb
setup.py
Python
gpl-3.0
684
# -*- coding: utf-8 -*- import time import Crypto.Hash.SHA import pycurl from module.plugins.internal.misc import json from module.plugins.internal.MultiHoster import MultiHoster def args(**kwargs): return kwargs class DebridlinkFr(MultiHoster): __name__ = "DebridlinkFr" __type__ = "hoster" __vers...
rlindner81/pyload
module/plugins/hoster/DebridlinkFr.py
Python
gpl-3.0
2,327