src
stringlengths
721
1.04M
# Copyright (C) 2012, One Laptop Per Child # # 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 distrib...
<<<<<<< HEAD <<<<<<< HEAD # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """GYP backend that generates Eclipse CDT settings files. This backend DOES NOT generate Eclipse CDT projects. Instead, it generates XML...
# -*- coding: utf-8 -*- from django.urls import path from django.conf.urls import include, url from django.contrib import admin from django.conf import settings from simple_sso.sso_client.client import Client from djradicale.views import DjRadicaleView, WellKnownView admin.autodiscover() handler500 = 'yats.errors.ser...
import signal signal.signal(signal.SIGINT, signal.SIG_IGN) import socket import os import sys import curses import traceback import atexit import time from os import walk class cmenu(object): datum = {} ordered = [] pos = 0 def __init__(self, options, title="FTP MENU"): curses.initscr() ...
"""Django page CMS ``models``.""" from .utils import get_placeholders, normalize_url, now_utc from .managers import PageManager, ContentManager from .managers import PageAliasManager, ISODATE_FORMAT from . import settings from django.db import models from django.db.models import Max from django.utils.translation imp...
from flask import Flask, flash, redirect, render_template, request, session, abort import random,os,ast,prettytable from flask_app import forms import AATC_Server_002 as AATC_Server import HedaBot COMMANDS = HedaBot.CreateCommandDictionary() COMMANDS["AddFlight"][2]["Type"] = lambda x: HedaBot.SplitWaypoints(x,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Bachata documentation build configuration file, created by # sphinx-quickstart on Wed Oct 7 22:16:05 2015. # # 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 # au...
import os import argparse from PIL import Image def is_image(file_name): if ".png" in file_name or ".jpg" in file_name: return True else: return False def resize_image(input_path, output_path, wd=0, ht=0): img = Image.open(input_path) # Resize the image sz = img.size if wd == 0...
# Author: Hubert Kario, (c) 2016 # Released under Gnu GPL v2.0, see LICENSE file for details """Check for CVE-2016-2107""" from __future__ import print_function import traceback import sys import getopt import re from itertools import chain from random import sample from tlsfuzzer.runner import Runner from tlsfuzzer.m...
#!/usr/bin/env pythonw # -*- coding: UTF-8 -*- # # untitled # # Created by Giovanni Porcari on 2007-03-24. # Copyright (c) 2007 Softwell. All rights reserved. # """ GnrDojo Grid Test""" from gnr.core.gnrbag import Bag class GnrCustomWebPage(object): def main(self, root, **kwargs): bc = root.borderCont...
""" Provides helpers for frequently used docker image/repository operations. This module defines several independent interfaces using an abstract-base-class pattern. They are extended through a few subclasses to meet basic needs. There is an assumption that the full 64-character long IDs are safer to use than the sh...
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
#!/usr/bin/env python import unittest from logging import * from framework import VppTestCase, VppTestRunner from vpp_sub_interface import VppDot1QSubint from vpp_gre_interface import VppGreInterface from vpp_ip_route import IpRoute, RoutePath from vpp_papi_provider import L2_VTR_OP from scapy.packet import Raw from...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # commandUI.py # # Copyright 2010-2015 Jose Riguera Lopez <jriguera@gmail.com> # # 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 # ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import androidhelper import requests import json import telebot import telebot.util as util import sys import time import os bot = telebot.TeleBot(my_token) class MachineStatus: def __init__(self): self.phone = androidhelper.Android() self.phone.batter...
import ntlm_auth.compute_hash as compute_hash class TestComputeHash(object): def test_lmowfv1(self): # 4.2.2.1.1 - LMOWFv1() expected = b"\xe5\x2c\xac\x67\x41\x9a\x9a\x22" \ b"\x4a\x3b\x10\x8f\x3f\xa6\xcb\x6d" actual = compute_hash._lmowfv1("Password") assert ac...
import pytest from flask.wrappers import Request from flask.wrappers import Response from werkzeug.routing import Map from werkzeug.routing import Rule from werkzeug.routing import Subdomain from werkzeug.test import create_environ @pytest.fixture def environ_factory(): return create_environ @pytest.fixture def...
from pkg_resources import get_distribution from subprocess import check_output import requests import json repos = 'rwgdrummer/maskgen' giturl = 'https://api.github.com/repos' def get_commit(): url = giturl + '/' + repos + '/pulls?state=closed' resp = requests.get(url) if resp.status_code == requests.code...
from __future__ import unicode_literals from __future__ import absolute_import import os import shutil import logging def path(name=""): """ Retrieve the relative filepath to a supplied name """ if name.startswith(os.path.sep): return name actual = os.path.dirname(os.path.abspath(__file...
# Copyright (C) 2012 Johnny Vestergaard <jkv@unixcluster.dk> # # 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 ...
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import re PHYSICAL_SIDES = ["top", "left", "bottom", "right"] LOGICAL_SIDES = ["block-start", "block-end", "inline-star...
# Opus/UrbanSim urban simulation software. # Copyright (C) 2010-2011 University of California, Berkeley, 2005-2009 University of Washington # See opus_core/LICENSE import os from opus_core.logger import logger from opus_core.store.attribute_cache import AttributeCache from opus_core.simulation_state import Simulatio...
#!/usr/bin/env python #Coding: UTF-8 from StringIO import StringIO import hmac from hashlib import sha1 import base64 from lxml import etree as ET import uuid def c14n(xml, exclusive=True): io_msg = StringIO(xml) et = ET.parse(io_msg) io_output = StringIO() et.write_c14n(io_output, exclusive=exclusive...
import unittest from rominet.motor import Motor class TestMotor(unittest.TestCase): def test_get_speed_command(self): m = Motor() model = MotorModel() m.set_speed(1) measured_speed = 0 for i in range(1, 100): cmd = m.get_speed_command(measured_speed, i) ...
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistribution and use in ...
""" Copyright 2016, Michael DeHaan <michael.dehaan@gmail.com> 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...
#!/usr/bin/python """Raspberry Pi Face Recognition Security gate access Face Detection Helper Functions Copyright 2014 Amine KARROUT Take photos for training the face recognizer. """ import glob import os import sys import select import cv2 import config import face # Prefix for positive training image filenames...
############################################################################### # Copyright 2011-2014 The University of Texas at Austin # # # # Licensed under the Apache License, Version 2.0 (the "License"); #...
""" Created on Thu Mar 24 08:18:04 2016 @author: npop The window selector calculates which global windows to use Calculates overlapping windows between given sites This removes the burden on the upcoming processor Upcoming processor can then simply get the data for the windows And process them """ import os from datet...
#!/usr/bin/python # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # Originally written by Mario and Luigi at Google. """A code generator for TPM utility functions. The generator inputs the Trouse...
# # General-purpose Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall # model for 1st, 2nd and 3rd generation solar cells. # Copyright (C) 2012-2017 Roderick C. I. MacKenzie r.c.i.mackenzie at googlemail.com # # https://www.gpvdm.com # Room B86 Coates, University Park, Nottingham, NG7 2RD...
from snippets.models import Snippet, Tag from snippets.serializers import SnippetSerializer, TagSerializer from rest_framework import generics from django.contrib.auth.models import User from snippets.serializers import UserSerializer from rest_framework import permissions from snippets.permissions import IsOwnerOrRead...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
# Copyright 2015 Google Inc. All Rights Reserved. # # 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 ...
from uuid import uuid4 import httpretty from django.test import RequestFactory from oscar.core.loading import get_model from ecommerce.coupons.tests.mixins import CouponMixin from ecommerce.courses.tests.factories import CourseFactory from ecommerce.extensions.catalogue.tests.mixins import DiscoveryTestMixin from e...
import cv2 import glob import pickle import numpy as np import matplotlib.pyplot as plt import matplotlib.image as mpimg from sklearn.metrics import mean_squared_error x_cor = 9 #Number of corners to find y_cor = 6 # Prepare object points, like (0,0,0), (1,0,0), (2,0,0) ....,(6,5,0) objp = np.zeros((y_cor*x_cor,3), np...
# Copyright 2012 David Fendrich # Copyright 2017 Oscar Najera # This file is part of Selfspy # Selfspy 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) a...
#!/home/software/SACLA_tool/bin/python2.7 import numpy as np import h5py import matplotlib import matplotlib.pyplot as plt import argparse import time import sys from argparse import ArgumentParser # -- parse parser = ArgumentParser() parser.add_argument("-r", "--run", type=int, dest="run", required=True, help="fir...
# Development tool - runqemu command plugin # # Copyright (C) 2015 Intel Corporation # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that ...
# -*- coding: utf-8 -*- # # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2007 Donald N. Allingham # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2010 Jakim Friant # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General...
#!/usr/bin/env python # -*- encoding: utf-8 -*- ############################################################################### # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
#!/usr/bin/env python # Copyright 2015-16 Bryce Schroeder, www.bryce.pw, bryce.schroeder@gmail.com # Wiki: http://www.ferazelhosting.net/wiki/delv # # 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...
""" QUESTION: Given an integer array nums, find the sum of the elements between indices i and j (i < j), inclusive. Example: Given nums = [-2, 0, 3, -5, 2, -1] sumRange(0, 2) -> 1 sumRange(2, 5) -> -1 sumRange(0, 5) -> -3 Note: You may assume that the array does not change. There are many calls to sumRange function. ...
import subprocess import os import pexpect def create_sub_folder(sub_folder, ftp_login, ftp_password, name_for_site_folder): '''create site_folder and subfolders''' path_to_backup_file = "/home/%s/%s/%s" % (ftp_login, name_for_site_folder, sub_folder) if not os.path.exists(path_to_backup_file): #...
import pandas as pd from systems.accounts.pandl_calculators.pandl_calculation import pandlCalculation, apply_weighting curve_types = ['gross', 'net', 'costs'] GROSS_CURVE = 'gross' NET_CURVE = 'net' COSTS_CURVE = 'costs' class pandlCalculationWithGenericCosts(pandlCalculation): def weight(self, weight: pd.Seri...
import yaml import os.path import libs.common_tools as U import libs.adb_tools as AT __uuid = [] for device in U.bash('adb devices').stdout.readlines(): str_device = device.decode('utf-8') if 'device' in str_device and 'devices' not in str_device: # print(str_device.split('\t')[0]) __uuid.appen...
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys # ...
# copyright 2016 twitter. all rights reserved. # # 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 agree...
"""Functions for dealing with remote posts.""" from author.models import Author from posts.models import Post, Comment from common.util import get_request_to_json, get_nodes from common.util import HINDLEBOOK, HINDLE_AUTH, BUBBLE, BUBBLE_AUTH from dateutil import parser import threading VISIBILITY = { 'PRIVATE': ...
# -*- coding: utf-8 -*- # Copyright © 2012-2015 Roberto Alsina and others. # 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 t...
#!/usr/bin/env python # Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia is free software: you can redistribute it and/or modify it under # the terms of the GNU Afextentro General Public License as published by the Free # Software Foundation (FSF...
from PyPedal import * import copy def main(): options1 = { 'pedname': 'Fake Pedigree 1', 'messages': 'verbose', 'renumber': 1, 'pedfile': 'set1.ped', 'pedformat': 'asd', 'debug_messages': True, } options2 = copy.copy(options1) options2['pedname'] = 'Fake Pedigree 2' options2['pedfile'] = 'set2.ped' ...
import cv2 import numpy as np from screen_finder.screen_finder import ScreenFinder from cam import OpenCV_Cam def draw_burning(canvas, location): cv2.circle(canvas, (lx, ly), 5, (255, 0, 0, 255)) return canvas def find_laser_loc(img, threshold): red_part = img[:,:,2] max_pos = red_part.arg...
# Copyright (C) 2012 VT SuperDARN Lab # Full license can be found in LICENSE.txt # # 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 la...
import unittest from atbash_cipher import decode, encode class AtbashCipherTest(unittest.TestCase): def test_encode_no(self): self.assertMultiLineEqual("ml", encode("no")) def test_encode_yes(self): self.assertMultiLineEqual("bvh", encode("yes")) def test_encode_OMG(self): self...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import time import json import urllib from gevent import monkey; monkey.patch_all() from urlparse import urlparse import webapp ################################################################################ # Base classes (they don't start with ...
# Copyright (c) 2013 OpenStack Foundation # All Rights Reserved. # # 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 ...
# ported from: # https://github.com/aio-libs/aiopg/blob/master/aiopg/sa/connection.py import weakref from sqlalchemy.sql import ClauseElement from sqlalchemy.sql.dml import UpdateBase from sqlalchemy.sql.ddl import DDLElement from . import exc from .result import create_result_proxy from .transaction import (RootTran...
import os import re import csv from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.http import HttpResponse from google.appengine.ext import db from google.appengine.ext.db import djangoforms from google.appengine.api import urlfetch from google.appengine.api import ...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # 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 applica...
""" Adapted from pydanny/django-cookiecutter Generated by 'django-admin startproject' using Django 1.11.2. For more information on this file, see https://docs.djangoproject.com/en/1.11/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.11/ref/settings/ """ import...
from math import sqrt from random import shuffle, randint, seed from Mazers import Depth_First from pygame.locals import * from time import time import sys import pygame import Main class Pathfinder: START_COLOR = (0, 0, 255) END_COLOR = (255, 20, 147) SEARCHED_COLOR = (255, 0, 0) PATH_COLOR = (0, 255...
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
""" Support for KNX components. For more details about this component, please refer to the documentation at https://home-assistant.io/components/knx/ """ import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import ( EVENT_HOMEASSISTANT_STOP, CONF_H...
from asyncpgsa import compile_query from asyncpg import protocol from asyncpg.pool import Pool from .mockconnection import MockConnection from .mocktransactionmanager import MockTransactionManager class MockSAPool(Pool): def __init__(self, connection=None): super().__init__(min_size=1, ...
""" This view is a port of the views.py file (using Piston) to DRF. It is a work in progress that is supposed to replace the views.py completely. """ import urllib from datetime import date, timedelta from django.conf import settings from django.core.urlresolvers import reverse from django.http import Http404 import ...
# The contents of this file are subject to the Common Public Attribution # License Version 1.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://code.reddit.com/LICENSE. The License is based on the Mozilla Public # License Version 1.1,...
# -*- coding: utf-8 -*- from . import cached_property import math, itertools from ..web.reverse import URL def full_page_range(pages_count, page): return range(1, pages_count+1) class FancyPageRange(object): '''Insures there are edge pages are shown at each edge and surround pages around current page.'...
# -*- coding: utf-8 -*- # # (c) Copyright 2001-2009 Hewlett-Packard Development Company, L.P. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your opt...
# Copyright 2006 James Tauber and contributors # Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net> # Copyright (C) 2011 Vsevolod Fedorov <vsevolod.fedorov@gmail.com> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You...
"""Unittest cases for fold_axis""" import nnvm import nnvm.testing.resnet import numpy as np from nnvm import symbol as sym from nnvm.compiler import graph_util, graph_attr def test_fold_axis_conv(): # Before simplify def before(x, conv_weight, conv_bias, in_scale, out_scale, channels): x = x * sym.exp...
from monosat import * import functools import math from monosat import * import os from random import shuffle import random import random import sys import itertools filename=None if __name__ == "__main__": seed = random.randint(1,100000) if len(sys.argv)>1: filename=sys.argv[1] if len(sys.argv)>2:...
# # Test suite for the textwrap module. # # Original tests written by Greg Ward <gward@python.net>. # Converted to PyUnit by Peter Hansen <peter@engcorp.com>. # Currently maintained by Greg Ward. # # $Id: test_textwrap.py 67896 2008-12-21 17:01:26Z benjamin.peterson $ # import unittest from test import test...
# coding: utf-8 # Raytheon BBN Technologies 2016 # Contributiors: Graham Rowlands # # This file contains the node descriptions from qtpy.QtGui import * from qtpy.QtCore import * from qtpy.QtWidgets import * from .wire import * class Node(QGraphicsRectItem): """docstring for Node""" def __init__(self, name, s...
"""Support for Harmony Hub devices.""" import asyncio import json import logging import aioharmony.exceptions as aioexc from aioharmony.harmonyapi import ( ClientCallbackType, HarmonyAPI as HarmonyClient, SendCommandDevice, ) import voluptuous as vol from homeassistant.components import remote from homeas...
# encoding: utf-8 import os import sys # for file hash calculation import hashlib # datetime manipulation from datetime import datetime # exif tags from gi.repository import GObject, GExiv2 # for moving files and dirs import shutil import errno # configuration VALID_IMAGES = set(['.cr2', '.cr3', '.crw', '.dng', '...
#! /usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### ## ## ## Copyright 2010-2012, Neil Wallace <neil@openmolar.com> ## ## ...
#!/usr/bin/env python # Always prefer setuptools over distutils from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) with open(path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup(name='etcdwatch', ...
#!/usr/bin/env python """ crate_anon/preprocess/rio_pk.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify it under th...
import bradata.utils import bradata.connection import os import io from zipfile import ZipFile import pandas as pd import glob import yaml import shutil import luigi import luigi.contrib.postgres def _find_header(data_type, year, path): with open(path, 'r') as f: data = yaml.load(f) a = data[data_ty...
import sys import struct import pprint from rosetta.common import get_spec, decode, build_standard_msg_parser, pb_parser def build_msg_parsers(spec): decoders = {} endian = spec['endian'] decoders['header'] = build_standard_msg_parser(spec['header']) decoders[100] = build_standard_msg_parser(spe...
#------------------------------------------------------------------------------- # Copyright (c) 2011 Anton Golubkov. # All rights reserved. This program and the accompanying materials # are made available under the terms of the GNU Lesser Public License v2.1 # which accompanies this distribution, and is available at #...
# # # from __future__ import absolute_import, division, print_function, \ unicode_literals from shutil import rmtree from tempfile import mkdtemp class SimpleSource(object): def __init__(self, id='test'): pass class SimpleProvider(object): SUPPORTS_GEO = False SUPPORTS = set(('A',)) ...
""" zbx.io.defaults ~~~~~~~~~~~~~~~ Defines all zabbix defaults """ __all__ = ['rules', 'RuleSet'] from abc import ABCMeta from itertools import chain from six import add_metaclass @add_metaclass(ABCMeta) class RuleSet(object): def __init__(self, path, rules): self.path = path self...
#!/usr/bin/env python # web.py # bring home the bacon Copyright (C) 2012 David Ormbakken Henriksen (davidohenriksen@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, eit...
import time import rlp import trie import db import utils import processblock import transactions import logging import copy import sys from repoze.lru import lru_cache # logging.basicConfig(level=logging.DEBUG) logger = logging.getLogger() INITIAL_DIFFICULTY = 2 ** 17 GENESIS_PREVHASH = '\00' * 32 GENESIS_COINBASE =...
# coding=utf-8 import imghdr from PyQt4.QtCore import * from PyQt4.QtGui import * from app import theme_manager from app import logger from app import constant SIGNAL_FINISH = SIGNAL('downloadFinished') SIGNAL_PROGRESS = SIGNAL('progress') SIGNAL_ZOOM = SIGNAL('zoom') log = logger.getLogger(__name__) class Downloa...
# arduino.py 20/06/2015 D.J.Whale # # (c) 2015 D.J.Whale # # Read card records from an arduino card reader. #----- CONFIGURATION ----------------------------------------------------------- DEBUG = False USE_EMBEDDED_PYSERIAL = True BAUD = 115200 ENABLE_ERROR_CORRECT = False if US...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 from datetime import datetime, timedelta from distutils.version import LooseVersion import numpy as np from numpy import nan import pytest import pytz from pandas._libs.tslib import iNaT from pandas.compat import range from pandas.errors import PerformanceWarning impo...
#!/usr/bin/env python3 import argparse import somaticseq.genomicFileHandler.genomic_file_handlers as genome def run(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) # Variant Call Type, i.e., snp or indel parser.add_argument('-infile', '--input-vcf', type=str...
""" .. module:: l_release_group_url The **L Release Group Url** Model. PostgreSQL Definition --------------------- The :code:`l_release_group_url` table is defined in the MusicBrainz Server as: .. code-block:: sql CREATE TABLE l_release_group_url ( -- replicate id SERIAL, link ...
#!/usr/bin/env python #coding:utf-8 # Author: mozman # Purpose: svg util functions and classes # Created: 08.09.2010 # Copyright (C) 2010, Manfred Moitzi # License: GPLv3 """ .. autofunction:: rgb .. autofunction:: iterflatlist .. autofunction:: strlist .. autofunction:: get_unit .. autofunction:...
import os import re import sys import time import fcntl import shelve import datetime import traceback import requests from urllib3.exceptions import InsecureRequestWarning import pandaserver.userinterface.Client as Client from pandaserver.taskbuffer import EventServiceUtils from pandacommon.pandalogger.PandaLogger i...
# Copyright 2014, 2015 Rackspace US, Inc. # # 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 ...
# Copyright (c) 2012 OpenStack Foundation. # All Rights Reserved. # # 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of Mylar. # # Mylar 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 vers...
from contextlib import suppress from pydash import find from ereuse_devicehub.resources.device.domain import DeviceDomain from ereuse_devicehub.resources.event.device import DeviceEventDomain from ereuse_devicehub.scripts.updates.update import Update class SnapshotSoftware(Update): """ Changes the values of...
''' add.py Takes a list of input ingredient names. Imports each if not already present. If already present, duplicates and rotates the ingredient. Thomas Storey 2016 ''' import sys import argparse import bpy import numpy as np import os import bmesh from math import * from mathutils import * import random def getO...
# -*- coding: utf-8 -*- """ test_query ~~~~~~~~~~ Tests the query generator """ import six import pytest from datetime import datetime, timedelta import dateutil from pyinfluxql.functions import Sum, Min, Max, Count, Distinct, Percentile from pyinfluxql.query import Query, ContinuousQuery @pytest.mark.u...