text
stringlengths
475
200k
import functions as f import maya.cmds as cmds # import pprint def get_zero_weight_jnts(mesh): sc = f.get_skin_cluster(mesh) jnts = cmds.skinCluster(sc, query=True, inf=True) bad_sc_jnts = [] for jnt in jnts: infl = cmds.skinPercent(sc, '%s.vtx[*]' ...
#!/usr/bin/python # Copyright (C) 2011 Red Hat, Inc., Michael S. Tsirkin <[EMAIL]> # # This file may be distributed under the terms of the GNU GPLv3 license. # Read a preprocessed ASL listing and put each ACPI_EXTRACT # directive in a comment, to make iasl skip it. # We also put each directive on a new line, the machi...
# -*- coding: utf-8 -*- # Copyright 2019 Red Hat Inc. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) """ The iosxr_l2_interfaces class It is in this file where the current configuration (as dict) is compared to the provided configuration (as dict) and the command set necess...
# Copyright 2017 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...
# CIRA File Validators # Copyright (C) 2014 InFo-Lab # # This program is free software; you can redistribute it and/or modify it under the terms of the GNU # Lesser General Public License as published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # This pro...
def _merge_array(arr1, arr2): ''' given two array arr1 & arr2, compare items from both of them & store their value on a new array in increasing order. By default arr1 & arr2 should sorted example : arr1 = [1,52,625] arr2 = [0,55,100] return value : [0, 1, 52, 55, 100, 625] ''' res = list() # r...
""" .. todo:: WRITEME """ try: from cPickle import BadPickleGet except ImportError: BadPickleGet = KeyError import pickle import logging import numpy as np from theano.compat import six from theano.compat.six.moves import cPickle, xrange import os import time import warnings import sys from pylearn2.utils....
from pyroute2.ipset import IPSet from pyroute2.netlink import NetlinkError from utils import require_user from uuid import uuid4 class TestIPSet(object): def setup(self): self.ip = IPSet() def teardown(self): self.ip.close() def list_ipset(self, name): try: return [x...
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Mimikatz DumpCreds', 'Author': ['@JosephBialek', '@gentilkiwi'], 'Description': ("Runs PowerSploit's Invoke-Mimikatz function " ...
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
# # Copyright (C) 2005, Giovanni Bajo # # Based on previous work under copyright (c) 2002 McMillan Enterprises, 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 L...
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # Tracing agent that captures friendly process and thread data - names, pids and # tids and names, etc to enrich display in the trace viewer. Captures snapsh...
''' Copyright 2013 Cosnita Radu Viorel 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, modify, merge, publish, distribu...
import time from datetime import date, timedelta from minezy_api import app from minezy_api import neo4j_conn from query_common import prepare_date_range, prepare_date_clause, prepare_word_clause def query_dates(account, params, countResults=False): t0 = time.time() bYear = True bMonth = False bDa...
import unittest from programy.mappings.base import SingleStringCollection, DoubleStringCharSplitCollection, TripleStringCollection class TestDoubleStringCollection(DoubleStringCharSplitCollection): def __init__(self): DoubleStringCharSplitCollection.__init__(self) def split_line(self, line): ...
# -*- coding: utf-8 -*- from flask import Flask, render_template, request, redirect, url_for, json, abort, Response from models import db, Cinema, Movie, ShowTime from difflib import SequenceMatcher from datetime import * app = Flask(__name__) app.config.from_pyfile('config_file.cfg') db.app = app db.init_app(app) @a...
""" kombu.transport.pika ==================== Pika transport. :copyright: (c) 2009 - 2012 by Ask Solem. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import socket from operator import attrgetter from kombu.exceptions import StdChannelError from . import base import pik...
""" Settings for Bok Choy tests that are used when running Studio. Bok Choy uses two different settings files: 1. test_static_optimized is used when invoking collectstatic 2. bok_choy is used when running the tests Note: it isn't possible to have a single settings file, because Django doesn't support both generating ...
#!/usr/bin/env python3 # Copyright (c) 2008-11 Qtrac Ltd. All rights reserved. # This program or module 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) an...
import os import sys import unittest import pickle import time sys.path.insert(0, os.pardir) sys.path.append(os.getcwd()) from tests.utils import BROKER_HOST, BROKER_PORT, BROKER_VHOST, \ BROKER_USER, BROKER_PASSWORD from carrot.connection import DjangoBrokerConnection, BrokerConnection from Us...
"""Test the cipher classes.""" import unittest import etao class TestBaseCipher(unittest.TestCase): """Test the base cipher class.""" def test_base_encrypt(self): with self.assertRaises(NotImplementedError): etao.Cipher().encrypt('hello') def test_base_decrypt(self): with sel...
#!/usr/bin/env python #coding=utf-8 from libs import pyforms not_null = pyforms.notnull is_not_empty = pyforms.regexp('.+', u"不允许为空") is_date = pyforms.regexp('(\d{4})-(\d{2}-(\d\d))', u"日期格式:yyyy-MM-dd") is_email = pyforms.regexp('[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$', u"email格式,比如[EMAIL]") is_chars = pyforms.regexp...
import random import numpy as np import math actions = { 0: ( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
import os from os import path import unittest from datetime import datetime from collections import OrderedDict from semantic_version import Version as SemanticVersion import mytardis_ngs_ingestor from mytardis_ngs_ingestor.illumina.run_info import \ parse_samplesheet, \ filter_samplesheet_by_project, \ fil...
# # Copyright (C) 2000 greg Landrum # """ unit testing code for cross validation """ from __future__ import print_function import unittest, random import io from rdkit import RDConfig from rdkit.ML.DecTree import CrossValidate def feq(a,b,tol=1e-4): return abs(a-b)<tol class XValTestCase(unittest.TestCase): de...
import sys, os, re, random from HapMixUtil import get_chrs_len from parseVcfTruthFile import del_chrs from parseVcfTruthFile import filter_truth_file def get_commandline_options(): """Get user options from command line""" from optparse import OptionParser parser = OptionParser() parser.a...
""" Deep Neural Network (DNN) Training Program for DENSE QSAR dataset Inputs: - a list of parameters, and - a path to data folder that stores the processed training datasets (.npz file) or raw datasets (.csv file) Output: in the specified output directory, - a file named DeepNeuralNetParameters.npz...
# Copyright (c) 2014 NetApp, 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 l...
<<<<<<< HEAD #!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http...
# -*- coding: utf-8 -*- ## ## Some functions about dates ## ## This file is part of Invenio. ## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Fr...
import unittest from ctypes import * import _ctypes_test class Callbacks(unittest.TestCase): functype = CFUNCTYPE ## def tearDown(self): ## import gc ## gc.collect() def callback(self, *args): self.got_args = args return args[-1] def check_type(self, typ, arg): P...
# -*- coding: utf-8 -*- """ tests/test_field.py :copyright: (c) 2015 by Fulfil.IO Inc. :license: see LICENSE for details. """ import pytest from trytond.transaction import Transaction class TestField: def test_encrypted_char_field(self, transaction): EncryptedCharField = self.POOL.get('encry...
from PySide2.QtWidgets import QMenu, QWidget, QMenuBar, QToolBar import weakref import unittest from helper import UsesQApplication class TestQActionLifeCycle(UsesQApplication): def actionDestroyed(self, act): self._actionDestroyed = True def testMenu(self): self._actionDestroyed = False ...
import re from collections import namedtuple from contextlib import contextmanager import warnings DeprecatedOption = namedtuple('DeprecatedOption', 'key msg rkey removal_ver') RegisteredOption = namedtuple( 'RegisteredOption', 'key msg rkey removal_ver' ) _deprecated_options = {} # holds deprecated option m...
# Copyright 2017 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...
# -*- coding: utf-8 -*- import pytest import os import numpy from numpy.testing import assert_almost_equal from planetaryimage.pds3image import PDS3Image, Pointer from pvl import Units DATA_DIR = os.path.join(os.path.dirname(__file__), 'data/') filename = os.path.join(DATA_DIR, 'pds3_1band.IMG') filename_3bands = os....
"""Tests for the Elgato Key Light config flow.""" import aiohttp from homeassistant import data_entry_flow from homeassistant.components.elgato import config_flow from homeassistant.components.elgato.const import CONF_SERIAL_NUMBER from homeassistant.config_entries import SOURCE_USER, SOURCE_ZEROCONF from homeassistan...
#!/usr/bin/env python import time import argparse from subprocess import check_output from subprocess import CalledProcessError # ------------------------------------------------------------------------------ parser = argparse.ArgumentParser() parser.add_argument( 'container_name', help='The name of the cont...
# Copyright 2020 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...
import pytest from django.conf import settings from django.core import mail as djmail from django.utils.timezone import now from django.utils.translation import ugettext_lazy as _ from pretix.base.models import Event, Organizer, User from pretix.base.services.mail import mail @pytest.fixture def env(): o = Organ...
# -*- coding: utf-8 -*- import logging import redis from docker_registry.core import lru from . import config logger = logging.getLogger(__name__) redis_conn = None cache_prefix = None cfg = config.load() def init(): enable_redis_cache(cfg.cache, cfg.storage_path) enable_redis_lru(cfg.cache_lru, cfg.sto...
# 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) import logging impor...
"Setup file for django-bootstrap-span" from setuptools import setup version='0.0.3' with open('README.rst') as fh: long_description = fh.read() setup( name='django-bootstrap-span', version=version, description='Django bootstrap span adds class=spanN support in forms input elements', ...
# Generated by Django 3.0.7 on 2020-08-31 13:48 from django.db import migrations from weblate.utils.hash import calculate_hash def migrate_json_units(apps, schema_editor): Unit = apps.get_model("trans", "Unit") db_alias = schema_editor.connection.alias units = ( Unit.objects.using(db_alias) ...
# Copyright (c) 2007-2008 Forest Bond. # This file is part of the pytagsfs software package. # # pytagsfs is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License version 2 as published by the Free # Software Foundation. # # A copy of the license has been included i...
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.openstack import OpenStackProvider from cfme.storage.manager import ProviderStorageManagerAllView from cfme.storage.manager import StorageManagerDetailsView from cfme.utils....
def printsq(M): for sublist in M: print sublist print def mesh_scanor(A): p = len(A) s = int(p**0.5) M = [A[i*s:i*s+s] for i in range(s)] printsq(M) for j in range(s-1): for i in range(s): M[i][j+1] = M[i][j+1] or M[i][j] printsq(M) for i in range(s-1): M[i+1][s-1] = M[i+1][s-1] or M[i][s-1] p...
# Copyright 2016 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 __future__ import absolute_import import socket from kombu import Connection, Exchange, Queue, Consumer, Producer from kombu.tests.utils import TestCase class test_MemoryTransport(TestCase): def setUp(self): self.c = Connection(transport='memory') self.e = Exchange('test_transport_memory'...
import pytest import pip.wheel import pip.pep425tags from pkg_resources import parse_version, Distribution from pip.req import InstallRequirement from pip.index import PackageFinder, Link from pip.exceptions import ( BestVersionAlreadyInstalled, DistributionNotFound, InstallationError, ) from pip.utils import Inf...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, ExtractorError, float_or_none, xpath_text, ) class AdultSwimIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?adultswim\.com/videos/(?P<is_playlist>playlist...
import collections import datetime import logging import os import sqlite3 import pytz logger = logging.getLogger(__name__) # For each record, timestamp is a datetime representing the time of the reading # or event. SoilMoistureRecord = collections.namedtuple('SoilMoistureRecord', ...
"""Views are filters on the global list of entries, which produces a subset of entries. """ __author__ = "Martin Blais <[EMAIL]>" import datetime import logging from beancount.core import data from beancount.ops import summarize from beancount.core import realization from beancount.parser import options from beancoun...
#!/usr/bin/env python # -*- coding: utf-8 -*-# # # # Copyright (C) 2016, S3IT, University of Zurich. All rights reserved. # # # 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 ...
import os import shutil import unittest from index_runner import index_all from jump_to_file import JumpToFile from queue.scanner import Scanner import env class TestJumpToFile(unittest.TestCase): @classmethod def setUpClass(cls): db_base = os.path.join( env.RESULTS_DIR, 'dat...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
''' Copyright 2011 Mikel Azkolain This file is part of Spotimc. Spotimc 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. Spotimc ...
# encoding: utf-8 import unittest from nose.plugins.skip import SkipTest from uricore import IRI, URI from uricore.wkz_datastructures import MultiDict class TestURICore(unittest.TestCase): def setUp(self): self.uri = URI("http://example.com?foo=bar") def test_hashability(self): iri1 = IRI(...
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from page_sets.login_helpers import login_utils def LoginAccount(action_runner, credential, credentials_path=login_utils.DEFAULT_CREDENTIA...
from balancer.model import types from ipmodels import cbc_dsapp as dsapp from logs import sonarlog from migration_queue import MigrationQueue from workload.timeutil import minu import conf_nodes import conf_domains import json import numpy as np import strategy # Fixed values START_WAIT = 0 # Data aggregation phase (...
import os import math import multiprocessing import markdown from distutils.dir_util import copy_tree import logging log = logging.getLogger(__name__) import MooseDocs from MooseDocsNode import MooseDocsNode from MooseDocsMarkdownNode import MooseDocsMarkdownNode def build_options(parser, subparser): """ Command...
""" Testing of admin inline formsets. """ from __future__ import unicode_literals from django.db import models from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes import generic class Parent(models.Model): name = models.CharField(max_length=50) def __unicode__(self):...
config={} with open('etc/pkg/config', 'r') as config_file: exec(config_file.read(), config) print('pkg for FreeBSD %s %s' % (config['DIST'], config['ARCHITECTURE'][1])) import os import subprocess import sys import re import io import shutil import copy try: import urllib2 except ImportError: ...
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <[EMAIL]> 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 Foundatio...
# Copyright 2015: Mirantis Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
# -*- coding: utf-8 -*- """ sphinx.transforms.compact_bullet_list ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Docutils transforms used by Sphinx when reading documents. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils import node...
#!BPY """ Registration info for Blender menus: Name: 'Speed Dreams AC3D (.ac)...' Blender: 243 Group: 'Export' Tip: 'Export selected meshes to AC3D (.ac) format' """ __author__ = "Willian P. Germano, Eckhard M. Jaeger" __url__ = ("blender", "blenderartists.org", "AC3D's homepage, http://www.ac3d.org", "PLib 3d gamin...
# coding: utf-8 # # Copyright 2015 The Oppia 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 requi...
import unittest from grade_school import School # Tests adapted from `problem-specifications//canonical-data.json` class GradeSchoolTest(unittest.TestCase): def test_adding_a_student_adds_them_to_the_sorted_roster(self): school = School() school.add_student(name="Aimee", grade=2) expecte...
from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import GridSearchCV, cross_val_score from .common import Benchmark, Estimator, Predictor from .datasets import _synth_classification_dataset from .utils import make_gen_classif_scorers class CrossValidationBenchmark(Benchmark): """ ...
"""Translation helper functions.""" from __future__ import unicode_literals from collections import OrderedDict import os import re import sys import gettext as gettext_module from threading import local import warnings from django.apps import apps from django.conf import settings from django.conf.locale import LANG_...
# -*- coding: utf-8 -*- # Copyright 2007-2015 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
#!/usr/bin/python #coding:utf-8 import SocketServer #from zio import * import string import os from hashlib import md5 import subprocess class MyServer(SocketServer.ThreadingTCPServer,object): allow_reuse_address = True class MyHandler(SocketServer.StreamRequestHandler): def handle(self): print 'get ...
#!/usr/bin/env python """Sluice Flask App.""" from __future__ import absolute_import import os from celery import Celery from flask import ( Flask, abort, flash, render_template, redirect, request, session, url_for, ) from flask.ext.bootstrap import Bootstrap from flask.ext import br...
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
from kombu import Queue, Exchange ########################################################### # Celery-RabbitMQ for Linux BROKER_HOST = "dsfasfd" BROKER_PORT = 5672 BROKER_VHOST = "rootair" BROKER_USER = "guest" BROKER_PASSWORD = "guest" RABBIT_URL = "amqp://qwr:guest@lll:5672" # CELERY_ENABLE_UTC = True # CELERY_TIME...
from twisted.trial import unittest from twisted.internet import reactor, defer from twisted.python.failure import Failure from scrapy.utils.defer import mustbe_deferred, process_chain, \ process_chain_both, process_parallel, iter_errback class MustbeDeferredTest(unittest.TestCase): def test_success_function(...
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Eficent (<http://www.eficent.com/>) # <[EMAIL]> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Publ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Time-stamp: <29-Jan-2014 19:47:27 PST by [EMAIL]> # Copyright © 2013 - 2014 K Richard Pixley """ Shell callable driver for :py:mod:`rain`. """ import argparse import contextlib import datetime import fnmatch import glob import logging import os import re import shlex...
#!/usr/bin/env python #encoding: utf8 import sys, rospy, math from pimouse_ros.msg import MotorFreqs from geometry_msgs.msg import Twist from std_srvs.srv import Trigger, TriggerResponse from pimouse_ros.srv import TimedMotion class Motor(): def __init__(self): if not self.set_power(False): sys.exit(1) r...
"""empty message Revision ID: 9f531d6f929e Revises: Create Date: 2017-05-02 22:23:23.792805 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by Alembic. revision = '9f531d6f929e' down_revision = None branch_labels = None depends_on = None d...
############################################################################# # hex_metric.py # this file is part of GEOCUBIT # # # # Created by Emanuele Casarotti ...
'''tzinfo timezone information for Israel.''' from pytz.tzinfo import DstTzInfo from pytz.tzinfo import memorized_datetime as d from pytz.tzinfo import memorized_ttinfo as i class Israel(DstTzInfo): '''Israel timezone definition. See datetime.tzinfo for details''' zone = 'Israel' _utc_transition_times = ...
# QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals. # Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect Corporation. # # 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 Lice...
""" Chamlek is an island kingdom with a total land area of 88,700 square miles, with a good climate and only a few rocky hills disturbing a well-watered countryside. Her population is just over 6.6 million, with an average density of about 75 people per square mile (an average roll of the dice using the recommended ran...
""" This file contains view functions for wrapping the django-wiki. """ import logging import re from django.conf import settings from django.shortcuts import redirect from django.utils.translation import ugettext as _ from opaque_keys.edx.keys import CourseKey from wiki.core.exceptions import NoRootURL from wiki.mo...
import random as Rand from math import sin from presets import * custom_chosen = False global chosen_array terrain_presets = [original1, original2, original3, plains, mountains, forest, mountains2, ice_mountains, lands_of_clay, perlin_hills, varied_perlin_hills] def start_up(): choose_option = str(input(" Choose ...
#!/usr/bin/python # Home: https://github.com/magma1447/backup-kvm-lvm # TODO # Implement options to mount/umount a remote server with sshfs (some old related code still exists) # Add support for fsarchiver # Add support for pre-hook, ie mysql lock tables # Per host/disk overrides for other options, like borg compres...
# Python file # Note: Before executing this module please ensure that a lens file has been # loaded into Zemax. Specifically, for using the function replicateArrayDemo() # load the file ...\ZEMAX\Samples\Sequential\Objectives\Cooke 40 degree field.zmx from __future__ import print_function, division import os as os imp...
# Copyright 2015 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...
import os from shutil import rmtree, copy from tempfile import gettempdir from pathlib import Path import pytest from pew._utils import invoke_pew as invoke from utils import TemporaryDirectory @pytest.yield_fixture(scope='session') def workon_home(): tmpdir = os.environ.get('TMPDIR', gettempdir()) os.envir...
import oebakery import oelite import oelite.parse.docparse import oelite.util import logging import os import glob description = "Generate documentation files from source code" arguments = ( ("layer", "Metadata layer(s) to generate documentation for", 0), ) def add_parser_options(parser): parser.add_option( ...
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility script for emulating common unix commands.""" from __future__ import print_function import fnmatch import glob import ...
# Copyright 2013 dotCloud 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 w...
"""Test for User Group related Upgrade Scenario's :Requirement: Upgraded Satellite :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: API :TestType: Functional :CaseImportance: High :Upstream: No """ from nailgun import entities from nailgun.config import ServerConfig from requests.exceptions impo...
#__BEGIN_LICENSE__ # Copyright (c) 2015, United States Government, as represented by the # Administrator of the National Aeronautics and Space Administration. # All rights reserved. # # The xGDS platform is licensed under the Apache License, Version 2.0 # (the "License"); you may not use this file except in compliance ...
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
#!/usr/local/bin/python2 -tt from scapy.all import * import struct MESSAGETYPEOFFSETUDP = 17 MESSAGETYPEOFFSETTCP = 21 DEBUG = True TGS_REP = chr(13) def findkerbpayloads(packets, verbose=False): kploads = [] i = 1 unfinished = {} for p in packets: # UDP if p.haslayer(UDP) and p.sport == 88 and p[UDP].load[...
# This file is part of Diamond. # # Diamond 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. # # Diamond is distribute...