input
stringlengths
2.65k
237k
output
stringclasses
1 value
<gh_stars>0 # -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in compli...
<reponame>pkgw/vernon # -*- mode: python; coding: utf-8 -*- # Copyright 2015-2018 <NAME> and collaborators. # Licensed under the MIT License. """Different particle distributions. These are all expressed relative to the magnetic field coordinate system. """ from __future__ import absolute_import, division, print_func...
<reponame>IBM/DPM360<gh_stars>10-100 #!/usr/bin/env python2 # -*- coding: utf-8 -*- ## Copyright 2020 IBM 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...
Parchment": 0xEFE3CA, "Ivory Ridge": 0xD9C9B8, "Ivory Steam": 0xF0EADA, "Ivory Stone": 0xEEE1CC, "Ivory Tassel": 0xF8EAD8, "Ivory Tower": 0xFBF3F1, "Ivy": 0x226C63, "Ivy Enchantment": 0x93A272, "Ivy Garden": 0x818068, "Ivy Green": 0x585442, "Ivy League": 0x007958, "Ivy Topiary": 0x67614F, "Ivy Wreath": 0x70...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import math import os import numpy as np from numpy import pi,cos,sin import pandas as pd import logging from plotnine import * from scipy.stats.mstats import winsorize from plotnine.stats.stat_summary import bootstrap_statistics #%% put PUPIL LABS data into PANDAS...
<filename>test/test_proteins.py<gh_stars>0 from unittest import TestCase from six import assertRaisesRegex from six.moves import builtins from contextlib import contextmanager from dark.proteins import ( splitNames, _NO_PATHOGEN_NAME, getPathogenProteinCounts, ProteinGrouper, PathogenSampleFiles) from dark.utils imp...
""" mcpython - a minecraft clone written in python licenced under the MIT-licence (https://github.com/mcpython4-coding/core) Contributors: uuk, xkcdjerry (inactive) Based on the game of fogleman (https://github.com/fogleman/Minecraft), licenced under the MIT-licence Original game "minecraft" by Mojang Studios (www.m...
## @ingroup Analyses-Aerodynamics # Vortex_Lattice.py # # Created: Nov 2013, <NAME> # Modified: 2014, <NAME>, <NAME>, <NAME> # Feb 2016, <NAME> # Apr 2017, <NAME> # Nov 2017, <NAME> # Dec 2018, <NAME> # Apr 2020, <NAME> # Jun 2020, <NAME> # Sep 2020, <NAME> # May 2021, <NAME> # Jun 2021, <NAME> # --------------------...
self._termlist = terms self._evaluators = evaluators self._term_to_column_builders = term_to_column_builders term_column_count = [] self._column_names = [] for term in self._termlist: column_builders = self._term_to_column_builders[term] this_count = 0 for column_builder in column_builders: this_names = column...
<filename>django/docs/howto/error-reporting.txt.py XXXXXXXXXXXXXXX XXXXX XXXXXXXXX XXXXXXXXXXXXXXX XXXX XXXXXX XXXXXXX X XXXXXX XXXX XXX XXXXXX XXXXXX XXXX XXX XXX XXXXXXXXXXXXXXXX XXXXXXXX XXXX XXXX XXXX XXXX XXXXXX XXX XXXX XXXXXXX XXX XXXX XXXX XXXXXXX XXXXXXXXX XXXXX XXXX XXXXXX XXXXXXX XX XXXX XXXXXXXXXXX XXXX XX...
from __future__ import annotations import copy import dataclasses import functools import getpass import json import logging import logging.handlers import os import platform import queue as queue_module import socket import sys import typing import warnings from .utils import get_fully_qualified_domain_name # The s...
stopping current game.**") await ctx.send( f"**Starting a game of Uno with {len(game.getPlayerList())} players. " + "Input `hand` to see your hand of cards, `time` to see total elapsed time, or " + "`quit` to quit the game (Note: You may only quit when it is your turn). " + "Remember to say `uno` when you only hav...
# Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved. # SPDX-License-Identifier: Apache-2.0 from typing import ( TYPE_CHECKING, AbstractSet, Any, Collection, Mapping, NoReturn, Optional, Sequence, Union, ) from ..damlast.daml_lf_1 import TypeConName from ..dam...
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
<filename>tests/api/endpoints/test_dir_view.py # -*- coding: utf-8 -*- import os import json import posixpath from seaserv import seafile_api from django.core.urlresolvers import reverse from seahub.test_utils import BaseTestCase from seahub.utils import check_filename_with_rename from tests.common.utils import ran...
arquivo self.vBCSTRet.xml = arquivo self.vICMSSTRet.xml = arquivo if self.regime_tributario == 1: self.CSOSN.xml = arquivo self.pCredSN.xml = arquivo self.vCredICMSSN.xml = arquivo else: self.UFST.xml = arquivo self.pBCOp.xml = arquivo self.motDesICMS.xml = arquivo self.vBCSTDest.xml = arquivo self.vICMSST...
from __future__ import division import numpy as np import torch import torch.nn as nn from mmcv.cnn import normal_init from mmdet.core import (PointGenerator, multi_apply, multiclass_nms_kp, point_target_kp) from mmdet.ops import DeformConv from ..builder import build_loss from ..registry import HEADS from ..utils i...
<filename>src/fortiel.py #!/usr/bin/env python3.9 # -*- coding: utf-8 -*- # pylint: disable=too-many-lines, eval-used # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= # # =-=-=-=-= =-=-=-=-= # # =-=-=-=-= ,------. ,--. ,--. ,--. =-=-=-=-= # # =-=-=-=-= | .---',---. ,--.--.,-' '-.`--' ,---. |...
#=========================================================================== # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope tha...
<reponame>joycenerd/Reinforcement_Learning_2021 import os from time import sleep import numpy as np from scipy.optimize import minimize from tqdm import tqdm import gym import torch import torch.nn as nn from torch.nn.utils import clip_grad_norm_ from torch.distributions import MultivariateNormal, Categorical from torc...
return self.audio def save(self, basepath_noextension : str, acceptable_formats : typing.List[VNAudioFormat] = []) -> str: """Save the audio to the specified path. return the final path with extension. acceptable_formats should be the list of formats that we can directly save. if it is empty, all formats are con...
<gh_stars>0 # # Copyright 2013 Hewlett-Packard Development Company, L.P. # 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 ...
m.fp_text: if t[0] == 'reference': ref = t[1] break; m_at,m_angle = getAt(m.at) pads = [] count += len(m.pad) for j,p in enumerate(m.pad): layers = [unquote(s) for s in p.layers] if self.layer not in layers \ and layer_match not in layers \ and '*' not in layers: skip_count+=1 continue if self.filterNets...
epoch end dataloader_prefix = self.get_test_dataloader_prefix(dataloader_idx) dataloader_logs = self.multi_test_epoch_end( test_outputs, dataloader_idx=dataloader_idx ) # If result was not provided, generate empty dict dataloader_logs = dataloader_logs or {} # Perform `test_loss` resolution first (if provided ...
# Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
#-*- coding: UTF-8 -*- import re open_id_pattern = re.compile("^\d{11}$") def join_activity(mysql_conn, parameters): open_id = parameters.get("id") activity = parameters.get("activity") code = "0" response = {"id": open_id, "activity": activity} result = {"kind": "joinActivity", "code": code, "re...
<reponame>MaxGhenis/taxcalc-helpers from typing import Callable, Union from functools import wraps import warnings import copy import numpy as np import pandas as pd class MicroSeries(pd.Series): def __init__(self, *args, weights: np.array = None, **kwargs): """A Series-inheriting class for weighted microdata. Wei...
xmin - value of x coodinate on the left side of frame xmax - value of x coordinate on right side of frame plot_type = - can be either 'strat' (for stratigraphic plot) or 'morph' (for morphologic plot) filename - first few characters of the output filenames dirname - name of directory where output files should be wr...
'double': return [validators.IS_FLOAT_IN_RANGE(-1e100, 1e100)] elif field_type == 'integer': return [validators.IS_INT_IN_RANGE(-1e100, 1e100)] elif field_type == 'date': return [validators.IS_DATE()] elif field_type == 'time': return [validators.IS_TIME()] elif field_type == 'datetime': return [validators.IS_...
include AND exclude! if not include.isdisjoint(exclude): raise ValueError('include and exclude overlap on %s' % (include & exclude)) # empty include/exclude -> defaults to True # three cases (we've already raised if both are empty) # case 1: empty include, nonempty exclude # we have True, True, ... True for inc...
classsqlalchemy_utils.types.json.JSONType(*args, **kwargs)[source] # JSONType offers way of saving JSON data structures to database. On PostgreSQL the underlying implementation of this data type is ‘json’ while on other databases its simply ‘text’. # from sqlalchemy_utils import JSONType # class Product(Base): # __t...
self.FocusOnLocalRegion == True: TotalWidth = self.LocalRegionBound[1] - self.LocalRegionBound[0] TotalHeight = self.LocalRegionBound[3] - self.LocalRegionBound[2] else: TotalWidth = self.MapEastBound - self.MapWestBound TotalHeight = self.MapNorthBound - self.MapSouthBound IntervalWidth = TotalWidth / self.Num...
change what types of input the query builder accepts. # The default set of available relations. Relations with aliases are # treated as their aliases. E.g., a search like ['Form', 'source_id' '=', ...] # will generate the filter model.Form.source_id.__eq__(...) relations = { '__eq__': {}, '=': {'alias': '__eq__'...
== 2: ratioRaw = ( (fvPos[1] - ymin) / float(ymax - ymin)) elif axis == 3: ratioRaw = ( (fvPos[2] - zmin) / float(zmax - zmin)) ratio = max(min(ratioRaw, 1), 0) outColor = maya.cmds.colorAtPoint( 'SXRamp', o='RGB', u=(ratio), v=(ratio)) outAlpha = maya.cmds.colorAtPoint( 'SXAlphaRamp', o='A', u=(ratio), v=(...
# -*- mode: python; coding: utf-8 -*- # Copyright 2015-2018 <NAME> <<EMAIL>> and collaborators. # Licensed under the MIT License. """sas - running software in the SAS environment To use, export an environment variable $PWKIT_SAS pointing to the SAS installation root. The files $PWKIT_SAS/RELEASE and $PWKIT_SAS/setsas...
<reponame>npodewitz/airflow<gh_stars>1000+ # 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, Ver...
http_archive, name = "raze__humantime__1_3_0", url = "https://crates.io/api/v1/crates/humantime/1.3.0/download", type = "tar.gz", strip_prefix = "humantime-1.3.0", build_file = Label("//rules/rust/remote:BUILD.humantime-1.3.0.bazel"), ) maybe( http_archive, name = "raze__idna__0_2_0", url = "https://crates.i...
# change is applied. self.vertices: List[MLineVertex] = [] def __len__(self): """ Count of MLINE vertices. """ return len(self.vertices) def _copy_data(self, entity: 'MLine') -> None: entity.vertices = [v.copy() for v in self.vertices] def load_dxf_attribs( self, processor: SubclassProcessor = None) -> 'DXFN...
0." # ================================ Line Weight ================================ try: if float(values_dict['lineWeight']) <= 0: error_msg_dict['lineWeight'] = u"The line weight value must be greater than zero." except ValueError: error_msg_dict['lineWeight'] = u"The line weight value must be a real number." ...
Key.KEY_DELETE_FORWARD: libevdev.EV_KEY.KEY_DELETE.value, Key.KEY_END: libevdev.EV_KEY.KEY_END.value, Key.KEY_PAGEDOWN: libevdev.EV_KEY.KEY_PAGEDOWN.value, Key.KEY_RIGHTARROW: libevdev.EV_KEY.KEY_RIGHT.value, Key.KEY_LEFTARROW: libevdev.EV_KEY.KEY_LEFT.value, Key.KEY_DOWNARROW: libevdev.EV_KEY.KEY_DOWN.value, Key...
"""This module contains the simulation setup and execution. .. autosummary: ControlledEnvironment Controller .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> """ from simpy.core import Environment from cs143sim.actors import Flow from cs143sim.actors import Host from cs143sim.actors import Li...
function["sum"]["type"] == 'mid': return_string += '\\tkzDrawRiemannSumMid[%s]' % options return_string += '\\end{scope}\n' if return_string != '': return_string = '%FUNCTIONS\n' + return_string return return_string def tikzify_segments(eucl): return_string = '' for segment in eucl["segments"]: if segment["s...
skin tone': u'\U0000261d\U0001f3fe', u'index pointing up dark skin tone': u'\U0000261d\U0001f3ff', u'backhand index pointing up': u'\U0001f446', u'backhand index pointing up light skin tone': u'\U0001f446\U0001f3fb', u'backhand index pointing up mediumlight skin tone': u'\U0001f446\U0001f3fc', u'backhand index poi...
-109.0, -113.0, -117.0, -121.0, -125.0, -129.0, -133.0, -137.0, -141.0, -145.0, -149.0, -153.0, -157.0, -161.0, -165.0, -169.0, -173.0, -177.0, -181.0, -185.0] SDNoise = [-200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -200.0, -192.0, -184.0...
# -*- coding: utf-8 -*- import json import os import pickle import random import numpy as np import torch from sklearn import metrics from sklearn.metrics import precision_recall_fscore_support, accuracy_score from torch.utils.data import DataLoader, SequentialSampler, TensorDataset from tqdm import tqdm import con...
tup: tup[0]) sorted_result2 = sorted(result2, key=lambda tup: tup[0]) if sorted_result1 != sorted_result2 : return False #************************************************** #* Commented out * #************************************************** #Check AbundanceTable.__str__(self) - Commented out by GW on...
Alexa global 'http://www.virtapay.com/', # Why: #3038 in Alexa global 'http://www.jobdiagnosis.com/', # Why: #3039 in Alexa global 'http://guokr.com/', # Why: #3040 in Alexa global 'http://www.clickpoint.it/', # Why: #3041 in Alexa global 'http://3dmgame.com/', # Why: #3042 in Alexa global 'http://www.ashley...
start = [0.,0.,0.] start[cmapc] = ncstart start[cmapr] = nrstart start[cmaps] = nsstart #print 'start', start origin = [0.,0.,0.] origin[cmapc] = (start[cmapc]-center[cmapc])/float(dims[cmapc]) origin[cmapr] = (start[cmapr]-center[cmapr])/float(dims[cmapr]) origin[cmaps] = (start[cmaps]-center[cmaps])/float(dim...
of visit_block, without opening { self.indent += 1 block = o.body self._write_body(block.body) self.indent -= 1 self.write_ind('}\n') if o.else_body: raise AssertionError("can't translate for-else") def _write_cases(self, if_node): """ The MyPy AST has a recursive structure for if-elif-elif rather than a f...
<reponame>dperl-sol/cctbx_project from __future__ import absolute_import, division, print_function import iotbx.pdb from scitbx.array_family import flex import time pdb_str=""" CRYST1 454.007 426.033 459.047 90.00 90.00 90.00 P 1 SCALE1 0.002203 0.000000 0.000000 0.00000 SCALE2 0.000000 0.002347 0.000000 0.00000 SCALE...
# -*- coding: utf-8 -*- """ .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> .. moduleauthor:: <NAME> <<EMAIL>> """ from __future__ import unicode_literals, print_function import os import util import spotipy.util import pygit2 import spotipy class SpotifyUse...
<filename>TNSAgent/tns/campus_agent.py # -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright (c) 2015, Battelle Memorial Institute # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followi...
# # Jasy - Web Tooling Framework # Copyright 2013-2014 <NAME> # import re import copy import jasy.core.Console as Console import jasy.script.api.Comment as Comment # Operator and punctuator mapping from token to tree node type name. # NB: because the lexer doesn't backtrack, all token prefixes must themselves # be ...
{'key': 'properties.privateEndpointConnections', 'type': '[PrivateEndpointConnection]'}, 'public_network_access': {'key': 'properties.publicNetworkAccess', 'type': 'str'}, 'required_nsg_rules': {'key': 'properties.requiredNsgRules', 'type': 'str'}, } def __init__( self, *, location: str, managed_resource_group...
and what services they run). Args: keyname: A str that indicates the name of the SSH keypair that uniquely identifies this AppScale deployment. Returns: A str that indicates where the locations.json file can be found. """ return cls.LOCAL_APPSCALE_PATH + "locations-" + keyname + ".json" @classmethod def clea...
#!/usr/bin/python # Based on previous work done by <NAME>, <NAME> # (Communications of the ACM 30(7), 1987) and <NAME> # https://github.com/postdataproject/skas-archived/blob/devel/skas/phonmet/syll/grapheme2syllable.py # # Presyllabification and syllabification rules are taken from # <NAME>'s 'El Diccionario Electróni...
<reponame>bio-boris/ExpressionUtils<gh_stars>0 # -*- coding: utf-8 -*- #BEGIN_HEADER import os import sys import time import shutil import glob import logging from datetime import datetime from pprint import pprint from pprint import pformat from installed_clients.DataFileUtilClient import DataFileUtil from installed...
<filename>Tugas EAS/Soal1.py # EVALUASI AKHR SEMESTER GENAP 2019 # Membuat simulasi Program Kontrol Ruangan Informatika mulai Q301 sd Q307 # Agar nyaman dan efisien penggunakan daya listrik, keawetan sarana # Menampilkan ruang Q301 sd Q307 dengan status & Keterangan sebagi contoh berikut; # Q301: AC Nyala, Lampu Ny...
'514194172':{'en': 'Claro'}, '514194173':{'en': 'Claro'}, '514194188':{'en': 'Movistar'}, '514194189':{'en': 'Movistar'}, '51419419':{'en': 'Movistar'}, '514294200':{'en': 'Movistar'}, '514294201':{'en': 'Movistar'}, '514294202':{'en': 'Movistar'}, '51429424':{'en': 'Movistar'}, '51429426':{'en': 'Movistar'}, ...
src_u.time nc.variables[varn].coordinates = \ str(dimens.reverse()) nc.variables[varn].field = src_u.field print('Creating boundary variables for '+vvar) for sid in sides: varn = vvar_out+str(sid) print('Creating variable', varn) dimens = list(dimens_v) for dim in dimens: if re.match(dimexcl[sid],dim): dimen...
IntPtr[] processIds, uint cb, [MarshalAs(UnmanagedType.U4)] out uint pBytesReturned); [DllImport("kernel32.dll", SetLastError = true)] private static extern IntPtr OpenProcess( ProcessAccessFlags processAccess, bool bInheritHandle, IntPtr processId); [DllImport("advapi32.dll", SetLastError = true)] private ...
<reponame>GG-yuki/bugs<filename>python/Nogo/3_try/all.py<gh_stars>0 # -*- coding: utf-8 -*- """ human VS AI models Input your move in the format: 2,3 @author: <NAME> """ import copy import json import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from torch.autograd import Var...
<reponame>linleon1995/prior_guiding_network import numpy as np import tensorflow as tf from tensorflow.contrib import framework as contrib_framework from tensorflow.contrib import slim as contrib_slim from core import resnet_v1_beta, preprocess_utils, cell, attentions slim = contrib_slim resnet_v1_beta_block = resnet_v...
lambda R, i: extrapolator_method( R[i, :, :], V, ar_order - i, "min", **extrap_kwargs )[-1] for i in range(ar_order): if not dask_imported: R[i, :, :] = f(R, i) else: res.append(dask.delayed(f)(R, i)) if dask_imported: num_workers_ = len(res) if num_workers > len(res) else num_workers R = np.stack(list(dask....
# # © Copyright 2020 Hewlett Packard Enterprise Development LP # # This file was auto-generated by the Python SDK generator; DO NOT EDIT. # from ..resource import Resource, Collection from ..exceptions import NimOSAPIOperationUnsupported from .snapshots import SnapshotList from .volume_collections import VolumeCollect...
is never awaited" message __slots___ = ('_method',) def __init__(self, method): self._method = method def __await__(self): return self._method().__await__() class Stream: """Wraps a Transport. This exposes write(), writelines(), [can_]write_eof(), get_extra_info() and close(). It adds drain() which return...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (C) 2015-2018 Shenzhen Auto-link world Information Technology Co., Ltd. All Rights Reserved Name: MqttDump.py Purpose: Created By: <NAME> <<EMAIL>> Created Date: 2018-01-11 Changelog: Date Desc 2018-01-11 Created by Clive Lau """ # Builtin librar...
full_json_list = [] remaining_content = True while (remaining_content): partial_json_list = self.list_rfps(start_date=start_date, end_date=end_date, page_size=page_size, page=page) full_json_list.extend(partial_json_list) page = page + 1 remaining_content = (len(partial_json_list) == page_size) return full_json...
<reponame>salv-orlando/vmware-nsxlib # Copyright 2016 VMware, 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 # # Unl...
import functools from numbers import Integral from itertools import product, starmap, cycle from collections import defaultdict from autoray import do from ..utils import check_opt, ensure_dict from ..gen.rand import randn, seed_rand from . import array_ops as ops from .tensor_core import ( Tensor, TensorNetwork, ...
return LiteralInput(**io_info) elif io_select == WPS_OUTPUT: io_info.pop("min_occurs", None) io_info.pop("max_occurs", None) io_info.pop("allowed_values", None) io_info.pop("data_format", None) io_info.pop("default", None) if io_type in WPS_COMPLEX_TYPES: io_info.pop("supported_values", None) return ComplexOut...
#!/usr/bin/python # coding: utf-8 import ctypes import math import sdl2 as SDL # Heavily modified JsMB-SDL2 Alpha 11 58884391d121876a2269f10202c65a9761b25e78 class JsMB(): Mouse = { 'x': 0, 'y': 0, 'lcount': 0, 'rcount': 0 } Gel = { 'Sprite': {} } Font = { 'family': 'arial', 'size': '10' } Draw = { ...
*(string) --* The default value. - **ParameterType** *(string) --* The parameter type. - **IsNoEcho** *(boolean) --* If this value is true, the value for this parameter is obfuscated from view when the parameter is retrieved. This parameter is used to hide sensitive information. - **Description** *(string) --*...
{ 'type': file, 'description': 'The optional parent diff to upload.', }, } ) def create(self, request, *args, **kwargs): """Creates a new diff by parsing an uploaded diff file. This will implicitly create the new Review Request draft, which can be updated separately and then published. This accepts a unifie...
""" GT Utilities @<NAME> - <EMAIL> - 2020-09-13 Functions were named with a "gtu" (GT Utilities) prefix to avoid conflicts. 1.1 - 2020-10-17 Added move pivot to bottom/top Added copy/paste material Added move to origin 1.2 - 2020-10-21 Updated reset transform to better handle translate Added...
import os import sys import traceback from typing import Callable, Generator, List, Tuple import pandas as pd import seaborn as sns from PySide2.QtCore import QEvent, QObject, QRunnable, QThreadPool, Qt, Signal, Slot from PySide2.QtGui import QIcon, QPixmap from PySide2.QtWidgets import (QApplication, QCheckBox, QComb...
<reponame>GPT-RL/generalization import math import warnings from typing import List, Optional, Tuple import torch import torch.nn.functional as F from torch import Tensor from torch.nn import Module from torch.nn.functional import _in_projection, linear from torch.nn.init import constant_, xavier_normal_, xavier_unifo...
_svalue += '-' total_seconds *= -1 else: _svalue += '+' hours = total_seconds // 3600 minutes = (total_seconds - (hours * 3600)) // 60 _svalue += '{0:02d}:{1:02d}'.format( hours, minutes) except AttributeError: pass return _svalue @classmethod def gds_parse_date(cls, input_data): tz = None if input_data[-...
self.cursor.execute( "DROP FUNCTION IF EXISTS l1sum (double precision, double precision);" ) self.cursor.execute( "CREATE OR REPLACE FUNCTION l1sum (double precision, double precision) returns text AS $$select concat('log(exp(', cast($1 AS text), ') + exp(', cast($2 AS text), ') - 1)')$$ LANGUAGE SQL;" ) self.cur...
")) statusLabel.setForeground(Color.RED) myPrint("B", "'FIX: Investment Security Txns with Invalid Parent Accounts' - You have %s errors to manually first first!" %(iCountUnfixable)) myPopupInformationBox(jif,"You have %s errors to manually first first!" %(iCountUnfixable), "FIX: Investment Security Txns with Invali...
(FilterType, len(PAINSFiltersMap["ID"][FilterType]))) def ProcessOptions(): """Process and validate command line arguments and options""" MiscUtil.PrintInfo("Processing options...") # Validate options... ValidateOptions() OptionsInfo["Infile"] = Options["--infile"] OptionsInfo["InfileParams"] = MiscUtil.Pr...
<filename>midea_beautiful/cloud.py """Interface to Midea cloud API.""" from __future__ import annotations import base64 from datetime import datetime import json import logging from threading import RLock from time import sleep, time from typing import Any, Final, Tuple from secrets import token_hex, token_urlsafe im...
represent and save method #========================================================= def Display_Steps(Step_number, StartPos=1, del_Method = False, cur_step = [0]*100): """When the number of steps is defined or 'add step' button is pressed, the function Display_Steps creates the widgets to define the different steps....
<reponame>jt112/SymplecticElements<filename>hrDataFeeder.py #!/usr/bin/env python # This script queries the Faculty Data Repository (FDR) and the Service Directory (SD) for faculty HR data to feed Symplectic Elements. # For FDR records without email addresses it can query the LDAP Service Directory using the python ut...
import functools import six from six.moves import builtins import string import threading import warnings import numpy from cupy.core import core from cupy import creation from cupy import logic from cupy import math from cupy import sorting from cupy import statistics _thread_local = threading.local() class Fusi...
{'table': self.config['table'], 'column': column}})) if schema[column]['nullable'] != self.config['schema'][column]['nullable']: raise ValueError(text_token({'E05004': {'table': self.config['table'], 'column': column}})) return columns def _table_exists(self): """Test if the table exists in the database. Return...
0.9872000217437744, "checkpoint": 2323 }, { "value": 0.9904000163078308, "checkpoint": 3471 }, { "value": 0.9912999868392944, "checkpoint": 4606 }, { "value": 0.9919999837875366, "checkpoint": 5785 }, { "value": 0.991599977016449, "checkpoint": 6956 }, { "value": 0.992900013923645, "checkpoint": 81...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import json import tempfile from collections import Counter import caffe2.python.hypothesis_test_util as hu import caffe2.python.predictor.predictor_exporter as pe import hypothesis.strategies as st import numpy as np import...
+ m.x1881 <= 9) m.c5022 = Constraint(expr= 6*m.b201 + m.x1882 <= 6) m.c5023 = Constraint(expr= 6*m.b202 + m.x1883 <= 6) m.c5024 = Constraint(expr= 6*m.b203 + m.x1884 <= 6) m.c5025 = Constraint(expr= 6*m.b204 + m.x1885 <= 6) m.c5026 = Constraint(expr= 6*m.b205 + m.x1886 <= 6) m.c5027 = Constraint(expr= 6*m.b206 + ...
实例名称,目前只有Ckafaka会用到 :type InstanceName: str :param ErrMsg: 错误消息 :type ErrMsg: str :param RequestId: 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。 :type RequestId: str """ self.Endpoint = None self.QueueName = None self.ProductID = None self.MsgType = None self.Result = None self.RoleName = None self.RoleID = ...
import sys import os import yaml import argparse import numpy as np import pandas as pd import csv import random import stat import glob import subprocess from statistics import mean from pprint import pprint, pformat import geopandas from shapely.geometry import Point from math import sin, cos, atan2, sqrt, pi from ...
<reponame>ccj5351/DAFStereoNets<filename>src/baselines/PACNet/task_jointUpsampling/main.py """ Copyright (C) 2019 NVIDIA Corporation. All rights reserved. Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode). """ import argparse import os import glob import numpy as ...
<reponame>google-research/hyperbo # coding=utf-8 # Copyright 2022 HyperBO 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 re...
pa.append("G04 Greetings! *\n") pa.append("G04 This Gerber was generated by PCBmodE, an open source *\n") pa.append("G04 PCB design software. Get it here: *\n") pa.append("G04 *\n") pa.append("G04 http://pcbmode.com *\n") pa.append("G04 *\n") pa.append("G04 Also visit *\n") pa.append("G04 *\n") pa.append("G04 h...
local_var_files = {} body_params = None if 'body' in params: body_params = params['body'] # HTTP header `Accept` header_params['Accept'] = self.api_client.\ select_header_accept(['application/json']) if not header_params['Accept']: del header_params['Accept'] # HTTP header `Content-Type` header_params['Con...
import sys import time import yaml import math import signal import datetime import threading import traceback import numpy as np from cvxopt import matrix, solvers #from scipy.spatial import ConvexHull import matplotlib.patches as ptc import matplotlib.pyplot as plt import matplotlib.animation as animatio...
<filename>rlpy/domains/domain.py """Domain base class""" from abc import ABC, abstractmethod from copy import deepcopy import logging import numpy as np __copyright__ = "Copyright 2013, RLPy http://acl.mit.edu/RLPy" __credits__ = [ "<NAME>", "<NAME>", "<NAME>", "<NAME>", "<NAME>", ] __license__ = "BSD 3-Clause" ...
# Copyright (C) 2002-2007 Python Software Foundation # Contact: <EMAIL> """Email address parsing code. Lifted directly from rfc822.py. This should eventually be rewritten. """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute...
#!/usr/bin/env python3 ''' USFM to HTML is a script designed to make it easier to print Scripture from USFM files. The suite of tags supported is currently limited because the tool is developed by Wycliffe Associates, and the number of tags our tools use is limited. Developed by <NAME> and released for general use. ''...
<filename>pandasreg/rperiod.py<gh_stars>1-10 import numpy as np from datetime import datetime, date import dateutil.parser from pandas.tseries.index import Int64Index, Index import pandas as pd import pandas.core.common as com import pandas._algos as _algos from pandas.tseries.tools import parse_time_string from rfreq ...