code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# -*- coding: utf-8 -*- """ :created: 2014-01-25 :author: Rinze de Laat :copyright: © 2014 Rinze de Laat, Delmic This file is part of Odemis. .. license:: Odemis 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 ...
ktsitsikas/odemis
src/odemis/gui/comp/overlay/view.py
Python
gpl-2.0
50,884
# Author: Zhang Huangbin <zhb@iredmail.org> import web session = web.config.get('_session') def require_login(func): def proxyfunc(self, *args, **kw): if session.get('logged') is True: return func(self, *args, **kw) else: session.kill() raise web.seeother('/lo...
villaverde/iredadmin
controllers/decorators.py
Python
gpl-2.0
1,054
from django.db import models from jokeregistryweb.jokes.models import Joke class Claim(models.Model): '''A claim of prior art (or infringement)''' FILED = 0 APPROVED = 1 REJECTED = 2 STATUS_CHOICES = ( (FILED, 'Filed'), (APPROVED, 'Approved'), (REJECTED, 'Rejected') )...
jokeregistry/jokeregistryweb
jokeregistryweb/claims/models.py
Python
gpl-2.0
1,263
from functools import cmp_to_key from time import time from timer import TimerEntry as RealTimerEntry from PowerTimer import PowerTimerEntry, AFTEREVENT from Components.ActionMap import ActionMap from Components.Button import Button from Components.config import config from Components.Label import Label from Components...
openatv/enigma2
lib/python/Screens/PowerTimerEdit.py
Python
gpl-2.0
10,350
import os import cPickle as pkl from collections import namedtuple import requests from bs4 import BeautifulSoup Song = namedtuple('Song', ['title', 'artist', 'album', 'length']) class Playlist(object): def __init__(self, title, url): self.title = title self.file_name = title.lower().replace(' ...
mshuffett/MetaPyMusic
playlister.py
Python
gpl-2.0
1,557
# -*- coding: utf-8 -*- """Module to check modules existance. This exports this booleans: - has_reportlab -- True if reportlab is found - has_PIL -- True if PIL is found - has_pygtk -- True if pygtk is found Copyright (C) 2005-2008 Xosé Otero <xoseotero@users.sourceforge.net> """ __all__ = ["has_reportlab",...
ternus/arcnet
cyber/pythonsudoku/check_modules.py
Python
gpl-2.0
644
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # Copyright (C) 2009 Douglas S. Blank # # 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; e...
arunkgupta/gramps
gramps/gui/editors/editdate.py
Python
gpl-2.0
13,619
#!/usr/bin/env python3 # -*- coding: utf-8 -*- sql_template0 = """alter table _shadow_orders_{0}_ modify fingerprint text DEFAULT '' COMMENT '下单fingerprint';""" if __name__ == '__main__': for index in range(0, 50): print(sql_template0.format(index)) print("------") for index in range(50, 100): ...
yaolei313/python-study
base/test.py
Python
gpl-2.0
365
try: from xml.etree import cElementTree as etree except ImportError: from xml.etree import ElementTree as etree import xml2nrn # module names derived from the namespace. Add new tags in proper namespace import neuroml import metadata import morphml import biophysics class FileWrapper: def __init__(self, sou...
neurodebian/pkg-neuron
share/lib/python/neuron/neuroml/rdxml.py
Python
gpl-2.0
1,545
#! /usr/bin/python # vim: set fileencoding=utf-8 sw=4 ts=4 et: import rrdtool, os from def_rrds import rrds import def_metrics from def_metrics import metrics for m in metrics: if isinstance(metrics[m]['rrd'], list): # multiples rrds for i,f in enumerate(metrics[m]['rrd']): if not os.p...
albatros69/monit-pi
monit/monit.py
Python
gpl-2.0
946
# Back In Time # Copyright (C) 2008-2017 Oprea Dan, Bart de Koning, Richard Bailey, Germar Reitze # # 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...
mgerstner/backintime
common/test/test_restore.py
Python
gpl-2.0
7,692
# rhnRepository.py - Perform local repository functions. #------------------------------------------------------------------------------- # This module contains the functionality for providing local packages. # # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under t...
moio/spacewalk
proxy/proxy/broker/rhnRepository.py
Python
gpl-2.0
19,738
import functools class memoize(object): def __init__ (self, func): self.func = func def __call__ (self, *args, **kwargs): if (args, str(kwargs)) in self.__dict__: value = self.__dict__[args, str(kwargs)] else: value = self.func(*args, **kwargs) self...
bop/foundation
lib/python2.7/site-packages/compressor/utils/decorators.py
Python
gpl-2.0
2,549
from datetime import datetime import csv import pandas import os import sys os.chdir(sys.argv[1]) ticker_f = open(sys.argv[2], "rb") ticker_reader = csv.reader(ticker_f) tickers = [r[0] for r in ticker_reader][1:] ticker_f.close() tln = len(tickers) t_1 = datetime.now() # build full data frame res = None for i, t i...
lbybee/NVLDA
code/build_dataset.py
Python
gpl-2.0
865
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2011 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
halbbob/dff
modules/builtins/info.py
Python
gpl-2.0
5,653
#!/usr/bin/python # script to measure save a bunch of VNA phase measurements while stepping beam numbers # useful for characterizing the RF path (transmitter antenna port to receiver input) and looking for time delay differences # requires ssh key for QNX box and VNA # jon klein, jtklein@alaska.edu, mit license # jef s...
loxodes/SuperDARN_Hardware_Tools
kingsalmon_scripts/antenna_grab.py
Python
gpl-2.0
3,161
import os import sys import random import pygame from Engine import * from Montag import * from Character import Character from pygame.locals import * class AICharacter(Character): def __init__(self, screen, **kwargs): super().__init__(screen, **kwargs) self.enemy = kwargs.get("enemy", None) ...
lumidify/fahrenheit451
AICharacter.py
Python
gpl-2.0
3,797
from __future__ import division, absolute_import, unicode_literals import time from qtpy import QtCore from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from qtpy.QtWidgets import QDockWidget from .. import core from .. import gitcfg from .. import qtcompat f...
sthalik/git-cola
cola/widgets/standard.py
Python
gpl-2.0
19,289
# -*- coding: utf-8 -*- ''' Module for handling openstack neutron calls. :maintainer: <akilesh1597@gmail.com> :maturity: new :platform: all :optdepends: - neutronclient Python adapter :configuration: This module is not usable until the following are specified either in a pillar or in the minion's config file::...
CSSCorp/openstack-automation
file_root/_modules/neutron.py
Python
gpl-2.0
13,539
import numpy as np from scipy.sparse import csr_matrix, coo_matrix def save_sparse_csr(filename,array): np.savez(filename,data = array.data ,indices=array.indices, indptr =array.indptr, shape=array.shape ) def load_sparse_csr(filename): loader = np.load(filename) return csr_matrix(( loader['...
napsternxg/DeepSequenceClassification
vector_utils.py
Python
gpl-2.0
2,879
""" Dtella - Core P2P Module Copyright (C) 2008 Dtella Labs (http://www.dtella.org) Copyright (C) 2008 Paul Marks $Id$ 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 Licen...
pmarks-net/dtella
dtella/common/core.py
Python
gpl-2.0
131,965
def p5a(): xs = [-.75, -0.5,-0.25,0] fxs = [-.0718125, -.02475, .3349375, 1.101] getdd123(xs,fxs,3) def getdd123(xs,fxs,n): #derivatives l1stdd = [] l2nddd = [] l3rddd = [] for i in range(0,n): l1stdd.append((fxs[i+1]-fxs[i])/(xs[i+1]-xs[i])) for i in range(0,n-1): l2nddd.append((l1stdd[i+1]...
ilcn/NumericalAnalysis
a3.py
Python
gpl-2.0
659
# 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 that it will be useful, # bu...
Akasurde/bodhi
bodhi/services/overrides.py
Python
gpl-2.0
8,799
import os import numpy as np from matplotlib import pyplot as plt from numpy import genfromtxt from matplotlib import cm from mpl_toolkits.mplot3d.art3d import Poly3DCollection import matplotlib as mpl from mpl_toolkits.mplot3d import Axes3D def axisEqual3D(ax): extents = np.array([getattr(ax, 'get_{}lim'.format...
agarciamontoro/TFG
Software/Stuff/test_ray.py
Python
gpl-2.0
3,739
__author__ = 'Dongwoo Kim' import itertools from collections import defaultdict import numpy as np def num_neighbor(T, idx, link_val=1): """ find neighborhood of given idx (node) """ outlink = len(np.nonzero(T[idx, :, :] == link_val)) inlink = len(np.nonzero(T[:, idx, :] == link_val)) retur...
chubbymaggie/almc
amdc/path_tool.py
Python
gpl-2.0
2,836
''' run with: python ten2eleven.py -f agmethods2 test_dummy_old_MDA_code.py Author: Tyler Reddy ''' from lib2to3.fixer_base import BaseFix from lib2to3.fixer_util import Name, Call, LParen, RParen, ArgList, Dot from lib2to3 import pytree class FixAgmethods2(BaseFix): PATTERN = """ power< head =any+ ...
alejob/mdanalysis
package/MDAnalysis/migration/fixes/fix_agmethods2.py
Python
gpl-2.0
1,114
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------- # Portello membership system # Copyright (C) 2014 Klubb Alfa Romeo Norge # # 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 # t...
KlubbAlfaRomeoNorge/members
model.py
Python
gpl-2.0
9,213
# Rekall Memory Forensics # # Copyright 2013 Google Inc. All Rights Reserved. # # 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 v...
dsweet04/rekall
rekall-core/rekall/plugins/darwin/networking.py
Python
gpl-2.0
13,974
from __future__ import print_function import argparse import collections import io import json import logging import os # pylint: disable=import-error import queue import random import re import requests import sys import traceback import threading import time from ..core import provider from ..utils import rnd from ...
code-dice/dice
dice/client/__init__.py
Python
gpl-2.0
12,056
import sys, xbmcplugin, xbmcgui,xbmc _id = "plugin.video.italian-news" _resdir = "special://home/addons/" + _id + "/resources" _thisPlugin = int(sys.argv[1]) _icons = _resdir + "/icons/" sys.path.append( xbmc.translatePath(_resdir + "/lib/")) import rai _tg1Icon=xbmc.translatePath(_icons +"Tg1_logo.png") _tg2Icon=xb...
mikpin/plugin.video.italian-news
default.py
Python
gpl-2.0
1,928
#!/usr/bin/python3 def sanitize(time_string): if '-' in time_string: splitter = '-' elif ':' in time_string: splitter = ':' else: return(time_string) (mins, secs) = time_string.strip().split(splitter) return(mins + '.' + secs) def get_coach_data(filename): try: with open(filename) as fn: ...
clovemfeng/studydemo
20140617/userlist_data.py
Python
gpl-2.0
657
"""Add default COMPILE_YARA_RULE_ON_SAVE setting Revision ID: af2de80654b6 Revises: 2f0f6d26a505 Create Date: 2018-11-11 19:26:53.631142 """ from alembic import op import sqlalchemy as sa from app.models import cfg_settings import datetime from sqlalchemy.dialects import mysql # revision identifiers, used by Alembic...
InQuest/ThreatKB
migrations/versions/af2de80654b6_add_default_compile_yara_rule_on_save_.py
Python
gpl-2.0
1,083
#!/usr/bin/env python import sys from PyQt4.QtCore import * from PyQt4.QtGui import * import moviedata class MainWindow(QMainWindow): def __init__(self, parent=None): super(MainWindow, self).__init__(parent) self.movies = moviedata.MovieContainer() self.table = QTableWidget() self...
opensvn/python
mymovies.py
Python
gpl-2.0
877
# -*- coding: utf-8 -*- # Copyright (C) 2011-2012 Vodafone España, S.A. # Author: Andrew Bird # # 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 o...
andrewbird/wader
plugins/devices/zte_mf180.py
Python
gpl-2.0
1,826
# Sketch - A Python-based interactive drawing program # Copyright (C) 1999 by Bernhard Herzog # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at ...
shumik/skencil-c
Script/select_same_fill_color.py
Python
gpl-2.0
3,431
import logging import re from streamlink.compat import html_unescape, urlparse from streamlink.plugin import Plugin, PluginArguments, PluginArgument from streamlink.plugin.api import validate from streamlink.stream import DASHStream, HLSStream, HTTPStream from streamlink.stream.ffmpegmux import MuxedStream from stream...
repotvsupertuga/tvsupertuga.repository
script.module.streamlink.base/resources/lib/streamlink/plugins/vimeo.py
Python
gpl-2.0
4,404
import socket, sys, time, argparse parser = argparse.ArgumentParser(description="This bad server accepts an HTTP connection and replies with a valid HTML document which links to assets. However, attemps to load the assets should result in a net::ERR_EMPTY_RESPONSE.") parser.add_argument("-p", "--port", type=int, help=...
djcf/error-reloader-extension
tests/badwebserver_jsonly.py
Python
gpl-2.0
4,289
# Copyright 2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 import array import tempfile from portage import _unicode_decode from portage import _unicode_encode from portage.tests import TestCase class ArrayFromfileEofTestCase(TestCase): def testArrayFromfileEof(self): #...
Neuvoo/legacy-portage
pym/portage/tests/ebuild/test_array_fromfile_eof.py
Python
gpl-2.0
1,023
"""audio driver subsystem""" from os.path import exists from os import environ from subprocess import check_call from functools import partial from .drive import Driver import click DRIVE_QUEUE = 'a.drive' CTL_PATH = '{}/.config/pianobar/ctl'.format(environ['HOME']) COMMANDS = {'p', 'n', '^', '(', ')'} def callback...
acm-uiuc/DJ-Roomba
dj_roomba/adrive.py
Python
gpl-2.0
906
import sys,os,string def GFX_MenuDialog(filename,*items): file=open(filename,'w') file.writelines(map(lambda x:x+"\n", items)) file.close() os.system("python X11_MenuDialog.py "+filename); if __name__=="__main__": import qt,string class WidgetView ( qt.QWidget ): def __init__( self, *arg...
kmatheussen/radium
bin/old/X11_MenuDialog.py
Python
gpl-2.0
1,375
####### LICENSE ####### # This code is part of the Recombineering module, written by Gregory # Moyerbrailean at Michigan State University, Department of Microbiology # and Molecular Genetics. # Copyright (C) 2010 Gregory Moyerbrailean # # This program is free software; you can redistribute it and/or modify # it under...
gmoyerbrailean/PyRec
Files/BLASTing.py
Python
gpl-2.0
5,396
from django.db import models class Tip(models.Model): text = models.TextField(max_length=1000) date = models.DateField(auto_now_add=True) class Meta: ordering = ['-date'] def __unicode__(self): return '%s ' % (self.text) class CurrentTip(models.Model): index ...
videntity/tweatwell
apps/tips/models.py
Python
gpl-2.0
440
from setuptools import setup from glob import glob from WebPlayer2LocalPlayer import __version__ APP = ['WebPlayer2LocalPlayer.py'] DATA_FILES = [ ('images', glob('images/*.png')), ] OPTIONS = { 'argv_emulation': True, 'includes': [ 'sip', 'PyQt5', 'PyQt5.QtGui', 'PyQt5.QtPrintSupport', ...
gotlium/WebPlayer2LocalPlayer
setup.py
Python
gpl-2.0
929
from setuptools import setup import os.path setup( name='State Fragility', version='1', py_modules=['state_fragility'], data_files=[('', [ "./state_fragility.db" ])] )
RealTimeWeb/datasets
datasets/python/state_fragility/setup.py
Python
gpl-2.0
198
import fsui from fswidgets.widget import Widget from launcher.i18n import gettext from launcher.option import Option from launcher.settings.settings_page import SettingsPage from system.prefs.components.notworking import PrefsNotWorkingWarningPanel class AudioSettingsPage(SettingsPage): def __init__(self, parent:...
FrodeSolheim/fs-uae-launcher
launcher/settings/audio_settings_page.py
Python
gpl-2.0
1,061
#! /usr/bin/env python """ edits mothur taxonomy summary file transfers last name that is not "unclassified" or "uncultured" to "unclassified" or "uncultured" assignment make sure that the file has default sorting (by rankID) Copyright: tax_summary_edit edits mothur taxonomy summary file Copyright (C) 2016...
Brazelton-Lab/lab_scripts
16S/tax_summary_edit.py
Python
gpl-2.0
1,875
# Copyright 2006 Joe Wreschnig # 2013 Nick Boultbee # 2013,2014 Christoph Reiter # # 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...
ptitjes/quodlibet
quodlibet/library/libraries.py
Python
gpl-2.0
28,163
import pytest from roam_tests import objects from roam.infodock import FeatureCursor, NoFeature layer = objects.newmemorylayer() layer = objects.addfeaturestolayer(layer, 2) features = layer.getFeatures() featureone = next(features) featuretwo = next(features) @pytest.fixture def cursor(): return FeatureCursor(...
DMS-Aus/Roam
src/roam_tests/test_featurecursor.py
Python
gpl-2.0
1,206
################################################################################ # new_users_saver funciton ################################################################################ def newusers(m): dict_updater() un = m.from_user.username if un not in DBDIC: uid = m.from_user.id DBD...
acasadoquijada/Telegram-bot-stuff
Stuff/new_users_saver.py
Python
gpl-2.0
825
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2011 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
halbbob/dff
api/events/__init__.py
Python
gpl-2.0
617
import os from enigma import eEPGCache, getBestPlayableServiceReference, \ eServiceReference, iRecordableService, quitMainloop, eActionMap from Components.config import config from Components.UsageConfig import defaultMoviePath from Components.TimerSanityCheck import TimerSanityCheck from Screens.MessageBox import M...
pli3/enigma2-pli
RecordTimer.py
Python
gpl-2.0
32,081
from castle.cms.interfaces import IReferenceNamedImage from plone.app.uuid.utils import uuidToObject from persistent.mapping import PersistentMapping from persistent.dict import PersistentDict from lxml.html import fromstring from lxml.html import tostring from plone import api from plone.app.blocks.layoutbehavior impo...
castlecms/castle.cms
castle/cms/linkintegrity.py
Python
gpl-2.0
3,563
# -*- coding: utf-8 -*- # # This tool helps you to rebase package to the latest version # Copyright (C) 2013-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...
phracek/rebase-helper
rebasehelper/completion.py
Python
gpl-2.0
3,343
# 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. from __future__ import absolute_import import itertools import os import posixpath import random import tempfile import unittest import silenttestru...
facebookexperimental/eden
eden/scm/tests/test-treestate.py
Python
gpl-2.0
9,519
Dependencies Python2.7 Python Requests python-rt https://gitlab.labs.nic.cz/labs/python-rt (should have a local copy installed on tsbackup, unntested with newer versions) jsondb request_tracker these last two are in the freegeek github repostitory configure EMAIL, WEEKLYDB, MONTHLYDB on installed copy use in cronjob...
freegeek-pdx/ts_rt_scripts
README_generate_completion_reports.py
Python
gpl-2.0
448
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-10 09:46 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependenc...
tridc/django_local_library
catalog/migrations/0002_bookinstance_borrower.py
Python
gpl-3.0
661
''' forms, mostly used for simple tastypie validation ''' from django.contrib.gis import forms class MeetingForm(forms.Form): ''' form for meetings ''' day_of_week = forms.IntegerField(min_value=1, max_value=7) start_time = forms.TimeField() end_time = forms.TimeField() name = forms.CharField(max_...
mcjug2015/mfserver2
django_app/forms.py
Python
gpl-3.0
444
# This file is part of xmpp-backends (https://github.com/mathiasertl/xmpp-backends). # # xmpp-backends 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 l...
mathiasertl/xmpp-backends
xmpp_backends/base.py
Python
gpl-3.0
21,732
import uncertainties from uncertainties import ufloat import math import numpy import numpy import pylab from scipy.optimize import curve_fit import math import scipy.stats #Misuro a mano con il tester i valori che poi vado a mettere nel file, posso anche lasciare lo sfasamento vuoto def linear(x, a, b): return a*x+...
fedebell/Laboratorio3
relazione2/scriptVecchi/bode.py
Python
gpl-3.0
1,939
# (C) Copyright 2016 Vit Mojzis, vmojzis@redhat.com # # This program is distributed under the terms of the GNU General Public License # # 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 v...
vmojzis/sepolicy_analysis
sepolicyanalysis/security_related.py
Python
gpl-3.0
2,061
#!/usr/bin/python3 # Instalar : # * python3-pdfrw import os from pdfrw import PdfWriter, PdfReader, IndirectPdfDict, PdfName, PdfDict,PdfObject INVOICE_TEMPLATE_PATH = 'templates/9_FP_GM_I_GS_AUTOBIS.pdf' # DOCUMENTO BASE INVOICE_OUTPUT_PATH = 'invoice.pdf' #DESTINO ANNOT_KEY = '/Annots' ANNOT_FIELD_KEY = '/T' ANN...
aberlanas/senia-cdd
tools/rellenarFormularioFP.py
Python
gpl-3.0
3,975
# -*- coding: utf-8 -*-# """ Basic Twitter Authentication requirements: Python 2.5+ tweepy (easy_install tweepy | pip install tweepy) """ __author__ = 'Bernie Hogan' __version__= '1.0' import string import codecs import os import pickle import copy import sys import json import webbrowser import tweepy from twe...
oxfordinternetinstitute/scriptingcourse
DSR-Week 2/wk02_twitter_test.py
Python
gpl-3.0
1,313
#!/usr/bin/env python """list all previously made bookings""" import os import sys import cgi import datetime import json import shuttle import shconstants import smtplib import shcookie print "Content-type: text/html\r\n" shuttle.do_login(shcookie.u, shcookie.p) form = cgi.FieldStorage() if 'action' in form: a...
christianholz/QuickShuttle
bookings.py
Python
gpl-3.0
3,213
import random import os # TicTacToe def createNewField(): result = [] for i in range(3): tmp = [] for i2 in range(3): tmp.append(' ') result.append(tmp) return result def printField(field): print '' for element in field: print element print '' def isFieldFull(field): occupiedPlaces = 0 for row in...
dodonator/ticTacToe
outdatet/ticTacToe.py
Python
gpl-3.0
3,105
from __future__ import absolute_import from __future__ import print_function # -*- coding: utf-8 -*- # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redi...
fmaguire/ete
ete3/tools/phylobuild_lib/utils.py
Python
gpl-3.0
21,864
import re from . import expression class AssertionBase: pass class RowAssertion(AssertionBase): def __init__(self, config, assert_config): assert assert_config["type"] == "row" self.config = config self.assert_config = assert_config def check(self, data): if self.type =...
mugwort-rc/idata
idata/config/assertion.py
Python
gpl-3.0
2,193
# Copyright (c) Mathias Kaerlev 2012. # This file is part of Anaconda. # Anaconda 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. # ...
joaormatos/anaconda
mmfparser/data/chunkloaders/actions/__init__.py
Python
gpl-3.0
749
#!/usr/bin/python import inkex import inkscapeMadeEasy_Base as inkBase import inkscapeMadeEasy_Draw as inkDraw class myExtension(inkBase.inkscapeMadeEasy): def __init__(self): inkex.Effect.__init__(self) self.OptionParser.add_option("--tab", action="store", type="string", dest="tab", default="ob...
fsmMLK/inkscapeMadeEasy
examples/iME_Draw_colorPicker.py
Python
gpl-3.0
1,000
# -*- coding: utf-8 -*- # # documentation build configuration file, created by # sphinx-quickstart on Sat Sep 27 13:23:22 2008-2009. # # This file is execfile()d with the current directory set to its # containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
dmsimard/ansible
docs/docsite/sphinx_conf/2.10_conf.py
Python
gpl-3.0
10,553
from sa_tools.base.magic import MagicMixin from sa_tools.inbox import Inbox from sa_tools.session import SASession from sa_tools.index import Index import os import pickle import sys def py_ver() -> str: return str(sys.version_info.major) class APSession(object): def __init__(self, username: str, passwd: s...
thismachinechills/awful.py
awful.py
Python
gpl-3.0
1,950
# # Copyright 2007 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 2, or (at your option) # any later version. #...
trnewman/VT-USRP-daughterboard-drivers_python
gr-usrp/src/db_wbx.py
Python
gpl-3.0
20,483
#!/usr/bin/env python import socket # Set admin server settings UDP_IP = '' # Leave empty for Broadcast support ADMIN_PORT = 48899 # Local settings of your Raspberry Pi, used for app discovery INT_IP = '10.0.1.61' INT_MAC = '111a02bf232b' # Code Starts Here # # Create UDP socket, bind to it adminsock = socket.sock...
ep1cman/RFLED-Server
source/admin.py
Python
gpl-3.0
1,061
#!/usr/bin/env python3 import fstimer.fslogger import fstimer.timer from gi.repository import Gtk def main(): pytimer = fstimer.timer.PyTimer() Gtk.main() if __name__ == '__main__': main()
bletham/fstimer
fstimer.py
Python
gpl-3.0
206
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
ctrlaltdel/neutrinator
vendor/keystoneauth1/tests/unit/loading/test_v3.py
Python
gpl-3.0
16,308
import re from io import BytesIO from typing import Optional, List from telegram import MAX_MESSAGE_LENGTH, ParseMode, InlineKeyboardMarkup from telegram import Message, Update, Bot from telegram.error import BadRequest from telegram.ext import CommandHandler, RegexHandler from telegram.ext.dispatcher import run_async...
PaulSonOfLars/tgbot
tg_bot/modules/notes.py
Python
gpl-3.0
11,067
#! /usr/bin/env python3 from abc import ABCMeta, abstractmethod import csv import os import re import subprocess import sys import plaid2text.config_manager as cm from plaid2text.interact import separator_completer, prompt class Entry: """ This represents one entry (transaction) from Plaid. """ def...
madhat2r/plaid2text
src/python/plaid2text/renderers.py
Python
gpl-3.0
15,244
""" Hook specifications for tox. """ from pluggy import HookspecMarker, HookimplMarker hookspec = HookspecMarker("tox") hookimpl = HookimplMarker("tox") @hookspec def tox_addoption(parser): """ add command line options to the argparse-style parser object.""" @hookspec def tox_configure(config): """ calle...
cvegaj/ElectriCERT
venv3/lib/python3.6/site-packages/tox/hookspecs.py
Python
gpl-3.0
3,276
""" Provides classes that represent complete taxonomies, built using components from the taxacomponents module. """ from taxacomponents import Citation, RankTable, Taxon from taxonvisitor import TaxonVisitor from taxonvisitors_concrete import PrintTaxonVisitor, CSVTaxonVisitor from nameresolve import CoLNamesResolver...
stuckyb/sqlite_taxonomy
utilities/taxolib/taxonomy.py
Python
gpl-3.0
15,593
# Configuration for fargo. # You can override Fargo default settings here # Fargo is a Django application: for the full list of settings and their # values, see https://docs.djangoproject.com/en/1.7/ref/settings/ # For more information on settings see # https://docs.djangoproject.com/en/1.7/topics/settings/ # WARNING...
IMIO/docker-teleservices
config/fargo/settings.py
Python
gpl-3.0
1,635
# -*- coding: utf-8 -*- from BaseOracle import * from Factura import * from ConfigDB import * class CargaFacturaOracle(object): def __init__(self): pass def carga(self, factura): cfgOra = ConfigDB("oracle") cfgOra.getConfig() #cfgOra.imprimir() oracle = BaseOracle(cf...
jorjoluiso/RecupeEle
CargaFacturaOracle.py
Python
gpl-3.0
2,100
# -*- coding: utf-8 -*- # Copyright 2013, 2014 Richard Dymond (rjdymond@gmail.com) # # This file is part of Pyskool. # # Pyskool 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...
skoolkid/pyskool
pyskool/skoolsound.py
Python
gpl-3.0
18,865
#!/usr/bin/env python3 import functools from nxtools import logging, log_traceback from .utils import ( Qt, QWidget, QSlider, QTimer, QHBoxLayout, QVBoxLayout, QIcon, RegionBar, TimecodeWindow, get_navbar, ) try: from .mpv import MPV has_mpv = True except OSError: ...
immstudios/firefly
proxyplayer/videoplayer.py
Python
gpl-3.0
9,818
# Copyright (C) 2007, 2011, One Laptop Per Child # Copyright (C) 2014, Ignacio Rodriguez # # 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) ...
icarito/sugar
src/jarabe/journal/volumestoolbar.py
Python
gpl-3.0
13,211
import logging, os import psycopg2 # settings database_name = 'postgres_database' user = 'postgres_user' password = 'some_password_here_lol' port = 5432 host = 'postgres_host_normally_localhost' path_to_gnaf_data = '/path/to/gnaf/data/' # setup logging.basicConfig(format='%(asctime)s %(levelname)s:%(message)s', leve...
ajosephau/psma-gnaf-loader
main.py
Python
gpl-3.0
6,393
#!/usr/bin/python # Internet de las Cosas - http://internetdelascosas.cl # # Descripcion : Programa que permite obtener la lectura de un sensor DHT11 # Lenguaje : Python # Autor : Jose Zorrilla <jzorrilla@iot.cl> # Dependencias : Libreria de Adafruit https://github.com/adafruit/Adafruit_Python_DHT # Web ...
luckyz/raspberry
dht11/dht11_examples/dht_log.py
Python
gpl-3.0
1,700
#!/usr/bin/env python import server import time from Sensoria.stereotypes.TimeControlData import TimeControlData from Sensoria.stereotypes.InstantMessageData import InstantMessageData class TemperatureSensor (server.TemperatureSensor): def __init__ (self): super (TemperatureSensor, self).__init__ ("HD", "Heater T...
SukkoPera/Arduino-Sensoria
python/server3.py
Python
gpl-3.0
1,544
# Case Conductor is a Test Case Management system. # Copyright (C) 2011 uTest Inc. # # This file is part of Case Conductor. # # Case Conductor 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...
mozilla/caseconductor-ui
tests/core/test_conf.py
Python
gpl-3.0
2,735
"""setuptools based packaging and installation module. Defines the project properties, as well as a special command to build a standalone executable, by using PyInstaller. Run with --help to see available options. """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a co...
errikos/amtt
setup.py
Python
gpl-3.0
5,374
from django.core.urlresolvers import reverse from django.core.mail import send_mail from django.shortcuts import render, redirect from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from .models import ActivateCode import uuid import os from django.http import HttpRespo...
littleghosty/forum
mysite/usercenter/views.py
Python
gpl-3.0
3,333
''' Author Joshua Pitts the.midnite.runr 'at' gmail <d ot > com Copyright (C) 2013,2014, Joshua Pitts License: GPLv3 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, ei...
codercold/Veil-Evasion
tools/backdoor/intel/LinuxIntelELF32.py
Python
gpl-3.0
5,166
from django.http import HttpResponse from django.core.cache import cache from EventSubscriptions.models import EventWithSubscriptions import requests ''' This view provides the final result requested from the exercise. It first looks for it in the cache; if the result is not there, it calls the class "EventWithSubscri...
luispdm/Calendar42Proxy
EventSubscriptions/views.py
Python
gpl-3.0
1,983
# ############################################################################# # AUTHOR BLOCK: # ############################################################################# # # RIB Mosaic RenderMan(R) IDE, see <http://sourceforge.net/projects/ribmosaic> # by Eric Nathen Back aka WHiTeRaBBiT, 01-24-2010 # This script...
gabyx/RIBMosaic
render_ribmosaic/setup.py
Python
gpl-3.0
2,423
# coding=utf-8 """ InaSAFE Disaster risk assessment tool developed by AusAid and World Bank - **Impact function Test Cases.** .. note:: 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; eithe...
dynaryu/inasafe
safe/impact_functions/volcanic/volcano_point_building/test/test_volcano_point_building.py
Python
gpl-3.0
4,136
# Copyright 2009 Noam Yorav-Raphael # # This file is part of DreamPie. # # DreamPie 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. # ...
noamraph/dreampie
dreampielib/data/subp_main.py
Python
gpl-3.0
1,566
import csv from dateutil.parser import parse from adoptarbol.tree.models import Tree def load(filename): with open(filename, encoding='utf-8') as f: reader = csv.reader(f) header = next(reader) def pos_for(field): return header.index(field) def float_or_none(string)...
icarito/arbio-azucar-adoptarbol
loader.py
Python
gpl-3.0
2,243
# -*- coding: utf-8 -*- """ * Partial implementation of standard atmospheric model as described in * GOST 4401-81 useful for processing of data from meteorological balloon * sensors. * * Supported modelling of temperature and pressure over the altitude span from * 0 up to 51km. * * algorithm by Oleg Kocheto...
Shatki/PyIMU
gost4401_81.py
Python
gpl-3.0
4,655
#!/usr/bin/python # Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
yoseforb/lollypop
src/settings.py
Python
gpl-3.0
14,299
import urllib2 url = "http://ifolderlinks.ru/404" req = urllib2.Request(url) #try: response = urllib2.urlopen(req,timeout=3) #except urllib2.HTTPError as e: # print 'The server couldn\'t fulfill the request.' # print 'Error code: ', e.code print response.info() #print response.read()
emmdim/guifiAnalyzer
traffic/tests/testUrl.py
Python
gpl-3.0
295
#!/usr/bin/python3 import gui gui.main()
Koala-Kaolin/pyweb
src/__main__.py
Python
gpl-3.0
42
# Licensed under the GPLv3 - see LICENSE import pytest import numpy as np import astropy.units as u from astropy.time import Time from .. import vdif from .. import mark4 from .. import mark5b from .. import dada from ..base.encoding import EIGHT_BIT_1_SIGMA from ..data import (SAMPLE_MARK4 as SAMPLE_M4, SAMPLE_MARK5B ...
mhvk/baseband
baseband/tests/test_conversion.py
Python
gpl-3.0
19,399