src
stringlengths
721
1.04M
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# pygame example: github.com/pddring/pygame-examples """ This example shows you how to experiment with different colours in pygame. It will fill the whole pygame window in different colours Here are some things to try to adapt the code: TODO: Make the screen appear black TODO: Make the screen appear blue TODO: Make ...
# -*- encoding: utf-8 -*- from abjad.tools import durationtools from abjad.tools.scoretools.Container import Container class FixedDurationContainer(Container): r'''A fixed-duration container. :: >>> container = scoretools.FixedDurationContainer( ... (3, 8), "c'8 d'8 e'8") >>> sho...
""" Combine .csv files into a single .csv file with all fields 2013-Nov-25 by Robert Woodhead, trebor@animeigo.com 2016-Apr by merrikat Usage: python combine-csv.py {csv folder} {output file} [{optional count field name}] Where: {csv folder} is a folder containing .csv files. {output file} is the destination fi...
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # seriesly - XBMC Plugin # Conector para ovfile # http://blog.tvalacarta.info/plugin-xbmc/seriesly/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import scra...
import numpy as np import random import cPickle as pkl from collections import OrderedDict class Batch(): def __init__(self, lhs, rel, rhs, batch_size=128): self.lhs = lhs self.rel = rel self.rhs = rhs self.batch_size = batch_size self.prepare() self.reset() d...
import json from coalib.bearlib.abstractions.Linter import linter from dependency_management.requirements.NpmRequirement import NpmRequirement from coalib.results.Diff import Diff from coalib.results.RESULT_SEVERITY import RESULT_SEVERITY from coalib.results.Result import Result @linter(executable='eslint', ...
import tensorflow as tf import numpy as np from tfs.core.layer import ops as ops from tfs.core.layer.base import Layer import tfs.core.initializer.init_func as init from tfs.core.util import get_arg_dict class FullyConnect(Layer): def __init__(self, net, outdim, activati...
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017-2018 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in ...
'''Copyright(C): Leaf Johnson 2011 This file is part of makeclub. makeclub 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. makeclub ...
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys,hashlib,os #add isDEV=0 def getDefaultVal(flg): dict={} if str(flg)=="1": dict['house_flag']=1 dict['borough_name']="" dict['house_addr']="" dict['house_title']="" dict['house_city']="" dict['house_region']=""...
import lldb from intelpt_testcase import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil from lldbsuite.test.decorators import * class TestTraceStartStop(TraceIntelPTTestCaseBase): mydir = TestBase.compute_mydir(__file__) def expectGenericHelpMessageForStartCommand(self): ...
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware 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 ...
#!/usr/bin/env python3 # # The test program for the MFU Python library. # # Copyright (c) 2015, Alexandre Hamelin <alexandre.hamelin gmail.com> # # This work is distributed under the LGPL license. See LICENSE.txt for details. import sys import unittest from unittest.mock import Mock, call, patch, ANY from ultraligh...
# -*- coding: utf-8 -*- # File: sessinit.py import os import numpy as np import tensorflow as tf import six from ..utils import logger from ..utils.develop import deprecated from .common import get_op_tensor_name from .varmanip import (SessionUpdate, get_savename_from_varname, is_training_name...
# iban.py - functions for handling Spanish IBANs # coding: utf-8 # # Copyright (C) 2016 Arthur de Jong # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the Licens...
#!/usr/bin/env python3 import http.client import re import sys import time def main(): # print info about me :) print("Andrew Downing") print("website: http://andrewd.50webs.com") print("github: ad510") print() # find twitter usernames twitterUsers = set(findbetween(gethttp("twitter.com", ...
""" Main interface loop for arm, periodically redrawing the screen and issuing user input to the proper panels. """ import os import time import curses import threading import arm.arguments import arm.menu.menu import arm.popups import arm.headerPanel import arm.logPanel import arm.configPanel import arm.torrcPanel i...
#!/usr/bin/env python # encoding: utf-8 name = "intra_substitutionS_isomerization/groups" shortDesc = u"" longDesc = u""" """ template(reactants=["XSYJ"], products=["XSYJ"], ownReverse=True) recipe(actions=[ ['BREAK_BOND', '*1', 1, '*2'], ['FORM_BOND', '*1', 1, '*3'], ['GAIN_RADICAL', '*2', '1'], ['...
#!/usr/bin/python # Claatu::trav_tree -first iteration of Claatu #Copyright (C) 2015 Christopher A. Gaulke #author contact: gaulkec@science.oregonstate.edu # #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...
# Copyright (c) 2009, Jurie-Jan Botha # # This file is part of the 'jquery' Django application. # # 'jquery' 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 optio...
<<<<<<< HEAD <<<<<<< HEAD # Minimal tests for dis module from test.support import run_unittest, captured_stdout from test.bytecode_helper import BytecodeTestCase import difflib import unittest import sys import dis import io import re import types import contextlib def get_tb(): def _error(): try: ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Nicolas Bessi # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # publi...
# # # This file is part of msprime. # # msprime 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. # # msprime is distributed in the hope ...
#!/usr/bin/env python # # Copyright 2007 Google 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 law o...
""" Django settings for samldemo project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) i...
"""This module conatins methods for creating and manipulating cortical images that are generated from SCO model run predictions and functional data. csv img.identifier, Func/Pred, V1-3, Filename """ import os import shutil import tempfile import tarfile import sco import pimms import pint import nibabel as nib impor...
#!/usr/bin/env python3 import pge, sys, time from pygame.locals import * print("starting matchsticks") # pge.batch () pge.interactive () pge.record () t = pge.rgb (1.0/2.0, 2.0/3.0, 3.0/4.0) wood_light = pge.rgb (166.0/256.0, 124.0/256.0, 54.0/256.0) wood_dark = pge.rgb (76.0/256.0, 47.0/256.0, 0.0) red = pge.rgb (...
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "...
# -*- coding: utf-8 -*- ''' Common cache method for python. Check usage on Example. ''' class DontCache(Exception): pass def cache(compute_key, container_factory): marker = object() def decorator(func): def replacement(*args, **kwargs): cache = container_factory() if c...
# 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the L...
from eden.model import _CrontabPattern, _ParsedSpec, Task, User from datetime import datetime, timedelta import unittest class TaskTest(unittest.TestCase): def test_new(self): task = Task(1, 'task_id', 'name', 'job.test', {'args':(), 'kw':{}}, 'every 5') self.assertEquals((task.name, task.event)...
# Copyright 2015 HuaWei Technologies. # # 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 ...
#!/usr/bin/env python """ Update the README.md file with the authors from the git log """ import re import subprocess AUTHORS = "README.md" IGNORE = [ "nick@raig-wood.com" ] def load(): """ returns a set of emails already in authors """ with open(AUTHORS) as fd: authors = fd.read() emails...
import cybox.objects, importlib, os, hashlib from cybox.common import Hash, String, Time, ToolInformation, ToolInformationList, ObjectProperties, DateTime, StructuredText, AnyURI, PositiveInteger import cybox.utils # Import all cybox object classes cybox_objects = [fname[:-3] for fname in os.listdir(cybox.objects.__pa...
"""Process weekly activities for extensions.""" # pylint: disable=C0301,C0103,W1201 from apiary.tasks import BaseApiaryTask import logging import datetime LOGGER = logging.getLogger() class ExtensionWeekly(BaseApiaryTask): """Kick off weekly tasks for extensions.""" def run(self, curr_day = None, curr_hour...
# -*- coding: utf-8 -*- from freezegun import freeze_time from odoo.addons.account_edi.tests.common import AccountEdiTestCommon from odoo.tests import tagged @tagged('post_install', '-at_install') class TestAccountEdiFacturx(AccountEdiTestCommon): @classmethod def setUpClass(cls, chart_template_ref=None, edi...
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + #pylint: disable=invalid-name from __future_...
# Copyright (c) 2010 Arthur Mesh # 2010 Christopher Nelson # # 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 us...
######## # Copyright (c) 2014 GigaSpaces Technologies Ltd. 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 # encoding: utf-8 # Copyright 2012 Aaron Morton # # 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 ...
# For xml parsing try: from etree.ElementTree import ElementTree except ImportError: from xml.etree.ElementTree import ElementTree # For date parsing from datetime import datetime import time # Model classes from model import Bounds,Point,Track #i18n from flask_babel import gettext # gpx creator="KeyMaze 5...
"""Implementation of Dynamo Second iteration, adding detection of missing responses and expansion of the preference list.""" import copy import random import logging import logconfig from node import Node from framework import Framework from hash_multiple import ConsistentHashTable from dynamomessages import ClientPu...
from pyCovertAudio_lib import * from BaseModulator import BaseModulator from SignalFunctions import SignalFunctions class BFSKModulator(BaseModulator): def __init__( self, bitsPerSymbol, sampleRate, samplesPerSymbol, symbolExpansionFactor, separationIntervals, configuration ): ...
## # Copyright 2013-2018 Ghent University # # This file is triple-licensed under GPLv2 (see below), MIT, and # BSD three-clause licenses. # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the...
# 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 2013 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
from ems.typehint import accepts from ems.qt.event_hook_proxy import SignalEventHookProxy from ems.qt import QtWidgets, QtGui, QtCore, QtPrintSupport from ems.qt.graphics.graphics_scene import GraphicsScene, BackgroundCorrector from ems.qt.graphics.graphics_widget import GraphicsWidget from ems.qt.graphics.storage.int...
"""Tests for maintenance.py""" import unittest import random import time import datetime from string import ascii_letters import webtest from google.appengine.ext import testbed from google.appengine.ext import ndb import maintenance import models def random_string(length=10, chars=ascii_letters + ' '): """Gene...
#!/usr/bin/env python # -*- coding:utf-8 -*- import pexpect #import sys # for logfile configure_lxr_responses = { r'single/multiple trees.*>.* ':'m\n', r'Tree designation.*>.* ':'embedded\n', r'--- Host name or IP.*>.* ':'http://192.168.170.64\n', r'Database engine.*>.* ':'sqlite\n', r'--- Direct...
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
# coding=utf-8 # Copyright 2021 The Google Research Authors. # # 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 applicab...
# -*- coding: utf8 -*- # # Copyright (C) 2021 NDP Systèmes (<http://www.ndp-systemes.fr>). # # 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,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Match', fields=[ ...
import nltk import os from nltk.corpus.util import LazyCorpusLoader from nltk.corpus.europarl_raw import german, english from nltk.corpus.reader import AlignedCorpusReader from nltk.translate import AlignedSent, Alignment from nltk.corpus.reader.plaintext import PlaintextCorpusReader def align(filename): files = fi...
"""Collection of global methods for fuzz testing.""" __author__ = 'Tomas Fiedor, Matus Liscinsky' import copy import difflib import itertools import os import os.path as path import signal import sys import time import threading from subprocess import CalledProcessError, TimeoutExpired from uuid import uuid4 import n...
# -*- coding: UTF-8 -*- # Copyright 2012 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """ Fills the cbss.Purposes table with the official values defined in `lijst_hoedanigheidscodes.pdf <http://www.bcss.fgov.be/binaries/documentation/fr/documentation/general/lijst_hoedanigheidscodes.pdf>`__. """ fro...
""" This module provides convenient functions to transform sympy expressions to lambda functions which can be used to calculate numerical values very fast. """ from __future__ import print_function, division from sympy.external import import_module from sympy.core.compatibility import exec_, is_sequence, iterable, st...
class ErrorBase(Exception): def oainame(self): name = self.__class__.__name__ # strip off 'Error' part name = name[:-5] # lowercase error name name = name[0].lower() + name[1:] return name class BadArgumentError(ErrorBase): pass class BadVerbError(ErrorBase): ...
# -*- coding: utf-8 -*- """Information. + Module versions. + Help descriptions. + Check for update function. """ __author__ = "Yuan Chang" __copyright__ = "Copyright (C) 2016-2021" __license__ = "AGPL" __email__ = "pyslvs@gmail.com" from typing import Optional from importlib.util import find_spec from enum import a...
from collections import OrderedDict import debug import logsupport from screens import screen import screens.__screens as screens from keyspecs import toucharea from utils import utilities, fonts, hw from stores import valuestore from utils.utilfuncs import wc, fmt from utils.weatherfromatting import CreateWeathBlock ...
# Copyright (c) 2016 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi, Sophie Jazwiecki import colander import json import urllib import transaction from persistent.list import PersistentList from pyramid.view import view_config from pyra...
#!/usr/bin/env python from setuptools import setup, Command try: # Python 3.x from distutils.command.build_py import build_py_2to3 as build_py except ImportError: # Python 2.x from distutils.command.build_py import build_py class DendroTest(Command): user_options = [] def initialize_options(self...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Modbus TestKit: Implementation of Modbus protocol in python (C)2009 - Luc Jean - luc.jean@gmail.com (C)2009 - Apidev - http://www.apidev.fr This is distributed under GNU LGPL license, see license.txt """ import threading import logging import socket import select...
#!/usr/bin/python3 import sys import os import smtplib import email import markdown import yaml import jinja2 from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from serverboards_aio import print import serverboards_aio as serverboards email_utils = email.utils settings = {} @serverb...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # aiopening documentation build configuration file, created by # sphinx-quickstart on Sun Jun 4 11:36:56 2017. # # 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 # ...
from setuptools import setup import os import sys from distutils.core import Extension version = '0.12.2' extLevensthein = Extension('Levenshtein._levenshtein', sources = ['Levenshtein/_levenshtein.c'], ) if sys.version_info >= (3, 0): _open = lambda f: open...
import numpy from chainer import cuda from chainer import optimizer _default_hyperparam = optimizer.Hyperparameter() _default_hyperparam.lr = 0.01 _default_hyperparam.stack_size = 100 _default_hyperparam.min_ro = 1e-5 class LBFGSRule(optimizer.UpdateRule): """Update rule of L-BFGS. """ ...
# (c) 2016 Open Source Geospatial Foundation - all rights reserved # (c) 2014 - 2015 Centre for Maritime Research and Experimentation (CMRE) # (c) 2013 - 2014 German Aerospace Center (DLR) # This code is licensed under the GPL 2.0 license, available at the root # application directory. import socket import logging imp...
"""Classes for resolving dependencies as specified in each ecosystem.""" import anymarkup from bs4 import BeautifulSoup from collections import defaultdict from functools import cmp_to_key import logging from lxml import etree from operator import itemgetter from pip._internal.req.req_file import parse_requirements fr...
# Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Use this to run several variants of the tests. ALL_VARIANT_FLAGS = { "assert_types": [["--assert-types"]], "code_serializer": [["--cache=code"]], "...
#! /usr/bin/python import pandas as pd import numpy as np import matplotlib.pyplot as plt sber_df = pd.read_csv("../../import/candle/sber_2006_2015_candles.txt") def compute_wnd0(m): wnd = np.zeros(m) k = 0 for i in range((1 - m)/2, (m - 1)/2 + 1): wnd[k] = ((3.0*m*m - 7.0 - 20.0*i*i)/4.0)/(m*(m...
############################################################################### # # Copyright 2009-2011, Universitat Pompeu Fabra # # This file is part of Wok. # # Wok 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...
from __future__ import absolute_import, division from django.conf import settings from django.core import urlresolvers from django.db import connection from django.db.models import Sum from django.db.models.query import QuerySet from django.http import HttpResponseNotFound, HttpRequest, HttpResponse from django.templa...
# !/usr/bin/env python # -*- coding: utf-8 -*- """ Defines the unit tests for the :mod:`colour_demosaicing.bayer.mosaicing` module. """ import numpy as np import os import unittest from colour import read_image from colour_demosaicing import TESTS_RESOURCES_DIRECTORY from colour_demosaicing.bayer import mosaicing_CF...
#!/usr/bin/env """ Read in two extracted light curves (interest band and reference band), split into segments, compute the power spectra per band and cross spectrum of each segment, averages cross spectrum of all the segments, and computes frequency lags between the two bands. Example call: python simple_cross_spectra...
# The MIT License (MIT) # Copyright (c) 2015 haidlir # 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, mer...
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
# -*- coding: utf-8 -*- """ /*************************************************************************** QuickOSM A QGIS plugin OSM Overpass API frontend ------------------- begin : 2014-06-11 copyright : (C) 2014 by 3Liz email ...
from flask import Flask from flask import render_template from time import time from datetime import datetime, timedelta import calendar import locale import numpy as np import os import sqlite3 import locale for loc in ['no_NO', 'nb_NO.utf8']: try: locale.setlocale(locale.LC_ALL, loc) except locale....
# encoding: utf-8 """Shared oxml objects for charts.""" from __future__ import absolute_import, division, print_function, unicode_literals from pptx.oxml import parse_xml from pptx.oxml.ns import nsdecls from pptx.oxml.simpletypes import ( ST_LayoutMode, XsdBoolean, XsdDouble, XsdString, XsdUnsig...
from __future__ import print_function import dbus.glib import gobject import logging import sys from time import sleep from account import connection_from_file from telepathy.client.channel import Channel from telepathy.constants import ( CONNECTION_HANDLE_TYPE_NONE as HANDLE_TYPE_NONE, CONNECTION_HANDLE_TYP...
#!/usr/bin/python3.4 # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # 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 app...
#!/usr/bin/python # -*- coding: utf-8 -*- import random import copy from agentspeak import * class Agent: def __init__(self, name, belief_base, initial_goals, plan_library): self.name = name self.__belief_base = belief_base # Conjunto de planos P self.__plan_library = plan_li...
import tkinter as tk class OptionsFrame(tk.LabelFrame): COLUMNS = 3 def __init__(self, parent, settings, **options): super().__init__(parent, **options) self.config(text='Export Options', padx=5, pady=5) self.parent = parent # Add widget...
# Copyright (C) 2008 Valmantas Paliksa <walmis at balticum-tv dot lt> # Copyright (C) 2008 Tadas Dailyda <tadas at dailyda dot com> # # Licensed under the GNU General Public License Version 3 # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
try: import gntp.notifier except ImportError: pass class GrowlNotifier(): growl = None @staticmethod def register(): if GrowlNotifier.growl is None: GrowlNotifier.growl = gntp.notifier.GrowlNotifier( applicationName='Terminal Notification', noti...
from typing import Any, Callable from rx.core import Observable from rx.internal.exceptions import ArgumentOutOfRangeException def _element_at_or_default(index, has_default=False, default_value=None): if index < 0: raise ArgumentOutOfRangeException() def element_at_or_default(source: Observable) -> O...
# vi: set encoding=utf-8 # Licensed to CRATE Technology GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License");...
# coding: utf-8 """ Environmental Exposures API Environmental Exposures API OpenAPI spec version: 1.0.0 Contact: stealey@renci.org Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file ex...
#!/usr/bin/env python """ Copyright (c) 2015, Ming Wen This program saves size of images into a json file. Usage: ./gen_misc.py (IMAGE_FILE | IMAGE_DIR) [train|validate|test] [JSON_FILE] The program reads one image file "IMAGE_FILE", or reads some image files from "IMAGE_DIR". Then it generates a json format str...
# EAPI call program using urllib2 and json import urllib2 #import random import json # eAPI JSON template enableCmd = {"input" : "test", "cmd" : "enable"} jsonCmd = {"params" : {"format" : "json", "version" : 1, "cmds" : "command"}, "jsonrpc" : "2.0", "method" : "runCmds", "id" : 0} # Create json based on enable_pa...
goicon=[ "32 32 5 1", ". c None", "b c #008000", "a c #00c000", "# c #00ff00", "c c #ffffc0", "................................", "................................", "................................", "................................", "................................", "..........#.....................", "............
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
# Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import path here = path.abspath(path.dirname(__file__)) # Get the long description from the README file with open(path.join(here, 'README.md'), encoding='utf-8') as f: ...
import argparse from multiprocessing import cpu_count import os from pathlib import Path import pytest import tarfile from typing import List from unittest.mock import patch from gdc_client.common.config import GDCClientArgumentParser from gdc_client.parcel.const import HTTP_CHUNK_SIZE, SAVE_INTERVAL from gdc_client.p...
# -*- 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. # # This program is distributed in the hope tha...
# Copyright (c) The University of Edinburgh 2014 # # 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 agr...
import os, traceback, textwrap, shutil from settings import APP_PATH from dropbox.rest import ErrorResponse from repo.dropbox.wrapper import DropboxWrapper from cStringIO import StringIO from crypto.file import FileMeta from crypto.exceptions import AuthenticationException __author__ = 'pezza' class ActionFailedE...
# -*- coding: utf-8 -*- from copy import deepcopy import os from django.apps import apps from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template import base from django.test import SimpleTestCase, TestCase from cms.api import add_plugin from cms.models.pluginmodel...