repo_name stringlengths 5 104 | path stringlengths 4 248 | content stringlengths 102 99.9k |
|---|---|---|
xaiki/pybackpack | pybackpack/rdiff_interface.py | from gi.repository import Gtk
import rdiff_backup.Main
import os
import sys
import shutil
import time
import subprocess
import version
from LogHandler import LogHandler
from ConfigParser import SafeConfigParser, NoOptionError
base = os.environ['HOME']
setspath = "%s/.%s/sets/" % (base, version.APPPATH)
class RdiffE... |
tekemperor/consensus | server/consensusapi/consensusapi/ideas/migrations/0001_initial.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2016-11-26 02:16
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):
initial = True
dependencies = [
migratio... |
whereaswhile/DLSR | convnet-folk_master/shownet_singleFrame.py | # Copyright (c) 2011, Alex Krizhevsky (akrizhevsky@gmail.com)
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# - Redistributions of source code must retain the above copyright notice,
# this ... |
117111302/iris-panel | iris/core/context_processors.py | # This file is part of IRIS: Infrastructure and Release Information System
#
# Copyright (C) 2013-2015 Intel Corporation
#
# IRIS is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# version 2.0 as published by the Free Software Foundation.
"""
Context process... |
tchx84/social-sugar | src/jarabe/view/tabbinghandler.py | # Copyright (C) 2008, Benjamin Berg <benjamin@sipsolutions.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.
#
# Th... |
jaqx0r/fengshui | rack.py | #!/usr/bin/python
from math import ceil
class OverlapException:
pass
class OutOfRackException:
pass
class RackFullException:
pass
unitsize = 43.5
class Rack(object):
def __init__(self, name, attr, units):
self._name = name
self.units = units
self.affinity = "bottom"
self._elements = {}
self.__att... |
castlelore/blender | archimesh/src/stairs_maker.py | # ***** BEGIN GPL LICENSE BLOCK *****
#
#
# 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 distribute... |
eeue56/PyGeo2 | pygeo/base/wiresphere.py |
import Numeric
import visual
class wiresphere:
def __init__(self,density):
self.density=density
self.stack_increment = Numeric.pi /(density+1)
self.slice_increment = Numeric.pi /density
def getstacks(self):
stackAngle = self.stack_increment
wireStack=[0]*self.density
for i in... |
ph1l/halo_radio | HaloRadio/Style.py | #
#
# Copyright (C) 2006 Patrick J Freeman
#
# This file is part of halo_radio
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... |
altendky/st | boots.py | #!/usr/bin/env python
from __future__ import print_function
import argparse
import collections
try:
import configparser
except ImportError:
import ConfigParser as configparser
import errno
import glob
import os
import os.path
import posixpath
import shlex
import shutil
import stat
import subprocess
import sys... |
jerrymomo10/Rfid_PCTest | parase.py | from math import log
import time
import sys
import glob
from serial import Serial
from serial import SerialException
# -*- coding:utf-8 -*-
__author__ = 'Jerry'
connected = 0
serial_port = 0
frame_head = 0xffaa # frame header
def serial_ports():
""" Lists serial port names
:raises EnvironmentError:
... |
magic2du/contact_matrix | Contact_maps/DeepLearning/DeepLearningTool/DL_contact_matrix_New_local_test.py |
# coding: utf-8
# In[5]:
import sys, os
sys.path.append('../../../libs/')
sys.path.append('../libs/')
sys.path.append('../../libs/')
import os.path
import IO_class
from IO_class import FileOperator
from sklearn import cross_validation
import sklearn
import csv
from dateutil import parser
from datetime import timede... |
mitshell/libmich | libmich/formats/L3Mobile.py | # −*− coding: UTF−8 −*−
#/**
# * Software Name : libmich
# * Version : 0.2.2
# *
# * Copyright © 2011. Benoit Michau. France Telecom.
# *
# * 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 Fou... |
Traumflug/Teacup_Firmware | configtool/build.py | import wx.lib.newevent
try:
import thread as _thread
except ImportError:
import _thread
import shlex
import subprocess
import os
import re
from os.path import isfile, join
from sys import platform
if platform.startswith("win"):
from subprocess import STARTF_USESHOWWINDOW
(scriptEvent, EVT_SCRIPT_UPDATE) ... |
abrt/satyr | tests/python/python.py | #!/usr/bin/env python
import unittest
from test_helpers import *
path = '../python_stacktraces/python-01'
contents = load_input_contents(path)
frames_expected = 11
expected_short_text = '''#1 [/home/anonymized/PackageKit/helpers/yum/yumBackend.py:2534] _getPackage
#2 [/usr/share/PackageKit/helpers/yum/yumBackend.py:2... |
casacore/python-casacore | tests/test_quanta.py | import unittest
from casacore.quanta import *
class TestQuanta(unittest.TestCase):
def test_quanta(self):
q0 = quantity('1deg')
self.assertTrue(is_quantity(q0))
q1 = quantity(1.0, 'deg')
self.assertTrue(is_quantity(q1))
self.assertEqual(q1, q0)
q2 = quantity([180.0... |
Superjom/bad_source | python/paper/spider/spider/spiders/amazon_camera.py | # -*- coding: utf-8 -*-
from __future__ import division
import sys
sys.path.append('../../')
import re
import time
import random
import urlparse as up
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.exceptions import CloseSpider
from scra... |
dayongxie/zeroc-ice-androidndk | certs/makewsscerts.py | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... |
freevo/freevo1 | src/util/ioctl.py | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# ioctl.py - A modules to make ioctl's in python easier.
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
# Todo:
#
# --------------------------------------------------------... |
jacobajit/ion | intranet/apps/schedule/management/commands/schedule_notify.py | # -*- coding: utf-8 -*-
import json
from django.core.management.base import BaseCommand
from intranet.apps.notifications.views import gcm_post, get_gcm_schedule_uids
from intranet.apps.schedule.notifications import period_start_end_data
from intranet.apps.users.models import User
class Command(BaseCommand):
hel... |
geobricks/geobricks_dockerizer | cli.py | import click
import imp
from geobricks_common.core.log import logger
# Logger
log = logger(__file__)
@click.command()
@click.argument('--common_settings', nargs=1)
@click.argument('--rest_settings', nargs=1)
def start_server(common_settings, rest_settings):
log.info(common_settings, rest_settings)
from geobr... |
CulturaEduca/portal | ponto/models.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.gis import admin
from django.contrib.gis.db import models
from ibge.models import Municipio
import datetime
class TipoGeo(models.Model):
'''Referencias do tipo Geo'''
id = models.IntegerField('Cod TipoGEO', primary_key=True)
... |
sa2ajj/DistroTracker | pts/core/tests/__init__.py | # -*- coding: utf-8 -*-
# Copyright 2013 The Distro Tracker Developers
# See the COPYRIGHT file at the top-level directory of this distribution and
# at http://deb.li/DTAuthors
#
# This file is part of Distro Tracker. It is subject to the license terms
# in the LICENSE file found in the top-level directory of this
# d... |
odahoda/noisicaa | noisicaa/builtin_nodes/midi_cc_to_cv/processor_messages.py | #!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# 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... |
marcomilanesio/qoe-server | DataManager.py | #!/usr/bin/python
#
# mPlane QoE Server
#
# (c) 2013-2014 mPlane Consortium (http://www.ict-mplane.eu)
# Author: Marco Milanesio <milanesio.marco@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published b... |
Tetrabude/cockbot | barkeeper/admin.py | from django.contrib import admin
from barkeeper.models import Pump, RawMaterial, Recipe, Ingredient, ExtraIngredient
class PumpAdmin(admin.ModelAdmin):
list_display = ('name', 'gpioId', 'mlPerMin', 'rawMaterial')
admin.site.register(Pump, PumpAdmin)
#admin.site.register(RawMaterial)
class IngredienInline(adm... |
ianjuma/it-docker-container | config-gunicorn.py | #!/usr/bin/env python
import os
"""
def numCPUs():
if not hasattr(os, 'sysconf'):
raise RuntimeError('No sysconf detected.')
return os.sysconf('SC_NPROCESSORS_ONLN')
"""
bind = '0.0.0.0:5000'
workers = 4
# backlog = 2048
# worker_class = 'sync'
worker_class = 'gevent'
debug = True
daemon = True
pidfi... |
wavesoft/LiveQ | liveq-webserver/webserver/common/userevents.py | ################################################################
# LiveQ - An interactive volunteering computing batch system
# Copyright (C) 2013 Ioannis Charalampidis
#
# 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 ... |
facebookexperimental/eden | eden/hg-server/tests/test-convert-datesort-t.py | # coding=utf-8
# coding=utf-8
# Copyright (c) Facebook, Inc. and its affiliates.
# Copyright (c) Mercurial Contributors.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
from testutil.dott ... |
thomec/tox | polls/views.py | # polls/views.py
from django.shortcuts import get_object_or_404, render
from django.http import HttpResponse, HttpResponseRedirect
from django.core.urlresolvers import reverse
from polls.models import *
from polls.forms import *
def index(request):
polls = Poll.objects.order_by('pub_date')[:10]
context =... |
swprojects/Advanced-Action-Scheduler | advancedactionscheduler/dialogs/control.py | # -*- coding: utf-8 -*
"""
@author Simon Wu <swprojects@runbox.com>
Copyright (c) 2018 by Simon Wu <Advanced Action Scheduler>
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... |
elbeardmorez/quodlibet | quodlibet/tests/test_util_collections.py | # -*- coding: utf-8 -*-
# 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.
from tests import TestCase
from quodlibet.util.... |
Anmol-Singh-Jaggi/Dictionary | quiz.py | #!/usr/bin/env python3
import json
import random
def main():
dictionary_file_path = 'dictionary.json'
with open(dictionary_file_path, "r") as dictionary_file:
dictionary = json.load(dictionary_file)
while True:
# Select a random word-meaning pair
word_meaning = random.choice(list(... |
jfalken/combine | winnower.py | #! /usr/bin/env python
import ConfigParser
import csv
import datetime as dt
import dnsdb_query
import json
import pygeoip
import re
import sys
import os
from netaddr import IPAddress, IPRange, IPSet
from sortedcontainers import SortedDict
from logger import get_logger
logger = get_logger('winnower')
# from http://e... |
shirayu/slex | setup.py | #!/usr/bin/env python
__author__ = 'Yuta Hayashibe'
__version__ = ""
__copyright__ = ""
__license__ = "GPL v3"
import os
version_file = os.path.join(os.path.dirname(__file__), 'VERSION')
with open(version_file) as fh:
slex_version = fh.read().strip()
from setuptools import setup, find_packages, Extension
setup... |
lawl/pmbootstrap | pmb/chroot/distccd.py | """
Copyright 2017 Oliver Smith
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.
pmbootstrap ... |
pablorecio/resistencia-1812 | guadaboard/board.py | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of Resistencia Cadiz 1812. #
# #
# This program is free software: you can redistribute it... |
ROIV/ViorCoin-ElectrumWallet | lib/i18n.py | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# 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... |
HiSPARC/topaz | 140804_detector_offsets/detector_offsets.py | """ Determine detector offset distribution
This determines the detector offsets for all stations in an ESD datafile.
These offsets are then fitted and the results are shown.
Having run this script on several datasets the expected distribution
has a mean of 0 ns and a sigma of 2.7 ns.
"""
from datetime import date
i... |
fmaguire/ete | ete3/tools/phylobuild_lib/task/dialigntx.py | from __future__ import absolute_import
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU Gener... |
LocutusOfPenguin/picochess | dgt/util.py | # Copyright (C) 2013-2018 Jean-Francois Romang (jromang@posteo.de)
# Shivkumar Shivaji ()
# Jürgen Précour (LocutusOfPenguin@posteo.de)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publi... |
feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/blender-for-unrealengine/bfu_ExportAsset.py | #====================== BEGIN GPL LICENSE BLOCK ============================
#
# 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 late... |
axeltidemann/self_dot | experiments/apriori_experiments2.py | #!/usr/bin/python
# -*- coding: latin-1 -*-
'''
Experiments with apriori
'''
import apriori
import random
import loadText
support = 0.03
loadText.importFromFile('association_test_db_full.txt')
dataset = loadText.rawPriori
#print dataset
C1 = apriori.createC1(dataset)
#print 'C1', C1
D = map(set,dataset)
#print 'D', ... |
Juanlu001/pfc | demo/plot_h.py | #******************************************************************************
# *
# * ** * * * * *
# * * * * * * * * * *
... |
chubbymaggie/reverse | plasma/lib/api.py | #!/usr/bin/env python3
#
# PLASMA : Generate an indented asm code (pseudo-C) with colored syntax.
# Copyright (C) 2015 Joel
#
# 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 ... |
mauroalberti/qProf | gis_utils/gdal_utils.py |
from builtins import zip
from builtins import map
from builtins import str
from builtins import range
from builtins import object
import os
try:
from osgeo import ogr
except ImportError:
import ogr
try:
from osgeo import gdal
except ImportError:
import gdal
try:
from osgeo import osr
except Imp... |
tasoc/photometry | tests/test_integrations.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
.. codeauthor:: Rasmus Handberg <rasmush@phys.au.dk>
"""
import pytest
import os
import re
import contextlib
import sqlite3
from timeit import default_timer
from conftest import capture_cli
from photometry import STATUS
from test_todolist import todo_file_valid
from t... |
iagapov/ocelot | gui/accelerator.py | '''
user interface for viewing/editing electron optics layouts
'''
import sys, os, csv
import matplotlib
from matplotlib.figure import Figure
from mpl_toolkits.mplot3d import Axes3D
from matplotlib.collections import PatchCollection
import matplotlib.patches as mpatches
import matplotlib.path as mpath
i... |
heldergg/moin-comments | macro/Comments.py | # -*- coding: utf-8 -*-
# Moin-comments - Blog like comments in MoinMoin
# Copyright (C) 2009, 2017 José Lopes
# This file is part of Moin-comments.
#
# Moin-comments 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 Foun... |
palli/check_serverview | schau_snmp.py | #! /bin/env python
# Author : Stijn Gruwier <stijn.gruwier@notforadsgmail.com>
# Description : Provides easier access to snmp for nagios
# $Id: schau_snmp.py,v 1.3 2007/10/09 07:05:11 sg Exp $
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General P... |
ZombieNinjaPirate/pypkg | Find/LogData.py | """This module can be used to extract speciffic types of data from a log file. """
"""
Copyright (c) 2014, Are Hansen - Honeypot Development.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
1. Redist... |
G-Node/gndata-api | rest/_service.py | from gndata_api import settings
max_results = settings.API_LIMIT_PER_PAGE
class BaseService(object):
"""
--- A PROTOTYPE FOR THE SERVICE LAYER ---
An abstract class that implements basic Service functions like get single
object, get list of objects, create, update and delete objects.
Assumes a ... |
youdulayo/Steam-Card-Wallpaper-Downloader | steamcard-dl.py | #!/usr/bin/env python
# TODO: Use urllib2.HTTPCookieProcessor to fix redirect infinite loop
# See: http://stackoverflow.com/a/22567206
import urllib.request, urllib.error, urllib.parse
import sys
from bs4 import BeautifulSoup
import time
import imghdr
import os
import re
def downloadImage(gameName, imageName, url, fT... |
drogenlied/qudi | interface/confocal_scanner_interface.py | # -*- coding: utf-8 -*-
"""
This module contains the Qudi interface file for confocal scanner.
Qudi 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 ... |
sicheider/simpleBay | extractors/secretExtractor.py | from .superExtractor import SuperExtractor
from bs4 import BeautifulSoup
import requests
import os
import time
import datetime
class SecretExtractorIE(SuperExtractor):
def __init__(self):
self.getInfoFromSecretFile()
self.itemsPerSide = 25
self.checkCache()
def getInfoFromSecretFile(s... |
iLoop2/ResInsight | ThirdParty/Ert/devel/python/python/ert_gui/widgets/error_popup.py | from PyQt4.QtCore import Qt, QPoint
from PyQt4.QtGui import QWidget, QVBoxLayout, QLabel, QFrame, QSizePolicy
class ErrorPopup(QWidget):
error_template = ("<html>"
"<table style='background-color: #ffdfdf;'width='100%%'>"
"<tr><td style='font-weight: bold; padding-... |
alexKleider/debk | src/work_with.py | #!../../venv/bin/python
# -*- coding: utf-8 -*-
# vim: set file encoding=utf-8
# File: /home/alex/Py/CSV/debk/src/work_with.py
"""
A second level menu model to work with a specific entity.
Part of the double entry book keeping project.
If called rather than imported, it attempts to 'work_with' a
defaultentity which ... |
Daroth/fatbotslim | include/utils.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2010 MatToufoutu
#
# This file is part of fatbotslim.
# fatbotslim 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
# (a... |
robcarver17/pysystemtrade | sysobjects/multiple_prices.py | from syscore.objects import missing_data
from dataclasses import dataclass
import datetime as datetime
from copy import copy
import pandas as pd
from sysinit.futures.build_multiple_prices_from_raw_data import (
create_multiple_price_stack_from_raw_data,
)
from sysobjects.dict_of_named_futures_per_contract_prices i... |
pranjalv123/hgt-nn | tree2vec.py | import dendropy
import scipy.sparse
def tree2vec(tree, tn=None):
if isinstance(tree, dendropy.Tree):
t = tree
tn = t.taxon_namespace
elif tree[0] == '(':
t = dendropy.Tree.get_from_string(tree, 'newick', taxon_namespace = tn)
else:
t = dendropy.Tree.get_from_path(tree, 'newi... |
codebycody/toolbox | ciphers/cesar_cipher.py | import argparse
parser = argparse.ArgumentParser()
parser.add_argument('-n', help='number of char to shift.', type=int, required=True)
parser.add_argument('-s', help='string to be ciphered', required=True)
args = parser.parse_args()
#use a string like this, instead of ord()
strs = 'abcdefghijklmnopqrstuvwxyz'
def shi... |
sensbio/sensbiotk | doc/conf.py | # -*- coding: utf-8 -*-
#
# sensbioTK documentation build configuration file, created by
# sphinx-quickstart on Tue Feb 19 13:55:30 2013.
#
# 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.
#
# A... |
mirkobrombin/Bottles | src/backend/managers/manager.py | # manager.py
#
# Copyright 2020 brombinmirko <send@mirko.pm>
#
# 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 ... |
yushakov/simulif | simulif/py_scripts/noiseless_theory/get_C.py | """**************************************************************************
* get_C.py *
* *
* Created on: April 18, 2015 *
* Autho... |
danellecline/stoqs | stoqs/stoqs/views/management.py | #!/usr/bin/env python
__author__ = "Mike McCann"
__copyright__ = "Copyright 2012, MBARI"
__credits__ = ["Chander Ganesan, Open Technology Group"]
__license__ = "GPL"
__version__ = "$Revision: 12294 $".split()[1]
__maintainer__ = "Mike McCann"
__email__ = "mccann at mbari.org"
__status__ = "Development"
__doc__ = '''
... |
zqhuang/COOP | mapio/pyscripts/stack_common.py | postfix = "_fwhm" + str(fwhm_out) + ".fits"
fullprefix = outdir + prefix
imap = fullprefix + "_I" + postfix
polmap = fullprefix + "_QU" + postfix
tqtutmap = fullprefix + "_TQTUT" + postfix
zetamap = fullprefix + "_zeta" + postfix
zetaqzuz = fullprefix + "_zetaqzuz" + postfix
emap = fullprefix + "_E" + postfix
bmap =... |
rascalmicro/control-freak | public/joystick.py | # Copyright (c) 2012 Richard Klancer <rpk@pobox.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, me... |
yujikato/DIRAC | src/DIRAC/ProductionSystem/scripts/dirac_prod_get.py | #!/usr/bin/env python
"""
Get informations for a given production
Usage:
dirac-prod-get prodID
Arguments:
prodID: Production ID (mandatory)
Example:
$ dirac-prod-get 381
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
__RCSID__ = "$Id$"
import ... |
rafaelmartins/ovirt-patch-verifier | ovirt_patch_verifier/release.py | import os
import re
import shutil
import subprocess
import tempfile
import requests
class OvirtRelease(object):
RESOURCES_BASE_URL = 'http://plain.resources.ovirt.org/pub/yum-repo/'
def __init__(self, version):
self.version = None
for rpm, _version in self.get_available_releases():
... |
jabber-at/hp | hp/account/views.py | # -*- coding: utf-8 -*-
#
# This file is part of the jabber.at homepage (https://github.com/jabber-at/hp).
#
# This project 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... |
smattis/BET-1 | examples/fromFile_ADCIRCMap/plotDomains3D.py | #! /usr/bin/env python
# Copyright (C) 2014-2019 The BET Development Team
# import necessary modules
import numpy as np
import bet.postProcess.plotDomains as pDom
import scipy.io as sio
from scipy.interpolate import griddata
import bet.sample as sample
# Set minima and maxima
param_domain = np.array([[-900, 1500], [... |
ringw/MetaOMR | metaomr/note.py | from .gpu import *
from metaomr import forest, components, music
import copy
import music21
CMAJOR = dict((n + 'n', n + 'n') for n in list('abcdefg'))
class PitchState:
""" Stores clef, key signature, and accidental information """
BASS = 50 # middle staff line is D3
TREBLE = 71 # middle staff line is B4
... |
crisely09/horton | tools/qa/trapdoor_namespace.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2016 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 Licens... |
mazvv/travelcrm | travelcrm/lib/qb/regions.py | # -*coding: utf-8-*-
from collections import Iterable
from . import ResourcesQueryBuilder
from ...models.resource import Resource
from ...models.region import Region
from ...models.country import Country
class RegionsQueryBuilder(ResourcesQueryBuilder):
def __init__(self, context):
super(RegionsQueryBui... |
stianrh/askbot-nordic | askbot/conf/forum_data_rules.py | """
Settings for askbot data display and entry
"""
from askbot.conf.settings_wrapper import settings
from askbot.deps import livesettings
from askbot import const
from askbot.conf.super_groups import DATA_AND_FORMATTING
from django.utils.translation import ugettext_lazy as _
FORUM_DATA_RULES = livesettings.Configurati... |
mazafrav/JdeRobot | src/drivers/MAVLinkServer/modules/mavproxy_log.py | #!/usr/bin/env python
'''log command handling'''
import time, os
from MAVProxy.modules.lib import mp_module
class LogModule(mp_module.MPModule):
def __init__(self, mpstate):
super(LogModule, self).__init__(mpstate, "log", "log transfer")
self.add_command('log', self.cmd_log, "log file handling", ... |
tmccombs/kountdown | src/contents/code/main.py | # -*- coding: utf-8 -*-
# Copyright 2013 Thayne McCombs
from PyQt4.QtCore import *
from PyQt4.QtGui import QGraphicsLinearLayout
from PyKDE4.plasma import Plasma
from PyKDE4 import plasmascript
from datetime import date
from model import KountdownModel
class Kountdown(plasmascript.Applet):
def __init__(self,pare... |
lsp84ch83/PyText | PyDj/django_rest/testcase/rest_test.py | #!/usr/bin/env python
# _*_ coding: utf-8 _*_
# @Time : 2018/4/19 11:43
# @Author : Soner
# @version : 1.0.0
# @license : Copyright(C), Your Company
import unittest
import requests
class UserTest(unittest.TestCase):
''' 用户查询测试 '''
def setUp(self):
self.base_url = 'http://127.0.0.1:8000/users'
... |
mkhuthir/catkin_ws | src/patrol/src/simple_fsm.py | #!/usr/bin/python
# BEGIN ALL
import rospy
# BEGIN PART_1
from smach import State,StateMachine
# END PART_1
from time import sleep
# BEGIN PART_2
class One(State):
def __init__(self):
State.__init__(self, outcomes=['success'])
def execute(self, userdata):
print 'one'
sleep(1)
... |
mborho/baas | baas/core/yqlapi.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2009 Martin Borho <martin@borho.net>
# GPL - see License.txt for details
import urllib
from baas.core.helpers import load_url
try:
# appengine
from django.utils import simplejson
except:
import simplejson
class YQLApi(object):
def __init__(self, co... |
iamkingmaker/ga-bitbot-revived | gal.py |
"""
gal v0.01.1
ga-bitbot-revived based on:
ga-bitbot application / system launcher
Copyright 2011 Brian Monkaba
This file is part of ga-bitbot.
ga-bitbot 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 Founda... |
mqopen/mqspeak | mqspeak/channel.py | # Copyright (C) Ivo Slanina <ivo.slanina@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 3 of the License, or
# (at your option) any later version.
#
# This program i... |
ressu/SickGear | sickbeard/providers/iptorrents.py | # Author: seedboy
# URL: https://github.com/seedboy
#
# This file is part of SickGear.
#
# SickGear 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 la... |
EvolutionClip/pyload | module/plugins/hooks/PremiumTo.py | # -*- coding: utf-8 -*-
from module.plugins.internal.MultiHook import MultiHook
class PremiumTo(MultiHook):
__name__ = "PremiumTo"
__type__ = "hook"
__version__ = "0.08"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
("... |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/python/lib/python3.3/site-packages/numpy/polynomial/tests/test_polyutils.py | """Tests for polyutils module.
"""
import numpy as np
import numpy.polynomial.polyutils as pu
from numpy.testing import *
class TestMisc(TestCase) :
def test_trimseq(self) :
for i in range(5) :
tgt = [1]
res = pu.trimseq([1] + [0]*5)
assert_equal(res, tgt)
def t... |
brunoabud/ic | ic/__init__.py | # coding: utf-8
# Copyright (C) 2016 Bruno Abude Cardoso
#
# Imagem Cinemática 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.
#
# Imag... |
DavidAndreev/indico | indico/util/caching.py | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... |
zzacharo/inspire-next | tests/unit/workflows/test_workflows_tasks_arxiv.py | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 ... |
linuxmuster/linuxmuster-base7 | share/firewall/opnsense/create-keytab.py | #!/usr/bin/python3
#
# create web proxy sso keytab
# thomas@linuxmuster.net
# 20200311
#
import constants
import getopt
import os
import sys
from functions import datetime
from functions import firewallApi
from functions import getSetupValue
from functions import printScript
from functions import readTextfile
# ch... |
dradux/tracker | web/migrations/versions/221e8b598f94_.py | """empty message
Revision ID: 221e8b598f94
Revises: b6113b96cc90
Create Date: 2017-03-22 09:49:19.438159
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '221e8b598f94'
down_revision = 'b6113b96cc90'
branch_labels = None
depends_on = None
def upgrade():
# ... |
rhdunn/libclangpy | tests.py | #!/usr/bin/python
# Copyright (C) 2014 Reece H. Dunn
#
# This file is part of libclangpy.
#
# libclangpy 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) ... |
avedaee/DIRAC | WorkloadManagementSystem/private/GridPilotDirector.py | ########################################################################
# $HeadURL$
# File : GridPilotDirector.py
# Author : Ricardo Graciani
########################################################################
"""
Base Grid PilotDirector class to be inherited MW specific PilotDirectors gLite/LCG.
It include... |
Naereen/mazhe | phystricksUneCellule.py | from phystricks import *
def UneCellule():
def Sigma(dep,leng):
sigma=[dep]
d=dep
for l in leng :
d=d+l
sigma.append(d)
return sigma
pspict,fig = SinglePicture("UneCellule")
a1=1
l1=[1.2,1.5,0.5,1,1]
sigma1=Sigma(a1,l1)
b1=a1+sum(l1)
a2=2
l2=[0.5,1.5,1]
sigma2=Sigma(a2,l2)
b2=a2+sum(l2)
for ... |
piface/pifacerelayplus | docs/conf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# PiFace Relay Plus documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 9 14:17:48 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in t... |
fkie-cad/FACT_core | src/helperFunctions/merge_generators.py | import itertools
from copy import deepcopy
from random import sample, seed
from typing import Iterable, List, Sequence, TypeVar
seed()
T = TypeVar('T') # pylint: disable=invalid-name
def _add_nested_list_to_dict(input_list, input_dict):
for item in input_list:
if item[0][0] in input_dict.keys():
... |
ivmech/iviny-scope | lib/xlsxwriter/test/helperfunctions.py | ###############################################################################
#
# Helper functions for testing XlsxWriter.
#
# Copyright (c), 2013, John McNamara, jmcnamara@cpan.org
#
import re
import sys
import os.path
from zipfile import ZipFile
from zipfile import BadZipfile
from zipfile import LargeZipFile
def... |
Mikea1985/maphot | maphot/maphot.py | #!/usr/bin/python
"""maphot is a wrapper for easily running trippy on a bunch of images
of a single object on a single night.
Usage: (-h gives this line as well)
maphot.py -c <coofile> -f <fitsfile> -v False -. True -o False -r True
-a 0.7 -t False -e 0
Defaults are:
inputFile = 'a100.fits' # Change with '-f... |
fhcrc/seqmagick | seqmagick/test/test_subcommands_convert.py | """
Tests for seqmagick.subcommands.convert - mostly integration with
seqmagick.transform
"""
import argparse
import os
import tempfile
import unittest
from seqmagick.subcommands import convert
from seqmagick import transform
# Test populating the transform
class PopulateTransformsMixIn(object):
"""
Tests tha... |
die-uhus/blueman | blueman/bluez/obex/Client.py | from __future__ import print_function
from __future__ import division
from __future__ import absolute_import
from __future__ import unicode_literals
import dbus
from blueman.Functions import dprint
from blueman.bluez.obex.Base import Base
from gi.repository import GObject
class ObexdNotFoundError(Exception):
pas... |
kernsuite-debian/lofar | CEP/Pipeline/test/recipes/nodes/gainoutliercorrection_test.py |
import os
import unittest
import tempfile
import sys
import shutil
import numpy
from argparse import ArgumentTypeError
from lofarpipe.support.utilities import create_directory #@UnresolvedImport
from lofarpipe.support.lofarexceptions import PipelineRecipeFailed
from lofarpipe.recipes.nodes.gai... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.