text
stringlengths
17
737k
# Procedurally generated duel cog for Red-DiscordBot # Copyright (c) 2016 Caleb Jonson # Idea and rule system courtesy of Axas # Additional moves suggested by OrdinatorStouff import asyncio import discord from functools import partial import math import os import random from redbot.core import checks, commands, Confi...
import flask import flask_buzz import flask_restplus import http import json import pytest import re def stripped(text): """ Removes all whitespace from a string """ return re.sub(r'\s+', '', text) class TestFlaskBuzz: def test_raise(self): with pytest.raises(flask_buzz.FlaskBuzz) as er...
# IFTTT email to Hook.io Nach step creator. # # Parameters are: # ?sec=<password> # &sub=<subject> # &bo=<body> # &att=<attachmenturl> # &par=<parent node> # All except sec are optional if properly configured, except # there must be either a subject or a body or both. # # This adds a step to a preconfigured Nach inbox...
# The Hazard Library # Copyright (C) 2013-2021 GEM Foundation # # 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. #...
ENVIRONMENT = '%ENVIRONMENT%' from datetime import datetime # folder locations, connection properties etc settings = dict( process_prefix='Synergy', # global prefix that is added to every process name started for synergy-scheduler process_cwd='/mnt/tmp', # daemonized process working directory, where it ca...
__author__ = 'mongolrgata' import os import struct import sys def read_unsigned_int32(file): """ :param file: :type file: io.FileIO :return: :rtype: int """ return struct.unpack('<L', file.read(4))[0] def extract_png(pna_filename): """ :param pna_filename: :type pna_filenam...
import MySQLdb class MySQL(object): def __init__(self,username, password): self.conn=MySQLdb.connect(host="localhost", user=username, passwd=password) self.cursor = self.conn.cursor() self.firstTime = True self.emptyDict = { "delete": 0, "select": 0, "insert...
# Copyright 2018 D-Wave 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/LICENSE-2.0 # # Unless required by applicable law or...
# -*- encoding: utf-8 -*- ######################################################################### #This module intergrates Open ERP with the magento core # #Core settings are stored here # ########################################################################...
# Copyright 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# 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, software # distributed under t...
import os import re import copy import logging from wasabi import msg from typing import Generator, Iterable, Optional, Sequence, List try: import spacy except ImportError as e: if e.name == "spacy": raise ImportError( "Could not find module 'spacy'. If you want to use extras," ...
from django.contrib.auth import get_user_model from django.core import mail from django.utils.encoding import force_bytes from django.utils.http import urlsafe_base64_encode from django_dynamic_fixture import G, N import pytest from ..forms import ( AddContactForm, AdminUserCreationForm, AdminUserChangeFo...
#!/usr/local/env python-sirius """.""" import time as _time from epics import PV as _PV egun_hvv = _PV('egun:hvps:voltoutsoft') egun_hvv_rb = _PV('egun:hvps:voltinsoft') egun_hvc = _PV('egun:hvps:currentoutsoft') egun_hve = _PV('egun:hvps:enable') egun_hves = _PV('egun:hvps:enstatus') egun_filaps = _PV('egun:filaps:c...
import windpowerlib.modelchain as mc import windpowerlib.wind_turbine as wt from pandas.util.testing import assert_series_equal from numpy.testing import assert_array_equal, assert_allclose import pandas as pd import pytest import numpy as np class TestModelChain: @classmethod def setup_class(self): ...
# -*- encoding:utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from os import path import unittest import mysqlparse class ParseTest(unittest.TestCase): def setUp(self): super(ParseTest, self).setUp() self.fixture_dir = path.join(path.dirname(__file...
"""The main program """ import time import Queue import MySQLdb as mysqldb from wikiparser import WorkingThread from wikiparser import ReadingThread class Program(): def __init__(self, xml_path, max_queue_size=20, num_threads=1, db_host='localhost', db_user='wikiwsd', db_pass='wikiwsd'): self...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests for the `PfsClient` class of the `pypachy` package.""" from builtins import str from collections import namedtuple import pytest import pypachy @pytest.fixture(scope='function') def pfs_client(): """Connect to Pachyderm before tests and reset to initial st...
import os from datadog_checks.dev.tooling.utils import ( get_check_file, get_config_file, get_default_config_spec, get_readme_file, get_valid_checks, get_valid_integrations, has_agent_8_check_signature, has_dashboard, has_e2e, has_process_signature, is_tile_only, ) MARKER =...
# Django settings for kitsune project. from datetime import date import logging import os import platform from django.utils.functional import lazy from django.utils.translation import ugettext_lazy as _ from sumo_locales import LOCALES DEBUG = True TEMPLATE_DEBUG = DEBUG LOG_LEVEL = logging.WARN SYSLOG_TAG = 'http_...
#!/usr/bin/env python2 import sys # check input parameters, generate INDATA list # code placed here to avoid unneccesary vtk loading if len(sys.argv) == 1 : sys.stderr.write('Using standard data set, to use other data:\n'.format(sys.argv[0])) sys.stderr.write('Usage: {0} <pdb file> <connection file> |<protna...
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
"""Tests for Submission class.""" from __future__ import print_function, unicode_literals from praw import errors from praw.objects import Submission from six import text_type from .helper import OAuthPRAWTest, PRAWTest, betamax class SubmissionTest(PRAWTest): def betamax_init(self): self.r.login(self.un...
#!/usr/bin/env python3 import argparse import curses import curses.ascii import os import sys import text_unidecode # constants DESCRIPTION = "shakyo2d is a tool to learn about something just copying it " \ "by hand." TTY_DEVICE_FILE = "/dev/tty" QUIT_CHARS = {chr(curses.ascii.ESC), curses.ascii.ct...
#!/usr/bin/env python import sys import os import signal import time import math import json import pygame from pygame.locals import * import config from config import * # debug mode, no gfx DEBUG = 0 # constants NORMAL = 0 DEADAIR = 1 COLON = 10 MINUS = 11 # globals mode = NORMAL currentmessage = 0 TRACKINFO = ...
""" fun, not useful commands """ import json import random import discord import requests from discord.ext import commands class Fun: def __init__(self, bot_): self.bot = bot_ self._8ball_responses = ['Signs point to yes.', 'Yes.', 'Reply hazy, try again.', 'My sources say no.', 'You may rely on it.', 'C...
from decimal import Decimal as D from django.test import TestCase from oscar_testsupport import factories from oscar.apps.basket.models import Basket from datacash import the3rdman, models from . import XmlTestingMixin class TestRequestGeneration(TestCase, XmlTestingMixin): def test_for_smoke(self): do...
""" FR-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import CharField, RegexField, Select from django.utils.encoding import smart_text from django.utils.tran...
# -*- coding: utf-8 -*- from __future__ import print_function import sys import collections from collections import OrderedDict, defaultdict import networkx as nx from heapq import * #https://gist.githubusercontent.com/kachayev/5956408/raw/c918417ef7f3c0deb6a0a1223a49035dcca84077/uf.py class UF(object): __slots__...
try: set except NameError: from sets import Set as set from django import template from django.http import Http404 from django.core.paginator import Paginator, InvalidPage from django.conf import settings register = template.Library() DEFAULT_PAGINATION = getattr(settings, 'PAGINATION_DEFAULT_PAGINATION', 20...
# -*- coding: utf-8 -*- import operator import dxchange import numpy as np import tomopy from util import * class Sinogram(object): def __init__(self, sinogram, type, coords=None, normalize_bg=False, minus_log=False, center=None, fin_angle=180): assert type in ('local', 'tomosaic', 'full', 'raw') ...
import urllib import urllib2 from BeautifulSoup import BeautifulSoup import re import time import datetime import mechanize from collections import defaultdict import slate import cStringIO class LegistarScraper (object): """ A programatic interface onto a hosted Legistar website. """ def __init__(self, confi...
# Copyright 2019 Omar Castiñeira, Comunitea Servicios Tecnológicos S.L. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from odoo import models, fields, api, _, exceptions class AccountMoveLine(models.Model): _inherit = 'account.move.line' scheme = fields.Selection([('CORE', 'Basic (CORE)'),...
# ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2011 Contributor # # This program is free software; you can redistribute it and/or modify # it under the terms of the EU DataGrid Software License. You should # have received a copy of the license with...
from __future__ import unicode_literals import re class LineBuffer(object): r""" Buffer bytes read in from a connection and serve complete lines back. >>> b = LineBuffer() >>> len(b) 0 >>> b.feed(b'foo\nbar') >>> len(b) 7 >>> list(b.lines()) == [b'foo'] True >>> len(b) ...
import time from celery.task import task as celery_task @celery_task(max_retries = 3) def cache_resync(source_doc_class, source_doc_id, doc_class, doc_id, fields): """ Performs cache resync for fields that need updating. @param source_doc_class: Source document class @param source_doc_id: Source document c...
from django.conf.urls import * from corehq.apps.hqcase.views import explode_cases urlpatterns = patterns('corehq.apps.hqcase.views', # for load testing url(r'explode/', explode_cases, name='hqcase_explode_cases') )
import numpy as np import numba # For diagnostic plotting: from textwrap import dedent import matplotlib.pyplot as plt import os from pax import plugin, datastructure, dsputils from pax.dsputils import find_intervals_above_threshold class FindHits(plugin.TransformPlugin): """Finds hits in pulses First, the ...
#!/usr/bin/python # # 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) any later version. # # Ansible is distribut...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Maximillian Dornseif <md@hudora.de> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """ This script replicates databases from one CouchDB server to an other. This is mainly f...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009 Maximillian Dornseif <md@hudora.de> # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. """ This script replicates databases from one CouchDB server to an other. This is mainly f...
# @file setup.py # @brief Setup file that packages the project for pip. # @author Justin Gallagher (jrgallag@andrew.cmu.edu) # @since 2015-11-08 #!/usr/bin/env/python3 from setuptools import setup setup(name='cmu-course-api', version='1.5.1', description=('Python utility for retrieving information about c...
#!/usr/bin/env python # # Copyright (C) 2010-2011 Hideo Hattori # Copyright (C) 2011-2013 Hideo Hattori, Steven Myint # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, in...
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party/nccl:nccl_configure.b...
""" Wrapper module for LIBPCP - the core Performace Co-Pilot API # # Copyright (C) 2012-2019 Red Hat # Copyright (C) 2009-2012 Michael T. Werner # # This file is part of the "pcp" module, the python interfaces for the # Performance Co-Pilot toolkit. # # This program is free software; you can redistribute it and/or modi...
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party/nccl:nccl_configure.b...
import os import sys import re from datetime import datetime from lib.doi import DOI class SearchResult(object): """ Representation of an individual search result. """ def __init__(self, json=None): self.doi = None self.score = None self.title = None self.subtitle = No...
from django.conf.urls import patterns, url from gym_app import views ''' You may have seen that within your project configuration directory a urls.py file already exists. Why make another? Technically, you can put all the URLs for your project's applications within this file. However, this is considered bad practice...
# -*- coding: utf-8 -*- ## $Id$ ## This file is part of the CERN Document Server Software (CDSware). ## Copyright (C) 2002, 2003, 2004, 2005 CERN. ## ## The CDSware 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 Found...
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import # Simple decorator that pulls data from a combination of the usercache and the timeseries. # We could avoid this if we put data directly into the timeseries when it came i...
# TensorFlow external dependencies that can be loaded in WORKSPACE files. load("//third_party/gpus:cuda_configure.bzl", "cuda_configure") load("//third_party/gpus:rocm_configure.bzl", "rocm_configure") load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure") load("//third_party/nccl:nccl_configure.b...
from importlib import import_module import json import os import pprint import types import argparse import sys import logging import imp import xmldsig import xmlenc from saml2.client import Saml2Client from saml2.config import SPConfig from saml2.mdstore import MetadataStore, ToOld from saml2.mdstore import MetaDat...
from django.shortcuts import render_to_response import random from datetime import datetime # Create your views here. # name them year<year> so that the manager can grab them YOUTUBE_EMBED = """<iframe width="560" height="315" src="http://www.youtube.com/embed/{}?rel=0&autoplay=1" frameborder="0"></iframe>""" def y...
""" Read one or more protein fasta files and calculate md5sums """ import os import sys import argparse import hashlib from roblib import stream_fasta, bcolors def read_fasta(fafile, idmapfile, minlen=100, verbose=False): """ Read a fasta file and return a dict of proteins and their md5 sums :param fafile...
""" This program aims to provide a simple and efficient way to run encounters in the Edge of the Empire roleplaying game. Doing this from paper can be confusing and even frustrating at times, because there is a lot to keep track of such as distances, critical hits, temporary modifiers, initiative slots and more. Star ...
# Eve W-Space # Copyright (C) 2013 Andrew Austin and other contributors # # 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...
import asyncio import time import re import json import os import sqlite3 import logging from random import SystemRandom random = SystemRandom() import joseerror as je import jplaying_phrases as playing_phrases import randemoji as emoji import discord logger = logging.getLogger(__name__) logger.setLevel(logging.INFO...
""" **Experimental** CMA-ES optimizer using JAX backend. Code in this file is an adaption from <https://github.com/CyberAgentAILab/cmaes/blob/main/cmaes/_cma.py> which is a faithful implementation of CMA-ES (Covariance matrix adaptation evolution strategy) described in <https://arxiv.org/abs/1604.00772>. Overall, the...
"""sosource.py Second order source term calculation module. Author: Ian Huston $Id: sosource.py,v 1.34 2009/01/29 12:35:04 ith Exp $ Provides the method getsourceandintegrate which uses an instance of a first order class from cosmomodels to calculate the source term required for second order models. """ from __futur...
from io import BytesIO import urllib.request from PIL import Image import socket import simplejson googleGeocodeUrl = 'http://maps.googleapis.com/maps/api/geocode/json?' def get_map(lat,lng): latString = str(lat) lngString = str(lng) print(lat) url = ("https://maps.googleapis.com/maps/api/staticmap?c...
# -*- coding: utf-8 -*- import sys import os from datetime import datetime import functools from flask import (Flask, request, render_template, send_file, redirect, flash, url_for, g, abort, session) from flask_wtf.csrf import CsrfProtect from sqlalchemy.orm.exc import MultipleResultsFound, NoResult...
import os import datetime import requests import subprocess import shlex import tweepy import himawari_config from celery_conf import app URL = "http://www.jma.go.jp/en/gms/imgs_c/6/visible/0/" CONVERSION_COMMAND = ( 'convert {input_name} -thumbnail {size} -quality {qual}' ' -unsharp 0.05x0.05+12+0.001' ...
from django.http import Http404, HttpResponse, HttpResponseBadRequest from django.utils import simplejson from django.conf import settings from django.contrib.contenttypes.models import ContentType from hitcount.utils import get_ip from hitcount.models import Hit, HitCount, BlacklistIP, BlacklistUserAgent def _update...
import sys, re from util import * from pprint import pprint from twitter.util import htmlentitydecode from urllib.parse import quote as url_quote class Threader(object): def __init__(self, tracker): self.tracker = tracker self.thread = [] self.thread_ids = set() self.examine = [ ] ...
# All of SubliminalCollaborator is licensed under the MIT license. # Copyright (c) 2012 Nick Lloyd # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including wit...
# -*- coding=utf -*- # Actually, this is a furry snowflake, not a nice star from cubes.browser import * from cubes.common import get_logger from cubes.mapper import SnowflakeMapper, DenormalizedMapper, coalesce_physical from cubes.mapper import DEFAULT_KEY_FIELD import logging import collections import re import datet...
""" Error handlers for CP2K calculations. Handlers should be specific enough that they are not bulky (keep overhead low), but if two handlers will always be called together, then consider joining them into one handler. When adding more remember the following tips: (1) Handlers return True when the error is caught, an...
# Copyright 2013 NetApp # 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 applic...
"""Load base config and export package constants.""" import logging from configparser import ConfigParser from os.path import expanduser LOG = logging.getLogger(__name__) def find_config(): """Look for **foremast.cfg** in config_locations. If not found, give a fatal error. Returns: ConfigParser...
nuke_factory = util.BuildFactory() nuke_factory.useProgress = True nuke_factory.addSteps([ steps.ShellCommand( name="Clear SRCCACHE", command=["/bin/bash", "-c", "rm -rf /tmp/srccache/*"], flunkOnFailure=False, doStepIf=lambda step: step.getProperty('clear_srccache'), hideSte...
# -*- coding: utf-8 -*- import sys import os import socket import urllib2 import re import base64 import time import json import logging import argparse from ConfigParser import ConfigParser from pprint import pprint import socks __version__ = '1.0.3' __author__ = 'JinnLynn' __author_email__ = 'eatfishlin@gmail.com' ...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # (C) British Crown Copyright 2017-2018 Met Office. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
# Copyright (c) 2009-2019 The Regents of the University of Michigan # This file is part of the HOOMD-blue project, released under the BSD 3-Clause # License. # Maintainer: joaander / All Developers are free to add commands for new # features R""" Apply forces to particles. """ from hoomd import _hoomd from hoomd.md ...
# Copyright 2014 redis-api authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import os import redis import docker class DockerManager(object): def __init__(self): self.server = self.get_value("REDIS_SERVER_HOST") se...
import bugzoo import copy import time import timeit import signal import math from houston.sandbox import Sandbox from houston.mission import Mission, MissionOutcome from houston.action import ActionSchema, ActionOutcome, Action from houston.branch import BranchID, Branch, BranchPath from houston.state import StateVar...
"""Declare critical models for Hydroshare hs_core app.""" import os.path import json import arrow import logging from uuid import uuid4 from languages_iso import languages as iso_languages from dateutil import parser from lxml import etree from django_irods.icommands import SessionException from django.contrib.postg...
from geoserver.support import ResourceInfo, atom_link, atom_link_xml, \ xml_property, write_bool, write_string from geoserver.style import Style from geoserver.resource import FeatureType, Coverage from collections import namedtuple class _attribution(object): def __init__(self, title, width, height): ...
import scrapy import re from locations.items import GeojsonPointItem DAY_MAPPING = { "Mon": "Mo", "Tue": "Tu", "Wed": "We", "Thu": "Th", "Fri": "Fr", "Sat": "Sa", "Sun": "Su" } class WhidbeycoffeeSpider(scrapy.Spider): name = "whidbeycoffee" allowed_domains = ["www.whidbeycoffee....
""" Copyright (c) 2013, Dave Mankoff 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 of conditions and the fol...
""" Define a few commands """ from .meeseeksbox.utils import Session, fix_issue_body, fix_comment_body from .meeseeksbox.scopes import admin, write, everyone from textwrap import dedent def _format_doc(function, name): if not function.__doc__: doc = ' ' else: doc = function.__doc__.splitlin...
"""VisionEgg Core Library """ # This is the python source code for the Core module of the Vision Egg package. # # # Copyright (c) 2001, 2002 Andrew Straw. Distributed under the terms of the # GNU General Public License (GPL). #################################################################### # # Import all ...
import pygration class PygrationDB: """A single step for a migration. """ def execute_sql( self, sql ): self._sql = sql def execute_sql_file( self, sql_file ): self._sql_file = sql_file class AddPygrationDB(PygrationDB): """Adds elements to the DB. """ def add_column( ...
"""Random dot stimuli""" # Copyright (c) 2003 Andrew Straw. Distributed under the terms # of the GNU Lesser General Public License (LGPL). #################################################################### # # Import all the necessary packages # ##############################################################...
# # Copyright (c) 2005-2006 rPath, Inc. # # All rights reserved # import email import os import re import sys from mod_python import apache from mint import database from mint import mailinglists from mint import releases from mint import releasetypes from mint import userlevels from mint import users from mint import...
from numpy import array, zeros, concatenate, sin, cos ERROR_TEXT = { 'VERTICES_SIZE': "Size of vertices array should be a multiple of three, " "but {} provided", 'TRIANGLES_SHAPE': "Need array of triangles (x, 3), " "but array with shape {} provided", 'TRIANGLES...
#!/usr/bin/python2.4 # # Copyright 2009 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. """A tool to run a chrome sync integration test, used by the buildbot slaves. When this is run, the current directory (cw...
# Copyright 2012-2014 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 applicable law or agree...
# Copyright 2018 The Cirq Developers # # 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2018 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 #...
from cli_helpers.packages import tabulate from .preprocessors import bytes_to_string, align_decimals supported_markup_formats = ('mediawiki', 'html', 'latex', 'latex_booktabs', 'textile', 'moinmoin', 'jira') supported_table_formats = ('plain', 'simple', 'grid', 'fancy_grid', 'pipe', ...
import getpass import json import time import os from abc import ABCMeta, abstractmethod from collections import defaultdict from itertools import chain from selenium import webdriver from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium....
import pytest import os from .conf import browser_os_name_conf from .utils import post_test_reports_to_slack from .utils.email_pytest_report import Email_Pytest_Report from .utils import Tesults @pytest.fixture def browser(): "pytest fixture for browser" return pytest.config.getoption("-B") @pytest.fixture ...
import json import urlparse from jingo import register, env import jinja2 from tower import ugettext as _ import waffle from amo.helpers import urlparams from amo.urlresolvers import reverse from amo.utils import JSONEncoder from translations.helpers import truncate def new_context(context, **kw): c = dict(cont...
import unittest import numpy as np from . import amplitude, rge, observables from math import sin, asin from flavio.physics.eft import WilsonCoefficients from flavio import Observable s = 1.519267515435317e+24 par = { 'm_B0': 5.27961, 'm_Bs': 5.36679, 'm_b': 4.18, 'm_d': 4.8e-3, 'm_s': 0.095, ...
# -*- coding: utf-8 -*- # # Copyright (c) 2016, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Create a MANIFEST file for distributing soruces with distutils.""" from __future__ import print_function import glob ...
#!/usr/bin/env python ''' Documentation, License etc. @package hue-Automation ''' # test with # sudo LD_LIBRARY_PATH=<prefix>/lib PYTHONPATH=<prefix>/lib/python2.7/site-packages python ./swig/python/xwiimote_test.py import errno from time import sleep from select import poll, POLLIN from inspect import getmembers f...
""" Copyright 2016 Brocade Communications 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/LICENSE-2.0 Unless required by applicable law or agreed to i...
############################################################################## # # Copyright (C) 2015 Comunitea Servicios Tecnológicos # $Carlos Lombardía Rodríguez <carlos@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General...
# Copyright 2014-2015 0xc0170 # # 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/env python __copyright__ = "Copyright 2014" """ Name: trex_unit_test.py Description: This script creates the functionality to test the performance of the T-Rex traffic generator The tested scenario is a T-Rex TG directly connected to a Cisco router. :: Topology: ------- ...