text
stringlengths
12
6.59M
""" Mailu admin app utilities """ try: import cPickle as pickle except ImportError: import pickle import dns.resolver import dns.exception import dns.flags import dns.rdtypes import dns.rdatatype import dns.rdataclass import hmac import secrets import time from multiprocessing import Value from mailu import...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2011 Piston Cloud Computing, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); y...
#cronjob syntax running on server: 0 8 * * * python3 homework-10-gruen-apirequest.py #API key: yourapikey #Place in decimal degrees: NYC = {'Latitude': 40.7142700 , 'Longitude': -74.0059700} import requests weather_response = requests.get ('https://api.forecast.io/forecast/yourapikey/40.7142700,-74.0059700') wea...
import filesegmenter import hashlib import os import shutil import swiftclient import sys import datetime import socket import time import olrcdb from multiprocessing import Process, Lock, Value from math import floor #Settings AUTH_VERSION = 2 SWIFT_AUTH_URL = '' USERNAME = '' PASSWORD = '' CONTAINER = '' AUTH_TOKEN...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2010 OpenStack 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- from PyQt4 import QtCore, QtGui, uic from PyQt4.QtCore import * from PyQt4.QtGui import * class MyTable(QtGui.QTableWidget): def __init__(self, parent): QtGui.QTableWidget.__init__(self, parent) self.setAcceptDrops(True) self.resize(100, 100) ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Rackspace # 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-...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, 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/LICE...
# -*- coding: utf-8 -*- import graphene from graphene import relay from graphql_relay.connection.arrayconnection import cursor_to_offset from hypatia.interfaces import STABLE from pyramid.threadlocal import get_current_request from substanced.objectmap import find_objectmap from dace.util import get_obj, find_catalog...
import bs import bsHockey import random class PuckTouchedMessage(object): pass class Puck(bsHockey.Puck): def __init__(self, position, team): bsHockey.Puck.__init__(self, position) self.team = team self.tickrate = 100 self._timeout = 5000 / self.tickrate self._count = self._timeout self._tickTimer = ...
class Solution(object): def minimumDeleteSum(self, s1, s2): """ :type s1: str :type s2: str :rtype: int """ list1 = {} list2 = {} i = 1 tot1 = 0 tot2 = 0 for x in s1: list1[i] = ord(x) tot1 += ord(x) ...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
# No shebang line, this module is meant to be imported # # Copyright 2013 Oliver Palmer # # 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 # # U...
""" Implementation of math operations on Array objects. """ from __future__ import print_function, absolute_import, division import math import numpy as np from llvmlite import ir import llvmlite.llvmpy.core as lc from llvmlite.llvmpy.core import Constant, Type from numba import types, cgutils, typing from numba.e...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. # Python import glob import json import logging from optparse import make_option import os import re import shlex import string import subprocess import sys import time import traceback # PyYAML import yaml # Django from django.conf import settings from djang...
#bin/python # Main functions/classes for bri-focal v2. import numpy as np # DO NOT PLAY NICE WITH NANS np.seterr(all='raise') np.seterr(under='warn') from copy import deepcopy import sys import gzip import time import re from copy import deepcopy #import pathos.multiprocessing as mp # --- CONSTANTS --- # THEANO=False...
""" Implement the cmath module functions. """ from __future__ import print_function, absolute_import, division import cmath import math import llvm.core as lc from llvm.core import Type from numba.targets.imputils import implement, Registry from numba import types, cgutils, utils from numba.typing import signature ...
#bin/python # Main functions/classes for bri-focal v2. import numpy as np # DO NOT PLAY NICE WITH NANS np.seterr(all='raise') np.seterr(under='warn') from copy import deepcopy import sys import gzip import time import re from copy import deepcopy #import pathos.multiprocessing as mp # --- CONSTANTS --- # THEANO=False...
""" This file defines the types for type annotations. These names aren't part of the module namespace, but they are used in the annotations in the function signatures. The functions in the module are only valid for inputs that match the given type annotations. """ __all__ = ['Array', 'Device', 'Dtype', 'SupportsDLPac...
#!/usr/bin/python # -*- coding: utf8 -*- # Khmer Unicode to Khmer Legacy fonts Conversion # (c) 2006 The WordForge Foundation, all rights reserved. # This program 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 F...
"""numerictypes: Define the numeric type objects This module is designed so 'from numerictypes import *' is safe. Exported symbols include: Dictionary with all registered number types (including aliases): typeDict Type objects (not all will be available, depends on platform): see variable sctypes for w...
from flask import Blueprint, redirect # from flask.ext.security import current_user from util import * from modules.api import placeholderdata from helpers import generate_port, AdmiralHelper, DockHelper api_user = Blueprint('api_user', __name__) prepare_api_blueprint(api_user) @api_user.route('/api_get_member/mater...
from __future__ import division, absolute_import, print_function import collections import operator import re import sys import warnings import numpy as np import numpy.core.numeric as _nx from numpy.core import linspace, atleast_1d, atleast_2d, transpose from numpy.core.numeric import ( ones, zeros, arange, conc...
# Copyright 2008-2011 WebDriver committers # Copyright 2008-2011 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 requ...
from __future__ import absolute_import import operator from collections import OrderedDict, namedtuple from ctypes import c_double, c_int from functools import reduce from hashlib import sha1 from os import path import cgen as c import numpy as np from devito.compiler import (get_compiler_from_env, get_tmp_dir, ...
import json import requests from hummingbird.objects import * __version__ = '0.0.2-r1' class Hummingbird(object): """Object for the wrapper for the Hummingbird API v1""" headers = {'content-type': 'application/json'} auth_token = '' api_url = "http://hummingbird.me/api/v1" def __init__(self, u...
#!/usr/bin/python import sys import os def fatalError(message): print message sys.exit() numArguments = len(sys.argv) if numArguments < 5: fatalError("Usage: " + sys.argv[0] + " <prod/dev> <major> <minor1> <minor2>") release_type = sys.argv[1] majorV = sys.argv[2] minor1V = sys.argv[3] minor2...
# Copyright (C) 2018 OpenMotics BVBA # # 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, or (at your option) any later version. # # This program is distri...
# Standard library imports. import sys # System library imports. from pyface.qt import QtCore, QtGui # Enthought library imports. from traits.api import DelegatesTo, Instance, implements, on_trait_change # Local imports. from pyface.tasks.i_advanced_editor_area_pane import IAdvancedEditorAreaPane from pyface.tasks.i...
# -*- coding: utf-8 -*- # Copyright(C) 2010-2012 Romain Bignon, Pierre Mazière # # This file is part of weboob. # # weboob 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 Licen...
#!/usr/bin/env python # Copyright 2008 Nokia Siemens Networks Oyj # # 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...
# Copyright (c) 2011 Dave McCoy (dave.mccoy@cospandesign.com) # # This file is part of Nysa. # (http://wiki.cospandesign.com/index.php?title=Nysa.org) # # Nysa 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 Foundat...
# coding: utf-8 # Copyright (c) 2010-2012 Raphaël Barrois from __future__ import unicode_literals, absolute_import """Abstract the filesystem layer.""" import codecs from fs import osfs, multifs, mountfs, memoryfs from fs.wrapfs import readonlyfs import hashlib import io import logging import os import stat from . ...
#!/usr/bin/env python # Copyright 2015, 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 list o...
import os import re import time import flask import prometheus_client import prometheus_client.multiprocess from oauthclientbridge import compat registry = prometheus_client.CollectorRegistry() if "prometheus_multiproc_dir" in os.environ: prometheus_client.multiprocess.MultiProcessCollector(registry) TIME_BUC...
""" Command function to schema-validate a HXL dataset. David Megginson November 2014 License: Public Domain Documentation: https://github.com/HXLStandard/libhxl-python/wiki """ import sys import os import argparse from copy import copy from hxl.model import DataProvider, Column from hxl.io import StreamInput, HXLRead...
from hypergan.util.ops import * from hypergan.util.hc_tf import * import tensorflow as tf import hypergan.util.wavegan as wavegan import hyperchamber as hc TINY = 1e-12 class Graph: def __init__(self, gan): self.gan = gan def generator(self, z, reuse=False): config = self.gan.config x...
#!/usr/bin/env python ##PACKAGES## from __future__ import division import sys import warnings import re import itertools import seaborn as sns import pandas as pd from matplotlib.lines import Line2D import matplotlib.animation as animation import matplotlib.pyplot as plt from .._shared.helpers import * from ..tools.cl...
import requests from django.shortcuts import redirect from django.http import Http404 from django.views.generic import TemplateView, View from django.views.generic.edit import FormView from django.core.urlresolvers import reverse from django.contrib import messages from django.utils.translation import ugettext as _ fr...
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys, time, pymongo, bson, urllib, urllib2, httplib, urlparse, random, types import json from txjsonrpc import jsonrpclib from txjsonrpc.jsonrpc import Introspection from txjsonrpc.web import jsonrpc from twisted.web import server from twisted.application import serv...
from __future__ import absolute_import, print_function import os import numpy as np from oct2py import Oct2Py class TestNumpy: """Check value and type preservation of Numpy arrays """ codes = np.typecodes['All'] @classmethod def setup_class(cls): cls.oc = Oct2Py() ...
# Copyright 2014 Cisco Systems. # 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 b...
from __future__ import absolute_import import copy import re from collections import namedtuple from odin.utils import getmeta, lazy_property, force_tuple # Imports for typing support from typing import Dict, Union, Optional, Callable, Any, AnyStr, List, Tuple, Hashable, Iterator # noqa from odin import Resource #...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2019 GoPro Inc. # # 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 #...
"""Dashboard functionality for the diamondash web app""" import re import json import yaml from unidecode import unidecode from pkg_resources import resource_stream from twisted.web.template import Element, renderer, XMLFile from exceptions import ConfigError DEFAULT_WIDGET_TYPE = 'graph' DEFAULT_NULL_FILTER = 'ski...
# # File for taring up necessary daemons for glidein to run properly # # Note, we still need glidein_startup import tarfile import logging import os import sys import shutil import tempfile import glob from campus_factory.util.CampusConfig import get_option DEFAULT_GLIDEIN_DAEMONS = [ 'condor_master', 'condor_procd'...
from __future__ import absolute_import import os from celery import Celery from django.conf import settings # set the default Django settings module for the 'celery' program. os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'dierentheater.settings') app = Celery('dierentheater') # Using a string here means the wor...
import dingo from egopowerflow.tools.io import get_timerange, import_components, \ import_pq_sets, create_powerflow_problem, results_to_oedb, \ transform_timeseries4pypsa from egopowerflow.tools.plot import add_coordinates, plot_line_loading from egoio.db_tables import model_draft as orm_pypsa from egoio.db_t...
#Importando librerias from time import sleep import random import tweepy from credenciales import * ## Instrucciones de uso # Cree un archivo llamado credenciales.py y dentro defina y asignele el valor correspondiente a las siguientes variables: # USER_SCREEN_NAME # CONSUMER_KEY # CONSUMER_SECRET # ACCESS_TOKEN # ACCE...
""" Classes BasicPlotGroupPanel and PlotGroupPanel. These classes provide GUI windows for PlotGroups, allowing sets of related plots to be displayed. $Id$ """ __version__='$Revision$' import numpy.oldnumeric as Numeric import copy from inspect import getdoc from math import floor import Image import ImageTk impor...
#-*- coding:utf-8 -*- import uuid import base64 from collections import deque try: import cPickle as pickle except ImportError: import pickle import tornadis from tornado import gen from .tornado_hbredis import TornadoHBRedis class AbstractSession(object): def __init__(self, session_id=None): ...
# -*- coding: utf-8 -*- """ Created on Thu May 7 19:32:22 2015 @author: sternc1 """ import pandas as pd import numpy as np import simtk.openmm as mm import simtk.unit as u import mdtraj as md from copy import copy, deepcopy from cclib.parser import Gaussian, Psi from cclib.parser.utils import convertor from mdtraj im...
# -*- coding: utf-8 -*- # FOGLAMP_BEGIN # See: http://foglamp.readthedocs.io/ # FOGLAMP_END import json import urllib.parse import aiohttp from aiohttp import web from foglamp.common import utils from foglamp.common import logger from foglamp.common.service_record import ServiceRecord from foglamp.common.storage_cli...
# Copyright 2014-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 wr...
#!/usr/bin/env python3 """UniShell Usage: unishell [(-t | --trace)] [(-i | --interactive)] [(-c COMMAND) ...] [-s | --syntax] [FILE ...] unishell (-h | --help) unishell --version Options: -c Execute COMMAND -s --syntax Check syntax but do not run anything -i --interactive Start in...
#!/usr/bin/env python #coding=utf-8 from twisted.internet.defer import Deferred from toughradius.radiusd.pyrad import tools from toughradius.radiusd.pyrad.packet import AuthPacket from toughradius.radiusd.pyrad.packet import AcctPacket from toughradius.radiusd.pyrad.packet import CoAPacket from toughradius.radiusd.pyra...
from datetime import datetime from slackclient import SlackClient from bs4 import BeautifulSoup import requests import yaml def read_config(): with open('unslackd.yaml', 'r') as ymlfile: cfg = yaml.load(ymlfile) return cfg def get_html(user): url = 'https://untappd.com/user/' + user raw = requ...
from rdflib import RDF from rdflib import URIRef, Literal, BNode from rdflib.util import first, uniq, more_than from rdflib.syntax.serializers import Serializer from rdflib.syntax.serializers.XMLWriter import XMLWriter XMLLANG = "http://www.w3.org/XML/1998/namespacelang" # TODO: def fix(val): "strip off _: fro...
import re from unittest import mock import pytest from ukpostcodeparser.parser import parse_uk_postcode from faker.providers.address.cs_CZ import Provider as CsCzAddressProvider from faker.providers.address.de_AT import Provider as DeAtAddressProvider from faker.providers.address.de_DE import Provider as DeDeAddres...
# vim: set fileencoding=utf-8 # this system uses structured settings as defined in # http://www.slideshare.net/jacobian/the-best-and-worst-of-django # # this is the base settings.py -- which contains settings common to all # implementations of ona: edit it at last resort # # local customizations should be done in sever...
# coding=utf-8 from __future__ import unicode_literals import unittest import re import six from faker import Faker from faker.providers.company.ja_JP import Provider as JaProvider from faker.providers.company.pt_BR import company_id_checksum from faker.providers.company.pl_PL import ( company_vat_checksum, reg...
""" Identifier for course resources. """ from __future__ import absolute_import import inspect import logging import re import warnings from abc import abstractproperty from six import string_types, text_type from bson.errors import InvalidId from bson.objectid import ObjectId from bson.son import SON from opaque_k...
# Test for one implementation of the interface from lexicon.providers.transip import Provider from integration_tests import IntegrationTests, provider_vcr from unittest import TestCase import pytest from tempfile import mkstemp import os FAKE_KEY = b""" -----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEAxV08IlJRwNq9WyyGO...
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging logging.basicConfig(level=logging.INFO) logger = logging.getLogger(__name__) from kamaki.clients import astakos, cyclades from kamaki.clients import ClientError from kamaki.clients.utils import ...
# -*- coding: utf-8 -*- { 'name': "Open Academy", 'summary': """Manage trainings""", 'description': """ Open Academy module for managing trainings: - training courses - training sessions - attendees registration """, 'author': "Dave", 'website': "ht...
# 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 # "License"); you may not u...
from i3pystatus import Status status = Status(standalone=True) # Displays clock status.register("clock", format="%Y-%m-%d(%a) %H:%M:%S") # Displays master volume status.register("alsa", format="♪:{volume}%", card=1) # Displays speaker state status.register("alsa", ...
# Copyright 2019 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...
#!/usr/bin/env python """ Copyright (c) 2014-2022 Maltrail developers (https://github.com/stamparm/maltrail/) See the file 'LICENSE' for copying permission """ import re from core.common import retrieve_content __url__ = "https://data.netlab.360.com/feeds/dga/bigviktor.txt" __check__ = "netlab 360" __info__ = "bigv...
###################################################################################################################### # WebTools helper unit # # Runs a seperate webserver on a specified port # Author: dane22, a Plex Community member # ######################################################################...
from dota2py import api from i3pystatus import IntervalModule class Dota2wins(IntervalModule): """ Displays the win/loss ratio of a given Dota account. Requires: dota2py """ settings = ( ("matches", "Number of recent matches to calculate"), ("steamid", "Steam user to track"), ...
#----------------------------------------------------------- # Multicorn, multiprocessing inspired by gunicorn # TODO rename class: Multicorn -> Arbiter ? #----------------------------------------------------------- import errno import fcntl import logging import os import psutil import random import resource import se...
import os from itertools import groupby import sublime from sublime_plugin import WindowCommand, TextCommand from ...common import ui, util from ..commands import GsNavigate from ..commands.log import LogMixin from ..commands.log_graph import LogGraphMixin from ..git_command import GitCommand class GsShowBranchComm...
#!/usr/bin/env python2 from multiprocessing import cpu_count import os from sklearn import svm from sklearn.cross_validation import KFold from sklearn.cross_validation import train_test_split from sklearn.externals import joblib from sklearn.grid_search import GridSearchCV from sklearn.preprocessing import StandardSc...
#!/usr/bin/env python3 from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar2QTAgg import satellites # to cope with GNSS tracking import sys import ephem from PyQt5 import QtGui, QtCore, QtWidgets sys.pat...
# -*- coding: utf-8 -*- from openfisca_senegal.base import * from numpy import clip, floor_divide class date_de_naissance(Variable): column = DateCol entity = Individu label = u"Date de naissance" class salaire(Variable): column = FloatCol entity = Individu label = "Salaire" set_input = s...
""" Map is a generic Map class from which all other Map classes inherit from. """ import copy import warnings import inspect from collections import namedtuple import numpy as np import matplotlib.pyplot as plt from matplotlib import patches, cm, colors import astropy.wcs import astropy.units as u from astropy.visual...
import numpy as np import numpy.ma as ma import scipy as sp import scipy.stats import scipy.special import matplotlib as mpl import matplotlib.pyplot as plt import vdj def scatter_repertoires_ontology(reps,info='VJCDR3',gooddata=False,measurement='proportions'): """Create a grid of scatter plots showing corelations ...
__author__ = 'Volodymyr Varchuk' __email__ = "vladimir.varchuk@rackspace.com" from d_utils import * DELETE_TMPL = 'DELETE FROM {table} WHERE {condition};' UPDATE_TMPL = 'UPDATE {table} SET {statement} WHERE {condition};' def op_delete_stmts(schema, path, id): return gen_statements(schema, path, id) def get_ma...
# 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...
import nose.tools from source.referee_highchair import * def test_referee_is_an_object(): referee = Referee('fake_board','fake_P1', 'fake_p2') assert isinstance(referee, object) == True def test_check_for_draw_returns_true(): true_board = [1,1,10,10,10,1,1,10,1] true_ref = Referee(true_board, 'P1', 'P...
#!/usr/bin/env python """ Cloud connected autonomous RC car. Copyright 2016 Visible Energy Inc. All Rights Reserved. """ __license__ = """ 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 htt...
""" Map is a generic Map class from which all other Map classes inherit from. """ from __future__ import absolute_import #pylint: disable=E1101,E1121,W0404,W0613 __authors__ = ["Russell Hewett, Stuart Mumford, Keith Hughitt, Steven Christe"] __email__ = "stuart@mumford.me.uk" import warnings import inspect from copy ...
# Connect Google Drive # Reference: https://developers.google.com/api-client-library/python/auth/web-app # Python import json import httplib2 import urllib2 from urllib import urlencode # Flask from flask import render_template, flash, redirect, request, url_for from flask import session, abort from flask.ext.login i...
# -*- coding: utf-8 -*- ############################################################################## # # OpenCivil module for OpenERP, module Etat-Civil # Copyright (C) 200X Company (<http://website>) pyf # # This file is a part of penCivil # # penCivil is free software: you can redistribute it and/or mo...
#!/usr/bin/env python '''Testing a sprite. The ball should bounce off the sides of the window. You may resize the window. This test should just run without failing. ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' import os import unittest from pyglet.GL.VERSION_1_1 import glClear import pyglet.window...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Zimbra specific objects, they handle parsing and unparsing to/from XML and # other glue-code. # Note that they do *not* handle themselves communication with # zimbra API. It is left to ZimbraAdminClient. from pysimplesoap.client import SimpleXMLElement class ZObject(o...
import time import threading import warnings import requests from .persistence import NoPersistenceLayer class LongshotThread(threading.Thread): def __init__(self, device, api_root): threading.Thread.__init__(self) self.device = device self.api_root = api_root self.terminating = Fa...
# Copyright (c) 2012 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. { 'variables': { 'conditions': [ # Define an "os_include" variable that points at the OS-specific generated # headers. These were gene...
# -*- coding: utf-8 -*- ############################################################################## # # OpenCivil module for OpenERP, module Etat-Civil # Copyright (C) 200X Company (<http://website>) pyf # # This file is a part of penCivil # # penCivil is free software: you can redistribute it and/or mo...
""" Module to generate Systems and positions for simple reference molecular systems for testing. DESCRIPTION This module provides functions for building a number of test systems of varying complexity, useful for testing both OpenMM and various codes based on pyopenmm. Note that the PYOPENMM_SOURCE_DIR must be set to...
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserve. # #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...
#! -*- coding: utf-8 -*- # # Copyright 2016 Robert Clark (clark@exiter.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 # # U...
# -*- coding: utf-8 -*- ############################################################################## # # OpenCivil module for OpenERP, module Etat-Civil # Copyright (C) 200X Company (<http://website>) pyf # # This file is a part of penCivil # # penCivil is free software: you can redistribute it and/or mo...
import xlrd import math def angstronIndex (airTemperature, relactiveHumidity): ###This function calculates the Angstron Index for a given air temperature and relactive humidity, , measured at 12h. result = 0.05 * relactiveHumidity - 0.1 * (airTemperature - 27) print('Angstron Index is:', round(result, 2)) ...
import random import logging import openpathsampling as paths from openpathsampling.netcdfplus import StorableObject, lazy_loading_attributes from openpathsampling.tools import refresh_output logger = logging.getLogger(__name__) class SampleKeyError(Exception): def __init__(self, key, sample, sample_key): ...
# Copyright 2014 Ahmed H. Ismail # 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...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2017, GEM Foundation # OpenQuake 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 Licen...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2015-2017 GEM Foundation # # OpenQuake 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 Licen...