input
stringlengths
2.65k
237k
output
stringclasses
1 value
is current, delete vmsn from server. if params.name not in snapshots_to_delete: snapshots_to_delete.append(params.name) if backing_file in get_sn_chain_path(disk_config['current']): if params.domain and is_vm_active(params.domain): current_backing_file = DiskImageHelper.get_backing_file(disk_config['current']) #...
heap top = m_heap.top() #if value exceeds beta, break if top[0] > beta: break #assume value is still valid #check if indices still exist, not merged before m_inds = top[1] inds_exist = all(e in row_inds for e in m_inds) if inds_exist == True: #proceed to merge and update heap #get, from inds, matching r...
<reponame>zhouhaozeng/kaggle-quora-question-pairs __author__ = '<NAME>: https://www.kaggle.com/zhouhao' __date__ = '6/12/2017' import os import re import logging import csv import json import time import codecs import numpy as np import pandas as pd import collections from nltk.corpus import stopwords from nltk.stem ...
<gh_stars>0 from django.shortcuts import render, redirect from django.contrib.auth.models import User from django.db import transaction from django.db.models import Q from django.http import JsonResponse from django.utils.translation import gettext as _ from django.core.exceptions import ObjectDoesNotExis...
import itertools import datetime import decimal import struct import re import uuid import six import functools from io import StringIO, BytesIO from pytds.tds_base import read_chunks from . import tds_base from .collate import ucs2_codec, raw_collation from . import tz _flt4_struct = struct.Struct('f') _flt8_struct...
calibration vis_uncal = nidata.vis_off_dec # Timestamp corresponding to decimated visibilities timestamp = nidata.timestamp_dec # Find gains nidata.get_ni_gains() gain = nidata.ni_gains # Correct decimated visibilities if self.decimate_only: vis = vis_uncal.copy() else: # Apply the gain solution gain_inv ...
is_initial=True) return output def _generator_dilation_layer(self, input_batch, state_batch, layer_index, local_condition_batch, global_condition_batch): variables = self.variables['dilated_stack'][layer_index] weights_filter = variables['filter'] weights_gate = variables['gate'] output_filter = self._generato...
<reponame>mgarc729/lithography-GDSII-format-generator<filename>wafer.py import numpy import gdspy from tools import generate_circle_points as gc import pillar as Pillar import grid as Grid class Wafer: """Handles all the processes of modeling on a wafer shape. This class allows the user to create a gds template o...
receptor. Returns a dictionary whose keys are of form HDONOR-${MOLTYPE}_${RESIDUETYPE}_${STRUCTURE} where MOLTYPE is either "RECEPTOR" or "LIGAND", RESIDUETYPE is "BACKBONE" or "SIDECHAIN" and where STRUCTURE is "ALPHA" or "BETA" or "OTHER". The values are counts of the numbers of hydrogen bonds associated with t...
[1.0983700000000000e-01, -4.9422629399585800e-06, 1.0794689805131573e-10, 6.3160419072640888e-15], [1.0500900000000001e-01, -4.7074210181341546e-06, 1.0286798941483283e-10, 5.5530287193163326e-15], [1.0041000000000000e-01, -4.4850259531465425e-06, 9.7023106293067313e-11, 5.7028468534688681e-15], [9.6027699999999994e...
<gh_stars>0 from . import util from .util import ( mkhead, sm_name, sm_section, SubmoduleConfigParser, find_first_remote_branch ) from git.objects.util import Traversable from io import BytesIO # need a dict to set bloody .name field from git.util import ( Iterable, join_path_native, to_native_path_linux, Remo...
Adds an integer bit if needed.""" ret = self.__class__.__new(self._bits, self._signed, self._m, self._n, self.overflow, self.rounding, self.str_base, self.overflow_alert, self.implicit_cast_alert, self.mismatch_alert) ret._bits >>= ret._n ret._n = 0 # Signed numbers are guaranteed to have at least 1 integer bi...
import os,datetime, time, sys import brickDimensions import studView from random import randint from copy import deepcopy import numpy print "No command line argument passed - using simple file name..." def checkInput(): userNumber = raw_input("Choose number 1-99? (q to quit) ") if userNumber == "q"...
<reponame>gimyeongmin/miningpoolhub_info #!/usr/bin/env python from __future__ import print_function import time import datetime from colorclass import Color, Windows from terminaltables import SingleTable import argparse import requests import sys import signal parser = argparse.ArgumentParser(description="MINING P...
#!/usr/bin/env python3 """ Name: __init__.py Purpose: Implements a simple file cache Copyright (c) 2021 <NAME> This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone...
used to improve the Calculator in the future and to provide data for research purposes. No individual runs will be published, only aggregated results. '''))], id='div-calculate' ), html.Div( dcc.Markdown('#### Calculating...', id='md-calculating'), id='div-calculating' ), html.Div(id='div-results'), ]), htm...
<reponame>tharrrk/pydigitemp """ Conceptual Overview ------------------- Properly configured with respect to baud rate, data bits per character, parity and number of stop bits, a 115,200 bit per second capable UART provides the input and output timing necessary to implement a 1-Wire master. The UART produces the 1-Wir...
'v_3'), ('t_1', 'v_6'), ('c_1', 't_1'), ('t_1', 'v_2'), ('c_1', 'v_4'), ('c_1', 't_2'), ('t_2', 'v_4'), ('c_1', 'v_6'), ('t_2', 'v_2'), ('t_1', 'v_1'), ('c_1', 'v_2'), ('c_1', 'v_3'), ('t_2', 'v_5')}}, {'DOMAIN': {'v_1', 'v_4', 't_2', 't_1', 'c_1', 'v_2', 'v_6', 'v_5', 'v_3'}, 'City': {'c_1'}, 'Town': {'t_2', 't_1'...
<reponame>rwatson/chromium-capsicum # Copyright (c) 2006-2009 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. """This package contains utility methods for manipulating paths and filenames for test results and baselines. It...
filled if width is None: if filled: width = rc['colorbar.width'] else: width = rc['subplots.panelwidth'] width = units(width) if space is None: key = 'wspace' if side in ('left', 'right') else 'hspace' pad = rc['subplots.axpad'] if figure else rc['subplots.panelpad'] space = _get_space(key, share, pad=pad) r...
else: logger.info('No missing parameter detected.', '$MG:BOLD') def check_answer_consistency(self): """function called if the code reads a file""" self.check_card_consistency() self.do_update('dependent', timer=20) def help_set(self): '''help message for set''' logger.info('********************* HELP SE...
<reponame>lvikt/ekostat_calculator # -*- coding: utf-8 -*- """ Created on Tue Oct 31 08:10:06 2017 @author: a002028 """ import os import sys current_path = os.path.dirname(os.path.realpath(__file__))[:-4] if current_path not in sys.path: sys.path.append(current_path) import pandas as pd import numpy as np import ti...
the questions for which answers are being provided. $ref: "#/definitions/Questionnaire" resourceType: description: defines FHIR resource type, must be QuestionnaireResponse type: string status: externalDocs: url: http://hl7.org/implement/standards/fhir/DSTU2/questionnaireresponse-definitions.html#Questionnaire...
%s Bpdu Guard %s" %(obj["BridgeAssurance"] == 1, obj["BpduGuard"] == 1) print "Link Type %s" %("UNSUPPORTED",) print "\nPort Timers: (current tick(seconds) count)" print "EdgeDelayWhile:\t", obj["EdgeDelayWhile"] print "FdWhile: \t", obj["FdWhile"] print "HelloWhen: \t", obj["HelloWhen"] print "MdelayWhile: \t", ...
get command line arguments #-------------------------------------- if command_line: args=sys.argv user="" if "-h" in args: print(main.__doc__) return False if "-usr" in args: ind=args.index("-usr") user=args[ind+1] else: user="" if '-F' in args: ind=args.index("-F") meas_file=args[ind+1] if '-Fsa' in a...
padx=padx, pady=pady) if self.latch_status: label = self.error.cget('text') label = label + 'Trigger Latch enabled,\nTrigger Reset signal sent.\nPlease try again.\n' self.error.configure(text=label) if fifo_status: label = self.error.cget('text') label = label + 'Error: Inactive RPi!\n' self.error.configure(tex...
<filename>home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/win32/peb_teb.py #!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2009-2014, <NAME> # All rights reserved. # # Redistribution and use in source and ...
[1]_ and [2]_, and reviewed in [3]_. This model is one of the most often used. It uses the Dittus-Boelter correlation for turbulent convection and the Forster-Zuber correlation for pool boiling, and combines them with two factors `F` and `S`. .. math:: h_{tp} = S\cdot h_{nb} + F \cdot h_{sp,l} .. math:: h_{sp...
= a[16]+0.1*(np.sin(2*PI*(a[16]-time.get_value()))) dot16_0.move_to(self.coords_to_point(magic,0)) return dot16_0 def dot_updater_01(mobj): magic = a[0]+0.1*(np.sin(2*PI*(a[0]-time.get_value()))) dot0_1.move_to(self.coords_to_point(magic,0.5)) return dot0_1 def dot_updater_11(mobj): magic = a[1]+0.1*(np.s...
"harness_command" elif key == "languageHint": suggest = "language_hint" elif key == "logDir": suggest = "log_dir" elif key == "logToSerialconsole": suggest = "log_to_serialconsole" elif key == "logUploadLocation": suggest = "log_upload_location" elif key == "oauthScopes": suggest = "oauth_scopes" elif key ==...
# coding: utf-8 """ data.world API data.world is designed for data and the people who work with data. From professional projects to open data, data.world helps you host and share your data, collaborate with your team, and capture context and conclusions as you work. Using this API users are able to easily access da...
= src + ' - ' + sink # if skip_np is True, skip all flows starting with NP if skip_np and filter_out_flow(src, sink): continue # count how many times flow appears count = 0 for j in range(0, len(vers)): if matrix[i][j] > 0: count += matrix[i][j] total_count += matrix[i][j] flow_num[count] += 1 if matrix[i]...
<reponame>oicr-gsi/dashi from collections import defaultdict import dash_html_components as html from dash.dependencies import Input, Output, State from ..dash_id import init_ids from ..utility.plot_builder import * from ..utility.table_builder import table_tabs_single_lane, cutoff_table_data_ius from ..utility impor...
# -*- coding: utf-8 -*- # This file is generated from NI-Digital Pattern Driver API metadata version 19.5.0d7 enums = { 'BitOrder': { 'values': [ { 'documentation': { 'description': 'The most significant bit is first. The first bit is in the 2^n place, where n is the number of bits.' }, 'name': 'NIDIGITAL_VAL_MS...
# coding: utf-8 """ RadioManager RadioManager # noqa: E501 OpenAPI spec version: 2.0 Contact: <EMAIL> Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from radiomanager...
""" return "Tableau tuples of size %s"%self.size() def an_element(self): r""" Returns a particular element of the class. EXAMPLES:: sage: TableauTuples(size=3).an_element() ([], [[1, 2, 3]], []) sage: TableauTuples(size=0).an_element() ([], [], []) """ if self.size()==0: return self.element_class(self, [...
# Plotting utils import glob import math import os import random from copy import copy from pathlib import Path import cv2 import matplotlib import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import torch import yaml from PIL import Image, ImageDraw, ImageFont #from utils.ge...
0x0000003F, 0x000007FF, 0x00001000, 0x00002000, 0x00003000) self.TXANARAMPDRVBW = RM_Field_RAC_TXRAMP_TXANARAMPDRVBW(self) self.zz_fdict['TXANARAMPDRVBW'] = self.TXANARAMPDRVBW self.TXANARAMPDRVEN = RM_Field_RAC_TXRAMP_TXANARAMPDRVEN(self) self.zz_fdict['TXANARAMPDRVEN'] = self.TXANARAMPDRVEN self.TXANARAMPODEV...
# A small python library to modify SDdraft files created during publishing. """ SDdraft files contain the service configuration. Modifying this allows customizing the service being published. This library is not complete and is just a sample to showcase the possibility""" import xml.dom.minidom as DOM import o...
# coding: utf-8 from cached_property import cached_property import numpy as np import pandas as pd from collections import defaultdict from collections import OrderedDict import weakref from kids.cache import cache import requests import os from sqlalchemy.sql import text from random import random from time import sle...
<filename>MIDIInput.py<gh_stars>1-10 ############################################################### # MIDI Input class by <NAME> # # # # contains functions to be used in the improvisor # # check out www.github.com/dan-field/jazz for info and rights # ############################################################### # T...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ stand alone filter script based on jgi-rqc-pipeline/filter/fastq_filter2.py v3.2.8 Command $ filter.py -f FASTQ.GZ -o OUT_DIR --skip-blast -html Outputs - normal filter outputs + index.html Created: March 15, 2018 <NAME> (<EMAIL>) Revision: """ import os impo...
b order by a rows between UNBOUNDED PRECEDING AND CURRENT ROW) as flt_sum', 'sum(abs(flt)) over (partition by b order by a rows between UNBOUNDED PRECEDING AND CURRENT ROW) as flt_sum', 'sum(cast(c as Decimal(6,1))) over (partition by b order by a rows between UNBOUNDED PRECEDING AND CURRENT ROW) as dec_sum'] gen =...
<filename>pipeline/mtl_analysis/helper_functions.py from pipeline import lab, experiment, ephys, tracking, oralfacial_analysis from scipy import optimize import matplotlib.pyplot as plt plt.rcParams['font.size'] = 48 import numpy as np # ======== Define some useful variables ============== _side_cam = {'tracking_de...
# Full-duplex, 1000Mb/s, link type is force-up # Full-duplex, Auto Speed, SR, link type is force-up # Duplex unknown, 0Kb/s, THD, link type is autonegotiation p12 = re.compile(r'^(?P<duplex_mode>[\w\s\-]+([d|D]uplex|unknown)), ' '+(?P<port_speed>[\w\s\/]+)(, +(?P<media_type>\S+))?' '(, +link +type +is +(?P<link_ty...
{function (): undefined} */ render : $.empty, contains : $.lambda(false) }, circle : { /** * @param {?} adj * @param {?} lab * @return {undefined} */ render : function(adj, lab) { var dim = adj.getData("dim"); var pos = this.getAlignedPos(adj.pos.getc(true), dim, dim); /** @type {number} */ var qualifier ...
<reponame>JNDanielson/mplstereonet """ Classes and functions for kinematic analysis for rock slope stability. Kinematic analyses for three failure modes are available: (1) Planar Sliding, (2) Wedge Sliding, and (3) Flexural toppling. References: (1)) <NAME>. and <NAME>. (2004) Rock Slope Engineering. 4th Edition, ...
<reponame>HwanSolo/stanford-linguistics<filename>celery-queue/metrical-tree/metricaltree.py<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- import os from collections import defaultdict import cPickle as pkl import numpy as np import pandas as pd import matplotlib.pyplot as plt import codecs import nltk from ...
for e in obj['objectSegmentationPixels']: lign.append(e[0]) col.append(e[1]) xmin=min(lign) ymin=min(col) xmax=max(lign) ymax=max(col) #img=np.zeros([xmax-xmin+1,ymax-ymin+1,3],dtype='uint8') img=np.ones([xmax-xmin+1,ymax-ymin+1,3],dtype='uint8')*255 im=cv2.imread(imageName) for e in obj['objectSegmenta...
<filename>pipy/__init__.py<gh_stars>1-10 """ # PiPy Install or upload your Python packages from/to the PyPI package index website. Easy to use, IDLE/shell access, and no dependencies. PiPy (the PyPI acronym in reverse) is a one-stop tool for all your package needs, including both downloading and uploading. It is mean...
for the example or batch. permutation : list List of integers defining the new channels order. Returns ------- torch.Tensor Transformed inputs. torch.Tensor Transformed labels. References ---------- .. [1] <NAME>., <NAME>., <NAME>., <NAME>., <NAME>., & <NAME>. (2018). HAMLET: interpretable human and machi...
hostname_len + max_hostname_len + offset + negotiate_flags \ + ntlm_server_challenge + reserved + struct.pack("H", list_len) + struct.pack("H", list_max_len) \ + list_offset + smb_version + sambified_hostname + net_bios_domain_type + net_bios_domain_len \ + net_bios_domain_name + net_bios_computer_type + net_bios_co...
#!/usr/bin/env python # ================================================================================================== # This file is part of the CLBlast project. The project is licensed under Apache Version 2.0. This # project loosely follows the Google C++ styleguide and uses a max-width of 100 characters per li...
@param {?} type * @return {undefined} */ onMouseUp : function(adj, lab, event, type) { var qualifier = $.event.get(adj, lab); if (!this.moved) { if (type) { this.config.onRightClick(this.hovered, event, qualifier); } else { this.config.onClick(this.pressed, event, qualifier); } } if (this.pressed) { if (th...
Classification relies on log-softmax, multi-label classificatition and regression use sigmoid. instance_normalize : boolean, optional Apply mean/variance normalization on input sequences. rnn : {'LSTM', 'GRU'}, optional Defaults to 'LSTM'. recurrent : list, optional List of hidden dimensions of stacked recurren...
<gh_stars>0 #!/usr/bin/env python # Copyright 2016 Netfishers # # 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 logging import subprocess import datetime from getpass import getpass import copy from seml.database import get_collection, build_filter_dict from seml.sources import delete_orphaned_sources from seml.utils import s_if, chunker from seml.settings import SETTINGS from seml.errors import ArgumentError, MongoDBErr...
''' Created on 20/01/2014 @author: MMPE See documentation of HTCFile below ''' from __future__ import division from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import from builtins import zip from builtins import int from builtins import str from future im...
dir """ if system_name != "" and filename == "": filename = data_Utils.getSystemData(self.datafile, system_name, "filename") elif system_name == "" and filename == "": pNote("No system or filename found, needs to provide at least one", "error") path = data_Utils.get_object_from_datarepository("parallel_exec_tmp_di...
is_unicode(source): source = as_unicode(source, encoding) return source, encoding, ffilesystem def lines_cache(filename): filename = g_found_unicode_files.get(filename, filename) if filename in g_lines_cache: return g_lines_cache[filename] (source, encoding, ffilesystem) = source_provider(filename) source ...
symbolic version of the integrand kinetic_energy_intgd_sym = sympy.simplify(funcs[0](R.z, R.y, R.x)*(-1/2)*sympy.vector.Laplacian(funcs[1](R.z, R.y, R.x)).doit()) # numerical version of the integrand kinetic_energy_intgd_num = sympy.lambdify([R.z, R.y, R.x], kinetic_energy_intgd_sym, 'scipy') # integrate (first ind...
('foo', 1), () else: res = self for p in prop[:-1]: res = res[p] res[prop[-1]] = value def __setattr__(self, prop, value): """ Parameters ---------- prop : str The name of a direct child of this object value New property value Returns ------- None """ if (prop.startswith('_') or hasattr(self, prop)...
pd.DataFrame() for user in user_infos: if user is None: uname = "Group Average" else: uname = user rval[uname] = self.global_priority(user) return rval def limit_matrix(self, username=None, as_df=False): ''' :param username: If None, gets it for all users. Otherwise gets it for the user specified. It can al...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
"right", 4), minValue=8, fieldMinValue=1, maxValue=1024, fieldMaxValue=65536, attrName="tileSize") pm.separator(height=2) self._addControl( ui=pm.checkBoxGrp( label="Lock Sampling Pattern", height=18, columnAttach=(1, "right", 4), changeCommand=self.__lockSamplingPatternChanged), attrName="lockSamplingPa...
<filename>agent/basic_planning_pokemon_agent.py """Pokemon agent who's moves are determined by maximizing personal gain.""" import operator from copy import deepcopy import logging from agent.basic_pokemon_agent import PokemonAgent from agent.basic_pokemon_agent import calc_opp_position_helper, calc_position_helper f...
# Copyright 2018 The dm_control 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 agreed to in w...
# 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 applicable ...
__setitem__(self, idx, val): ''' Cases: 1. arr[idx] = num 2. arr[idx] += num idx can be: - slice - ndarray - int In general, we follow the strategy of offloading everything to NumPy after evaluating the stored operations. ''' def _update_single_entry(arr, index, val): ''' @start: index to update. @val: n...
# /bin/env python # coding: utf-8 from __future__ import print_function import sys import argparse import logging import os import math import cv2 import numpy as np class GenerateSyntheticData: import PythonMagick as Magick def __init__(self, logger=None): if logger == None: logging.basicConfig(stream=sys.st...
"select * from ModuleList where ModulePath = '" + row[1] + "'" ModuleListcursor.execute( SelectQuery ) Results = ModuleListcursor.fetchall() if len(Results) >= 1: statuswindow.SetLine(row[0] + " is already imported") else: statuswindow.SetLine(SelectedModuleName + " : " + row[1]) if row[1].count('/') >=...
# tL = [t if t is not None else "" for t in scopU.getNameLineage(familyId)] cObj.setValue(";".join(tL), "annotation_lineage_name", ii) idLinL = scopU.getIdLineage(familyId) cObj.setValue(";".join([str(t) for t in idLinL]), "annotation_lineage_id", ii) cObj.setValue(";".join([str(jj) for jj in range(1, len(idLinL) ...
should be reshaped according to dim." g = op2.Global((2, 2), [1.0] * 4) assert g.dim == (2, 2) and g.data.shape == (2, 2) def test_global_properties(self): "Data globalructor should correctly set attributes." g = op2.Global((2, 2), [1] * 4, 'double', 'bar') assert g.dim == (2, 2) and g.dtype == np.float64 and g....
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function import six.moves.http_client as httplib import xml.dom.minidom import time import re import os from six.moves.urllib.parse import quote from operator import itemgetter#, attrgetter from Plugins.Extensions.SubsDownloader2.SourceCode.archives...
<gh_stars>0 from typing import Union, List, Iterable from datetime import datetime from .internals.base_classes import ( BaseSyncCinnamon, BaseCinnamonField, QueryFieldSet, QueryField, ) from .internals.constants import CinnamonUndefined from .internals import scalars from . import fields as fields_module from . im...
<filename>BathymetryMap.py # BathymetryMap.py # # Class for parsing and querying bathymetric data # 2020-07-10 <EMAIL> initial implementation import seaborn as sns import numpy as np import datetime import rasterio as rio import importlib import earthpy as et import earthpy.plot as ep import scipy import scipy.signa...
<filename>WEEKS/CD_Sata-Structures/general/MAIN_DATA_STRUCTURES/binary-search-tree.py # create the node class that the tree will use class Node: def __init__(self, data, parent): self.data = data self.leftChild = None self.rightChild = None self.parent = parent # create the tree class and initialize the root nod...
0), # East Asian ideograph 0x6F5667: (0xC74D, 0), # Korean hangul 0x27304D: (0x4E71, 0), # East Asian ideograph 0x23514F: (0x992E, 0), # East Asian ideograph 0x6F5870: (0xCBD4, 0), # Korean hangul 0x275B36: (0x8F69, 0), # East Asian ideograph 0x6F5260: (0xC0AD, 0), # Korean hangul 0x27614B: (0x60CA, 0), # East A...
#!/usr/bin/env python # Copyright 2015 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. """git drover: A tool for merging changes to release branches.""" import argparse import cPickle import functools import logging import...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import sys import ftrobopy import webthing import threading import asyncio import uuid import os from pathlib import Path import cv2 import time import tornado.web from tornado.httpclient import AsyncHTTPClient, HTTPRequest from tempfile import TemporaryDirectory from To...
the ones emitted as event data described at this link https://plotly.com/javascript/plotlyjs-events/#event- data. Additionally, every attributes that can be specified per-point (the ones that are `arrayOk: true`) are available. variables `count`, `probability`, `category`, `categorycount`, `colorcount` and `band...
<filename>includes/ldap_helpers.py<gh_stars>1-10 # coding=utf-8 import ldap from includes.helpers import write_json_log, write_json_error from ldap import modlist import random def generate_password(): chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@£$%^&*().,?0123456789' password = '' for c in rang...
i)") del_items(0x80050FE0) SetType(0x80050FE0, "void OperateBookLever__Fii(int pnum, int i)") del_items(0x80051388) SetType(0x80051388, "void OperateSChambBk__Fii(int pnum, int i)") del_items(0x800515B0) SetType(0x800515B0, "void OperateChest__FiiUc(int pnum, int i, unsigned char sendmsg)") del_items(0x80051980) SetTyp...
<filename>view/ui_tela_chamado.py # -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'ui_tela_chamado.ui' ## ## Created by: Qt User Interface Compiler version 5.15.2 ## ## WARNING! All changes made in this file will be lost wh...
memory indicator to be False self.ch1._ext_mem = False self.ch2._ext_mem = False self.ch3._ext_mem = False self.ch4._ext_mem = False # Initialize marker state (marker will be associated only channel 1.) self.ch1._mk = False if mode[0] == 1: # Set mode self.write(':INSTrument:DACMode SINGle') # Set marker co...
# This source code is part of the Biotite package and is distributed # under the 3-Clause BSD License. Please see 'LICENSE.rst' for further # information. import warnings import numpy as np from .seqtypes import NucleotideSequence, ProteinSequence, GeneralSequence from .alphabet import LetterAlphabet from .align.align...
"name": "calendar-next" }, { "url": "/images/status/calendar-previous.png", "name": "calendar-previous" }, { "url": "/images/status/calendar-relation.png", "name": "calendar-relation" }, { "url": "/images/status/calendar-search-result.png", "name": "calendar-search-result" }, { "url": "/images/s...
# Copyright 2018 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 applicable ...
import numpy as np import time, copy import torch import torch.optim as optim import torch.nn as nn from model.data_utils import * from model.utils import * from model.bea_aggregate import bea_ent_x2_t10, bea_ent_uns class Trainer(): def __init__(self, args, evaluator, criterion, task2idx, metric): self.args = args...
# File: imap_connector.py # # Copyright (c) 2016-2022 Splunk 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 applica...
@stats.timer('sdk.beaker.update_email') def update_email(self, email_id, payload): """ Updates an Email object. :param payload: A dictionary of values to save to the database. :return: The updated Email object. """ path = BEAKER_API_PATHS['EMAILS'] % email_id try: email = self.patch(payload, path=path) exc...
<filename>word_language_model/lcrnn.py #!./env/bin/python import torch from torch import nn, FloatTensor, ByteTensor, LongTensor from torch.nn.functional import sigmoid from torch.autograd import Variable, Function from torch.distributions import RelaxedOneHotCategorical import numpy as np import random import time c...
<filename>tests/test_http_request.py<gh_stars>1-10 import unittest import re import json import xmlrpc.client import warnings from unittest import mock from urllib.parse import parse_qs, unquote_to_bytes, urlparse from scrapy.http import Request, FormRequest, XmlRpcRequest, JsonRequest, Headers, HtmlResponse from scra...
return self._coefs @Coefs.setter def Coefs(self, value): if value is None: raise ValueError('The coefficient array for a BankCustomType instance must be defined.') if isinstance(value, (list, tuple)): value = numpy.array(value, dtype=numpy.float64) if not isinstance(value, numpy.ndarray): raise ValueError( ...
<filename>examples/remarketing/set_up_remarketing.py #!/usr/bin/env python # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICE...
import warnings from typing import Union, Tuple import numpy as np import cv2 import PySpin from .utils import EasyPySpinWarning, warn class VideoCapture: """Open a FLIR camera for video capturing. Attributes ---------- cam : PySpin.CameraPtr PySpin camera pointer. grabTimeout : int, default=PySpin.EVENT_TIM...
# Copyright (c) 2020, <NAME> <<EMAIL>> # Licenced under the BSD 2-Clause License. import torch import numpy as np from Verifiers.Layer import Layer from Verifiers.Controller import Controller from Verifiers.Bounds import Bounds import pdb epsilon = 1e-12 def get_bounds_xy(l_x, u_x, l_y, u_y): alpha_l = l_y beta_l ...
# coding=utf-8 from __future__ import print_function import theano from theano import tensor from theano.tensor import slinalg from theano.tensor import nlinalg from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams from theano.ifelse import ifelse import numpy as np from utils import Container, tt pi...
<reponame>qria/nirum-python-wsgi # -*- coding: utf-8 -*- """:mod:`nirum_wsgi` --- Nirum services as WSGI apps ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import argparse import collections import itertools import json import logging import os import re import sys import typing from nirum._compat import g...
<gh_stars>1-10 # Authors: <NAME>, <NAME>, <NAME> import torch import torch.nn.functional as F from torch.autograd import Function from collections import namedtuple BACKEND_NAME = 'torch' def is_complex(input): return input.shape[-1] == 2 class ModulusStable(Function): """Stable complex modulus. This class imp...