src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- import time from tempfile import NamedTemporaryFile from xml.etree import cElementTree as ET from xml.etree.cElementTree import XML from dicttoxml import dicttoxml import requests import xmltodict ACTIONS = {} ACTIONS['GET_PROVIDERS'] = {'TA_ACTION': '5-45103'} ACTIONS['ISSUE'] = {'TA_ACTION...
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-18 22:05 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc import django_markdown.models class Migration(...
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from operator import attrgetter from sqlalchemy.event import listens_for from sqlalchemy.ext.declarative ...
# # Copyright Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accompanyi...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """A simple (improved + 1) ACBT scraper to download course files (by /u/chehanr).""" import getpass import os import urllib from argparse import ArgumentParser import requests from bs4 import BeautifulSoup, SoupStrainer CWD = os.getcwd() class Download: """Downlo...
# -*- coding: UTF-8 -*- servers = {"1" : "213.152.180.151", "2" : "213.152.180.250", "3" : "190.211.255.166", "4" : "190.211.255.168", "5" : "190.211.255.162", "6" : "190.211.255.165", "7" : "190.211.255.164", "8" : "190.211.255.163",...
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import contextlib from io import StringIO import json import os import tempfile import unittest import torch from . import test_binaries c...
# -*- coding: utf-8 -*- """ copied from https://github.com/bdarnell/tornado_http2/blob/master/tornado_http2/test/benchmark.py """ import time import logging from tornado.ioloop import IOLoop from tornado.options import define, options, parse_command_line, enable_pretty_logging from http2 import SimpleAsyncHTTP2Cl...
"""Tests for Makefile flags extraction.""" import imp import platform from os import path from unittest import TestCase from EasyClangComplete.plugin.utils import flag from EasyClangComplete.plugin.utils import search_scope from EasyClangComplete.plugin.flags_sources import makefile imp.reload(makefile) imp.reload(fl...
__author__ = 'ecowan' from time_converter import TimeConverter from link_finder import LinkFinder # TODO: Need to handle case where team is not playing that day. # Currently returns: ''' Traceback (most recent call last): File "/usr/local/bin/mlb-realtime", line 9, in <module> load_entry_point('mlb-realtime==...
import torch import math from abc import ABCMeta, abstractmethod from cogitare import utils from six import add_metaclass import numpy from dask import threaded, delayed, compute, multiprocessing def _identity(x): return x @add_metaclass(ABCMeta) class AbsDataHolder(object): """ An abstract object that ...
import pytest from collections import namedtuple from wait_for import wait_for from cfme.utils import os from cfme.utils.log_validator import LogValidator from cfme.utils.log import logger from cfme.utils.conf import hidden import tempfile import lxml.etree import yaml TimedCommand = namedtuple('TimedCommand', ['comma...
# -*- coding: utf-8 -*- ''' Created on Jun 19, 2017 @author: dzh ''' from ..model.constant import (YP_TPL_HOST, APIKEY, VERSION_V2, VERSION_V1, TEMPLATE, TPL_CONTENT, TPL_ID) from .ypapi import YunpianApi, CommonResultHandler class TplApi(YunpianApi): '''模版接口 https://www.yunpian.com/api2.0/tpl.html''' def _...
#!/usr/bin/env python # # Copyright 2020-2021 Espressif Systems (Shanghai) CO 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...
# Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
#!/usr/bin/env python #coding=utf-8 __author__ = 'Administrator' import json import datetime import sys import pandas as pd import tushare as ts import re import mail reload(sys) sys.setdefaultencoding('utf-8') class small_market_value_monitor: def __init__(self): self.__period = 20 self.__amount ...
import os import random from keras.preprocessing.image import ImageDataGenerator, array_to_img, img_to_array, load_img import numpy as np from PIL import Image import matplotlib.pyplot as plt import keras from keras.datasets import mnist from keras.models import Sequential from keras.layers import Dense, Dropout, Flatt...
from zappa.asynchronous import task try: from urllib.parse import parse_qs except ImportError: from cgi import parse_qs try: from html import escape except ImportError: from cgi import escape def hello_world(environ, start_response): parameters = parse_qs(environ.get('QUERY_STRING', '')) if '...
# Copyright 2012,2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # from __future__ import unicode_literals from . import pmt_python as pmt import numpy # SWIG isn't taking in the #define PMT_NIL; # getting the singleton locally. PMT_NIL = pmt.get_P...
#!/usr/bin/env python3 # # Copyright (c) 2015-2017 Nest Labs, 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/lice...
# -*- coding: utf-8 -*- # # Copyright © 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions # of the GNU General Public License v.2, or (at your option) any later # version. This program is distributed in t...
from __future__ import division, unicode_literals import os import re import sys import time import random from ..compat import compat_os_name from ..utils import ( decodeArgument, encodeFilename, error_to_compat_str, format_bytes, shell_quote, timeconvert, ) class FileDownloader(object): """File Downloader ...
################################################################################ # # This program is part of the CIMMon Zenpack for Zenoss. # Copyright (C) 2012 Egor Puzanov. # # This program can be used under the GNU General Public License version 2 # You can find full information here: http://www.zenoss.com/oss # ###...
# -*- encoding: utf-8 -*- from abjad.tools.datastructuretools import TreeContainer from abjad.tools.documentationtools.GraphvizObject import GraphvizObject class GraphvizNode(TreeContainer, GraphvizObject): r'''A Graphviz node. ''' ### INITIALIZER ### def __init__( self, attributes=N...
# 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. from . import steps RESULTS_URL = 'https://chromeperf.appspot.com' SPEC = { 'settings': { 'build_gs_bucket': 'chromium-fyi-archive', }, 'builders...
""" A place for code to be called from core C-code. Some things are more easily handled Python. """ from __future__ import division, absolute_import, print_function import re import sys from numpy.compat import basestring from .multiarray import dtype, array, ndarray try: import ctypes except ImportError: c...
import matplotlib.pyplot as plt import matplotlib.ticker as ticker import numpy as np import datetime from Bio.Seq import Seq if __name__ == '__main__': from needleman_wunsch import needleman_wunsch else: from .needleman_wunsch import needleman_wunsch #------------------------------- def plot_nw(seq_alpha_col,...
#!/usr/bin/python import os import sys # hack to make this able to import topic_modeling. must be run from final_project/ dir lib_path = os.path.abspath(os.path.join('.')) sys.path.append(lib_path) import numpy as np import pylab import pickle from collections import Counter from topic_modeling.topic_mo...
############################################################################### # Copyright 2012 FastSoft Inc. # Copyright 2012 Devin Anderson <danderson (at) fastsoft (dot) com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You m...
# Copyright 2015 Isotoma Limited # # 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...
#!/usr/bin/python3 from flask import Flask, request import sys from multiprocessing import Process, Queue import json from werkzeug.wrappers import Response def classifyrunner2(queue, request): cl.do_learntestclassify(queue, request) def predictrunner(queue, request): import predict pr = predict.Predic...
import numpy as np from gym.spaces import Box from scipy.spatial.transform import Rotation from metaworld.envs import reward_utils from metaworld.envs.asset_path_utils import full_v2_path_for from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set class SawyerSweepIntoGoalEnvV2(...
# Copyright 2018 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...
from __future__ import absolute_import from proteus import * from proteus.default_n import * try: from .pressure_p import * except: from pressure_p import * triangleOptions = triangleOptions femSpaces = {0:pbasis} stepController=FixedStep #matrix type numericalFluxType = NumericalFlux.ConstantAdvection_exteri...
# Copyright 2015 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...
# Copyright 2013 IBM Corp. # # 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...
# This file handles the class for the categories and the # CRUD methods associated to the categories import re from classes.recipes import Recipes class Categories(object): """This class will handle all the functions related to the categories and recipes""" categories = [] def __init__(self, category_nam...
# -*- coding: utf-8 -*- # (C) 2013-2018,2020 Muthiah Annamalai # # This file is part of 'open-tamil' package tests # # setup the paths from opentamiltests import * from transliterate import azhagi, jaffna, combinational, UOM, itrans, algorithm class ReverseTransliterationTests(unittest.TestCase): def test_tamil2e...
#!/usr/bin/env python # Copyright (C) 2010, 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
from DTW import * import cv2 import numpy as np recognizer = DTWRecognizer() #Using Laser ''' cap = cv2.VideoCapture(0) points = np.array([], np.int32) name = "Draw a gesture" flag = False score = 0 while True: ret, frame = cap.read() #frame = cv2.flip(frame, 1) hsv = cv2.cvtColor(frame,...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ m...
""" Views and functions for serving static files. These are only to be used during development, and SHOULD NOT be used in a production setting. """ import mimetypes import posixpath import re from pathlib import Path from django.http import ( FileResponse, Http404, HttpResponse, HttpResponseNotModified, ) from dja...
# Written by Yuan Yuan # see LICENSE.txt for license information import sys, os execpath = os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '..', '..') sys.path.append(execpath) #print sys.path from Utility.utility import getMetainfo from Tribler.Category.Category import Category DEBUG = False ...
from corehq.apps.fixtures.models import FixtureDataItem from corehq.util.quickcache import quickcache DOMAIN = 'opm' PREG_REG_XMLNS = "http://openrosa.org/formdesigner/D127C457-3E15-4F5E-88C3-98CD1722C625" VHND_XMLNS = "http://openrosa.org/formdesigner/ff5de10d75afda15cddb3b00a0b1e21d33a50d59" BIRTH_PREP_XMLNS = "htt...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-26 15:37 from typing import Union from hanlp.utils.io_util import get_resource, TimingFileIterator from hanlp.utils.log_util import logger def collapse_enhanced_empty_nodes(sent: list): collapsed = [] for cells in sent: if isinstance(cells[0], f...
from subprocess import call import collections import errno import logging import os import sqlite3 from sgsession import Entity log = logging.getLogger(__name__) class PathCache(collections.MutableMapping): def __init__(self, sgfs, project_root): self.sgfs = sgfs self.project_roo...
"""Unit tests of commenting objects.""" import pytest from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only from dlkit.abstract_osid.commenting import objects as ABCObjects from dlkit.abstract_osid.id.primitives import Id as ABC_Id from dlkit.abstract_osid.locale.primiti...
# -*- encoding: utf-8 -*- # # Copyright Red Hat, 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 ...
from django.test import TestCase from lists.forms import ( DUPLICATE_ITEM_ERROR,EMPTY_ITEM_ERROR, ExistingListItemForm,ItemForm ) from lists.models import Item, List class ItemFormTest(TestCase): def test_form_renders_item_text_input(self): form = ItemForm() self.assertIn('placeholder="Enter a to-do item"', f...
from pikka_bird_collector.parsers.table import Table as Parser from .base_port_command import BasePortCommand, Base class Postgresql(BasePortCommand): """ Collector for PostgreSQL (http://www.postgresql.org/). The collector is enabled whenever non-empty settings are passed. Multip...
from __future__ import absolute_import, division, print_function import uuid import numbers import operator import numpy as np from glue.external import six from glue.external.six import PY3 from glue.core.roi import CategoricalROI from glue.core.contracts import contract from glue.core.util import split_component_v...
from django.conf import settings from django.contrib.sites.models import RequestSite from django.contrib.sites.models import Site from registration import signals from registration.forms import RegistrationForm from registration.models import RegistrationProfile class DefaultBackend(object): """ A registration bac...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import itertools import json import logging import os import sys import random from random import shuffle import numpy as np import scipy as scp import scipy.misc from scipy.misc import imread, imresize imp...
from typing import Optional, Sequence from ...filth import Filth from ..base import PostProcessor class PrefixSuffixReplacer(PostProcessor): name = 'prefix_suffix_replacer' # type: str def __init__(self, prefix: Optional[str] = '{{', suffix: Optional[str] = '}}', name: Optional[str] = None): super(...
from graph_util import ReadGraph from micro_pda import MicroPDA from particle_pda1 import ParticlePDA from swarm_pda import SwarmPDA from Measurments import measurmnets import time import datetime import pymysql import json # avg , std , best for 30 times run, # file name = datasetName_Beta_k_Delta_l # levels = low, ...
#!/usr/bin/env python parts = {} partition_types = {} max_len = 4 import sys filename = 'partitions' if len(sys.argv) > 1: filename = sys.argv[1] α = 1.0 partitions_count = α f = open(filename) for l in f: partition_parts = l.strip().split() for i, part in enumerate(partition_parts): if '_' not...
# -*- encoding: utf-8 -*- # # Copyright © 2016-2018 Red Hat, Inc. # Copyright © 2014-2015 eNovance # # 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/LICE...
# -*- coding: utf-8 -*- # # PythonWrappper documentation build configuration file, created by # sphinx-quickstart on Fri Apr 8 14:40:45 2016. # # 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...
#!/usr/bin/python from __future__ import absolute_import import re import sys import time import logging import argparse import subprocess from dockerfile_parse import DockerfileParser DEFAULT_BRANCH_PREFIX = "branch" DEFAULT_BRANCH_COUNT = 100 DEFAULT_STAGGER_NUMBER = 10 DEFAULT_STAGGER_WAIT = 60 DEFAULT_KOJI_BIN ...
import socket import itertools import inspect import os import time import spectral_cube from astropy import units as u from astropy.io import fits dirpath = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) if 'eso-macbook' in socket.gethostname(): execfile(os.path.join(dirpath,'run_pipe...
""" Plugin for UrlResolver Copyright (C) 2018 jsergio This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
#encoding=utf-8 import MySQLdb, os from django.core.checks.registry import Tags def insertDomain(db): cursor = db.cursor() sql = "insert into %(table)s (%(para)s) values ('%(value)s')" insertValues = {'table' : 'quotation_domain', 'para' : 'name', 'value' : 'CD'} f = open(os.path.dirname(os.path.abspa...
#!/usr/bin/python # -*- coding: utf8 -*- # 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, or (at your option) any later # version. # # This program is distributed in the hope th...
# # 20,000 Light Years Into Space # This game is licensed under GPL v2, and copyright (C) Jack Whitham 2006-07. # # Do you believe in the users? import pygame , random from pygame.locals import * import stats , menu , draw_obj , mail , particle , tutor import resource from map_items import * from primitives import...
import sqlalchemy_utils from dataactcore.config import CONFIG_DB, ALEMBIC_PATH, MIGRATION_PATH from alembic.config import Config from alembic import command from sqlalchemy.exc import ProgrammingError def createDatabase(dbName): """Create specified database if it doesn't exist.""" config = CONFIG_DB conne...
# -*- coding: utf-8 -*- """ *************************************************************************** v_normal.py --------------------- Date : December 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ****************************...
#!/usr/bin/env python # -*- coding: utf-8 -*- DNS = { # Cogeco Cable (Trois-rivieres) 'cogeco.ca': ['205.151.69.200','205.151.68.200'], # Videotron.CA 'videotron.ca': ['205.151.222.250', '205.151.222.251'], # Colbanet 'colba.net': ['216.252.64.75', '216.252.64.76'], } template_...
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# -*- coding: utf-8 -*- try: # Python 2.7 from collections import OrderedDict except: # Python 2.6 from gluon.contrib.simplejson.ordered_dict import OrderedDict from gluon import current from gluon.storage import Storage T = current.T settings = current.deployment_settings """ Template settings ...
import ctypes import re import exceptions import inspect class CObjException(exceptions.StandardError): def __init__(self, msg, *args, **kwds): exceptions.Exception(self, msg, *args, **kwds) self.msg = msg return def __str__(self): return "%s: %s" % (self, self.msg) class CO...
''' In the "100 game," two players take turns adding, to a running total, any integer from 1..10. The player who first causes the running total to reach or exceed 100 wins. What if we change the game so that players cannot re-use integers? For example, two players might take turns drawing from a comm...
import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import numpy as np import time # # INFO: Your Parameters. # You can adjust them after completing the lab C = 1 kernel = 'linear' gamma = 'auto' iterations = 5000 # TODO: Change to 200000 once you get to Question#2 # # INFO: You can set...
from unittest import TestCase import models.wolfram as wolf from indra.composite import Composite from models.wolfram import create_wolf_cell, get_color, get_rule, next_color from models.wolfram import set_up, W, B TEST_ANUM = 999999 class WolframTestCase(TestCase): def setUp(self): (wolf.wolfram_env, w...
#! /usr/bin/python # Multistage table builder # (c) Peter Kankowski, 2008 ############################################################################## # This script was submitted to the PCRE project by Peter Kankowski as part of # the upgrading of Unicode property support. The new code speeds up property # matching...
import pygrit as GRIT import numpy as np import math # Decide upon some names for creating user-custom attribute fields, # they can be anything you want as long as they are unique. refinement_attribute_name = 'my_refinement_values' coarsening_attribute_name = 'my_coarsening_values' def write_svg_files(engine, paramet...
# -*- coding: utf-8 -*- """QGIS Unit tests for edit widgets. .. note:: 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. """ __au...
from selenium import webdriver from selenium.webdriver.common.keys import Keys from django.contrib.staticfiles.testing import StaticLiveServerTestCase import sys class NewVisitorTest(StaticLiveServerTestCase): @classmethod def setUpClass(cls): for arg in sys.argv: if 'liveserver' in arg: ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from collections import OrderedDict from unittest import TestCase from django.core.exceptions import ImproperlyConfigured from mock import patch, MagicMock, call from audit_tools.audit.views.api.mixins import AjaxFormMixin class AjaxFormMixinTestCase(...
# Use for loops to make a turtle draw these regular polygons # (regular means all sides the same lengths, all angles the # the same): # * An equilateral triangle # * A square # * A hexagon (six sides) # * An octagon (eight sides) import turtle window = turtle.Screen() # instantiate a window pointer = t...
# 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=no-init import systemtesting...
#!/usr/bin/env python import os import os.path as p import sys major, minor = sys.version_info[ 0 : 2 ] if major != 2 or minor < 6: sys.exit( 'The build script requires Python version >= 2.6 and < 3.0; ' 'your version of Python is ' + sys.version ) DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) ...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2013 Camptocamp SA # Copyright 2013 Akretion # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gene...
from __future__ import print_function import numpy import numpy as np from keras.preprocessing import sequence from keras.datasets import imdb from keras.models import Sequential, Model from keras.layers import Concatenate from keras.layers.core import Dense, Dropout, Activation from keras.layers.embeddings import Emb...
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
# -*- coding: utf-8 -*- # muMDAU_app main / first page from muMDAU_app import app, socketio from threading import Thread from flask import render_template, url_for, redirect, session, request from docker import Client pullthread = None # index page main route page @app.route('/project') def pview(): return rende...
#!/usr/bin/env python # dp2e.py import numpy as num def mr2rho(w,t,p): """rho = mr2rho(w,t,p) w in g/kg t in K p in mb This was provide by Holger Linne' from Max Planck Institute. Dave Turner Pacific Northwest National Laboratory Currently at the University of Wisconsin-Madison dave.turner@pnl.gov """ rh...
""" API described here: http://apfmon.lancs.ac.uk/help """ import requests import json import time import traceback from pandaharvester.harvesterconfig import harvester_config from pandaharvester.harvestercore import core_utils from pandaharvester import panda_pkg_info from pandaharvester.harvestermisc import generic...
# pyOCD debugger # Copyright (c) 2006-2013,2018 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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/LICENS...
import gc from celery.decorators import task from django.conf import settings from django.core.mail import EmailMultiAlternatives from django.template.loader import render_to_string from django.urls import reverse from blog.models import Sponsor from .models import Subscription, Mail def mail_newsletter(recipients, ...
# coding: utf-8 """ Tests for the public API ------------------------ :copyright: (c) 2012 by Simon Sapin. :license: BSD, see LICENSE for more details. """ from __future__ import unicode_literals from pytest import raises from tinycss import make_parser from tinycss.page3 import CSSPage3Parser def...
# Copyright 2015 Rackspace Hosting. # # Author: Eric Larson <eric.larson@rackspace.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 # #...
# -*- coding: utf-8 -*- try: import json except ImportError: import simplejson as json import math import pytz import pytest import time import datetime import calendar import re import decimal import dateutil from functools import partial from pandas.compat import range, zip, StringIO, u import pandas._libs.j...
""" Copyright 2020 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, software di...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'shtoommainwindow.ui' # # Created: Wed Jan 19 15:16:20 2005 # by: The PyQt User Interface Compiler (pyuic) 3.13 # # WARNING! All changes made in this file will be lost! from qt import * class ShtoomMainWindow(QMainWindow): def __i...
# -*- coding: utf-8 -*- import urllib2 import HTMLParser from bs4 import BeautifulSoup import sys from datetime import * import re import smtplib from email.MIMEText import MIMEText def sendmail(subject, content): email_host = 'smtp host' email_user = 'sender email' email_pwd = 'sender pwd' maillist = ['example@12...
# -*- 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...
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP module # Copyright (C) 2010 Micronaet srl (<http://www.micronaet.it>) # # Italian OpenERP Community (<http://www.openerp-italia.com>) # #####################################################...
""" Ansible action plugin to execute health checks in OpenShift clusters. """ # pylint: disable=wrong-import-position,missing-docstring,invalid-name import sys import os from collections import defaultdict try: from __main__ import display except ImportError: from ansible.utils.display import Display displ...
# Lint as: python3 # Copyright 2020 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 ...
# -*- encoding: utf-8 -*- # # Copyright 2013 IBM Corp. # Copyright © 2013 Julien Danjou # # Author: Julien Danjou <julien@danjou.info> # # 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 # # ...