content
stringlengths
4
20k
""" Django settings for djangorest01 project. Generated by 'django-admin startproject' using Django 1.9. For more information on this file, see https://docs.djangoproject.com/en/1.9/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.9/ref/settings/ """ import os...
from __future__ import print_function import sys import mesh.patch as patch import numpy as np from util import msg def init_data(my_data, rp): """ initialize a smooth advection problem for testing convergence """ msg.bold("initializing the advect problem...") # make sure that we are passed a valid pat...
# -*- coding: utf-8 -*- # !/usr/bin/python ################################### PART0 DESCRIPTION ################################# # Description: Analise the result of Chinese word segmentation step, such as word frequency # statistic, result visualization, etc. # E-mail: <EMAIL> # Create: 2015-8-10 18:47:07...
import numpy as np from .GeoVectorizer import FULL_STOP_INDEX def scale(vectors): means = localized_mean(vectors) min_maxs = [] for index, data_point in enumerate(vectors): full_stop_point = data_point[:, FULL_STOP_INDEX].tolist() try: full_stop_point_index = full_stop_point....
import pytest from datetime import datetime import pytz import platform import os import numpy as np import pandas as pd from pandas import compat, DataFrame from pandas.compat import range pandas_gbq = pytest.importorskip('pandas_gbq') PROJECT_ID = None PRIVATE_KEY_JSON_PATH = None PRIVATE_KEY_JSON_CONTENTS = None...
"""Reader for Norpix .seq files Author: Nathan C. Keim Based heavily on cine.py by Kleckner and Caswell """ from __future__ import (absolute_import, division, print_function, unicode_literals) import six from six.moves import range from pims.frame import Frame from pims.base_frames import Fra...
from south.db import db from django.db import models from pressroom.models import * import datetime class Migration: def forwards(self, orm): # Adding model 'Article' db.create_table('pressroom_article', ( ('id', models.AutoField(primary_key=True)), ('pub_date'...
""" Project :Authors: Berend Klein Haneveld """ class Project(object): """ Project holds the basic information of a project for RegistrationShop """ def __init__(self, title=None, fixedData=None, movingData=None, isReference=None): super(Project, self).__init__() self.title = title self.fixedData = fixe...
"""Hook for winrm remote execution.""" from typing import Optional from winrm.protocol import Protocol from airflow.exceptions import AirflowException from airflow.hooks.base import BaseHook try: from airflow.utils.platform import getuser except ImportError: from getpass import getuser # TODO: Fixme please...
import os import subprocess from wishlib.si import si from wishlib.utils import JSONDict from wishlib.qt import QtGui, QtCore, loadUi, widgets from wishlib.qt.decorators import bussy from ..gitutils import git, git_init from .history import History from .branches import Branches from .remotes import Remotes from .pre...
import gcc def my_pass_execution_callback(*args, **kwargs): (optpass, fun) = args print(args) gcc.register_callback(gcc.PLUGIN_PASS_EXECUTION, my_pass_execution_callback)
#!/usr/bin/env python # -*- coding:utf-8 -*- import logging logging.basicConfig(level=logging.INFO) import os,time from datetime import datetime from transwarp import db from transwarp.web import WSGIApplication,Jinja2TemplateEngine from config import configs # 定义datetime_filter,输入是t,输出是unicode字符串: def datetime_filte...
""" Implementation of the adapter for the native cheat.sh cheat sheets repository, cheat.sheets. The cheat sheets repository is hierarchically structured: cheat sheets covering programming languages are are located in subdirectories. """ # pylint: disable=relative-import import os import glob from .git_adapter impo...
from django import db from django.db import transaction from django.conf import settings from django.core.management.base import NoArgsCommand from data.models import PopulationEst00Raw, AnsiState from datetime import datetime import csv # National Priorities Project Data Repository # import_population_est_00.py # Im...
import datetime import logging import threading from collections import namedtuple from typing import Iterable, Optional log = logging.getLogger(__name__) RawLimit = namedtuple("RawLimit", ["count", "limit", "time"]) class LimitCollection: def __init__(self): self._limits = {} self._limits_loc...
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = r''' --- module: bigip_traffic_selector short_description: Manage IPSec Traffic Selectors on BIG-IP description: - Manage IPSec Traffic Selectors on BIG-IP. version_added: "1.0.0" options: name: description: ...
from __future__ import absolute_import import os.path import logging import pwd import grp import errno class FileHandler(logging.FileHandler): def __init__(self, filename, owner=None, **kwargs): if owner: if not os.path.exists(filename): open(filename, 'a').close() ...
# -*- coding: utf-8 -*- """ 1st RUN: - Run update_check if needed. - Import the S3 Framework Extensions - If needed, copy deployment templates to the live installation. """ # ----------------------------------------------------------------------------- # Perform update checks - will happen in 1st_run o...
from io import BytesIO from unittest import TestCase from eve.io.media import MediaStorage from eve.io.mongo import GridFSMediaStorage from eve.tests import TestBase, MONGO_DBNAME from eve import STATUS_OK, ID_FIELD, STATUS, STATUS_ERR, ISSUES, ETAG import base64 from bson import ObjectId class TestMediaStorage(TestC...
#!/usr/bin/env python2 ################################################## # GNU Radio Python Flow Graph # Title: Top Block # Generated: Tue Oct 6 22:40:10 2015 ################################################## if __name__ == '__main__': import ctypes import sys if sys.platform.startswith('linux'): ...
from openerp import SUPERUSER_ID from openerp.osv import fields, osv from openerp.tools.translate import _ from openerp.exceptions import UserError class stock_picking(osv.osv): _inherit = 'stock.picking' _columns = { 'purchase_id': fields.related('move_lines', 'purchase_line_id', 'order_id', string="P...
"""WSGI tools for use with swift.""" import errno import os import signal import time import mimetools from swift import gettext_ as _ from itertools import chain from StringIO import StringIO import eventlet import eventlet.debug from eventlet import greenio, GreenPool, sleep, wsgi, listen from paste.deploy import l...
from flask import (Flask, render_template, request, flash) import RPi.GPIO as GPIO import os import time import threading import thread from threading import Thread app = Flask(__name__) GPIO.setmode(GPIO.BCM) ##PINS coil_A_1_pin = 17 coil_A_2_pin = 22 coil_B_1_pin = 24 coil_B_2_pin = 23 pin_butto...
class OperandType: """ Types of possible operands in an opcode. Refer to the diStorm's documentation or diStorm's instructions.h for more explanation about every one of them. """ (NONE, IMM8, IMM16, IMM_FULL, IMM32, SEIMM8, IMM16_1, # NEW IMM8_1, # NEW IMM8_2,...
import pytest import six from pyocd.core.options_manager import OptionsManager from pyocd.core.options import OPTIONS_INFO @pytest.fixture(scope='function') def mgr(): return OptionsManager() @pytest.fixture(scope='function') def layer1(): return { 'foo': 1, 'bar': 2, 'baz...
from django.conf import settings from django.core.cache import cache import datetime import requests import re from rauth import OAuth1Service class TwitterApi(object): def __init__(self): self.keys = getattr(settings, "TWITTER_API_KEYS", None) self.twitter_api = OAuth1Service( name='t...
""" Elevator.py elevator bank/passenger Simulator: Models an bank of elevators in a building that respond to passengers. WORK-IN-PROGRESS """ import time import os import sys ################ # GLOBAL ENUMERATIONS - Yeah, I know that Enums is supported in 3.4, but this works in 2.7 ################ def enum(**enum...
from __future__ import absolute_import import argparse import json import numpy as np import os import pandas as pd import pynliner import pymysql import smtplib import sqlalchemy import time from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import translogrify.create def parse_ema...
from random import Random from time import time import ecspy def main(prng=None): if prng is None: prng = Random() prng.seed(time()) problem = ecspy.benchmarks.Ackley(2) ea = ecspy.ec.EvolutionaryComputation(prng) ea.selector = ecspy.selectors.tournament_selection ...
from OpenGL.GL import * from OpenGL.GLU import * from OpenGL.GLUT import * # GTK imports import gtk from gtk import gtkgl # Application imports import glslview # Default shader DEFAULT_VERTEX=""" varying vec3 vN; varying vec3 v; void main(void) { v = vec3(gl_ModelViewMatrix * gl_Vertex); vN = normaliz...
# -*- coding: utf-8 -*- import datetime from utils import dt from django.test import TestCase from groupcalendar.models import Calendar, Recurrence, Event, Occurence class OccurenceTest(TestCase): def setUp(self): self.cal1 = Calendar(name='cal1', color='dddddd') self.cal1.save() self.ev...
import logging log = logging.getLogger('fabric.fabalicious.base') from fabric.api import * from fabric.state import output, env from fabric.context_managers import env from fabric.network import * from fabric.contrib.files import exists import re class LocallyContext(): def __init__(self, parent, config): ...
from .message import Message from .exceptions import LimitExceededException import requests class Conversation(object): def __init__(self, data, comments=None): """ Initializes new Conversation object :param data - dictionary data which can be got from inbox data field ...
from minecraft_backup.core.configuration import load_config from minecraft_backup.core.backup_manager import make_backup_thread from minecraft_backup.gui.msg_box import msg_no_backup_name from minecraft_backup.gui.msg_box import msg_name_exists from minecraft_backup.gui.msg_box import msg_dir_exists from minecraft_back...
from flask.ext.script import Command, Option from breezeminder.models.card import (BreezeCard, InvalidCardData, CardData) from breezeminder.models.reminder import (Reminder, ReminderHistory) from breez...
import os from vcs.cli import make_option from vcs.cli import SingleChangesetCommand class CatCommand(SingleChangesetCommand): """ Writes content of a target file to terminal. """ option_list = SingleChangesetCommand.option_list + ( make_option('--blame', action='store_true', dest='blame', ...
# -*- test-case-name: foolscap.test.test_reconnector -*- from twisted.trial import unittest from foolscap.api import Tub, eventually, flushEventualQueue from foolscap.test.common import HelperTarget, MakeTubsMixin from twisted.internet import defer, reactor, error from foolscap import negotiate class AlwaysFailNegoti...
import sys, os import argparse import ems_db_interface as db_i import ems_gen_dataset as gen_d import ems_analyzer as an import rpy2.robjects as ro import json import codecs audio_extractors = ['freesound', 'echonest', 'mirtoolbox', 'essentia'] der_extractors = ['rhythm_pos', 'en_structure', 'rhythm_structure'] ext...
import os import cv2 import numpy as np from all_params import * image_names = os.listdir(TRAIN_DATA_PATH) image_names.sort() img_num = IMG_START_NUM for img_name in image_names: if 'mask' in img_name: continue img = cv2.imread(TRAIN_DATA_PATH + img_name) mask_img = cv2.imread(TRAIN_DATA_PATH + i...
from ubuntui.frame import Frame # noqa from ubuntui.views import ErrorView from conjureup import async from conjureup.app_config import app from ubuntui.ev import EventLoop import macumba import errno class ConjureUI(Frame): def show_exception_message(self, ex): if isinstance(ex, async.ThreadCancelledE...
from odoo import _, api, fields, models class SnailmailLetterCancel(models.TransientModel): _name = 'snailmail.letter.cancel' _description = 'Dismiss notification for resend by model' model = fields.Char(string='Model') help_message = fields.Char(string='Help message', compute='_compute_help_message')...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from datetime import timedelta from django.core.urlresolvers import reverse from django.test import TransactionTestCase from django.utils.timezone import now from django.utils.translation import override from aldryn_newsblog.feeds import LatestArticles...
import endpoints from protorpc import message_types from protorpc import messages from protorpc import remote from models import Meeting, Person, Role, User import datetime def meeting2Msg(meeting): res = MeetingMsg() res.id = meeting.key.id() res.title = meeting.title res.startTime = meeting.startTime...
import sys, subprocess def make_stacked_bargraph(outfile, titles, data, ylabel = 'Percent of Cycles', size = (640, 480), title = ''): gnuplot_cmd_list = [] header = '''\ set terminal png font "FreeSans,10" size %d,%d set output "%s.png" set boxwidth 0.75 absolute set style fill solid 1.00 border -1 set style his...
""" Data API for Taxon entities. This API provides methods for traversing taxonomic parent/child relationships, and accessing information such as NCBI taxonomic id, scientific name, scientific lineage, etc. """ # Stdlib import abc # Third-party # Local from doekbase.data_api.core import ObjectAPI from doekbase.data...
import pickle,sys import statsmodels,statsmodels.api import scipy,scipy.stats import matplotlib,matplotlib.pyplot matplotlib.rcParams.update({'font.size':36,'font.family':'Arial','xtick.labelsize':28,'ytick.labelsize':28}) thePointSize=12 # 0. user defined variables jarDir='/Users/adriandelomana/scratch/' # sustained...
from __future__ import print_function import unittest import numpy as np import paddle.fluid as fluid from paddle.fluid.dygraph.dygraph_to_static import ProgramTranslator from paddle.fluid.optimizer import AdamOptimizer from test_fetch_feed import Linear np.random.seed(2020) place = fluid.CUDAPlace(0) if fluid.is_...
# -*- coding: UTF-8 -* ''' Created on 2014年10月20日 @author: RobinTang ''' from django.db import models from datamining.classify import BaseDriver class Probability(models.Model): cls = models.CharField(max_length=255) prt = models.FloatField(default=0.0) atb = models.ForeignKey('Attribute') class Attribu...
import os import flask import logging from raspibear import jukebox from raspibear import webcam from . import jukeboxapp from . import webcamapp log = logging.getLogger(__name__) raspibearapp = flask.Flask(__name__) raspibearapp.register_blueprint(jukeboxapp.bp, url_prefix="/jukebox") raspibearapp.register_bluepri...
import unittest import numpy as np import cellprofiler.cpimage as cpi import cellprofiler.objects as cpo import cellprofiler.pipeline as cpp import cellprofiler.measurements as cpmeas import cellprofiler.workspace as cpw import cellprofiler.settings as cps from cellprofiler.modules import instantiate_module INPUT_IMA...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class CountryTestCase(Integrati...
from lxml import etree from openerp import api, fields, models class AccountAssetModify(models.TransientModel): _name = 'account.asset.modify' _description = 'Modify Asset' name = fields.Char( string='Reason', size=64, required=True) method_number = fields.Integer( string='Number of ...
""" Django settings for testproj project. Generated by 'django-admin startproject' using Django 1.8. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ # Build paths...
# -*- coding: utf-8 -*- from twitter_connect.create_session import CreateSession from twitter_connect.get_timeline import GetTimeline import configparser import time import json if __name__ == '__main__': # watching text watch_text = ['写真', 'しゃしん', 'シャシン'] # get session information filepath='session....
from __future__ import absolute_import import json import logging import os import unittest import zlib from structlog import wrap_logger from mock import Mock from ..encoder import GELFEncoder from ..handler import GELFHandler from ..rabbitmq import GELFRabbitHandler class TestingGELFHandler(GELFHandler): d...
import unittest import bb import os import tempfile class VerCmpString(unittest.TestCase): def test_vercmpstring(self): result = bb.utils.vercmp_string('1', '2') self.assertTrue(result < 0) result = bb.utils.vercmp_string('2', '1') self.assertTrue(result > 0) result = bb.ut...
from django.db import models from django.contrib.auth.models import User from django.utils.translation import ugettext as _ class Project(models.Model): customer = models.ForeignKey(User) name = models.CharField(max_length=200) description = models.TextField(blank=True, null=True) website = models.URL...
"""Utility helpers for Bert2Bert.""" from __future__ import absolute_import from __future__ import division # from __future__ import google_type_annotations from __future__ import print_function from absl import logging import tensorflow as tf from typing import Optional, Text from official.modeling.hyperparams import...
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ModeType from zope.interface import implements class LimitMode(ModuleData, Mode): implements(IPlugin, IModuleData, IMode) name = "LimitMode" ...
import datetime from oslo_config import cfg import webob.exc from jacket.api.compute.openstack import extensions from jacket.api.compute.openstack import wsgi from jacket.compute import cloud from jacket.i18n import _ from jacket.compute import utils CONF = cfg.CONF CONF.import_opt('compute_topic', 'jacket.compute.c...
import pytest import zlib import json from anchore_engine.services.policy_engine.engine.policy.gates import files from anchore_engine.services.policy_engine.engine.policy.gate import ExecutionContext from anchore_engine.db.entities.policy_engine import ( Image, FilesystemAnalysis, AnalysisArtifact, ) image...
import sys from time import sleep from datetime import datetime from digidevice import cli REBOOT_TIME = 86340 DEBUG = False def usage(): print("""Usage: python {} [--help | --debug | --time <seconds>] Options: --help Print this help and exit --debug Output 'show tech-suppor...
import re import json try: from urllib.request import urlopen # Python 3 except ImportError: from urllib2 import urlopen # Python 2 def download_database(filename, database_url): """Downloads a database and saves it to disk""" print("[database] Downloading database from '" + database_url + "'...") ...
from msrest.serialization import Model class ParametersLink(Model): """Entity representing the reference to the deployment paramaters. :param uri: URI referencing the template. :type uri: str :param content_version: If included it must match the ContentVersion in the template. :type content_...
''' A file for visualizing the small 1D microtrafficsim module. ''' __author__ = 'Dominic Parga Cacheiro' ################################################################################ import argparse from matplotlib import pyplot from matplotlib import animation from matplotlib import cm import random import nump...
#vim: set encoding=utf-8 from unittest import TestCase from regparser.layer import external_citations from regparser.tree.struct import Node class ParseTest(TestCase): def test_section_act(self): """ Test an external reference that looks like this: "section 918 of the Act" ...
#!/usr/bin/env python # Based on previous work by # Charles Menguy (see: http://stackoverflow.com/questions/10217067/implementing-a-full-python-unix-style-daemon-process) # and Sander Marechal (see: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/) # Adapted by M.Hendrix [2015,2016] # daem...
""" Copyright (c) 2013, SMART Technologies ULC 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...
import sublime import sublime_plugin from datetime import datetime import io import os import re import subprocess import sys def get_setting(key, default=None): settings = sublime.load_settings('tmux.sublime-settings') os_specific_settings = {} if sys.platform == 'darwin': os_specific_settings = ...
import numpy as np #from minimal_example_interface import * def multiplicative_term(kappa_val, r_array, cue_array): assert (type(kappa_val) == float or type(kappa_val) == int) assert (type(r_array) == np.ndarray) assert (type(cue_array) == np.ndarray) return ({"kappa": kappa_val, "r": r_array, "cue": ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os import uuid import datetime from django.contrib.contenttypes.fields import GenericRelation from future import standard_library from future.builtins import int from time import time from operator import ior from functools import reduce try: ...
# -*- coding: utf-8 -*- from __future__ import with_statement from cms.api import create_page from cms.models.pagemodel import Page from cms.test_utils.util.context_managers import SettingsOverride class NavextendersFixture(object): def create_fixtures(self): """ Tree from fixture: ...
def main(): s = Nonterminal('s') a = Nonterminal('a') b = Nonterminal('b') x = Terminal('x') terminals = {"x": x} accept = s user_grammar = [ Rule(s, [s, a]), Rule(s, []), Rule(a, [x]), ] parser = preprocess(user_grammar, accept)() input_string = "xxxxx...
from pprint import pprint import json import helpers with open('metadata.json') as data_file: data = json.load(data_file) class WikiFile: def __init__(self, **reference_to_pages): self.base_url = "https://en.wikipedia.org/w/api.php" self.payload = { 'action': 'query', ...
#!/usr/bin/python ## for LaTeX in the .ps import matplotlib matplotlib.use ('PS') from matplotlib import rc matplotlib.rcParams['text.latex.preamble']=[r"\usepackage{amsmath}"] # to have ascii hyphen minus signs (shorter than the official unicode) matplotlib.rcParams['text.latex.unicode']=False matplotlib.rc ('font',...
from __future__ import print_function from rdkit.Dbase import DbConnection from rdkit.ML.Data import Quantize def runIt(namesAndTypes, dbConnect, nBounds, resCol, typesToDo=['float']): results = map(lambda x: x[0], dbConnect.GetColumns(namesAndTypes[resCol][0])) nPossibleRes = max(results) + 1 for cName, cType...
import optparse import os import os.path import signal import stat import sys import threading import time import kpageutil MEMCG_ROOT_PATH = "/sys/fs/cgroup/memory" DEFAULT_DELAY = 300 # seconds def _get_end_pfn(): end_pfn = 0 with open('/proc/zoneinfo', 'r') as f: for l in f.readlines(): ...
from weboob.tools.test import BackendTest __all__ = ['DresdenWetterTest'] class DresdenWetterTest(BackendTest): BACKEND = 'dresdenwetter' def test_gauges_sensors(self): """ test if the gauge listing works. Only one gauge on the website, but we can test sensors after that """...
# -*- coding: utf-8 -*- from os.path import dirname, join import django import django_ratings import example_project TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', ) CACHE_TEMPLATE_LOADERS = ( 'django.tem...
import numpy as np import logging from sklearn.cluster import KMeans from ._base import Base __all__ = ['convexNMF'] class convexNMF(Base): ''' Convex-Nonnegative Matrix Factorization. Reference ========= Ding, C., Li, T., & Jordan, M. I. (2010). Convex and semi-nonnegative matrix factorizati...
import tools from osv import fields, osv class asset_asset_report(osv.osv): _name = "asset.asset.report" _description = "Assets Analysis" _auto = False _columns = { 'name': fields.char('Year', size=16, required=False, readonly=True), 'purchase_date': fields.date('Purchase Date', readonl...
import pytest from ovirtlago import utils class TestUtilsOvirtSDKs(object): @pytest.mark.parametrize( ('modules'), [(['ovirtsdk4', 'ovirtsdk']), (['ovirtsdk4', 'ovirtsdk', 'dummy'])] ) def test_available_all(self, modules): assert utils.available_sdks(modules=modules) == ['3', '4'...
from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_resource from nssrc.com.citrix.netscaler.nitro.resource.base.base_resource import base_response from nssrc.com.citrix.netscaler.nitro.service.options import options from nssrc.com.citrix.netscaler.nitro.exception.nitro_exception import nitro_...
import mock import oslo_messaging from oslo_utils import uuidutils from neutron.api.rpc.callbacks import events from neutron.api.rpc.callbacks import resources from neutron.objects import trunk as trunk_obj from neutron.services.trunk.drivers.openvswitch.agent import driver from neutron.services.trunk.drivers.openvsw...
import abc from abc import abstractmethod import json import logging import os import sys from google.datacatalog_connectors.rdbms.scrape import metadata_scraper, config from google.datacatalog_connectors.rdbms.sync import \ datacatalog_synchronizer ABC = abc.ABCMeta('ABC', (object,), {}) # compatible with Pytho...
"""Tests for letsenecrypt.plugins.selection""" import sys import unittest import mock import zope.component from certbot.display import util as display_util from certbot import interfaces class ConveniencePickPluginTest(unittest.TestCase): """Tests for certbot.plugins.selection.pick_*.""" def _test(self, f...
# Standard library from hashlib import sha1 from urlparse import urlparse, parse_qs, parse_qsl, urlunsplit from urllib import urlencode # 3rd party library from flask import Flask, flash, request, render_template, redirect, url_for app = Flask(__name__) app.secret_key = 'some secret' DB = {} counter = {} def clean_...
import unittest import AssetPackager class SimpleTest(unittest.TestCase): def testAnalyze(self): def match(a, b): self.assertEqual(AssetPackager.analyze(a), b) match( [ # 6 pages' worth of assets: ['/static/jquery.js', '/static/sitecore.js', '/foo/stuff/lost.js'], ['/st...
# encoding: utf-8 """ parse_neighbor.py Created by Thomas Mangin on 2015-06-04. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ import sys import socket import string from copy import deepcopy from exabgp.protocol.ip import IP from exabgp.bgp.message.open.holdtime import HoldTime from exabgp.bgp.mess...
#!/usr/bin/python # # WARNING: Make changes wisely, most of the change you do here have an impact on existing libraries publicly used # Make changes in cli too, most of the change you do here have an impact on rudder-cli # import json import re import pprint import urllib from collections import OrderedD...
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
bl_info = { "name": "EXPERIMENTAL FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", "version": (3, 2, 0), "blender": (2, 72, 0), "location": "File > Import-Export", "description": "Experimental FBX io meshes, UV's, vertex colors, materials, " "textur...
import threading, queue import unittest import mock import logger import time import generator import os class Test_generator(unittest.TestCase): def setUp(self): self.name = "testgenerator" def test_generator_loop(self): genq = queue.Queue(10) senderq = queue.Queue(10) lqueue = queue.Q...
""" desitarget.test.desitarget_test_suite ================================= Used to initialize the unit test framework via ``python setup.py test``. """ from __future__ import (absolute_import, division, print_function, unicode_literals) # The line above will help with 2to3 support. import unit...
import synapse.lib.module as s_module class GovUsModule(s_module.CoreModule): def getModelDefs(self): modl = { 'types': ( ('gov:us:ssn', ('int', {}), {'doc': 'A US Social Security Number (SSN).'}), ('gov:us:zip', ('int', {}), {'doc': 'A US Postal Zip Code.'}), ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals class FavoriteQueries(object): section_name = 'favorite_queries' usage = ''' Favorite Queries are a way to save frequently used queries with a short name. Examples: # Save a new favorite query. > \\fs simple select * from abc where a is...
""" Unit tests for bmr client. """ import unittest import os import sys import json file_path = os.path.normpath(os.path.dirname(__file__)) sys.path.append(file_path + '/../../') from baidubce.auth.bce_credentials import BceCredentials from baidubce.bce_client_configuration import BceClientConfiguration from baidubc...
"""Utilities for adding node references to AST nodes.""" from __future__ import division from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import ast def add_parent_references(node): """Add a parent backref to all child nodes.""" nodes = [no...
r''' Copyright 2014 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 agreed to i...
from random import * from math import * deg_to_rad = 0.01745329252 rad_to_deg = 57.2957795131 def EquipLoadout(UI, loadout): UI.EquipLoadout(loadout) def AutoConfigurePlatform(UI, setupName): UI.AutoConfigurePlatform(setupName) def MovePlatform(UI, lon, lat): UI.MovePlatform(lon,...