input
stringlengths
2.65k
237k
output
stringclasses
1 value
is not None: pulumi.set(__self__, "idle_timeout", idle_timeout) if key is not None: pulumi.set(__self__, "key", key) if local_address is not None: pulumi.set(__self__, "local_address", local_address) if mode is not None: pulumi.set(__self__, "mode", mode) if mtu is not None: pulumi.set(__self__, "mtu", mtu) i...
<gh_stars>0 import requests import pandas as pd from bs4 import BeautifulSoup import time import numpy as np import random import logging def searates(country, country_abr): response = requests.get(url='https://www.searates.com/maritime/' + country +'.html',) soup = BeautifulSoup(response.content, 'html.parser') # ...
- 0.59*m.x672 - 0.59*m.x688 + 17.66*m.x711 + 17.66*m.x717 + 17.66*m.x742 - 48.98*m.x759 - 48.98*m.x769 - 48.98*m.x784 - 21.57*m.x801 - 21.57*m.x826 - 60.67*m.x869 - 60.67*m.x878 - 60.67*m.x887 + 17.14*m.x893 + 17.14*m.x911 + 17.14*m.x921 - 10.14*m.x940 - 10.14*m.x958 - 44.89*m.x985 - 44.89*m.x994 - 44.89*m.x1012 - 4...
import os from pyglet.gl import * import numpy from pygly.shader import Shader import pymesh.obj from razorback.mesh import Mesh class Data( object ): shader_source = { 'vert': open(os.path.dirname(__file__) + '/obj.vert','r').read(), 'frag': open(os.path.dirname(__file__) + '/obj.frag','r').read() } _data ...
Compute month features for the last timestamp. """ n = len(time) ans = np.zeros(n * 12) indices = pd.to_datetime(time[:, -1]).month.values + np.arange(0, n * 12, 12) ans[indices] = 1.0 return torch.tensor(ans.reshape(n, -1), dtype=torch.get_default_dtype()) @staticmethod def _get_ts2vec( x: np.ndarray, time:...
<reponame>wangqf1997/Human-injury-based-safety-decision-of-automated-vehicles # -*- coding: utf-8 -*- ''' ------------------------------------------------------------------------------------------------- This code accompanies the paper titled "Human injury-based safety decision of automated vehicles" Author: <NAME>, <N...
<reponame>cydenix/OpenGLCffi<gh_stars>0 DEF = ''' typedef int32_t khronos_int32_t; typedef uint32_t khronos_uint32_t; typedef int64_t khronos_int64_t; typedef uint64_t khronos_uint64_t; typedef signed char khronos_int8_t; typedef unsigned char khronos_uint8_t; typedef signed short int khronos_int16_t; typedef unsigned...
arg_path doesn’t exist, returns arg_default_value_to_return. Arguments: arg_default_value_to_return - This is the returned value, if arg_path isn't in the tree. arg_bool_path_is_absolute - If True, starts from the entire tree's root node. If False, the method focuses on the children in the sub tree. Note: This...
return np.sort(self.get_channel_order( channel_orderfile=channel_orderfile)[n_cut:-n_cut]) def get_subband_from_channel(self, band, channel, channelorderfile=None, yml=None): """Returns subband number given a channel number Args ---- band : int Which band we're working in. channel : int Ranges 0..(n_channel...
"""Vocabulary for theme-based transformer Author: <NAME> Email: <EMAIL> Date: 2021/11/03 """ import pickle import numpy as np import miditoolkit import os import math from miditoolkit.midi import parser as mid_parser from miditoolkit.midi import containers as ct class Vocab(object): def __init__(self): """ini...
<gh_stars>1-10 #!/usr/bin/env python # pylint: disable=C0301 # for the whitelist and the blacklist # C0301: I'm ignoring this because breaking up error messages is painful """ _JobSubmitterPoller_t_ Submit jobs for execution. """ from __future__ import print_function, division import logging import os.path import thr...
"character(len=*), intent({f_intent}) :: {c_var}", ], f_c_arg_names=["{c_var}"], pre_call=[ "char *{cxx_var} = " "{cast_static}char *{cast1}{c_var_cfi}->base_addr{cast2};", ], temps=["cfi"], ), dict( # Native argument which use CFI_desc_t. name="c_mixin_arg_native_cfi", iface_header=["ISO_Fortran_binding.h"...
time) for the given rank, allowing # dims to be specified using negative indices def canonicalize_dim(rank: int, idx: int) -> int: # TODO: add a comment for why this is _rank = rank if rank != 0 else 1 if idx >= 0 and idx < _rank: return idx if idx < 0: _idx = idx + _rank else: _idx = idx if _idx < 0 or _id...
<filename>lib/evaluation.py from easydict import EasyDict as edict import logging import logging.config import numpy as np from osgeo import gdal import torch from lib import data_normalization, fdutil, rasterutils, utils def compute_residuals(raster, raster_gt, nodata, mask_gt=None): """ Computes the residual err...
# -*- coding: utf8 -*- # Program to process the features from GATE annotation export files # Requires the following files in the current working directory: # _raw.txt # _toc.txt # _rel.txt # TODO Add support for more than one set of files in cwd import os import csv import re import json from collections import Ord...
p in sel_files: idx = sel_model.model().index(str(p)) sel_model.select(idx, QItemSelectionModel.SelectionFlag.Select | QItemSelectionModel.SelectionFlag.Rows) self.file_view = file_view def disable_buttons(self): # remove okay/cancel buttons from dialog, when showing in another dialog btn_box = self.findChild(Q...
faster loading. df = df.astype('float32') pd.to_pickle(df, Path(data_dir,pkl_name)) LOGGER.info(f"saved {pkl_name}") if m_value: df = consolidate_values_for_sheet(batch_data_containers, postprocess_func_colname='m_value', bit=bit, poobah=poobah) if not batch_size: pkl_name = 'm_values.pkl' else: pkl_name = f'm...
<reponame>MorganeAudrain/Calcium_new<gh_stars>0 import os import logging import numpy as np import caiman as cm import datetime import pickle import mysql.connector import getpass database = mysql.connector.connect( host="172.16.31.10", user="morgane", passwd=<PASSWORD>pass.getpass(), database="Calcium_imaging", ...
import numpy as np import pickle import theano import time import constants as c import scipy.constants as sc import scipy.interpolate as spi import eigen import starry import progressbar import theano import theano.tensor as tt import mc3.stats as ms from numba import njit def initsystem(fit, ydeg): ''' Uses a fit ...
<filename>rpython/jit/backend/llsupport/test/zrpy_gc_test.py """ This is a test that translates a complete JIT together with a GC and runs it. It is testing that the GC-dependent aspects basically work, mostly the mallocs and the various cases of write barrier. """ import weakref import os, py from rpython.rlib import...
of <NAME>, though carried on for the benefit of a small number of clients, was of vast importance and productive of lucrative returns. At present, the importance was overshadowed by the immediate interest of a campaign, which, if successful would land the second Appleby in the gubernatorial chair. This plan, as yet no...
<reponame>danlove99/django-auth-ldap-ng # coding: utf-8 # Copyright (c) 2009, <NAME> # 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 cop...
multiple durations and not # error and reminds me of the needed metrics by FULL_DURATION # ionosphere.analyzer.unique_metrics (at FULL_DURATION) # ionosphere.mirage.unique_metrics (NOT at FULL_DURATION) all_fp_ids = [] # @added 20170115 - Feature #1854: Ionosphere learn - generations # Create the fp_ids_db_objec...
+ '</h6>' + \ '<h6>Register of Trade and Companies : ' + register_of_trade_and_companies + '</h6>' + \ '<h6>Main activities : ' + main_activities + '</h6>' + \ '<h6>Activity number : ' + activity_number + '</h6>' + \ '<h6>Intra-community VAT number : ' + intra_community_vat_number + '</h6>' + \ '<h6>Pres...
<gh_stars>0 #-*- coding: utf-8 -*- from __future__ import division import os import math import time import tensorflow as tf import numpy as np from tensorflow.python.ops import math_ops from tensorflow.contrib.rnn import GRUCell from GAN_GRU.ops import * from utils import * import mygru_cell import matplotlib.pyplot a...
("The observed correlation between strain-specific pain profiles and MOR-1K gene expression levels suggests that MOR-1K contributes to OIH in genetically susceptible mice.", {"entities": [(67, 73, PHYS), (111, 117, PHYS), (133, 136, FUNC)]}), ("Within the OIH murine paradigm, we found that sustained i.t.", {"ent...
<gh_stars>0 import csv import re import os from pyaedt.generic.general_methods import aedt_exception_handler, generate_unique_name, is_ironpython from pyaedt.application.Analysis import Analysis from pyaedt.modeler.Model3D import Modeler3D from pyaedt.modules.MeshIcepak import IcepakMesh if is_ironpython: from pyaed...
_("Countries") def __str__(self): if self.code and self.name: return "{} - {}".format(self.code, self.name) elif self.name: return "{}".format(self.name) return _("Unknown Country") def get_absolute_url(self): return reverse('business:business_pfcountry_detail', args=(self.pk,)) def get_update_url(self): r...
from collections import defaultdict from pathlib import Path from typing import Dict, Iterable, List, Optional, Tuple, Union import networkx as nx import onnx from . import graph_ir as g from .onnx_attr import get_node_shape, node_attr_to_dict, node_to_shape PathLike = Union[str, Path] GraphT = onnx.GraphProto NodeT...
# -*- coding: utf-8 -*- """ Copyright 2015-2021 The MITRE 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 License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by appl...
<reponame>Kricki/kicktipper import mechanicalsoup import re import pandas as pd import warnings import getpass class KicktippAPI: """ API for communication with kicktipp.de website Attributes ---------- name : str Name of the kicktipp group members : pandas.DataFrame DataFrame containing registered members of...
<reponame>edu-gp/annotation_tool<filename>alchemy/ar/data.py import itertools import logging from collections import namedtuple from typing import Dict, List import numpy as np import pandas as pd from pandas import DataFrame from sklearn.metrics import cohen_kappa_score from sqlalchemy import distinct, func from alc...
<reponame>mikusjelly/smafile import os import re __VERSION__ = '0.4.3' class NotSmaliClassException(Exception): def __init__(self, clz): err = '{} is not a class that conforms to the smali grammar.'.format( clz) Exception.__init__(self, err) def smali2java(smali_clz): if not smali_clz.startswith('L') or not ...
<reponame>BitWorks/xbrlstudio """ :mod: 'BookModel' ~~~~~~~~~~~~~~~~~ .. py:module:: BookModel :copyright: Copyright BitWorks LLC, All rights reserved. :license: MIT :synopsis: Collection of PyQt models used by XBRLStudio :description: Contains the following classes: BookTableModel - model for numerical and text...
""" :mod:`transformer.python` -- Python Syntax Tree =============================================== Transformer's Python Syntax Tree framework allows you to create and manipulate Python source code without bothering with irrelevant, style-related details. It is the main API for writing :term:`OnPythonProgram` plugins...
cm) : self.__CM = cm class InnerClassesAttribute(BasicAttribute) : def __init__(self, class_manager, buff) : self.__CM = class_manager super(InnerClassesAttribute, self).__init__() # u2 attribute_name_index; # u4 attribute_length # u2 number_of_classes; self.number_of_classes = SV( '>H', buff.read(2) ) # {...
''' Name: load_ops.py Desc: Input pipeline using feed dict method to provide input data to model. Some of this code is taken from <NAME>'s colorzation github and python caffe library. Other parts of this code have been taken from <NAME>'s library ''' from __future__ import absolute_import, division, print_func...
# SPDX-License-Identifier: Apache-2.0 # -*- coding: utf-8 -*- """ Validation related functions """ import bpy import os import xrs.collection import xrs.filename import xrs.log import xrs.material import xrs.object import xrs.tools import xrs.validation_report def active_object_is_a_mesh(): """ Check if the active o...
<reponame>hectormartinez/rougexstem import os, sys, re import util, compression, text, ilp from globals import * import nltk class SummaryProblem: """ A class for representing elements of a summary problem self.id 'D0701' self.title 'Southern Poverty Law Center' self.narr 'Describe the activities of <NAME>...' ...
<reponame>RobotJustina/tmc_justina_docker<filename>src/planning/knowledge_representation/scripts/interprete/interpretation.py<gh_stars>0 # code dependencies import kb_services import parsing # network toolkit import networkx as nx # regular expressions import re def diff(a, b): b = set(b) return [aa for aa in a if...
<filename>pysmartnode/components/devices/climate/__init__.py # Author: <NAME> # Copyright <NAME> 2019-2020 Released under the MIT license # Created on 2019-10-10 """ example config: { package: .devices.climate component: Climate constructor_args: { temperature_sensor: "mysensor" # temperature sensor name or object...
<reponame>evgeniimv/cloud-pipeline # Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/) # # 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-...
= 0 self.keys['(e) '+self.gris1+'Emission_Lines_Multiple'] = 0 if not self.ACSins: self.keys['(f) '+self.gris2+'Emission_Lines_Multiple'] = 0 self.keys['(g) G102_Contamination_Level'] = 0 self.keys['(h) G141_Contamination_Level'] = 0 self.keys['(i) '+self.gris1+'Defect'] = 0 if not self.ACSins: self.keys['(j) '...
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import cchardet import re import argparse import os COLOR = { 'aliceblue': '#F0F8FF', 'antiquewhite': '#FAEBD7', 'aqua': '#00FFFF', 'aquamarine': '#7FFFD4', 'azure': '#F0FFFF', 'beige': '#F5F5DC', 'bisque': '#FFE4C4', 'black': '#000000', 'blanchedalmond': '#FFEB...
<reponame>geobook2015/magPy """ Created on Thu Mar 24 08:18:04 2016 @author: npop ProcessorSingleSite Inherits from Processor And implements single site processing """ import os import random import numpy as np import scipy.signal as signal import scipy.interpolate as interp # utils from utilsFreq import * from utilsI...
<reponame>Alejandro5852/tytus<gh_stars>10-100 # File: Interface # License: Released under MIT License # Notice: Copyright (c) 2020 TytusDB Team from tkinter import * from tkinter import ttk from tkinter import messagebox from PIL import Image, ImageTk from team17 import BMode as B def runInterface(): r = ...
<reponame>mnubo/smartobjects-python-client import gzip import json import uuid from builtins import filter from datetime import datetime from io import BytesIO from typing import Tuple, Dict, Union, Any, List, Optional import zlib from .routes import route class MockMnuboBackend(object): def __init__(self): self....
### Rubik's cube solver ### # Inspired from http://beust.com/rubik/ and personal knowledge # Imports functions to do the movements from cube_functions.fonctions_logique import * from cube_functions.constantes import * # DEFINE SEARCH FUNCTION def _cubesearch(rubik, side_filter, color_filters, xyz_filter = (-1, -1, -...
"Gift Certificate for %(waybill)s" % {"waybill": send_ref} filename = "%s.xls" % title response = current.response from gluon.contenttype import contenttype response.headers["Content-Type"] = contenttype(".xls") disposition = "attachment; filename=\"%s\"" % filename response.headers["Content-disposition"] = dispo...
y = pos # x -= 0.5*rect.width x -= 0.5*rect.width() # y -= 0.5*rect.height y -= 0.5*rect.height() self.x += x / self.zoom_ratio - x / zoom_ratio self.y += y / self.zoom_ratio - y / zoom_ratio self.zoom_ratio = zoom_ratio self.zoom_to_fit_on_resize = False self.update() def zoom_to_area(self, x1, y1, x2, y2): #...
row, col, val) def _get_matrix_index(index, name, nrows, ncols, bRow): if isinstance(index, int): if bRow: if index<-nrows or index>=nrows: raise ValueError("%d: row index out of range" % (index)) else: if index<-ncols or index>=ncols: raise ValueError("%d: column index out of range" % (index)) return ...
<filename>AER_theorist/object_of_study.py from abc import ABC, abstractmethod from torch.utils.data import Dataset from enum import Enum from AER_experimentalist.experiment_environment.variable import * import AER_config as AER_cfg from typing import List, Dict import torch import numpy as np import copy import random ...
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
""" (c) 2013 LinkedIn 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/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing,...
len(similars) == self.dist_similarity_test_times * len(discm_tests_gender0) with open(file1, "a") as f2: for prt in similars: f2.write(str(prt)[1:-1].replace(" ", "") + "\n") # remove space with open(file0, "a") as f1: for cnt, i in enumerate(discm_tests_gender0): for _ in range(self.dist_similarity_test_times)...
""" SSBJ test case - http://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19980234657.pdf Python implementation and OpenMDAO integration developed by <NAME> and <NAME> ONERA, the French Aerospace Lab. """ from __future__ import print_function import numpy as np from openmdao.api import ExplicitComponent from .common im...
"""Main class for working with records. vectorbt works with two different representations of data: matrices and records. A matrix, in this context, is just an array of one-dimensional arrays, each corresponding to a separate feature. The matrix itself holds only one kind of information (one attribute). For example, o...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Distributed under the terms of the MIT License. """ Script to analyse FASTA sequence files from BRENDA in bulk. Author: <NAME> Date Created: 06 Dec 2018 """ from os.path import exists import pandas as pd from numpy import arange, histogram import matplotlib.pyplot as...
- is for electrons # - Make a copy of energy so that the original dest['energy'] # does not change energy = f_out['energy'].copy() if scpot is not None: # sign = -1 if dist.attrs['species'] == 'e' else 1 sign = -1 energy += (sign * J2eV * e * scpot) # Low energy integration limit # - Exclude data below the lo...
init fails # Define a task for testing class FailInit(PipelineTask): def init(self,a,b,c='hello',d=13,e=None): raise Exception("Forced init to fail") def setup(self): result = "a=%s b=%s c=%s d=%s e=%s" \ % (self.args.a, self.args.b, self.args.c, self.args.d, self.args.e) self.output.results.append(result) ...
import torch import math import numpy as np from matplotlib import path import pdb class BoxSampler(object): def __init__(self, RoI_number=1, IoU_bin_bases=torch.tensor([0.73,0.12,0.15,0.05,0], dtype=torch.float), IoU_weights=torch.tensor([0.5,0.6,0.7,0.8,0.9], dtype=torch.float), IoU_limit_precision=1e-5): su...
beta=self.beta_psf) # Define the Flux psf = psf.withFlux(self.psf_flux) # Define the shear psf = psf.shear(g1=e1s[it], g2=e2s[it]) # Draw the PSF on a vignet image_epsf = gs.ImageF(self.image_size, self.image_size) # Define intrapixel shift (uniform distribution in [-0.5,0.5]) rand_shift = np.random.rand(2) - ...
<gh_stars>1-10 # # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel 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 License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless req...
<reponame>RangeKing/Paddle<gh_stars>1-10 # Copyright (c) 2020 PaddlePaddle 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/LIC...
<reponame>rimmartin/cctbx_project<gh_stars>0 from __future__ import division from cctbx.array_family import flex from cctbx import sgtbx from cctbx.crystal.find_best_cell import alternative_find_best_cell from cctbx.sgtbx import cosets from cctbx import crystal from cctbx import miller import cctbx.sgtbx.lattice_symmet...
, u'讹' : [u'e'] , u'幀' : [u'z'] , u'靆' : [u'd'] , u'淍' : [u'z'] , u'䙐' : [u'k'] , u'祚' : [u'z'] , u'嗝' : [u'g'] , u'諣' : [u'h'] , u'慪' : [u'o'] , u'㟱' : [u'y'] , u'陰' : [u'y', u'a'] , u'泷' : [u's', u'l'] , u'䥺' : [u'y'] , u'鼁' : [u'q'] , u'碄' : [u'l'] , u'下' : [u'x'] , u'蜑' : [u'd'] , u'悔' : [u'h'] , u'馚' : [u'f'] , u'...
save : bool Save the resulting PSF coefficients to a file? (default: True) Keyword Args ------------ return_results : bool By default, results are saved in `self._psf_coeff_mod` dictionary. If return_results=True, results are instead returned as function outputs and will not be saved to the dictionary attribu...
vusb_device_configure(self, dev_sxp, devid): """Configure a virtual root port. """ dev_class = sxp.name(dev_sxp) if dev_class != 'vusb': return False dev_config = {} ports = sxp.child(dev_sxp, 'port') for port in ports[1:]: try: num, bus = port dev_config['port-%i' % int(num)] = str(bus) except TypeError: ...
= locals() all_params = [ 'request' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method ge...
Affine or tuple.") # Enable shortcut to create CRS from an EPSG ID. if isinstance(crs, int): crs = CRS.from_epsg(crs) # If a 2-D ('single-band') array is passed in, give it a band dimension. if len(data.shape) < 3: data = np.expand_dims(data, 0) # Preserves input mask if isinstance(data, np.ma.masked_array):...
<reponame>Gametz/Helper_Bot<filename>bot_4u/hackgame.py import json import random def hackmenu(id): with open('json/' + str(id) + '.json') as f: ff = json.loads(f.read()) return "📋 Твой профиль:" \ "\n" \ "\n🔎 Уровень: " + str(ff["hlevel"]) + \ "\n💊 ХП: " + str(ff["hhp"]) + " (+" + str(ff["php"]) + ")" + \ "...
0x38, ], "gEfiPeiGraphicsPpiGuid": [ 0x6ECD1463, 0x4A4A, 0x461B, 0xAF, 0x5F, 0x5A, 0x33, 0xE3, 0xB2, 0x16, 0x2B, ], "gEfiPeiMpServicesPpiGuid": [ 0xEE16160A, 0xE8BE, 0x47A6, 0x82, 0xA, 0xC6, 0x90, 0xD, 0xB0, 0x25, 0xA, ], "gEfiPeiCapsulePpiGuid": [ 0x3ACF33EE, 0xD892, 0x40F4, 0xA2, 0xFC...
<filename>enas_lm/src/lstm_lib.py # coding=utf-8 # Copyright 2019 The Google Research Authors. # # 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 #...
<reponame>dmitryvinn/watchman<filename>build/fbcode_builder/getdeps/cargo.py #!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import os import re import shutil from ...
= 0 y = 0 # todo enable/disable bar graf here if not self.enable_barGraph: # float_value = ((lenght / (self.value_max - self.value_min)) * (self.value - self.value_min)) lenght = int(round((lenght / (self.value_max - self.value_min)) * (self.value - self.value_min))) # print("f: %s, l: %s" %(float_value, lenght)...
glean request: 0 ''' } golden_output2 = {'execute.return_value': ''' +++ XR1: executing command 'show ipv6 vrf all interface' +++d.parse() show ipv6 vrf all interface Fri Sep 6 09:50:49.892 EST BVI100 is Up, ipv6 protocol is Up, Vrfid is default (0x60000000) IPv6 is disabled, link-local address unassigned No...
self.trackReader.changeList if change.frame not in self.trackReader.undone_changes ] self.changelist_widget.setChangeList(change_list) self.changelist_widget.setVisible(True) @qc.pyqtSlot() def saveChangeList(self): if self.trackReader is None: return fname, _ = qw.QFileDialog.getSaveFileName( self, 'Save li...
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 ...
category: ``str`` :return: Assertion pass status :rtype: ``bool`` """ return assertions.FixCheck( msg=msg, has_tags=has_tags, absent_tags=absent_tags, description=description, category=category, ) @bind_entry def match( self, actual, expected, description=None, category=None, include_tags=None, exclude_tag...
(matrix) notation uk = common.to_grid(uk, self.rows, self.cols) #add pre-defined banks uk = self.__add_banks(uk) #smoothen for i in range(self.rows): uk[i,:] = common.smooth(uk[i,:],smoothie) print "Finished [UK]." self.z_interpol = uk del uk #plot if plot: self.plot(fignum='UK') #TODO: PROBABLY ONLY P...
db_logo_img , db_header_text,db_please_login_text ],[] ) elif pathname == '/data/video6': if current_user.is_authenticated: username_text = html.Div(['Current user: ' + current_user.username], id='user-name', style=dict(color='black', fontWeight='bold', fontSize='1.1rem', marginTop='1rem', marginLeft='1rem')) d...
from __future__ import print_function import hashlib import os import numpy as np try: from lensit.bicubic import bicubic except ImportError: print("***could not import bicubic fortran module") print("***I wont be able to lens maps or invert a deflection field") bicubic = 'could not import bicubic fortran module'...
# -*- coding: utf-8 -*- # FLEDGE_BEGIN # See: http://fledge.readthedocs.io/ # FLEDGE_END """ auth routes """ import re import json from collections import OrderedDict from aiohttp import web from fledge.services.core.user_model import User from fledge.common.web.middleware import has_permission from fledge.common i...
Crawler(object): """Crawls a site until a registration page is found or max level is reached. Creates, uses and destroys Retriever objects. Creates a cookie temp file needed for session cookies. It keeps track of 'visited links' and 'links to visit' of the site. To do this it uses the links discovered from each R...
"hemlock", "password", 0, "http://127.0.0.1:9200") error.append(error6) h, error7 = a.process_action(0, "tenant-create", {'--name':'tenant2'}, m_server, "localhost", "hemlock", "hemlock", "password", 0, "http://127.0.0.1:9200") error.append(error7) hemlock.getpass.getpass = lambda _: '<PASSWORD>' i, error8 = a.pro...
<gh_stars>0 #!/cosma/home/dp004/dc-rope1/.conda/envs/flares-env/bin/python import matplotlib as ml ml.use('Agg') import numpy as np import sphviewer as sph from sphviewer.tools import QuickView, cmaps, camera_tools, Blend import matplotlib.pyplot as plt from astropy.cosmology import Planck13 as cosmo import matplotlib....
# author: <NAME> from p5 import * import sympy as sym import mpmath as mp import numpy as np from tkinter import Tk from scipy.spatial import distance import PIL from PIL import Image import argparse import os import csv import mimetypes DEBUG = False parser = argparse.ArgumentParser( description='Custom frame annot...
in range(lump.length//thingSize): if zStyle: lump.read(2) x = int.from_bytes(lump.read(2), "little", signed=True) # same reason for inverting Y as for vertices y = -int.from_bytes(lump.read(2), "little", signed=True) lump.read(2) angle = int.from_bytes(lump.read(2), "little", signed=True) typeID = int...
# only functions to generate, load, save, check itp.. from random import randint from math import log import inspect import os import sys import pickle from .__tools_single import __cre_rotor, __save_rotor, __load_rotor, __check_rand_rotor, generate_from_64b_inter_key, \ bcolors from .core import EncryptNextRotor, ...
# This file was automatically generated by SWIG (http://www.swig.org). # Version 3.0.1 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (3,0,0): new_instancemethod = lambda func, inst, cls: _GeomTools...
# -*- coding: utf-8 -*- import csv import datetime from dateutil.relativedelta import relativedelta from dateutil.parser import parse import ftplib import glob import os import os.path import pickle import pprint import re import shutil import sys import time import webbrowser import dataset import...
<filename>demisto_sdk/commands/update_release_notes/tests/update_rn_test.py import os import shutil import unittest import pytest from demisto_sdk.commands.common.git_tools import git_path from demisto_sdk.commands.common.tools import get_json class TestRNUpdate(unittest.TestCase): FILES_PATH = os.path.normpath(os....
<filename>sam_jax/training_utils/flax_training.py # Copyright 2020 The Authors. # # 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...
#!/usr/bin/python3 ######################################################################################## # # ISPWatcher2 # <NAME> # November 1, 2009 # # - Testing - # Tested on MacOS Snow Leopard (10.6) and Ubuntu Linux 9.04 and 9.10 # # - Version History - # 2.0.0 - November 1, 2009 # Converted from .NET to Python ...
template_name = 'dcim/device_component_add.html' class InterfaceEditView(ObjectEditView): queryset = Interface.objects.all() model_form = forms.InterfaceForm template_name = 'dcim/interface_edit.html' class InterfaceDeleteView(ObjectDeleteView): queryset = Interface.objects.all() class InterfaceBulkImportView...
code """ if opts.dst_node is not None: ToStderr("New secondary node given (disabling iallocator), hence evacuating" " secondary instances only.") opts.secondary_only = True opts.primary_only = False if opts.secondary_only and opts.primary_only: raise errors.OpPrereqError("Only one of the --primary-only and" ...
starting {0}".format( # service)) # node.run_cmd("service {0} start".format(service)) sleep(1) logger.debug("{0} is up on {1}!".format(service, node.name)) def verify(self, builds, progress, node_up, node_down=None): """ Verifies state persistence """ logger.info("Verifying cluster integrity...") progress.se...
<reponame>vast-data/vast-csi # Copyright 2015 gRPC authors. # # 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 la...
op in sum_op], [4, 2, 4, 2]) sum_op = sum_op.collapse_summands() with self.subTest('SummedOp test 7-b'): self.assertEqual(sum_op.coeff, 1) self.assertListEqual([str(op.primitive) for op in sum_op], ['XX', 'YY']) self.assertListEqual([op.coeff for op in sum_op], [8, 4]) sum_op = SummedOp([X ^ X * 2, Y ^ Y], 2) +...
<reponame>skadge/doit import os import time import sys import tempfile import uuid from sys import executable import pytest from doit.task import Task from doit.dependency import get_md5, get_file_md5 from doit.dependency import DbmDB, JsonDB, SqliteDB, Dependency from doit.dependency import DatabaseException, Uptoda...