gt
stringclasses
1 value
context
stringlengths
2.49k
119k
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, unittest from frappe.model.db_query import DatabaseQuery from frappe.desk.reportview import get_filters_cond from frappe.permissions import add_user_permission, cl...
# Copyright 2019 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, ...
import furnitureList as fl import random import warnArea import constants from vector import * def addPlacedFurniture(placedFurniture, furniture, warnAreas): placedFurniture.append(furniture) #Add a warn area for the furniture warnArea.addWarnArea( warnAreas, ( fl.getCorne...
# Copyright 2013-2014 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2012 Tsutomu Uchino # # 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 ...
# This is the HealthCraft Govhack2017 entry from high-fliers team. from flask import Flask, render_template, request import sys from CryptoPhotoUtils import CryptoPhotoUtils import urllib, hashlib, hmac, time, json, base64 # CryptoPhoto dependencies import requests app = Flask(__name__) app.config.from_pyfile('confi...
from entities.atom import Atom from entities.hetatm import Hetatm from entities.aminoacids import aminoacids from numpy import matrix, dot, sqrt from libraries.rotationMatrices import * class PDB: """Please, take care of working with different models, I haven't checked it properly For each entity in the PDB, t...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2012 Hewlett-Packard Development Company, L.P. # # 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 applicabl...
# Copyright 2013 Brocade Communications System, 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 # #...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack Foundation # Copyright 2012 Nebula, Inc. # Copyright (c) 2012 X.commerce, a business unit of eBay Inc. # # Licensed under the Apach...
import json import mock import collections from django.test import TestCase from django.test.utils import override_settings from django.core.urlresolvers import reverse from wagtail.wagtailcore.models import Page from wagtail.api.v2 import signal_handlers from wagtail.tests.demosite import models from wagtail.tests...
""" Copyright (c) 2014 Brian Muller Copyright (c) 2015 OpenBazaar """ from collections import Counter, defaultdict from twisted.internet import defer from log import Logger from dht.utils import deferredDict from dht.node import Node, NodeHeap from protos import objects class SpiderCrawl(object): """ Craw...
import sys import os myPath = os.path.abspath(os.getcwd()) sys.path.insert(0, myPath) import hubblestack.extmods.modules.pulsar as pulsar from salt.exceptions import CommandExecutionError import shutil import six import pyinotify if os.environ.get('DEBUG_SHOW_PULSAR_LOGS'): import logging root_logger = loggin...
# Copyright 2008 Google Inc. All Rights Reserved. # Code originally from Ian Bicking # (http://code.google.com/p/appengine-monkey/). # Contributed by Ian and subsequently modified here at Google. """Copyright 2008 Python Software Foundation, Ian Bicking, and Google.""" import cStringIO import mimetools HTTP_PORT = 80...
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
# pylint: disable-msg=E1101,W0612 import itertools import numpy as np import pytest from pandas.errors import PerformanceWarning import pandas as pd import pandas.util.testing as tm class TestSparseArrayConcat(object): @pytest.mark.parametrize('kind', ['integer', 'block']) def test_basic(self, kind): ...
########################################################################## # # Copyright (c) 2013-2014, Image Engine Design 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: # # * Redi...
#!/usr/bin/env python3 import pytest import sys import time import calendar import datetime from chronyk import LOCALTZ, Chronyk, ChronykDelta, currentutc, guesstype, DateRangeError def isEqual(time1, time2): return abs(time1 - time2) < 0.1 ######################################################################...
# QRCode for Python # # Ported from the Javascript library by Sam Curren # ReportLab module by German M. Bravo # # QRCode for Javascript # http://d-project.googlecode.com/svn/trunk/misc/qrcode/js/qrcode.js # # Copyright (c) 2009 Kazuhiko Arase # # URL: http://www.d-project.com/ # # Licensed under the MIT license: # h...
"""linterate - an automated lint excitor. Download files from differential reviews and apply robust linters to those files. Where almost certain errors are detected, make inline comments on those reviews. This is emphatically not a stand-in for CI, more a utility for getting developers excited about CI and showing w...
"""Unit tests for reviewboard.reviews.views.ReviewRequestDetailView.""" from datetime import timedelta from django.contrib.auth.models import User from django.test.html import parse_html from djblets.extensions.hooks import TemplateHook from djblets.extensions.models import RegisteredExtension from djblets.siteconfig...
#!/usr/bin/env python # Copyright (c) 2014, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. ''' STIX Document Validator (sdv) - validates STIX v1.1.1 instance documents. ''' import sys import os import logging import argparse import json import settings from validators import (STIXSc...
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # from __future__ import ...
"""Parser for bvlc caffe googlenet.""" # Authors: Michael Eickenberg # Kyle Kastner # License: BSD 3 Clause from sklearn.externals import joblib from ...datasets import get_dataset_dir, download from .caffemodel import _parse_caffe_model, parse_caffe_model import os from ...utils import check_tensor, get_mini...
#The MIT License (MIT) #Copyright (c) 2015-2016 mh4x0f P0cL4bs Team #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 to #use, copy, mo...
# coding=utf-8 # pylint: disable-msg=E1101,W0612 import pytest from datetime import datetime, timedelta from numpy import nan import numpy as np import numpy.ma as ma import pandas as pd from pandas.api.types import CategoricalDtype from pandas.core.dtypes.common import ( is_categorical_dtype, is_datetime64...
""" Copyright 2015 Enzo Busseti [ Modified by Balasubramanian Narasimhan ] 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 appli...
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import glob import logging import os import unittest.mock from pants.binaries.binary_util import ( BinaryRequest, BinaryToolFetcher, BinaryToolUrlGenerator, BinaryUtil, ...
# Copyright 2014: Intel 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 a...
import os import platform import subprocess import textwrap import pytest from conan.tools.env.environment import environment_wrap_command from conans.test.utils.tools import TestClient, GenConanfile from conans.util.files import save @pytest.fixture() def client(): openssl = textwrap.dedent(r""" import...
from __future__ import unicode_literals import re import json import os from .common import InfoExtractor from ..compat import ( compat_urlparse, compat_urllib_parse_urlencode, compat_urllib_parse_urlparse, compat_str, ) from ..utils import ( unified_strdate, determine_ext, int_or_none, ...
import os import sys import inspect from textwrap import dedent from textwrap import indent def is_function(obj): return inspect.isbuiltin(obj) or type(obj) is type(ord) def is_method(obj): return inspect.ismethoddescriptor(obj) or type(obj) in ( type(str.index), type(str.__add__), t...
# Copyright 2010-2011 OpenStack Foundation # Copyright 2012-2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/li...
from __future__ import print_function import json import pycurl import re import six import urllib import twisted from twisted.internet import reactor, threads from twisted.internet.defer import Deferred, DeferredLock, DeferredSemaphore from twisted.internet.protocol import Protocol from twisted.web.client import Agen...
from mock import Mock, patch, call from pytest_relaxed import raises from fabric import Connection, Group, SerialGroup, ThreadingGroup, GroupResult from fabric.group import thread_worker from fabric.exceptions import GroupException class Group_: class init: "__init__" def may_be_empty(self): ...
#!/usr/bin/env python import Bio.Phylo as bp import os import re import sha import shutil import sys import pypyodbc as pyodbc from pruner import Prunable from annotate import Annotatable from config import get_treestore_kwargs, base_uri, load_dir import tempfile import phylolabel import time from cStringIO import Stri...
#Author: Jaspreet Jhoja #contact:Jaspreetj@ece.ubc.ca import random,copy, statistics, timeit, threading, math from math import * import numpy as np import matplotlib.pyplot as plt import plot as pt import queue as Queue print("SIMULATED ANNEALING BASED PLACER") files = ['cm138a.txt', 'cm150a.txt', 'cm151a.txt', 'cm1...
import claripy import logging import itertools from .memory_object import SimMemoryObject from ..state_plugins.plugin import SimStatePlugin from ..state_plugins.sim_action_object import SimActionObject from ..state_plugins.symbolic_memory import SimSymbolicMemory from .. import sim_options l = logging.getLogger(name=...
# 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...
# coding: utf-8 """ Server API Reference for Server API (REST/Json) OpenAPI spec version: 2.0.6 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems import re class CreateProductRequest(object): """ NOTE: This class...
# coding=utf-8 # TODO: Not yet implemented! """ The model for the character level speech recognizer. Based on the paper: http://arxiv.org/pdf/1601.06581v2.pdf This model is: character level RNN-LM """ import tensorflow as tf from tensorflow.python.client import timeline import numpy as np import time import os fro...
# Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org> # Copyright (c) 2013 Gergely Nagy <algernon@madhouse-project.org> # Copyright (c) 2013 James King <james@agentultra.com> # Copyright (c) 2013 Julien Danjou <julien@danjou.info> # Copyright (c) 2013 Konrad Hinsen <konrad.hinsen@fastmail.net> # Copyright (c) 2013...
#!/usr/pkg/bin/python2.7 """Interfaces for launching and remotely controlling Web browsers.""" # Maintained by Georg Brandl. import os import shlex import sys import stat import subprocess import time __all__ = ["Error", "open", "open_new", "open_new_tab", "get", "register"] class Error(Exception): pass _browse...
# coding: utf-8 # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Test the Logarithmic Units and Quantities """ import pickle import itertools import pytest import numpy as np from numpy.testing import assert_allclose from astropy.tests.helper import assert_quantity_allclose from astropy import...
#!/usr/bin/env python2.3 # -*- coding: utf-8 -*- # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache Lice...
# # 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...
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: msp/msp_principal.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection...
#!/usr/bin/env python #============================================================================== # Copyright 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Amazon Software License (the "License"). You may not use # this file except in compliance with the License. A copy of the...
""" A sensor to monitor incoming and outgoing phone calls on a Fritz!Box router. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.fritzbox_callmonitor/ """ import logging import socket import threading import datetime import time import re import v...
# -*- coding: utf-8 -*- """ This module provides a simple interface into RProfile-01-????.bobaaa files generated by the PPMstar code """ from __future__ import division from __future__ import print_function from builtins import str from builtins import range from past.utils import old_div from builtins import object ...
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import torch from mmdet.models.dense_heads import PISARetinaHead, PISASSDHead from mmdet.models.roi_heads import PISARoIHead def test_pisa_retinanet_head_loss(): """Tests pisa retinanet head loss when truth is empty and non-empty.""" s = 256 img...
#!/usr/bin/env python import logging l = logging.getLogger("simuvex.storage.memory") import claripy from ..plugins.plugin import SimStatePlugin stn_map = { 'st%d' % n: n for n in xrange(8) } tag_map = { 'tag%d' % n: n for n in xrange(8) } class AddressWrapper(object): """ AddressWrapper is used in SimAbstr...
import synapse.exc as s_exc import synapse.tests.utils as s_utils import synapse.common as s_common class EconTest(s_utils.SynTest): async def test_model_econ(self): async with self.getTestCore() as core: # test card number 4024007150779444 card = (await core.nodes('[ econ:pay:c...
#! /usr/bin/env python from __future__ import print_function import os import re import subprocess import sys from collections import OrderedDict, defaultdict from pkg_resources import parse_version import click import jinja2 import m2r __version__ = "0.1.1" CHANGELOG = """ # Change Log All notable changes to landl...
# Copyright (C) 2010, 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions an...
#!/usr/bin/python """ Concatenates all SNPs from a VCF file in either FASTA or aln (clustal) format """ import os, sys import copy import argparse import multiprocessing from pprint import pprint as pp from collections import defaultdict, Counter sys.path.insert(0, '.') import vcfmerger import editdist from treem...
#!/usr/bin/env python from __future__ import division # ----------------------------------------------------------------------------- # Copyright (c) 2014--, The Qiita Development Team. # # Distributed under the terms of the BSD 3-clause License. # # The full license is in the file LICENSE, distributed with this soft...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_gp_signals ---------------------------------- Tests for GP signal modules. """ import unittest import numpy as np import scipy.linalg as sl from enterprise.pulsar import Pulsar from enterprise.signals import gp_signals, parameter, selections, signal_base, uti...
#!/usr/bin/python2.4 # # Copyright (C) 2010 The Android Open Source Project # # 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...
import os import sys import time import numpy as np from numpy.testing import assert_ import pytest from scipy.special._testutils import assert_func_equal try: import mpmath # type: ignore[import] except ImportError: pass # ------------------------------------------------------------------------------ # M...
''' binary.py Methods to translate DNA sequences to integers via binary intermediates (for more efficient memory usage) ''' # Lookup tables _LUTsb = {'AAAA':0x0,'AAAC':0x1,'AAAG':0x2,'AAAT':0x3,'AACA':0x4,'AACC':0x5, 'AACG':0x6,'AACT':0x7,'AAGA':0x8,'AAGC':0x9,'AAGG':0xa,'AAGT':0xb,'AATA':0xc, 'AATC':0xd,'AATG':0xe...
""" Functions to generate Theano update dictionaries for training. """ import numpy as np import theano import theano.tensor as T def sgd(loss, all_params, learning_rate): all_grads = theano.grad(loss, all_params) updates = [] for param_i, grad_i in zip(all_params, all_grads): updates.append((p...
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type, binary_type from pip._vendor.six.moves import http_client, urllib import codecs import re from pip._vendor import webencodings from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .con...
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
#!/usr/bin/env python """ ar_follower.py - Version 1.0 2013-08-25 Follow an AR tag published on the /ar_pose_marker topic. The /ar_pose_marker topic is published by the ar_track_alvar package Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2013 Patrick Goebel. All...
# -*- coding: utf-8 -*- """MongoDB backend for celery.""" from __future__ import absolute_import from datetime import datetime try: import pymongo except ImportError: # pragma: no cover pymongo = None # noqa if pymongo: try: from bson.binary import Binary except ImportError: ...
#!/usr/bin/env python3 # This software was developed at the National Institute of Standards # and Technology by employees of the Federal Government in the course # of their official duties. Pursuant to title 17 Section 105 of the # United States Code this software is not subject to copyright # protection and is in the...
import pytest from mitmproxy.test import tflow from mitmproxy.addons import view from mitmproxy import flowfilter from mitmproxy import options from mitmproxy.test import taddons def tft(*, method="get", start=0): f = tflow.tflow() f.request.method = method f.request.timestamp_start = start return f...
from __future__ import unicode_literals, division, absolute_import import logging from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from collections import MutableSet from datetime import datetime from sqlalchemy import Column, Unicode, Integer, ForeignKey, func, DateTime from sqlalchemy...
# coding=utf-8 # Copyright 2015 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 collections imp...
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
from django.conf import settings from django.core.checks.security import base, csrf, sessions from django.test import SimpleTestCase from django.test.utils import override_settings class CheckSessionCookieSecureTest(SimpleTestCase): @override_settings( SESSION_COOKIE_SECURE=False, INSTALLED_APPS=[...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """bibgrep: Grep for bib(la)tex files. To get all articles where the author contains 'Johnson' and the article is from 2010 or beyond: >>> bibgrep --entry="article" --field="author~Johnson" --field="year>=2010" The key, entry and field arguments take strings in a mini ...
from datetime import datetime import json import os.path import re import sys import click from openelex.api import elections as elec_api from openelex.base.bake import Baker, RawBaker, reporting_levels_for_election from openelex.base.publish import published_url from openelex.lib import format_date, compose from ope...
''' pydevd - a debugging daemon This is the daemon you launch for python remote debugging. Protocol: each command has a format: id\tsequence-num\ttext id: protocol command number sequence-num: each request has a sequence number. Sequence numbers originating at the debugger are odd, sequence numbers ori...
# uncompyle6 version 2.9.10 # Python bytecode 2.7 (62211) # Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10) # [GCC 6.2.0 20161005] # Embedded file name: xmlreader.py """An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ import handler from _exceptions impo...
# Authors: Marijn van Vliet <w.m.vanvliet@gmail.com> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD-3-Clause import numpy as np from .constants import FIFF from .meas_info import _check_ch_keys from .proj import _has_eeg_average_ref_proj, ma...
"""Test config validators.""" from datetime import timedelta, datetime, date import enum import os from socket import _GLOBAL_DEFAULT_TIMEOUT from unittest.mock import Mock, patch import pytest import voluptuous as vol import homeassistant.helpers.config_validation as cv def test_boolean(): """Test boolean vali...
try: from Tkinter import * except ImportError: from tkinter import * try: import tkMessageBox except ImportError: from tkinter import messagebox as tkMessageBox try: import tkFileDialog except ImportError: from tkinter import filedialog as tkFileDialog import os from PIL import Image, ImageTk ...
# -*- coding: utf-8 -*- from PyQt4 import QtGui from PyQt4.QtGui import QGridLayout, QLabel from PyQt4.QtCore import Qt import Orange.data from Orange.regression import linear from Orange.preprocess.preprocess import Preprocess from Orange.widgets import widget, settings, gui class OWSGDRegression(widget.OWWidget):...
'''Functions and classes used to interface with .nib files as created by Jim Kent's nibFrag and faToNib utilities.''' import glob import math import os import struct import sys import warnings from cStringIO import StringIO from collections import defaultdict as dd from chipsequtil import reverse_complement, get_file...
################################################################################ # Copyright (C) 2012-2013 Leap Motion, Inc. All rights reserved. # # Leap Motion proprietary and confidential. Not for distribution. # # Use subject to the terms of the Leap Motion SDK Agreement available at ...
""" Module for managing a remote value on the KNX bus. Remote value can be : - a group address for writing a KNX value, - a group address for reading a KNX value, - or a group of both representing the same value. """ from __future__ import annotations from abc import ABC, abstractmethod import logging from typing imp...
## A script for extracting info about the patients used in the analysis ## Load necessary modules from rpy2 import robjects as ro import numpy as np import os ro.r('library(survival)') import re ##This call will only work if you are running python from the command line. ##If you are not running from the command line...
# encoding: utf-8 """ Initializes lxml parser and makes available a handful of functions that wrap its typical uses. """ from __future__ import absolute_import from lxml import etree from .ns import NamespacePrefixedTag # configure etree XML parser ------------------------------- element_class_lookup = etree.Elem...
# -*- coding: utf-8 -*- """Tools for working with groups This provides several functions to work with groups and a Group class that keeps track of the different representations and has methods to work more easily with groups. Author: Josef Perktold, Author: Nathaniel Smith, recipe for sparse_dummies on scipy user ma...
# implementation of Spaceship - program template for RiceRocks import simplegui import math import random # globals for user interface WIDTH = 800 HEIGHT = 600 score = 0 lives = 3 time = 0 started = False class ImageInfo: def __init__(self, center, size, radius = 0, lifespan = None, animated = False): sel...
#!/usr/bin/env python3 import io import json import logging import os import sys import tarfile import tempfile import unittest sys.path.append(os.path.dirname(os.path.dirname(__file__))) from src import Application, Logger, load def _get_json(obj): return json.dumps(obj).encode('utf-8') class ApplicationTes...
62,963 -> 844,181 58,85 -> 917,944 137,76 -> 137,347 453,125 -> 347,19 178,65 -> 977,864 447,360 -> 62,745 723,326 -> 156,893 47,497 -> 107,437 387,491 -> 340,491 58,477 -> 283,252 86,351 -> 562,827 215,172 -> 539,172 496,801 -> 496,63 546,412 -> 232,98 621,807 -> 481,807 471,20 -> 618,20 175,283 -> 175,467 19,283 -> 1...
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Font(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "box.hoverlabel" _path_str = "box.hoverlabel.font" _valid_props = {"color", "colorsrc", "family...
import pytest import socket from amqp import RecoverableConnectionError from unittest.mock import Mock, patch from case import ContextMock from kombu import common from kombu.common import ( Broadcast, maybe_declare, send_reply, collect_replies, declaration_cached, ignore_errors, QoS, PREFETCH_COUNT_M...
from mock import Mock, sentinel from stevedore import (ExtensionManager, NamedExtensionManager, HookManager, DriverManager, EnabledExtensionManager) from stevedore.dispatch import (DispatchExtensionManager, NameDispatchExtensionManager) from stevedore.extension imp...
"""Build the tutorial data files from the IMDB *.list.gz files.""" import csv import gzip import os import re import sys from datetime import datetime split_on_tabs = re.compile(b'\t+').split BAD_GENRES = {b'Adult', b'Documentary', b'Short', b'Horror', b'Reality-TV', b'Talk-Show', b'Game-Show', b'Reali...
import qi import os import time import cv2 import numpy as np import almath as m import base64 import sys try: import cPickle as pickle except: import pickle try: from almath import OccupancyMapParams from almath import Point2Di except: class Point2Di: def __init__(self, x, y): ...
# $Id: tableparser.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module defines table parser classes,which parse plaintext-graphic tables and produce a well-formed data structure suitable for building a CALS tab...
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # Copyright (c) 2015, Gamelan Labs, Inc. # Copyright (c) 2016, Google, Inc. # Copyright (c) 2016, Gamelan Labs, Inc. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import json import os import unittest.mock from textwrap import dedent from typing import Tuple from pex.interpreter import PythonInterpreter from pants.backend.python.interpreter_cache ...
# Copyright 2011-2015 MongoDB, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...