text
stringlengths
12
6.59M
# Generic env wrappers, including for Atari/images # They don't come with Gym but are crucial for Atari to work # Many were adapted from OpenAI Baselines (MIT) https://github.com/openai/baselines/blob/master/baselines/common/atari_wrappers.py from collections import deque from gym import spaces from slm_lab.lib import ...
# -*- coding: UTF-8 -*- # Copyright 2009-2018 Rumma & Ko Ltd # License: BSD (see file COPYING for details) """ Defines :class:`HtmlRenderer` and :class:`TextRenderer`. """ from __future__ import print_function from __future__ import unicode_literals import logging from builtins import object # str = six.text_type fro...
version = "1.0.0dev"
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import sys import logging import os import yaml import inspect from ruleset import RuleSet from actionrule import StopProcessingException class SmartFileSorter(object): def __init__(self): self.logger = logging.getLogger('SmartFileSorter') ...
# -*- coding: UTF-8 -*- # Copyright 2011-2019 Rumma & Ko Ltd # License: BSD (see file COPYING for details) from __future__ import print_function, unicode_literals from builtins import str from collections import OrderedDict from django.conf import settings from django.db import models from lino.api import dd, rt, _...
#!/usr/bin/python import os import sys from datetime import datetime, timedelta ''' #!/usr/bin/python from Tkinter import * import tkMessageBox window = Tk() window.wm_withdraw() #message at x:200,y:200 window.geometry('1x1+200+200') # remember its .geometry('WidthxHeight(+or-)X(+or-)Y') #window.geometry('1x1+' + st...
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import keras from keras import backend from keras.utils.np_utils import to_categorical from keras.models import Sequential from keras.layers import De...
############################################################################### ## Tool name: Generate GTFS Route Shapes ## Step 1: Generate Shapes on Map ## Creator: Melinda Morang, Esri, mmorang@esri.com ## Last updated: 11 January 2018 ############################################################################...
#!/usr/bin/python #misc.py # # <<<COPYRIGHT>>> # # # # """ .. module:: misc A set of different methods across the code. TODO Really need to do some refactoring here - too many things in one place. """ import os import sys import random import time import math import hmac import hashlib...
# Copyright (C) 2009 Duncan McGreggor <duncan@canonical.com> # Licenced under the txaws licence available at /LICENSE in the txaws source. import os from txaws.credentials import AWSCredentials from txaws.ec2.client import EC2Client from txaws.service import AWSServiceEndpoint, AWSServiceRegion, EC2_ENDPOINT_US from ...
## # See the file COPYRIGHT for copyright information. # # 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...
from twisted.words.protocols import irc from txircd.modbase import Command from txircd.utils import epoch, now class TopicCommand(Command): def onUse(self, user, data): cdata = data["targetchan"] if "topic" not in data: if cdata.topic: user.sendMessage(irc.RPL_TOPIC, cdata.name, ":{}".format(cdata.topic)) ...
""" models.py App Engine NDB datastore models """ import re from google.appengine.api.datastore_errors import BadValueError from google.appengine.ext import ndb from inbox import constants def validate_email(prop, value): value = value if value else None if value is None: return value elif not...
from twisted.words.protocols import irc from txircd.modbase import Command from txircd.utils import epoch, now class TopicCommand(Command): def onUse(self, user, data): cdata = data["targetchan"] if "topic" not in data: if cdata.topic: user.sendMessage(irc.RPL_TOPIC, cdata.name, ":{}".format(cdata.topic)) ...
#!/usr/bin/env python """ Usage: get-addons [-m] path1 [path2 ...] Given a list of paths, finds and returns a list of valid addons paths. With -m flag, will return a list of modules names instead. """ from __future__ import print_function import os import sys def is_module(path): if not os.path.isdir(path): ...
import os import json import time import logging import requests try: import urllib.request as urllib2 except ImportError: import urllib2 log = logging.getLogger("travis.leader") log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' TRAVIS_BUILD_ID = 'TRAV...
# -*- coding: utf-8 -*- """ treebeard.models ---------------- Django models. :copyright: 2008 by Gustavo Picon :license: Apache License 2.0 """ import operator import numconv from django.core import serializers from django.db import models, transaction, connection from django.db.models import Q...
#!/usr/bin/env python # encoding: utf-8 # # Hanoh Haim # Cisco Systems, Inc. VERSION='0.0.1' APPNAME='cxx_test' import os; import shutil; import copy; import re import uuid import subprocess import platform from waflib import Logs # these variables are mandatory ('/' are converted automatically) top = '../' out = 'bu...
# # IAS Basic device framework. # # Author: Joeri Hermans # import sys import socket import struct import os import RPIO from time import sleep # Global members, which are required for the communication # with the remote IAS controller. gDeviceIdentifier = sys.argv[1] gControllerAddress = sys.argv[2] gControllerPort...
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2015 SciFabric LTD. # # PyBossa 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 # (at your op...
# -*- coding: utf-8 -*- # © 2016 Lorenzo Battistini - Agile Business Group # © 2016 Antonio Espinosa <antonio.espinosa@tecnativa.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import models, fields, api, _ class AccountTax(models.Model): _inherit = 'account.tax' balance = ...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2012-2013 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details import os, os.path, sys, subprocess, copy, cPickle, multiprocessing, pydot import bat.interfaces ''' This program can be used to check whe...
#!/usr/bin/env python # Copyright 2017 IBM Corp. # # 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 require...
""" WSGI config for lister project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os import sys sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "...
from fontTools.misc.py23 import bytesjoin, tobytes, tostr from fontTools.misc.fixedTools import ( fixedToFloat as fi2fl, floatToFixed as fl2fi, floatToFixedToStr as fl2str, strToFixedToFloat as str2fl, ensureVersionIsLong as fi2ve, versionToFixed as ve2fi, ) from fontTools.misc.textTools import pad, safeEval from...
import logging, threading, time from acq4.util import Qt import falconoptics from ..FilterWheel.filterwheel import FilterWheel, FilterWheelFuture, FilterWheelDevGui class FalconTurret(FilterWheel): def __init__(self, dm, config, name): self.dev = falconoptics.Falcon(config_file=config.get('configFile', No...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2009-2011 Armijn Hemel for LOCO (LOOHUIS CONSULTING) ## Licensed under Apache 2.0, see LICENSE file for details ''' This module contains helper functions to unpack archives or file systems. Most of the commands are pretty self explaining. The result of the wrappe...
#!/usr/bin/env python import ConfigParser import hashlib import json import os import re import sys import tempfile import time import urllib2 import boto.s3.connection import boto.s3.key from publicsuffixlist import PublicSuffixList from publicsuffixlist.update import updatePSL from trackingprotection_tools import ...
import socket import getpass import datetime import inspect import logging def levelAsString(level): return {logging.DEBUG: 'debug', logging.INFO: 'info', logging.WARNING: 'warning', logging.ERROR: 'error', logging.CRITICAL: 'critical', logging.FATAL: ...
import psycopg2 import datetime import network nt = network.Table(('IA_ASOS','MO_ASOS','IL_ASOS', 'ND_ASOS', 'AWOS', 'WI_ASOS','MN_ASOS', 'SD_ASOS', 'NE_ASOS', 'KS_ASOS', 'IN_ASOS','KY_ASOS','OH_ASOS','MI_ASOS', 'WFO')) AFOS = psycopg2.connect(database='afos', host='iemdb', user='nobody') acursor =...
# -*- coding-8 -*- from openpyxl import load_workbook import os def get_company_ids(xlsx_file): basename = os.path.basename(xlsx_file) str_split = basename.split('_') lang_name = str_split[0] wb = load_workbook(xlsx_file) ws = wb.get_sheet_by_name(lang_name) rows = len(list(ws.rows)) list_...
from optparse import make_option import os import shutil from django.db.models import Q from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.management.base import BaseCommand, CommandError from django.test.client import RequestFactory from django.utils import translat...
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Use genetic map to break chimeric scaffolds, order and orient scaffolds onto chromosomes. """ import sys import logging import numpy as np from itertools import combinations, product from collections import defaultdict from jcvi.algorithms.tsp import hamiltonian, I...
import gdata.youtube.service import sys import time def get_first(iterable, default=None): if iterable: for item in iterable: return item return default def getplaylist (yt_service, playlist_name): """ yt_service: YouTube service playlist: name to search Retruns the playlist object o...
#!/usr/bin/env python # # merge_authz_tests.py: merge tests that need to write an authz file # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundatio...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2009-2013 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This module contains helper functions to unpack archives or file systems. Most of the commands are pretty self explaining. The result o...
# -*- encoding: UTF-8 - import logging from optparse import make_option import os import re import sys import shutil from time import sleep from zipfile import ZipFile from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core.management.base import BaseCommand, CommandErro...
# (c) 2012-2014, Chris Meyers <chris.meyers.fsu@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...
import multiprocessing as mp from timeit import default_timer from datetime import datetime, timedelta from itertools import repeat, islice import ctypes import sys import os import traceback from textwrap import dedent from functools import partial from pathlib import Path import shutil import pandas as pd import nu...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # TODO(hinoka): Use logging. import cStringIO import codecs import copy import ctypes import json import optparse import os import ppr...
# -*- coding: utf-8 -*- """ redi.ext ~~~~~~~~ This module contains extra stuff. """ from . import config from . import models from .utils import is_collection, compress_key TYPE_MAP = { 'string': models.RedisString, 'value': models.RedisString, 'liststring': models.RedisListString, 'list-string'...
# -*- encoding: utf-8 -*- from supriya.tools.systemtools.SupriyaObject import SupriyaObject class TimespanCollection(SupriyaObject): r'''A mutable always-sorted collection of timespans. :: >>> from abjad import timespantools >>> from supriya import timetools >>> timespans = ( ...
from .labels import LabelsPlugin from electrum_ltc.plugins import hook class Plugin(LabelsPlugin): @hook def load_wallet(self, wallet, window): self.start_wallet(wallet) def on_pulled(self, wallet): self.print_error('labels pulled from server')
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2009-2015 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This module contains helper functions to unpack archives or file systems. Most of the commands are pretty self explaining. The result o...
"""Runs `linkage.link_tornadoes_to_storms`.""" import argparse from gewittergefahr.gg_io import storm_tracking_io as tracking_io from gewittergefahr.gg_utils import storm_tracking_utils as tracking_utils from gewittergefahr.gg_utils import echo_top_tracking from gewittergefahr.gg_utils import time_conversion from gewi...
# Copyright 2017 Mycroft AI 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 or agreed to in writin...
import multiprocessing as mp from timeit import default_timer from datetime import datetime, timedelta from itertools import repeat, islice from functools import partial import ctypes import sys import traceback from textwrap import dedent from pathlib import Path import shutil import pandas as pd from numpy.random i...
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # TODO(hinoka): Use logging. import cStringIO import codecs import copy import ctypes import json import optparse import os import ppr...
# -*- coding: utf-8 -*- #/*************************************************************************** # Irmt # A QGIS plugin # OpenQuake Integrated Risk Modelling Toolkit # ------------------- # begin : 2016-06-29 # copyright ...
import climate import collections import datetime import fnmatch import gzip import io import itertools import numpy as np import os import pandas as pd import re logging = climate.get_logger(__name__) class TimedMixin: '''This mixin is for handling filenames that start with timestamps. ''' FORMAT = '%Y...
from indra.statements import * import pygraphviz class GraphAssembler(): def __init__(self): self.statements = [] self.existing_nodes = [] self.existing_edges = [] self.graph = pygraphviz.AGraph(directed=True, rankdir='LR', splines='spline') ...
######### # Copyright (c) 2013 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 """ Site'N'Co ========= Simple websites for simple projects. """ import os import json import csstyle import docutils import mimetypes import xml.etree.ElementTree as ET from datetime import datetime from kalamar.access_point import NotOneMatchingItem from werkzeug.exceptions import NotFound f...
#!/usr/bin/python ## Binary Analysis Tool ## Copyright 2009-2016 Armijn Hemel for Tjaldur Software Governance Solutions ## Licensed under Apache 2.0, see LICENSE file for details ''' This module contains helper functions to unpack archives or file systems. Most of the commands are pretty self explaining. The result o...
"""Runs Monte Carlo significance test for saliency maps.""" import argparse import numpy from gewittergefahr.gg_utils import prob_matched_means as pmm from gewittergefahr.deep_learning import saliency_maps SEPARATOR_STRING = '\n\n' + '*' * 50 + '\n\n' BASELINE_FILE_ARG_NAME = 'baseline_saliency_file_name' TRIAL_FILE...
import logging import sys import unittest import urllib from time import sleep from urllib3 import encode_multipart_formdata, HTTPConnectionPool from urllib3.exceptions import TimeoutError, EmptyPoolError, MaxRetryError HOST = "localhost" PORT = 8081 log = logging.getLogger('urllib3.connectionpool') log.setLeve...
#!/usr/bin/python3 # regSplit.py - import re, os def Split(media_item): # Test if the parameter is a valid file if not os.path.isfile(media_item): raise Exception('Not a file.') # Make TV regex, 2 groups [all chars before Season/Ep] and [Season/Ep] tv_regex = re.compile(r'(.*)([Ss]\d\d[Ee]\d\...
# -*- coding: utf-8 -*- # /*************************************************************************** # Irmt # A QGIS plugin # OpenQuake Integrated Risk Modelling Toolkit # ------------------- # begin : 2014-10-24 # copyright ...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str import os import unittest from datetime import datetime from indra.statements import * from indra.sources.hume.api import * # Path to the HUME test files path_this = os.path.dirname(os.path.abspath(__file__)) test...
#### Regulation D INCLUDE_DEFINITIONS_IN_PART_1004 = [ ('Alternative mortgage transaction', 'Alternative mortgage transaction'), ('Creditor', 'Creditor'), ('State', 'State'), ('State law', 'State law'), ] PARAGRAPH_HIERARCHY_1004 = { '1004.2': [ 1, 1, 2, 2, 2, 1, ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
import inspect from .base import BaseBackend, CacheBackend, StorageBackend from .exceptions import InvalidBackend from ..conf import settings from ..utils.imports import import_class from ..utils.uri import URI BACKENDS = { 'locmem': 'locmem', 'sqlite': 'sqlite' } def get_backend(backend): config = {} ...
# -*- coding: utf-8 -*- # /*************************************************************************** # Irmt # A QGIS plugin # OpenQuake Integrated Risk Modelling Toolkit # ------------------- # begin : 2014-10-24 # copyright ...
import re import warnings import pickle import xml.etree.ElementTree as ET from indra.statements import * import indra.databases.hgnc_client as hgnc_client import indra.databases.uniprot_client as up_client residue_names = { 'S': 'Serine', 'T': 'Threonine', 'Y': 'Tyrosine', 'SER': 'Serine', 'THR...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014 Smile (<http://www.smile.fr>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
# Module: http # Date: 13th September 2007 # Author: James Mills, prologic at shortcircuit dot net dot au """Hyper Text Transfer Protocol This module implements the Hyper Text Transfer Protocol or commonly known as HTTP. """ from urllib import unquote from urlparse import urlparse from cStringIO import Strin...
#!/usr/bin/env python3 # Copyright 2016-2017 The Meson development team # 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 ...
import discord from discord.ext import commands from random import randint from random import choice as randchoice import datetime import time import os import asyncio from copy import deepcopy from __main__ import send_cmd_help from .utils.dataIO import fileIO, dataIO from .utils import checks DEFAULT_SETTINGS = {"F...
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckan.model.package import Package from ckan.logic.action import get import logging log = logging.getLogger(__name__) @toolkit.side_effect_free def package_show(context, data_dict): package_dict = get.package_show(context, data_dict) p...
#! /usr/local/bin/python # NOTE: the above "/usr/local/bin/python" is NOT a mistake. It is # intentionally NOT "/usr/bin/env python". On many systems # (e.g. Solaris), /usr/local/bin is not in $PATH as passed to CGI # scripts, and /usr/local/bin is the default directory where Python is # installed, so /usr/bin/env w...
""" This module contains classes to handle datasets consisting of many files. They are inspired by the implemented dataset classes in atmlab written by Gerrit Holl. Created by John Mrziglod, June 2017 """ import atexit from collections import defaultdict from datetime import datetime, timedelta import glob from itert...
# 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 a...
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket Ltd # # 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 la...
# -*- coding: utf-8 -*- ######################################################################## # # License: BSD # Created: May 26, 2003 # Author: Francesc Alted - faltet@pytables.com # # $Id$ # ######################################################################## """Here is defined the AttributeSet class.""" im...
# This file is part of cclib (http://cclib.sf.net), a library for parsing # and interpreting the results of computational chemistry packages. # # Copyright (C) 2006-2014, the cclib development team # # The library is free software, distributed under the terms of # the GNU Lesser General Public version 2.1 or late...
import os from termcolor import colored def get_dirs(base, names): return set([name for name in names if os.path.isdir(os.path.join(base, name))]) def get_files(base, names): return set([name for name in names if not os.path.isdir(os.path.join(base, name))]) def show_arr(key, text, diff, color): if le...
# coding=utf-8 """ Copyright 2013 Load Impact 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 writ...
# -*- coding: utf-8 -*- import argparse import json import logging from os.path import abspath, exists from tsstats import config from tsstats.exceptions import InvalidConfiguration from tsstats.log import parse_logs from tsstats.template import render_servers logger = logging.getLogger('tsstats') def cli(): p...
from collections import namedtuple import logging import re from os import path import sublime import sublime_plugin from sublime_lib.flags import RegionOption from .lib import get_setting __all__ = ( 'SyntaxTestHighlighterListener', 'PackagedevAlignSyntaxTestCommand', 'PackagedevSuggestSyntaxTestComman...
import copy import datetime import os import re import sys from snakefire import GNOME_ENABLED, KDE_ENABLED from PyQt4 import Qt from PyQt4 import QtGui from PyQt4 import QtCore if KDE_ENABLED: from PyKDE4 import kdecore from PyKDE4 import kdeui elif GNOME_ENABLED: import subprocess import keyring from campfire...
#! python3 # -*- coding: utf-8 -*- """Searches recent reddit comments for ClashCaller! string and saves to database. This module uses the Python Reddit API Wrapper (PRAW) to search recent reddit comments for the ClashCaller! string. If found, the userID, permalink, comment time, message, and expiration time (if any) ...
#!/usr/bin/env python3 import sys import os modules = { "intel": ["e1000", "e1000e", "igb", "ixgb", "ixgbe", "ixgbevf", "i40e", "i40evf"], "accel_ppp": ["ipoe"], "misc": ["wireguard"] } if __name__ == '__main__': success = True print("[load modules] Test execution started") for msk in modules: ...
"""Broker Orchestration The Broker is responsible for: * Coordinating runs * Ensuring run transitions * Providing a rudimentary public API for use by the CLI/Web clients Complete name of environment variables available in a test container: - BROKER_ID Unique ID of the broker running this test. - BROKER_VERSION ...
# -*- coding: utf-8 -*- import logging from os.path import dirname from time import localtime, strftime from jinja2 import ChoiceLoader, Environment, FileSystemLoader, PackageLoader from tsstats.utils import seconds_to_text, sort_clients logger = logging.getLogger('tsstats') def render_template(clients, output, t...
from __future__ import absolute_import import logging import os import textwrap import pip._internal.utils.filesystem as filesystem from pip._internal.cli.base_command import Command from pip._internal.cli.status_codes import ERROR, SUCCESS from pip._internal.exceptions import CommandError, PipError from pip._interna...
import copy import datetime import os import re import sys from snakefire import GNOME_ENABLED, KDE_ENABLED from PyQt4 import Qt from PyQt4 import QtGui from PyQt4 import QtCore if KDE_ENABLED: from PyKDE4 import kdecore from PyKDE4 import kdeui elif GNOME_ENABLED: import subprocess import keyring from campfire...
import subprocess import os import sys from glob import glob from osgeo import gdal,ogr,osr from math import floor, ceil # From Metageta and http://gis.stackexchange.com/a/57837/2910 def GetExtent(gt,cols,rows): ''' Return list of corner coordinates from a geotransform @type gt: C{tuple/list} @...
#! /usr/bin/env python # This file is part of the FifoCI project. # Copyright (c) 2014 Pierre Bourdon <delroth@dolphin-emu.org> # Licensing information: see $REPO_ROOT/LICENSE # Runs a system specific script to generate frame dumps, and exports the test # results to a Zip file that can then be imported back by the ce...
""" SDoc Copyright 2016 Set Based IT Consultancy Licence MIT """ # ---------------------------------------------------------------------------------------------------------------------- import html import re import sdoc from sdoc.sdoc2 import node_store from sdoc.sdoc2.node.Node import Node from sdoc.sdoc2.node.EndPa...
import urllib2 from xml.dom import minidom YQL_URL = 'https://query.yahooapis.com/v1/public/yql?format=xml&q=%s' WEATHER_NS = 'http://xml.weather.yahoo.com/ns/rss/1.0' WEATHER_QUERY = 'select * from weather.forecast where woeid in (select woeid from geo.places(1) where text="%s")' class WeatherPlugin(object): def...
from utils import file_sha1sum class AnalysisFile(object): def __init__(self, filename): self.filename = filename def checksum(self): return file_sha1sum(self.filename)
#!/usr/bin/python # Copyright (C) 2009-2011 - Curtis Hovey <sinzui.is at verizon.net> # This software is licensed under the MIT license (see the file COPYING). """Check for syntax and style problems.""" from __future__ import with_statement __metaclass__ = type __all__ = [ 'Reporter', 'UniversalChecker', ...
import json import hashlib from django.conf import settings from django.contrib.auth.decorators import permission_required from django.core.cache import cache from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.http import Http404, HttpResponse, HttpResponseBadRequest, HttpResponseNotM...
"""Tornado handlers for the notebook. Authors: * Brian Granger """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as p...
from django.core.management.base import BaseCommand from django.contrib.gis.geos import Point from pollingstations.models import PollingStation, PollingDistrict from councils.models import Council class Command(BaseCommand): def handle(self, *args, **kwargs): print("updating Torridge phone number...") ...
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
from django.core.management.base import BaseCommand from django.contrib.gis.geos import Point from pollingstations.models import PollingStation, PollingDistrict, ResidentialAddress from councils.models import Council from addressbase.models import Address, Blacklist def update_station_point(council_id, station_id, p...
import json from logging import error import sendgrid from django.conf import settings from django.core.mail import EmailMultiAlternatives def sendgrid_send(recipients, subject, substitutions, template_id): from_email = "HackUPC Team <contact@hackupc.com>" mail = EmailMultiAlternatives( subject=subje...
# Copyright 2018 Google LLC # # 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, ...
#!/usr/bin/env python3 # Copyright 2018 Google LLC # # 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 o...