code
stringlengths
1
199k
from sfa.rspecs.elements.disk_image import DiskImage class Image: def __init__(self, image=None): if image is None: image={} self.id = None self.container_format = None self.kernel_id = None self.ramdisk_id = None self.properties = None self.name = None ...
import re import sys def hw(): # function to print a text print 'This is the proportion of non applicable characters and missing data for each taxon' def lines(fp): #fonction to count print str(len(fp.readlines())) def datatype( datafile ): datat = "STANDARD" datafilecopy = datafile if datat in data...
from scrapyts.parser.youtube import Youtube from scrapyts.parser.playlist.youtube import YoutubePlaylist from scrapyts.exceptions import DownloadError, ParseError import sys import re import os import os.path import scrapyts.utils as utils import scrapyts.helpers.youtube as ythelper class CLIDownloader: """A comman...
''' Created on 1.12.2016 @author: Darren ''' ''' Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return the maximum enemies you can kill using one bomb. The bomb kills all the enemies in the same row and column from the planted point until it hits the wall since the wall is...
''' Created on 1.12.2016 @author: Darren '''''' Design a data structure that supports all following operations in average O(1) time. insert(val): Inserts an item val to the set if not already present. remove(val): Removes an item val from the set if present. getRandom: Returns a random element from current set of eleme...
import pygame pygame.init() WINDOW_WIDTH = 1366 WINDOW_HEIGHT = 768 WINDOW_SIZE = [WINDOW_WIDTH, WINDOW_HEIGHT] DISPLAY_SURFACE = pygame.display.set_mode(WINDOW_SIZE, pygame.FULLSCREEN | pygame.HWSURFACE | pygame.DOUBLEBUF) FPS = 60 CLOCK = pygame.time.Clock() FONT = pygame.font.Font('freesansbold.ttf',50) PAUSED_TEXT ...
import numpy as np import matplotlib.pyplot as plt import plotly.plotly as py from datos import data d=data('mtcars') carb=d.cyl wt= d.mpg y0 = carb y1 = wt fig, ax = plt.subplots() ax.plot(y0, label='y0') ax.plot(y1, label='y1') update = {'data':[{'fill': 'tonexty'}]} plot_url = py.plot_mpl(fig, update=update, strip_s...
import http.server import socketserver PORT = 8080 Handler = http.server.SimpleHTTPRequestHandler with socketserver.TCPServer(("", PORT), Handler) as httpd: print("serving at port", PORT) httpd.serve_forever()
print "Hello, world!" print "HELP I'M STUCK IN A COMPUTER" print "SET ME FREEE" print "HELP ME" print "eh baows" print "Frogs in a Pickle" print 1541467290 print "Isaiah Jupo" myName = "Isaiah" myMiddlename = "Thomas" myLastname = "Jupo"
from locchannelfactory import LocChannelFactory
from Rtp_cluster_config import read_cluster_config from Rtp_cluster import Rtp_cluster from Rtp_cluster_member import Rtp_cluster_member import getopt, os import sys from contrib.objgraph import typestats import operator from twisted.internet import reactor sys.path.append('sippy') from sippy.SipConf import MyAddress f...
import os import re import subprocess from . import util from .size import Size from .flags import flags import pyudev global_udev = pyudev.Context() import logging log = logging.getLogger("blivet") INSTALLER_BLACKLIST = (r'^mtd', r'^mmcblk.+boot', r'^mmcblk.+rpmb', r'^zram') """ device name regexes to ignore when flag...
import matplotlib matplotlib.use('Agg') import yt import os import sys import util import MPI_taskpull2 import logging logging.getLogger('yt').setLevel(logging.ERROR) import matplotlib.pyplot as plt import numpy as np dir = './' regex = 'MHD_Jet*_hdf5_plt_cnt_[0-9][0-9][0-9][0-9]' files = None def rescan(printlist=Fals...
"""PostgreSQL service checker""" import psycopg2 from nav.statemon.abstractchecker import AbstractChecker from nav.statemon.event import Event class PostgresqlChecker(AbstractChecker): """PostgreSQL""" IPV6_SUPPORT = True DESCRIPTION = "PostgreSQL" ARGS = ( ('user', ''), ('password', '')...
from ....ggettext import gettext as _ from .._isprivate import IsPrivate class NotePrivate(IsPrivate): """Note marked private""" name = _('Notes marked private') description = _("Matches notes that are indicated as private")
"""[MS-ASNOTE] Note objects""" from MSASEMAIL import airsyncbase_Body def parse_note(data): note_dict = {} note_base = data.get_children() note_dict.update({"server_id" : note_base[0].text}) note_elements = note_base[1].get_children() for element in note_elements: if element.tag == "airsyncb...
import logging, time, re, os from autotest.client.shared import error from autotest.client import utils from autotest.client.virt import virt_vm, virt_utils class EnospcConfig(object): """ Performs setup for the test enospc. This is a borg class, similar to a singleton. The idea is to keep state in memory f...
import gi gi.require_version('Gtk', '3.0') from gi.repository import GObject, Gio, Gtk, Gdk, PeasGtk, Liferea import gettext _ = lambda x: x try: t = gettext.translation("liferea") except FileNotFoundError: pass else: _ = t.gettext class HeaderBarPlugin (GObject.Object, Liferea.ShellActivatable): __gtyp...
from __future__ import unicode_literals import os import string import random from django.db import models def get_gallery_filename(instance, filename): """ Returns a filename that a gallery item can be saved to. This function is used to rename the files by publication date (with a random string appended to...
import datetime """ from pypinsobj import * p.add(23, 'temp_sensor', IN) p.add(24, 'doorbell', IN) p.add(22, 'test_LED', OUT) p.add(25, 'latch', OUT) p.add(1, 'vcc', RESERVED, 'connected to positive 3v') p.add(9, 'MISO', RESERVED, 'used for MISO SPI') ... if p.input('temp_sensor'): p.turn_on('test_LED') def ...
# ---------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # @tantrumdev wrote this file. As long as you retain this notice you # can do whatever you want with this stuff. If we meet some day, and you think # this stuff is worth it, you can buy me a bee...
import os, sys path = [ ".", "..", "../..", "../../..", "../../../.." ] head = os.path.dirname(sys.argv[0]) if len(head) > 0: path = [os.path.join(head, p) for p in path] path = [os.path.abspath(p) for p in path if os.path.exists(os.path.join(p, "scripts", "TestUtil.py")) ] if len(path) == 0: raise RuntimeError...
from arcadia_admin import db class OnlineDatabase(db.Model): __tablename__ = 'online_databases' id = db.Column(db.String(32), primary_key=True) name = db.Column(db.String(255)) api_key = db.Column(db.String(255)) class Platform(db.Model): __tablename__ = 'platforms' id = db.Column(db.Integer, primary_key=True) #...
import sys import os import subprocess def allDSS(): for i in range(1,895): str = "/home/fab1/prog/stellarium/util/dssheaderToJSON.py" + " S %i %i" % (i,i+1) print str try: retcode = subprocess.call(str, shell=True) if retcode < 0: print >>sys.stderr, "Child was terminated by signal", -retcode else:...
import os import sys arg = sys.argv[1] command = "samba-tool ntacl set " wp = os.getcwd() for dirname, dirnames, filenames in os.walk(wp): os.system(command + "\"" + arg + "\" " + "\"" + dirname + "\"") files = [f for f in os.listdir(dirname) if os.path.isfile(os.path.join(dirname,f))] for f in files: ...
import re import fauxfactory import pytest import requests from random import sample from cfme import test_requirements from cfme.intelligence.reports.dashboards import Dashboard from cfme.utils.blockers import BZ from cfme.utils.wait import wait_for pytestmark = [ test_requirements.dashboard, pytest.mark.tier(...
""" *************************************************************************** Postprocessing.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************************************...
""" Things todo: Add functionality to menu buttons clean up the map's XML Add more comments """ import pygame import random import os from pygame.sprite import Sprite from pygame import font from data import * from utils import * from constants...
import os import shutil import jenkins from argparse import ArgumentParser from ConfigParser import SafeConfigParser from distutils.version import LooseVersion class JenkinsUtility: def __init__(self, user, passwd, host="http://localhost:8080"): self.server = jenkins.Jenkins(host, username=user, password=pa...
from django.core import urlresolvers from django.http.response import HttpResponse, HttpResponseRedirect, Http404 from django.shortcuts import render, get_object_or_404, redirect from web.forms import ModuleForm from web.models import Module def get_redirect_to_edit_page(module): return HttpResponseRedirect( ...
from setuptools import setup, find_packages try: import pypandoc long_description = pypandoc.convert('README.md', 'rst') except: long_description = None from ionize.__version__ import __version__ setup(name='ionize', version=__version__, author='Lewis A. Marshall', author_email='lewis.a.ma...
from functools import partial import traceback from vdsm import supervdsm import hooking import ovs_utils log = partial(ovs_utils.log, tag='ovs_after_network_setup_fail: ') def main(): setup_nets_config = hooking.read_json() in_rollback = setup_nets_config['request']['options'].get('_inRollback') if in_roll...
from __future__ import absolute_import from __future__ import print_function import sys import numpy as np import matplotlib.pyplot as plt import burnman from burnman import minerals import pymc import cProfile import scipy.stats as sp import matplotlib.mlab as mlab if __name__ == "__main__": seismic_model = burnma...
""" Read the data in the included .csv file. """ import csv import json _FILE = 'data/sic.csv' def load_data(): """Load data from the CSV file into memory and return it in various formats. """ data_2007, data_2003 = {}, {} with open(_FILE, 'r') as f: reader = csv.reader(f) for row in rea...
import shutil, stat, re, os import svntest from svntest import wc from svntest.tree import SVNTreeError, SVNTreeUnequal, \ SVNTreeIsNotDirectory, SVNTypeMismatch Skip = svntest.testcase.Skip XFail = svntest.testcase.XFail Item = wc.StateItem def verify_xml_elements(lines, exprs): """Verify th...
import openwns from Logger import Logger class SourceAddressFilter: def __init__(self, subnetIdentifier, dllDataTransmission, addressResolver, parentLogger): self.subnetIdentifier = subnetIdentifier self.logger = Logger("SAF", True, parentLogger) self.dllDataTransmission = dllDataTransmissio...
import numpy as np import cv2 from pyocr import pyocr from pyocr import builders from PIL import Image from time import sleep drawing = False # true if mouse is pressed ix,iy = -1,-1 rectangle = None def define_rectangle(iy, ix, y, x): x_sorted = sorted([ix, x]) y_sorted = sorted([iy, y]) return (x_sorted[0], y_s...
from polybori.PyPolyBoRi import Polynomial from polybori.nf import symmGB_F2_C from polybori.ll import ll_encode from itertools import ifilter class OccCounter(object): def __init__(self): self.impl = dict() def __getitem__(self, k): try: return self.impl[k] except KeyError: ...
import nest import unittest __author__ = 'naveau' class TestDisconnect(unittest.TestCase): def setUp(self): nest.ResetKernel() nest.set_verbosity('M_ERROR') self.exclude_synapse_model = [ 'stdp_dopamine_synapse', 'stdp_dopamine_synapse_lbl', 'stdp_dopamine...
__version__ = "1.0" __all__ = ["main"] __author__ = [ "Bin Lan <authurlan@gmail.com>" ] __date__ = "2014-03-02" from main import main
""" Defines a text editor which displays a text field and maintains a history of previously entered values. """ from enthought.qt import QtCore, QtGui from editor import Editor class _HistoryEditor(Editor): """ Simple style text editor, which displays a text field and maintains a history of previously e...
import netshow.cumulus.print_bond as print_bond import netshowlib.cumulus.bond as cumulus_bond import mock from asserts import assert_equals, mod_args_generator import io class TestPrintBondMember(object): def setup(self): iface = cumulus_bond.BondMember('swp22') self.piface = print_bond.PrintBondMe...
import errno import glob import grp import re from shutil import move import os import pwd from datetime import date, timedelta from subprocess import call, CalledProcessError def get_logfiles(): logrotate_configs = ["/etc/logrotate.conf"] logrotate_configs.extend(glob.glob("/etc/logrotate.d/*")) actions = ...
from __future__ import division, print_function, unicode_literals import cairo class Painter: def paint(data): """Paint moodbar to a Cairo surface. :param data: Moodbar data :type data: bytes :return: Cairo surface containing the image to be drawn :rtype: cairo.ImageSurface ...
from __future__ import print_function import sys import os os.environ['NUMPTHREADS'] = '1' import math import numpy import pylab import matplotlib.pyplot as plt import moose import proto18 scriptDir = os.path.dirname( os.path.realpath( __file__ ) ) def loadElec(): library = moose.Neutral( '/library' ) moose.set...
from models.object_types import ObjectTypes from tests.persistence_t.in_memory.in_memory_test_base import InMemoryTestBase class GetUsersTest(InMemoryTestBase): def setUp(self): self.pl = self.generate_pl() self.pl.create_all() self.user1 = self.pl.create_user('admin@example.com', is_admin=T...
import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "geoviz.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
from tns.sectors import Sector, BaseStackAnimation, BounceLightnessAnimation, DecreaseLightnessAnimation, \ BounceSnakeAnimation, SequenceAnimation, StaticAnimation, SectorManager __author__ = 'alfred' class SuccessAnimation(BaseStackAnimation): def __init__(self, *args, **kwargs): super(SuccessAnimatio...
from vertigo import RaveVertexFactory, EventFactory, RaveConstantMagneticField, RaveVacuumPropagator, LoopSettings, RaveTrackContainer, RaveLogger LoopSettings.Instance().setVerbosity(0) ravefactory=RaveVertexFactory ( RaveConstantMagneticField(0.,0.,4.), RaveVacuumPropagator() ) RaveLogger().writeToFile ( "rave_log.tx...
"""Creates sample data to prime the pump""" from . import AdultApplications from . import CharterApplications from . import District from . import Guardian from . import SponsoringOrganization from . import Subdistrict from . import Unit from . import User from . import Volunteer from . import Youth from . import Youth...
'''Standard directory and filename locations are stored in the :class:`padre.config` class, and imported to the root level for convenience. (e.g., ``padre.config.padre_root`` can be accessed as ``padre.padre_root``) ''' import os import json verbose = True error_msg = ''' ERROR!! PADRE_ROOT not set!! Please set the env...
import os import datetime import base64 import logging import six.moves.configparser as ConfigParser try: import pymongo import gridfs from pymongo.errors import DuplicateKeyError MONGO_MODULE = True except ImportError: MONGO_MODULE = False from .compatibility import thug_unicode from .ExploitGraph ...
__author__ = 'jursonovicst' sim_len=60*10 #in sec sim_res=0.5 #in sec sim_vodlen=5*60 #in sec sim_vodarr=30 #arrival intensity (lambda) sim_subseglen=2 #in sec sim_vodbw=16 #in Mbps sim_numasset=3800 # sim_s=0.8 #Zipf parameter sim_url="http://da-ts...
from exceptions import Warning import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject import pango as __pango import pangocairo as __pangocairo class Keymap(__gobject__gobject.GObject): """ Object GdkKeymap Signals from GdkKeymap: state-changed () direction...
import pytest from utils import lazycache @pytest.fixture def test_object(): return LazycacheTester() class PropertyObject(object): def __init__(self, value): self.value = value def __eq__(self, other): # simplify equality checks in tests below return self.value == other class Lazyca...
from __future__ import division import os import os.path as osp import inspect from threading import Thread from functools import partial from glob import glob from importlib import import_module import re import six from collections import defaultdict from itertools import chain, product, repeat, starmap, count, cycle...
from pykickstart.base import KickstartCommand from pykickstart.errors import KickstartParseError, formatErrorMsg import getopt import pipes import shlex from pykickstart.i18n import _ class F19_Realm(KickstartCommand): removedKeywords = KickstartCommand.removedKeywords removedAttrs = KickstartCommand.removedAtt...
''' Bullseye: An accelerated targeted facet imager Category: Radio Astronomy / Widefield synthesis imaging Authors: Benjamin Hugo, Oleg Smirnov, Cyril Tasse, James Gain Contact: hgxben001@myuct.ac.za Copyright (C) 2014-2015 Rhodes Centre for Radio Astronomy Techniques and Technologies Department of Physics and Electron...
from django.conf import settings from django.contrib.auth.models import User from ldap3 import Server, Connection class ReselAdminMiddleware(object): def __init__(self, get_response): self.get_response = get_response def __call__(self, request): if request.user.is_authenticated and not request.u...
""" GRAMPS registration file """ register(TOOL, id = 'test_for_date_parser_and_displayer', name = "Check Localized Date Displayer and Parser", description = ("This test tool will create many people showing all" " different date variants as birth. The death date is" "...
from django.test import TestCase from lists.models import Item, List from django.utils.html import escape class HomePageTest(TestCase): def test_uses_home_template(self): response = self.client.get('/') self.assertTemplateUsed(response, 'home.html') class ListViewTest(TestCase): def test_uses_li...
from pytest import raises from seedboxsync.main import SeedboxSyncTest def test_seedboxsync(): # test seedboxsync without any subcommands or arguments with SeedboxSyncTest() as app: app.run() assert app.exit_code == 0 def test_seedboxsync_debug(): # test that debug mode is functional arg...
import socket import httplib import StringIO class SSDPResponse(object): class _FakeSocket(StringIO.StringIO): def makefile(self, *args, **kw): return self def __init__(self, response): r = httplib.HTTPResponse(self._FakeSocket(response)) r.begin() self.location = r.g...
import string import bz2 import geometry class tstData(object): '''this class holds all the data from a tst data file in a dictionary it automatically reads in any standard formatted record (and ignores parentheses)''' #one example of necessaryKeys that can be used necessaryKeysForMesh = [ 'CONVEX_HULL_...
import os def numberName(dir,start,ext): '''dir: dirpath Îļþ¼Ð start: start number ÆðʼÊý×Ö ext: ext ºó׺ return a filepath <type string> named by continual number. ·µ»ØÒ»¸öÒÔÁ¬ÐøÊý×ÖÃüÃûµÄ·¾¶''' if ext and ext[0]!='.': ext='.'+ext while os.path.exists(os.path.join(dir,...
import nest import unittest from .utils import extract_dict_a_from_b __author__ = 'naveau' class TestStructuralPlasticityManager(unittest.TestCase): def setUp(self): nest.ResetKernel() nest.hl_api.set_verbosity('M_INFO') self.exclude_synapse_model = [ 'stdp_dopamine_synapse', ...
''' Created on 05/09/2015 @author: Jorge Luis Abrir uma imagem colorida, visualizar e salvar. ''' from skimage import io import sys import dlib class LoadImage(object): def __init__(self,pathImage): ''' Construtor do LoadIamge ''' self.pathImage = pathImage self.win = dli...
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Courses', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=Fals...
import kivy.lang from kivy.app import App class TestApp(App): def build(self): return kivy.lang.Builder.load_file("test.kv") if(__name__ == "__main__"): TestApp().run()
from __future__ import absolute_import, print_function, division, unicode_literals import argparse import gzip import os import os.path import re class PrettyTuple(tuple): def __repr__(self): return ', '.join(self) CHUNK_SIZE = 64 * 1024 GZIP_EXCLUDE_EXTENSIONS = PrettyTuple(( # Images 'jpg', 'jpeg'...
from os.path import join from ..models import DBSession from pyramid.view import view_config from pyramid.response import FileResponse import pkg_resources @view_config(route_name='export_page', renderer='export.mako') def export_page(context, request): # session = DBSession() # # imported_regions = session...
""" Serializing protocol for sending log records between processes. """ from __future__ import print_function, unicode_literals import json import logging import pickle class LogRecordSerializer(object): @staticmethod def dumps(record_dict): raise NotImplementedError("") @staticmethod def loads(...
""" A Vim instance starts a Debugger instance and dispatches the netbeans messages exchanged by vim and the debugger. A new Debugger instance is restarted whenever the current one dies. """ import os import sys import time import os.path import tempfile import subprocess import inspect import optparse import logging im...
import sys, os import json as _json import random import datetime import xbmc import xbmcplugin import xbmcgui import xbmcaddon import time import base64 IS_PY3 = sys.version_info[0] > 2 if IS_PY3: from urllib.request import Request from urllib.request import urlopen from urllib.parse import unquote_plus else: from...
import sys import httplib import json import csv import traceback from api import Taringa from collections import Counter from pymongo import MongoClient from dateutil.parser import parse taringa = Taringa() client = MongoClient() db = client["taringa_db"] def get_and_save_shouts_actions(shoutid_list): shouts_actio...
import requests import threading import argparse import time import sys import os import random import string from multiprocessing import Process from multiprocessing import Pool as ProcessPool from multiprocessing.dummy import Pool as ThreadPool UserAgent = [ 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0)', 'Mozi...
import binascii from XBeeFrames import xbeeFrame from common.util import hex_to_float, parsePkgs, littleEndian, hexStr_to_hex class XBeeController(): def parseData(self, data): pkgs = xbeeFrame | parsePkgs(data | hexStr_to_hex) # print pkgs[0][0] return self.getImportData(pkgs[0][0]) def...
import apt from datetime import datetime import decimal import json import os import Queue import random import socket import subprocess import sys import traceback import xbmc import xbmcaddon import xbmcgui __libpath__ = xbmc.translatePath(os.path.join(xbmcaddon.Addon().getAddonInfo('path'), 'resources','lib')) sys.p...
''' Author: Thomas Beucher Module: MuscularActivation Description: Class used to compute the muscular activation vector U with motor noise ''' import numpy as np def getNoisyCommand(U, knoiseU): ''' Computes the next muscular activation vector U Input: -state: the state of the arm, numpy array Output: ...
""" *************************************************************************** ParametersPanel.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya (C) 2013 by CS Systemes d'information (CS SI) Email : ...
import sys infname = sys.argv[1] templatefname = sys.argv[2] outfname = sys.argv[3] key = sys.argv[4] fp = open(templatefname, 'r') outfp = open(outfname, 'w') for line in fp: outfp.write(line) #outfp.write("*\n") if key in line: #outfp.write("***") infp = open(infname, 'r') for inline in infp: outfp.write(...
import wx import MainFrame import gettext gettext.install('Editor') app = wx.App(False) frame = MainFrame.MainFrame(None, _('Editor')) app.MainLoop()
"""This file defines the Button class.""" from src.Icon import Icon class Button(Icon): """This class defines an individual Button.""" def __init__(self, text, # The text to display (can be None) text_colour, # The colour of the text/polygons (can be None) ba...
import os import json class Config(dict): version = 1 def __init__(self, path='/etc/pyrouted/pyrouted.conf'): self.path = os.environ.get('PYROUTED_CONFIG', path) def load(self): with open(self.path, 'r') as f: self.update(json.load(f)) if int(self['version']) > self.versi...
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('activitydb', '0006_auto_20150625_1636'), ('indicators', '0001_initial'), ] operations = [ migrations.AddField( model_name='objective'...
"""Tests for the index.""" from cStringIO import ( StringIO, ) import os import shutil import stat import struct import tempfile from dulwich.index import ( Index, build_index_from_tree, cleanup_mode, commit_tree, index_entry_from_stat, read_index, write_cache_time, write_index, ...
import unittest import Polar import Parser class TestPolarTags( unittest.TestCase ): def test_000_TagDateTime(self): polar = Polar.Polar( [ 0x3a,0x20,0x08,0x01,0x12,0x17,0x0a,0x07,0x08,0xdf,0x0f,0x10,0x01,0x18,0x0a,0x12,0x08,0x08,0x0b,0x10,0x2f,0x18,0x00,0x20,0x00,0x18,0x00,0x20,0x78,0x1d,0x00,0x00,0x80 ] ) ...
""" Django settings for Agora_Django project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ import os import socket BASE_DIR = os.path.dirname(os.path.dirname(__fil...
import subprocess import sys import portage from portage import os from portage import _unicode_decode from portage.const import PORTAGE_BIN_PATH, PORTAGE_PYM_PATH, USER_CONFIG_PATH from portage.process import find_binary from portage.tests import TestCase from portage.tests.resolver.ResolverPlayground import ResolverP...
import os import unittest from datetime import datetime, timedelta import numpy as np import pytest from . import * from opendrift.readers import reader_netCDF_CF_generic from opendrift.readers import reader_timeseries from opendrift.models.oceandrift import OceanDrift def test_map_background(): """Plotting map of ...
import sys import os import shlex extensions = [ 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.ifconfig' ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'Weissheiten.Neos.InstagramMedia' copyright = u'2015 and onwards by the authors' author = u'Author and ...
from PyQt5 import QtCore qt_resource_data = b"\ \x00\x00\x03\xdd\ \x3c\ \x3f\x78\x6d\x6c\x20\x76\x65\x72\x73\x69\x6f\x6e\x3d\x22\x31\x2e\ \x30\x22\x20\x65\x6e\x63\x6f\x64\x69\x6e\x67\x3d\x22\x69\x73\x6f\ \x2d\x38\x38\x35\x39\x2d\x31\x22\x3f\x3e\x0d\x0a\x3c\x21\x2d\x2d\ \x20\x47\x65\x6e\x65\x72\x61\x74\x6f\x72\x3a\x20\x...
MODULE_VERSION="4.2" register(SIDEBAR, id = 'categorysidebar', name = _("Category Sidebar"), description = _("A sidebar to allow the selection of view categories"), version = '1.0', gramps_target_version = MODULE_VERSION, status = STABLE, fname = 'categorysidebar.py', authors = ["Nick Hall"], authors_email = ["nic...
''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import time from pyglet.media import AbstractAudioPlayer, AbstractAudioDriver, \ MediaThread, MediaEvent import pyglet _debug = pyglet.options['debug_media'] class SilentAudioPacket(object): def __init__(self, timestamp, durati...
from typing import Union, Tuple, List, Iterator, Dict, Optional, Any import uuid import gdb from crash.util.symbols import Types from crash.exceptions import MissingTypeError, MissingSymbolError from crash.exceptions import ArgumentTypeError, NotStructOrUnionError TypeSpecifier = Union[gdb.Type, gdb.Value, str, gdb.Sym...
try: import cairocffi cairocffi.install_as_pycairo() except ImportError: pass import cairo import math import pkgutil import midi import svgutil def getInstruments(): instruments = {} for importer, modname, ispkg in pkgutil.iter_modules(__path__, 'instruments.'): module = __import__(modname,...
{ 'name': 'RMA Claim (Product Return Management)', 'version': '1.1', 'category': 'Generic Modules/CRM & SRM', 'description': """ Management of Return Merchandise Authorization (RMA) ==================================================== This module aims to improve the Claims by adding a way to manage the ...
from datetime import date from django.utils import timezone from edc_appointment.models import Appointment from edc_constants.constants import YES, NO, NEG, SCHEDULED, NOT_APPLICABLE from microbiome.apps.mb_maternal.tests.factories import ( MaternalEligibilityFactory, MaternalVisitFactory) from microbiome.apps.mb_m...
import os import sys import time import syck import numpy.numarray as na from pylab import * from matplotlib.backends.backend_agg import FigureCanvasAgg import paths import colors import math font = { 'fontsize' : 21, "color" : "black", } def readData(files): global inputData global dataOrder def...
""" p=[0.2,0.2,0.2,0.2,0.2] pHit = 0.6 pMiss = 0.2 print p """ p=[0.2,0.2,0.2,0.2,0.2] pHit = 0.6 pMiss = 0.2 for each in range(0,5): if each == 0 or each == 3 or each == 4: p[each] = p[each]*pMiss else: p[each] = p[each]*pHit print p