gt
stringclasses
1 value
context
stringlengths
2.49k
119k
from __future__ import print_function, division, absolute_import import io import os from toolz import merge, partial from warnings import warn from .compression import seekable_files, files as compress_files from .utils import SeekableFile, read_block from ..compatibility import PY2, unicode from ..base import toke...
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import json import os import shutil import tempfile import time import unittest import itertools import urllib from gevent import monkey monkey.patch_all() from bs4 import BeautifulSoup import PIL.Image from urlparse import urlparse from cStringIO i...
# Copyright (c) 2015-2020 Cloudify Platform Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
"""Tests for the EntityPlatform helper.""" import asyncio import logging import unittest from unittest.mock import patch, Mock, MagicMock from datetime import timedelta import pytest from homeassistant.exceptions import PlatformNotReady import homeassistant.loader as loader from homeassistant.helpers.entity import ge...
import copy import re from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist from django.db import connection from django.db.models import Q from django.db.models.sql.query import AND, OR from django.utils.tree import Node ORDER_PATTERN = re.compile(r'^[-+]?[a-zA-Z0-9_]+$') FIELD_PATTERN = re...
import os import click import logbook import multiprocessing from pathlib import Path import random import shutil import string import subprocess import sys from tempfile import mkdtemp import gunicorn.app.base from werkzeug.middleware.proxy_fix import ProxyFix import yaml from ..app import build_app from ..bootstra...
import socket print(socket.gethostbyname("localhost")) import argparse import itertools import logging import pymongo # from scoop import futures import sys, os import re from numpy import linspace # import random # add ofspy to system path sys.path.append(os.path.abspath('..')) db = None # lazy-load if required fr...
import sys import itertools import numpy as np from phonopy.structure.symmetry import Symmetry class StructureAnalyzer: def __init__(self, atoms): self._atoms = atoms self._filename = None self._dictionary = {} def update_attributes(self): """Update attributes of the class Pos...
#!/usr/bin/python # coding=utf-8 ########################################################################## from mock import Mock from mock import patch, call from diamond.collector import Collector from pytest_diamond import get_collector_config, CollectorTestCase from diamond_redis import RedisCollector ##########...
""" Custom integration to integrate frigate with Home Assistant. For more details about this integration, please refer to https://github.com/blakeblackshear/frigate-hass-integration """ from __future__ import annotations from datetime import timedelta import logging import re from typing import Any, Callable, Final ...
# Copyright (c) Meta Platforms, Inc. and affiliates. # # 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...
# # 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...
# -*- encoding: utf-8 -*- from django.test import TestCase from caffe.models import Caffe from employees.models import Employee from .forms import (CategoryForm, FullProductForm, ProductForm, ReportForm, UnitForm) from .models import Category, Product, Unit class CategoryFormTest(TestCase): ...
#!/usr/bin/python -u # Debug # 1 - print interesting stuff # 2 - print counters as written to stats file # 4 - print lines as read from log # 8 - cat vs tail logfile and when done exist, sleeping 0.01 secs # between samples # source /opt/stack/venvs/openstack/bin/activate # the api log is an apache log and ...
# engine/default.py # Copyright (C) 2005-2017 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementations of per-dialect sqlalchemy.engine classes. These are se...
#!/usr/bin/env python # # Copyright (c) 2016 Alexander Lokhman <alex.lokhman@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the...
from tornado import netutil from tornado.ioloop import IOLoop from tornado.iostream import IOStream from tornado.testing import AsyncHTTPTestCase, LogTrapTestCase, get_unused_port from tornado.util import b from tornado.web import RequestHandler, Application import socket import time class HelloHandler(RequestHandler)...
# 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...
#========================================================================= # Sparse Memory Image #========================================================================= # This module contains a class for representing ELF binary which would be # loaded into a TestMemory object. from __future__ import print_function ...
import math from sqf.common_expressions import TryCatchExpression, ForEachExpression, \ WhileDoExpression, ForFromToDoExpression, ForSpecDoExpression, SwitchDoExpression, \ IfThenSpecExpression, IfThenElseExpression, IfThenExpression, IfThenExitWithExpression from sqf.types import Keyword, Namespace, Number, A...
# Copyright 2021 Google LLC. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
import logging import ldap3 try: from flask import _app_ctx_stack as stack except ImportError: # pragma: no cover from flask import _request_ctx_stack as stack from enum import Enum log = logging.getLogger(__name__) AuthenticationResponseStatus = Enum( 'AuthenticationResponseStatus', 'fail success') ...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: ...
# -*- Mode: Python -*- # Author: Sam Rushing <rushing@nightmare.com> # stealing from myself. taken from amk's medusa-0.5.4 distribution, # then hacked about ten years into the future, buncha stuff ripped # out. # # mostly useful for debugging, should not be distributed with the final client! # # # python REPL ...
# engine/default.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Default implementations of per-dialect sqlalchemy.engine classes. These are se...
# Copyright (c) 2014 OpenStack Foundation # # 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 ...
# 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 libs.graph.DLinkedList import Queue, DoubledLinkedList as List from libs.graph.PriorityQueue import PriorityQueueBinary as PriorityQueue from libs.graph.Tree import * #it is better to use a DoubledLinkedList to operate with a great efficiency on #the lists those will be used in the graph representation class Node...
""" Gaussian Mixture Models. This implementation corresponds to frequentist (non-Bayesian) formulation of Gaussian Mixture Models. """ # Author: Ron Weiss <ronweiss@gmail.com> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Bertrand Thirion <bertrand.thirion@inria.fr> import warnings import numpy as...
# 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 # d...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting field 'Job.strength' db.delete_column('main_job', 'strength') ...
import platform import sys import os import os.path import re import errno import stat from subprocess import Popen, PIPE, STDOUT from shutil import rmtree, copy, Error as ShError ####################################################################################################################### SYSNAME = platform...
# # 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 # ...
from __future__ import absolute_import, division, print_function import logging from inspect import getmro from collections import defaultdict from .message import Message from .exceptions import InvalidSubscriber, InvalidMessage __all__ = ['Hub', 'HubListener'] class Hub(object): """The hub manages communica...
# This file is mainly for detecting the graphics used and storing these # information in string that are later used for the report import json import re import logging from django.db import models LOG = logging.getLogger(__name__) class UserReport(models.Model): uploader = models.GenericIPAddressField(editable...
#analysis files from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtWidgets import QFileDialog from analysis_gui import Ui_Analysis import numpy as np import matplotlib,math,csv matplotlib.use('Qt5Agg') from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backen...
# coding: utf-8 """ Talon.One API The Talon.One API is used to manage applications and campaigns, as well as to integrate with your application. The operations in the _Integration API_ section are used to integrate with our platform, while the other operations are used to manage applications and campaigns. #...
from sqlalchemy import select, cast, Date, Float, desc, func from ecorelevesensor.models import DBSession, Individual from ecorelevesensor.models.data import ( V_Individuals_LatLonDate, V_Individuals_History ) from ecorelevesensor.models.views import V_SearchIndiv from pyramid.security import NO_PERMISSION_REQU...
# 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...
#!/usr/bin/env python3 import tensorflow as tf from tfx.bricks import embedding, dense_to_one_hot, linear, dropout, reduce_max, batch_norm_lin, conv2d_bn, \ pow_1, softmax_2d from model import ModelW2TArgs class Model(ModelW2TArgs): def __init__(self, data, FLAGS): super(Model, self).__init__(data,...
# coding=utf-8 import random from copy import deepcopy, copy from itertools import product from simpleai.search.utils import argmin MOST_CONSTRAINED_VARIABLE = 'mcv' HIGHEST_DEGREE_VARIABLE = 'degree' LEAST_CONSTRAINING_VALUE = 'lvc' def backtrack(problem, variable_heuristic='', value_heuristic='', inference=True): ...
""" Support for the Amazon Polly text to speech service. For more details about this component, please refer to the documentation at https://home-assistant.io/components/tts.amazon_polly/ """ import logging import voluptuous as vol from homeassistant.components.tts import PLATFORM_SCHEMA, Provider import homeassista...
from rapidsms.tests.scripted import TestScript from form.models import * from reporters.models import * import reporters.app as reporter_app import bednets.app as nigeria_app import form.app as form_app from app import App from models import * from django.core.management.commands.dumpdata import Command import random i...
# Modified work: # ----------------------------------------------------------------------------- # Copyright (c) 2018 Preferred Infrastructure, Inc. # Copyright (c) 2018 Preferred Networks, Inc. # ----------------------------------------------------------------------------- # Original work: # -------------------------...
import itertools import numpy as np import pandas as pd from graphysio.utils import truncatevecs def findPressureFeet(curve): series = curve.series samplerate = curve.samplerate fstderiv = series.diff().shift(-1) sndderiv = fstderiv.diff().shift(-1) # Remove deceleration peaks sndderiv = s...
# -*- coding: UTF-8 -*- import sys from vulkan import * from PySide2 import (QtGui, QtCore) validationLayers = [ 'VK_LAYER_LUNARG_standard_validation' ] enableValidationLayers = True class InstanceProcAddr(object): T = None def __init__(self, func): self.__func = func def __call__(self...
#!/usr/bin/env python # Copyright 2012 Cloudera 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 ag...
import abc import sqlite3 import os import os.path import sys from pogo.dao.local_db_access import LocalDBAccessor from pogo.util.config import StretchConfig class RecordDaoLocal(object): __metaclass__ = abc.ABCMeta def __init__(self, localdbaccessor): if not localdbaccessor: raise ValueEr...
# -*- coding: utf-8 -*- #***************************************************************************** # Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu> # # Distributed under the terms of the BSD License. The full license is in # the file COPYING, distributed as part of this software. #***...
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9332") else: access = Ser...
# -*- coding: utf-8 -*- # # Copyright (C) 2013-2015 Vinay Sajip. # Licensed to the Python Software Foundation under a contributor agreement. # See LICENSE.txt and CONTRIBUTORS.txt. # from io import BytesIO import logging import os import re import struct import sys from .compat import sysconfig, detect_encoding, ZipFi...
import pytest import os import json import pyecore.ecore as Ecore from pyecore.resources import * from pyecore.resources.json import JsonResource, JsonOptions, DefaultObjectMapper, NO_OBJECT @pytest.fixture(scope='module') def lib(): package = Ecore.EPackage('mypackage') package.nsURI = 'http://simplemetamode...
#!/usr/bin/env python # Copyright (c) 2013 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 ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Test Network ------------ This module tests the basic functionality of a VLAN network. Each test "runs" on a VLAN with two nodes, node_1 and node_2, and each has a state machine. """ import unittest from bacpypes.debugging import bacpypes_debugging, ModuleLogger f...
#!/usr/bin/env python # -*- coding: utf-8 -*- import datetime import json import os import random as _random import sys import traceback from getopt import getopt, GetoptError from multiprocessing import Process from os import environ from wsgiref.simple_server import make_server import requests as _requests from json...
"""Handle Manager.""" import json import logging import math import numbers import os from queue import Queue from threading import Event import time from typing import ( Any, Callable, cast, Dict, Iterable, List, Optional, Sequence, Tuple, TYPE_CHECKING, ) from wandb.proto.wan...
""" Octave (and Matlab) code printer The `OctaveCodePrinter` converts SymPy expressions into Octave expressions. It uses a subset of the Octave language for Matlab compatibility. A complete code generator, which uses `octave_code` extensively, can be found in `sympy.utilities.codegen`. The `codegen` module can be us...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
import onmt import onmt.Models import onmt.modules import torch.nn as nn import torch from torch.autograd import Variable def loadImageLibs(): "Conditional import of torch image libs." global Image, transforms from PIL import Image from torchvision import transforms class Translator(object): def...
import traceback from typing import Dict, List, Optional, Union import dateparser import demistomock as demisto # noqa: F401 import requests from CommonServerPython import * # noqa: F401 # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' CONSTANTS ''' DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ'...
""" @package mi.instrument.star_asimet.bulkmet.metbk_a.driver @file marine-integrations/mi/instrument/star_aismet/bulkmet/metbk_a/driver.py @author Bill Bollenbacher @brief Driver for the metbk_a Release notes: initial version """ import re import time from mi.core.log import get_logger from mi.core.common import B...
# -*- coding: utf-8 -*- from __future__ import print_function from sys import hexversion import random from .context import sortedcontainers from sortedcontainers import SortedSet from nose.tools import raises from functools import wraps import operator if hexversion < 0x03000000: from itertools import izip as z...
#!/usr/bin/env python ''' NAME launcher.py DESCRIPTION 'launcher.py' emulates the behaviour of a web-based launcher. This script will ssh to a remote host and execute the bash-based 'headnode.bash' script on that host. HISTORY 07 November 2014 o Initial design and coding. ''' ...
# Copyright (c) 2016 Jonathan Lloyd - copyright@thisisjonathan.com # # The MIT License # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the ...
#!/bin/python3 import requests import time import os import sys import re from html.parser import HTMLParser import config import logger _CONFIGFILE = 'config.yaml' _WAIT = 0.25 # global rait limiting value, don't set to 0 _EXT = re.compile('^http.*/download/[0-9]+/[^\.]+(\.[a-zA-Z]{2,4})\?token=.*$') log = logger....
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from froide.helper.auth_migration_util import USER_DB_NAME APP_MODEL, APP_MODEL_NAME = 'account.User', 'account.user' class Migration(SchemaMigration): def forwards(self, orm): ...
import re import logging from optparse import make_option from django.db import transaction, connections, DEFAULT_DB_ALIAS from django.core.management.base import BaseCommand from vdw.genes.models import Gene, GenePhenotype from vdw.literature.models import PubMed from vdw.phenotypes.models import Phenotype from vdw.va...
import time import httplib from urllib import urlencode from threading import Lock from django.conf import settings from django.core.cache import cache from graphite.node import LeafNode, BranchNode from graphite.readers import FetchInProgress from graphite.logger import log from graphite.util import unpickle from grap...
# -*- coding: utf-8 -*- """ Created on Mon Dec 09 21:29:20 2013 Author: Josef Perktold """ import os import numpy as np import pandas as pd import statsmodels.discrete.discrete_model as smd from statsmodels.genmod.generalized_linear_model import GLM from statsmodels.genmod import families from statsmodels.genmod.fam...
#!/usr/bin/env python import errno import getopt import math import os import progress import re import select import signal import socket import subprocess import sys import time from xml.dom.minidom import parse,parseString from xml.dom import DOMException from pprint import pprint from configtool import getConfigVa...
# Electrum - Lightweight Bitcoin Client # Copyright (c) 2012 Thomas Voegtlin # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights t...
# voter_guide/views_admin.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from .controllers import voter_guides_import_from_master_server from .models import VoterGuide, VoterGuideListManager, VoterGuideManager from .serializers import VoterGuideSerializer from admin_tools.views import redirect_to_sig...
import analysis import numpy as np from sklearn import linear_model from sklearn.preprocessing import PolynomialFeatures from sklearn import cross_validation from sklearn.pipeline import Pipeline import sklearn #from sklearn.kernel_ridge import KernelRidge from sklearn import svm from sklearn import gaussian_process fr...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """An extensible ASCII table reader and writer. cds.py: Classes to read CDS / Vizier table format :Copyright: Smithsonian Astrophysical Observatory (2011) :Author: Tom Aldcroft (aldcroft@head.cfa.harvard.edu) """ import fnmatch import itertools impor...
# setup.py # Copyright (c) 2013-2020 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,E0401,E0601,E1111,R0904,W0122,W0201,W0621 # Taken in large part from: # http://www.jeffknupp.com/blog/2013/08/16/ # open-sourcing-a-python-project-the-right-way/ # With additional hints from: # http:/...
# Copyright 2013: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
import attr from plumbum import local import benchbuild as bb from benchbuild.source import HTTP from benchbuild.utils.cmd import sh, tar @attr.s class RodiniaGroup(bb.Project): """Generic handling of Rodinia benchmarks.""" DOMAIN = 'rodinia' GROUP = 'rodinia' SOURCE = [ HTTP(remote={ ...
import sys, os import types from . import model, ffiplatform class VGenericEngine(object): _class_key = 'g' _gen_python_module = False def __init__(self, verifier): self.verifier = verifier self.ffi = verifier.ffi self.export_symbols = [] self._struct_pending_verification...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
#!/usr/bin/env python # Copyright 2012 The Swarming Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 that # can be found in the LICENSE file. import json import logging import os import subprocess import sys import unittest ROOT_DIR = os.path.dirname(os.path.di...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 3.0.0.11832 on 2017-03-22. # 2017, SMART Health IT. import io import json import os import unittest from . import eligibilityresponse from .fhirdate import FHIRDate class EligibilityResponseTests(unittest.TestCase): def instantiate_from(se...
# pset7.py # sys.path.append('..') import midi from common.audio import * from common.clock import * from common.core import * from common.gfxutil import * from common.mixer import * from common.synth import * from common.wavegen import * from common.wavesrc import * BEAT_LEN = 160 * 6 * 2 class MidiController(ob...
import pytest from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from nbgrader.tests.formgrader.base import BaseTestFormgrade @pytest.mark.js @pytest.mark...
#!/usr/bin/env python # Author: Lisandro Dalcin # Contact: dalcinl@gmail.com """ Python bindings for MPI """ import sys import os import re try: import setuptools except ImportError: setuptools = None pyver = sys.version_info[:2] if pyver < (2, 6) or (3, 0) <= pyver < (3, 2): raise RuntimeError("Python...
from pkg_resources import require require("cothread==2.14") from cothread.catools import * import cothread from Generic_BPMDevice import * from subprocess import Popen, PIPE import numpy as np class SparkERXR_EPICS_BPMDevice(Generic_BPMDevice): """Libera BPM Device class that uses Epics to communicate with PVs. ...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2017 F5 Networks Inc. # # 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 # ...
import math import OpenGL from OpenGL.GL import * import coordinate_system import vector class Camera: """ camera = Camera() camera.mode = Camera.ORTHOGONAL camera.set_window_size(800, 600) camera.set_opengl_projection() .. draw 3d stuff .. camera.set_opengl_pixel_projection() sx,...
# -*- coding: utf-8 -*- # Copyright (c) 2015-2022, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 """ Data Objects ################################### Data objects are used to store typed data coming from an external source (for example a file on disk). There are three primary da...
import wx import wx.webview as webview import webbrowser import templates import util import threading import time from settings import settings BLANK = 'about:blank' COMMAND_CLOSE = 'http://close/' COMMAND_NEXT = 'http://next/' COMMAND_PREVIOUS = 'http://previous/' COMMAND_FIRST = 'http://first/' COMMAND_LAST = 'http...
# # 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 # ...
# # GtkMain.py -- pygtk threading help routines. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # """ GUI threading help routines. Usage: import GtkMain # See c...
from __future__ import print_function import re import jwt import boto3 # import json print('Loading function') def lambda_handler(event, context): print('Client token: ' + event['authorizationToken']) print('Method ARN: ' + event['methodArn']) '''validate the incoming token''' '''and produce the pri...
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) import sys import base64 import os import zlib import itertools import hashlib import datetime import six from six.moves...
# -*- coding: utf-8 -*- import json import os import random import time import uuid import pyrax from pyrax.autoscale import AutoScaleClient from pyrax.autoscale import AutoScalePolicy from pyrax.autoscale import AutoScaleWebhook from pyrax.autoscale import ScalingGroup from pyrax.autoscale import ScalingGroupManager ...
""" Tests that the specified index column (a.k.a "index_col") is properly handled or inferred during parsing for all of the parsers defined in parsers.py """ from io import StringIO import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, ) import pandas._testing as tm # TODO(1...
# Copyright 2017 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 or agreed to in writing, s...
import random from koon.input import Mouse from tiles import * from pickups import * import ai import world from event import Event class GroundControl: """The main control center that interacts with the model """ def __init__( self, playfield ): self.playfield = playfield self.controlle...
"""Tests for letsencrypt.cli.""" from __future__ import print_function import argparse import functools import itertools import os import shutil import traceback import tempfile import unittest import mock import six from six.moves import reload_module # pylint: disable=import-error from acme import jose from lets...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from textwrap import...
""" dj-stripe Event Handler tests """ import decimal from copy import deepcopy from unittest.mock import patch from django.contrib.auth import get_user_model from django.test import TestCase from djstripe.models import ( Card, Charge, Coupon, Customer, Dispute, DjstripePaymentMethod, Event, Invoice, InvoiceItem, Pl...