src
stringlengths
721
1.04M
# -*- coding: utf-8 -*- ''' Created on 2013-11-19 @author: samuelchen ''' import sys, os sys.path.insert(0, '%s/../' % os.getcwd()) import unittest from conn_mgr import ConnectionManager import time flag = False class RegisterTest(unittest.TestCase): def setUp(self): ip ='127.0.0.1'...
import os import sys # OS Specifics ABS_WORK_DIR = os.path.join(os.getcwd(), "build") BINARY_PATH = os.path.join(ABS_WORK_DIR, "firefox", "firefox.exe") INSTALLER_PATH = os.path.join(ABS_WORK_DIR, "installer.zip") XPCSHELL_NAME = 'xpcshell.exe' EXE_SUFFIX = '.exe' DISABLE_SCREEN_SAVER = False ADJUST_MOUSE_AND_SCREEN =...
"""ajaxgoogle.py - Simple bindings to the AJAX Google Search API (Just the JSON-over-HTTP bit of it, nothing to do with AJAX per se) http://code.google.com/apis/ajaxsearch/documentation/reference.html#_intro_fonje brendan o'connor - gist.github.com/28405 - anyall.org""" try: import json except ImportError: import s...
# Copyright 2011-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in...
#!/usr/bin/env python from chm.chm import CHMFile from os.path import basename, exists, abspath from HTMLParser import HTMLParser from sys import argv, exit, stderr import re class LinksLocator(HTMLParser): """ LinksLocator is a class for retrieve name and path (Name and Local) from TopicsTree in chm (com...
# -*- coding: UTF-8 -*- import datetime import logging from .settings import LOGGER_NAME from .gameapi import APIManager class Resources: def __init__(self): self.wallet = {} def add(self, data): self.wallet = data.get('wallet', {}) def is_enough_for_mission(self, mission): for ...
import urllib2 def f(m): l = list() o = 0 b = None while not b and o < len(m): n = m[o] <<2 o +=1 k = -1 j = -1 if o < len(m): n += m[o] >> 4 o += 1 if o < len(m): k = (m[o - 1] << 4) & 255; ...
from __future__ import absolute_import from . import HttpService from httplib import HTTPConnection, HTTPException, HTTPSConnection from socket import timeout, error import time class HttpLibHttpService(HttpService): """ HttpService using python batteries' httplib. """ def __init__(self, *args, **kwa...
# 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 compliance with the License. You may obtain # a ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """Sketch Config class Support reading configuration files from the following file formats: * YAML (with file extension .yaml or .yml) * JSON (with file extension .json or .js) * INI (extension .ini) * Text (with extension .txt or .cnf) * XML (not yet implemented...
import os from setuptools import setup from setuptools.extension import Extension from setuptools.command.sdist import sdist as _sdist cython_modules = [ ["word_embedding_loader", "loader", "word2vec_bin"], ["word_embedding_loader", "saver", "word2vec_bin"] ] def _cythonize(extensions, apply_cythonize): ...
import unittest from typing import List import utils # O(nlog(n)) time. O(n) space. Merge sort. class Solution: def countSmaller(self, nums: List[int]) -> List[int]: result = [0] * len(nums) def sort(dst, src, lo, hi): if lo + 1 >= hi: return mid = lo + (...
"""Test search VTGraph methods.""" import pytest import six import vt_graph_api try: from unittest.mock import call from unittest.mock import Mock import urllib.parse as urlparse except ImportError: from mock import call from mock import Mock import urlparse test_graph = vt_graph_api.VTGraph( "Dumm...
"""Functions for fetching basic statistics about observers and observations.""" from ebird.api.utils import call from ebird.api.validation import ( clean_area, clean_date, clean_max_observers, clean_rank, clean_region, ) TOP_100_URL = "https://ebird.org/ws2.0/product/top100/%s/%s" TOTALS_URL = "ht...
# # Copyright (C) University College London, 2007-2012, all rights reserved. # # This file is part of HemeLB and is provided to you under the terms of # the GNU LGPL. Please see LICENSE in the top level directory for full # details. # from vtk import vtkSTLReader, vtkCutter, vtkPlane, \ vtkPolyDataConnectivityF...
# -*- coding: utf8 -*- ''' Created on 27 dec. 2012 @author: ediemert ''' import argparse import ConfigParser from twisted.internet import reactor from varan import logger, VERSION from varan.ts_store import TSStore from varan.stream import Stream from varan.application import Application parser = argparse.ArgumentP...
#!/usr/bin/env python # Dynamixel library for MX28 and MX64 # WINDOWS WARNING: For best performance, parameters of the COM Port should be set to maximum baud rate, and 1ms delay (Device Manager, COM Ports, properties, advanced) class DxlRegister(): def __init__(self,address,size,mode='r',eeprom=Fa...
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
#!/usr/bin/env python # This code exists in 2 places: ~/datatypes/converters and ~/tools/fasta_tools """ Input: fasta, minimal length, maximal length Output: fasta Return sequences whose lengths are within the range. """ import sys, os seq_hash = {} def __main__(): infile = sys.argv[1] outfile = sys.argv[2] ...
from datetime import datetime import pytz from pytz.exceptions import UnknownTimeZoneError from cardinal.decorators import command, help TIME_FORMAT = '%b %d, %I:%M:%S %p UTC%z' class TimezonePlugin: @command(['time']) @help("Returns the current time in a given time zone or GMT offset.") @help("Syntax:...
# Credits to CF2009 for the original favourites script. import os, sys, re import xbmc, xbmcgui, xbmcaddon, xbmcvfs from xml.dom.minidom import parse ADDON = xbmcaddon.Addon() ADDONID = ADDON.getAddonInfo('id') ADDONVERSION = ADDON.getAddonInfo('version') CWD = ADDON.getAddonInfo('path').decode("...
import json import os from model.component.component_specification import ComponentSpecification from model.component.subgraph_component import SubgraphComponentModel from model.module.graph_prototype.graph_prototype_specifications import GraphPrototypeSpecifications from model.module.module_model import ModuleModel f...
# Copyright 2013 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 applicable law o...
import random from functools import wraps from ludema.abstract.utils import Direction from ludema.exceptions import (PieceIsNotOnATileError, PieceIsNotOnThisBoardError, TileIsEmptyError, NotGrabbableError) class Action: de...
# Generates an input mesh for circular, large aspect-ratio # simulations: # # o Constant magnetic field # o Curvature output as a 3D logB variable # o Z is poloidal direction # o Y is parallel (toroidal) # # NOTE: This reverses the standard BOUT/BOUT++ convention # so here Bt and Bp are reversed # from __future_...
# Copyright 2015 Christian Kramer # # 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 writ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2015 Glencoe Software, Inc. All rights reserved. # # This software is distributed under the terms described by the LICENCE file # you can find at the root of the distribution bundle. # If the file is missing please request a copy by contacting # jason@glen...
""" Install Python and Node prerequisites. """ from __future__ import print_function import hashlib import os import re import sys import subprocess import io from distutils import sysconfig from paver.easy import BuildFailure, sh, task from .utils.envs import Env from .utils.timer import timed PREREQS_STATE_DIR = ...
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Nimbis Services, 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 # (...
############################################################################### #cyn.in is an open source Collaborative Knowledge Management Appliance that #enables teams to seamlessly work together on files, documents and content in #a secure central environment. # #cyn.in v2 an open source appliance is distributed un...
import threading import time import logging import json from typing import List, Tuple from lib.client.core import Connection, RecvTimeout from lib.client.communication import Communication, MsgRequest class BasicConnection(Connection): def __init__(self): self._msg_list = [] # type: List[str] @pro...
#!/usr/bin/python # aim for python 2/3 compatibility from __future__ import (division, print_function, absolute_import, unicode_literals) from Qt import QtGui, QtWidgets, QtCore # see https://github.com/mottosso/Qt.py import sys import os #try: # sip.setapi('QString', 1) #except ValueErro...
""" This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well as testing instructions are located at http://amzn.to/1LzFrj6 For additional samples, visit the Alexa Skills Kit Getting Started guide at http://amzn.to/1LG...
# Auto generated configuration file # using: # Revision: 1.168 # Source: /cvs_server/repositories/CMSSW/CMSSW/Configuration/PyReleaseValidation/python/ConfigBuilder.py,v # with command line options: GeneratorInterface/AMPTInterface/amptDefault_cfi.py -s GEN --conditions auto:mc --datatier GEN --eventcontent RAWSIM -...
# /** # * Definition for a binary tree node. # * public class TreeNode { # * int val; # * TreeNode left; # * TreeNode right; # * TreeNode(int x) { val = x; } # * } # */ # public class Solution { # public TreeNode addOneRow(TreeNode root, int v, int d) { # if (d < 2) { # T...
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from django.db.models.fields.related import ManyToManyField from authentication.models import Alumno, Profesor from comisiones_evaluacion.models import Comision_Evaluacion, Tribunales from eventos.models import Periodo import simplejson as json import collections def get_params(req): datos = {} if req.method ...
from django.shortcuts import render # Create your views here. import uuid from rest_framework import status from rest_framework.response import Response from rest_framework import generics from rest_framework import serializers as DRFserializers from rest_framework import permissions from rest_framework import rendere...
import os import xml.etree.ElementTree as et import html from datetime import datetime from jinja2 import Environment, PackageLoader class moodle_module: def __init__(self, **kwargs): self.backup = kwargs['backup'] self.temp_dir = kwargs['temp_dir'] self.db = kwargs['db'] self.dir...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# -*- Mode: python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*- """ Friendly Python SSH2 interface. Copied from http://media.commandline.org.uk//code/ssh.txt Modified by James Yoneda to include command-line arguments. """ import getopt import os import time import paramiko import sys import tempfile f...
# -*- coding: utf-8 -*- """ Created on Fri Mar 03 11:11:22 2017 @author: A """ import matplotlib.pyplot as plt import numpy as np from scipy.optimize import fsolve from scipy.special import iv #from scipy.signal import find_peaks_cwt plt.close('all') zStart=0+0.67 zEnd=230.045+0.67 zStep=0.005###...
# Your mission is to: # - find the control room from which you will be able to deactivate the tracker beam # - get back to your starting position once you've deactivated the tracker beam # The structure is arranged as a rectangular maze composed of cells. Within the # maze Kirk can go in any of the following dire...
# Copyright (c) James Percent and Unlock contributors. # 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 l...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Eh, I'm not so worried about tracking user notices that this is a problem db.clear_table(u'myuw_mobile_use...
import enum import pathlib import typing # noqa import warnings from pytest import mark, raises from .utils import os_environ from settei.base import (ConfigKeyError, ConfigTypeError, Configuration, ConfigValueError, ConfigWarning, config_object_property, config_prop...
# Copyright (c) 2011 Google Inc. All rights reserved. # Copyright (c) 2009 Apple Inc. All rights reserved. # Copyright (c) 2010 Research In Motion Limited. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are...
# -*- coding: latin-1 -*- import os import sys reload(sys) sys.setdefaultencoding('utf-8') from flask import Flask from flask_restful import Api from flask_restful_swagger import swagger from flask.ext.restful.representations.json import output_json from flask.ext.cors import CORS from flask.ext.script import Manager...
# Copyright (C) 2012 David Morton # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distribut...
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
#!/usr/bin/python # -*- coding: utf-8 -*- from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * from gui.menus import SettingsMenu from gui.dwidgets import DMainFrame from gui.functionpages import SimpleTitleBar, SimpleMusicBottomBar from gui.utils import collectView, setSkinForApp from ...
# -*- coding: utf-8 -*- # Copyright (C) 2014-present Taiga Agile LLC # # 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 ver...
from __future__ import print_function import requests try: # Python 2 (uses str) from StringIO import StringIO except ImportError: # Python 3 (Python 2 equivalent uses unicode) from io import StringIO from io import BytesIO from .version import VERSION from .exceptions import LoadFailed from zipfile imp...
""" Locate the each enum item in seperate lines. == Violation == enum A { A_A, A_B <== Violation } == Good == enum A { A_A, <== Good A_B } """ from nsiqunittest.nsiqcppstyle_unittestbase import * from nsiqcppstyle_rulehelper import * from nsiqcppstyle_...
# -*- coding: utf-8 -*- # © 2016 ClearCorp # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). import errno from openerp.osv import osv, fields from openerp.tools.translate import _ import base64 import logging class cash_budget_program_populate(osv.osv_memory): _name = 'cash.budget.program.popu...
#!/usr/bin/env python """ This node is responsible for turning smoothing the velocity odometry data using a moving average. """ from collections import deque import rospy from std_msgs.msg import Float64 from nav_msgs.msg import Odometry MAX_LEN = 10 vxs = deque(maxlen=MAX_LEN) vxs.append(0) total = 0 def odomet...
import os.path import warnings import attr import cattr from typing import ( Dict, Optional, List, Any, DefaultDict, Mapping, Tuple, Union, ClassVar, ) from enum import Enum import collections import argparse import abc import numpy as np import math import copy from mlagents.train...
import socket import time import struct import sys import threading import datetime def PrintLog(message): message = "[" + str(datetime.datetime.now()) + "] " + message print message f = open("hashlog.txt", "a") f.write(message + "\n") f.close() class Handler(threading.Thread): def __init__(...
import urllib2 import sys sys.path.insert(1, "..") import h2o from tests import utils """ Here is some testing infrastructure for running the pyunit tests in conjunction with run.py. run.py issues an ip and port as a string: "<ip>:<port>". The expected value of sys_args[1] is "<ip>:<port>" All tests MUST have the f...
# -*- coding: utf-8 -*- """This file contains SELinux audit log (audit.log) file parser. Information updated 16 january 2013. An example: type=AVC msg=audit(1105758604.519:420): avc: denied { getattr } for pid=5962 comm="httpd" path="/home/auser/public_html" dev=sdb2 ino=921135 Where msg=audit(1105758604.519:420) c...
# -*- coding: utf-8 -*- # Copyright 2015-2019 Nate Bogdanowicz """ Helpful utilities for writing drivers. """ import copy import contextlib from inspect import getargspec import pint from past.builtins import basestring from . import decorator from .. import Q_, u from ..log import get_logger log = g...
from __future__ import (absolute_import, division, print_function) import unittest import numpy as np from MsdTestHelper import is_registered, check_output, create_model, create_test_workspace, create_function_string from mantid.simpleapi import Fit class MsdPetersTest(unittest.TestCase): def test_function_has_...
import argparse import json # Python code generator to create new troposphere classes from the # AWS resource specification. # # Todo: # - Currently only handles the single files (not the all-in-one) # (Note: but will deal with things like spec/GuardDuty*) # - Handle adding in validators # - Verify propery dependen...
from collections import defaultdict import logging logging.basicConfig(level=logging.INFO, format="%(funcName)s\t%(message)s") def createC1(dataset): C1 = [] for transaction in dataset: for item in transaction: if not [item] in C1: C1.append([item]) C1.sort() retur...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
#! /usr/bin/env python3 #-*- coding: UTF-8 -*- ### Legal # # Author: Thomas DEBESSE <dev@illwieckz.net> # License: ISC # from Urcheon import Ui import __main__ as m import argparse import glob import json import logging import os import struct import sys from collections import OrderedDict from logging import debug ...
#!/usr/bin/python3 # -*- coding: utf8 -*- # -*- Mode: Python; py-indent-offset: 4 -*- """TSL functions""" from timevortex.utils.globals import ERROR_TIMESERIES_NOT_DEFINED KEY_TSL_BAD_JSON = "ts_without_json_message" KEY_TSL_NO_SITE_ID = "ts_without_site_id" KEY_TSL_NO_VARIABLE_ID = "ts_without_variable_id" KEY_TSL_...
"""Module with functions that read data and metadata from the S3 and retrieve durations.""" from s3interface import * from duration import * from botocore.exceptions import * def read_component_analysis_from_core_data(s3, ecosystem, component, version): """Read component analysis from the core data and retrieve ...
# Copyright 2014-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...
# Copyright (c) Aaron Gallagher <_@habnab.it> # See COPYING for details. "I HATE TWITTER" from twisted.application.service import Service from twisted.protocols.policies import TimeoutMixin from twisted.web.http_headers import Headers from twisted.protocols.basic import LineOnlyReceiver from twisted.internet.error imp...
# -*- coding: utf-8 -*- """Doubl linked List implementation.""" class Node(object): """Creates a node object.""" def __init__(self, value, next, prev): """Initalize Node Object.""" self.value = value self.next = next self.prev = prev class DoublyLinkedList(object): """De...
""" Filters to be used Any customized print filters should be inserted in this file Filters are provided via CLI option -F json-file """ from libs.core.printing import PrintingOptions from libs.core.sanitizer import Sanitizer from libs.tcpiplib.tcpip import get_ofp_version from libs.tcpiplib.process_data ...
import textwrap from random import Random from django.utils import simplejson from django.test import TestCase from django.test.client import RequestFactory from django.contrib.auth.models import User from django_datatable.tests.views import TestViewOne class DatatableViewCase(TestCase): dt_js_request = textwr...
""" Initialize adventure delorme controller """ import logging import urllib2 import datetime from pykml import parser from flask import Blueprint, abort, request, jsonify from werkzeug.exceptions import BadRequest from app.decorators import crossdomain from app.views.auth import OAUTH from app.models.adventure impor...
# -*- coding: utf-8 -*- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from vispy.visuals.shaders import (Function, MainFunction, Variable, Varying, FunctionChain, StatementList) # Users normally...
from proteus.default_n import * from proteus import (StepControl, TimeIntegration, NonlinearSolvers, LinearSolvers, LinearAlgebraTools, NumericalFlux) from proteus.mprans import RDLS import redist_p as physics from ...
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import datetime import os CHECK_NAME = 'openstack' FIXTURES_DIR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'fixtures') ALL_IDS = ['server-1', 'server-2', 'other-1', 'other-2'] EXCLUDED_NETWORK...
# 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...
import sympy from eqpy._systems import BaseSystem, System from eqpy._utils import raises def test_symbol_types(): A = System() assert A.x is A.x assert isinstance(A.x, sympy.Symbol) assert A[1] is A[1] assert isinstance(A[1], sympy.Dummy) B = System() assert A.x is B.x assert A[1] is n...
import collections import copy import heapq import traceback import warnings import weakref import numpy import chainer from chainer import cuda from chainer import initializers from chainer.initializers import constant from chainer import utils from chainer.utils import argument def _check_grad_type(func, x, gx): ...
# -*- coding: utf-8 -*- from django.core.files.base import ContentFile from django.db.models.signals import post_delete from django.db import models from django.utils.translation import ugettext from django.core.cache import cache from gitstorage.StorageBackend import GitStorage class Wiki(models.Model): name =...
import urllib import urllib2 import json from datetime import datetime from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.views.decorators.csrf import csrf_exempt from django.contrib.sessions.models import Session from django.contrib.auth.models import User from...
# -*- encoding: utf-8 -*- from abjad.tools import datastructuretools from abjad.tools.documentationtools.ReSTDirective import ReSTDirective class ReSTAutosummaryDirective(ReSTDirective): r'''A ReST Autosummary directive. :: >>> toc = documentationtools.ReSTAutosummaryDirective() >>> for item...
import itertools import math # @include def solve_sudoku(partial_assignment): def solve_partial_sudoku(i, j): if i == len(partial_assignment): i = 0 # Starts a row. j += 1 if j == len(partial_assignment[i]): return True # Entire matrix has been filled ...
#-*-coding:utf-8-*- """ Original Author: wong2 <wonderfuly@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 rights to use, copy...
#!/usr/bin/env python3 # # A command line tool to suck the configuration out of a remote BMC. # # Under the hood it simply runs four executables from the FreeIPMI toolkit: # # bmc-config # pef-config # ipmi-sensors-config # ipmi-chassis-config # # Usage & various options: # # Basic: $0 target-...
#! /usr/bin/env python import rospy import math from pprint import pprint import numpy as np import fetch_api from std_msgs.msg import String, Header, ColorRGBA, Bool from std_srvs.srv import Empty from image_geometry import PinholeCameraModel import tf import tf.transformations as tft # from tf import TransformBroadc...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
import asyncio import logging import os import re from typing import Dict, Any import pytest from autobahn.wamp import ApplicationError from autobahn.wamp.types import Challenge, PublishOptions, CallOptions from asphalt.core import executor, Context, qualified_name from asphalt.exceptions import ExtrasProvider from a...
#!/usr/bin/env python2 # Rekall Memory Forensics # Copyright 2016 Google Inc. All Rights Reserved. # # Author: Michael Cohen scudette@google.com # # 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...
# Copyright 2018 The Chromium Authors. # # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd. import unittest from .client_api import CsFile, CodeSearch from .messages import FileInfo, TextRange, NodeEnumKi...
GPD_DICT = {'gpd_20':{'runs_5Hz':[972,973,974,975,976,979,980,981,982], 'runs_20Hz':[923,924,925,926,927,928,929,930,931,958,959,960,961,962,963,964,965,966], 'runs_50Hz':[983,984,985,986,987,988], 'runs_100Hz':[990], 'notes':['So...
# -*- coding: utf-8 -*- from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('spirit_user', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='user', name='comment_count'...
# BEGIN_COPYRIGHT # # Copyright 2009-2018 CRS4. # # 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...
#!/usr/bin/python # -*- coding: utf-8 -*- #### Modulo empresa # modulos python #import MySQLdb #import time import datetime #import os #import sys #import locale #from reportlab.lib.pagesizes import A4 #from reportlab.lib.units import mm #from reportlab.pdfgen import canvas from Funciones.funs import select_sql, sql_...
import dolfin import solving import libadjoint import adjglobals import adjlinalg import utils class NewtonSolver(dolfin.NewtonSolver): '''This object is overloaded so that solves using this class are automatically annotated, so that libadjoint can automatically derive the adjoint and tangent linear models.''' d...
""" Testing for the forest module (sklearn.ensemble.forest). """ # Authors: Gilles Louppe, # Brian Holt, # Andreas Mueller, # Arnaud Joly # License: BSD 3 clause import pickle import math from collections import defaultdict import itertools from itertools import combinations from itertools ...
import mock # To run unittests on python 2.6 please use unittest2 library try: import unittest2 as unittest except ImportError: import unittest from jenkinsapi.plugins import Plugins from jenkinsapi.utils.requester import Requester from jenkinsapi.jenkins import Jenkins, JenkinsBase, Job from jenkinsapi.custom...
import random from urllib import urlopen import sys WORD_URL = "http://learncodethehardway.org/words.txt" WORDS = [] PHRASES = { "class %%%(%%%):": "Make a class named %%% that is-a %%%.", "class %%%(object):\n\tdef __init__(self, ***)" : "class %%% has-a __init__ that takes self and *** parameter...
# -*- coding: utf-8 -*- """ Wistia Video player plugin. """ import HTMLParser import json import httplib import logging import re import requests import babelfish from video_xblock import BaseVideoPlayer from video_xblock.constants import TranscriptSource from video_xblock.utils import ugettext as _ log = logging.g...