input
stringlengths
2.65k
237k
output
stringclasses
1 value
<filename>qcodes/data/data_array.py<gh_stars>0 from typing import Dict, Any, Optional import numpy as np import collections from qcodes.utils.helpers import DelegateAttributes, full_class, warn_units import xarray as xr class DataArray(DelegateAttributes): """ A container for one parameter in a measurement loop....
import calendar, json from urllib.parse import urlparse import requests from datetime import date, time, datetime, timedelta from django.db import models from django.utils.translation import gettext_lazy as _ from django.contrib.auth.models import User from django.core.validators import URLValidator from django.core.e...
1 if dir_down: row += 1 else: row -= 1 return "".join(result) def rot13(word, **kwargs): ''' Case Sensetive Support Numbers and Symbols But Not Work on Them (Under Maintaince) ''' result = "" for v in word: c = ord(v) if c >= ord('a') and c <= ord('z'): if c > ord('m'): c -= 13 else: c += 13 elif ...
<gh_stars>0 # -*- coding: UTF-8 -*- ############################################# ## (C)opyright by <NAME>, 2008 ## ## All rights reserved ## ############################################# import cgi import copy import inspect import logging import os import os.path import re import string import sys import types impor...
def list_cases_with_http_info(self, request): """查询工单列表接口 查询工单列表接口 :param ListCasesRequest request :return: ListCasesResponse """ all_params = ['search_key', 'label_id_list', 'app_key', 'incident_id', 'query_start_time', 'query_end_time', 'status', 'incident_status', 'x_customer_id', 'x_customer_name', 'group_...
Constraint(expr=m.x555*m.x2515 + m.x1180*m.x2521 + m.x1805*m.x2527 + m.x2430*m.x2533 <= 8) m.c2449 = Constraint(expr=m.x556*m.x2515 + m.x1181*m.x2521 + m.x1806*m.x2527 + m.x2431*m.x2533 <= 8) m.c2450 = Constraint(expr=m.x557*m.x2515 + m.x1182*m.x2521 + m.x1807*m.x2527 + m.x2432*m.x2533 <= 8) m.c2451 = Constraint(exp...
<reponame>fractalego/dgt import os import random import torch from gensim.models import KeyedVectors from parvusdb import create_graph_from_string from parvusdb.utils.code_container import DummyCodeContainer from parvusdb.utils.match import Match from parvusdb.utils.match import MatchException from dgt.graph import...
<reponame>ram8647/gcb-mobilecsp # Copyright 2016 Mobile CSP Project. 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 # # Un...
or more spectral indices (indices are added as bands) for an image collection. .. deprecated:: 0.3.0 Use :func:`spectralIndices()` instead. Tip ---------- Check more info about the supported platforms and spectral indices in the :ref:`User Guide<Spectral Indices Computation>`. Parameters ---------- self : ...
but no private key file configured', str(e)) # outstanding queury cache should still be empty self.assertEqual(session.get('_saml_outstanding_queries',{}), {}) def test_Saml_handle_discovery_response(self): session_id = 'a0123456789abcdef0123456789abcdef' tmp_sp_config = copy.deepcopy(sp_config) entity_id = 'htt...
" + sc.Name + " failed: " + process_stderr) return [-1] elif sc.Controller == "upstart": (process_stdout, process_stderr, retval) = Process( [upstart_start_path, sc.Name]) if retval is not 0: Print("Error: " + upstart_start_path + " failed: " + process_stderr, file=sys.stderr) LG().Log( 'ERROR', "Error: " + u...
so # perhaps it isn't the right thing to do. Also, meh u_psi_rot_real = np.real(np.exp(-1j*rho) * u_psi) popt, pcov = curve_fit(func_qu,psi,u_psi_rot_real) return popt[0:2] # strategy (1/2/3 slice) -- fracpol -- leakage/posang error -- parsep -- snr # p m b i k onxpol = np.zeros([4,fraclinpol.size,2,parsep.size,sn...
<filename>appuselfbot.py import collections import datetime import math import subprocess import asyncio import random import glob import gc import psutil import sys import re from datetime import timezone from cogs.utils.allmsgs import * from discord_webhooks import * from cogs.utils.checks import * from discord.ext i...
Solver(name='mc', bootstrap_with=[[1], [2], [3]]) >>> s.add_atmost(lits=[1, 2, 3], k=2, no_return=False) False >>> # the AtMostK constraint is in conflict with initial unit clauses """ if self.solver: res = self.solver.add_atmost(lits, k, no_return) if not no_return: return res def append_formula(self, formu...
field.fid in mappings inst = mappings[field.fid] # If this is a virtual mapping then we can skip it if we # are a post close operation because this is the end of a context if inst.is_virtual() and self.kind == POST_CLOSE_OP_KIND: continue if not req.logical_node.perform_physical_close(depth, field, self, req, in...
+ str(number_of_clusters) + "\n") log_file.write("Average cluster size: " + str(avg_size_of_cluster) + "\n") log_file.write("Standard deviation cluster size: " + str(std_size_of_cluster) + "\n") log_file.write("Noise percentage: " + str(noise_percentage) + "\n") log_file.write("Percentage of all unknown connections...
<filename>trident/optims/pytorch_losses.py<gh_stars>0 from __future__ import absolute_import from __future__ import division from __future__ import print_function import numbers import sys from typing import Callable, Any from tqdm import tqdm import builtins import math from math import * import string import numpy ...
0.45787382, 0.55902845], [0.4123755, 0.45249655, 0.55598654], [0.41653307, 0.44715887, 0.55286034], [0.42074398, 0.44186248, 0.54965225], [0.42500442, 0.43660906, 0.54636471], [0.4293108, 0.43140027, 0.54300022], [0.4336598, 0.42623771, 0.53956127], [0.43804833, 0.42112299, 0.5360504], [0.44247353, 0.41605769, ...
<filename>src/onevision/cv/imgproc/transformation/affine.py #!/usr/bin/env python # -*- coding: utf-8 -*- """An affine transformation is any transformation that preserves collinearity (i.e., all points lying on a line initially still lie on a line after transformation) and ratios of distances (e.g., the midpoint of a ...
<filename>sam/tweeter/app.py import json import io import datetime import os import logging import boto3 import pandas import numpy import altair from shared import S3_scraper_index from twitter_shared import TwitterAPI from plot_shared import get_chrome_driver, plot_key_ni_stats_date_range, plot_points_average_and_t...
<reponame>tristan-j-wood/gap-train-1 import numpy as np from ase.calculators.dftb import Dftb from gaptrain.utils import work_in_tmp_dir from gaptrain.log import logger from gaptrain.exceptions import MethodFailed, GAPFailed from gaptrain.gtconfig import GTConfig from subprocess import Popen, PIPE import os ha_to_ev =...
"""The Latticework AmberOS component.""" from __future__ import annotations import asyncio from collections.abc import Callable from datetime import timedelta import logging from typing import Any from homeassistant.core import HomeAssistant, ServiceCall, callback from homeassistant.config_entries import ConfigEntry ...
hist[0][np.argmax(hist[1])] self.preview3DViewer.volumeviewer.setLevels([max, hist[0][-1]]) def onManualCenter(self, active): """ Activates the manual center portion of the ProjectionViewer. This is connected to the corresponding toolbar signal Parameters ---------- active : bool Boolean specifying to activa...
Assert that the returned page shows the page submitted. self.assertContains( response, 'Submitted', status_code=200, html=False, ) # Assert that the returned page shows the guardian name. self.assertContains( response, 'Guardian Student', status_code=200, html=False ) # Assert that the student slip has ...
+ 1, l, int(spec_matrix[z, c, l]))) del spec_matrix return spectrum def _fpgrowth_filter(concept, winlen, max_c, min_neu): """ Filter for selecting closed frequent items set with a minimum number of neurons and a maximum number of occurrences and first spike in the first bin position """ keep_concepts = len( ...
<reponame>namnamir/21-Card-Game<gh_stars>0 import deck import players from input import get_text as get_text from input import get_number as get_number import config from colored import fg, bg, attr from terminaltables import SingleTable play = {} status = ['Stand', 'Hit', 'Bust', 'Split'] # print the hand def pri...
import unittest from unittest.mock import patch from gym_powerworld.envs import voltage_control_env # noinspection PyProtectedMember from gym_powerworld.envs.voltage_control_env import LOSS, \ MinLoadBelowMinGenError, MaxLoadAboveMaxGenError, OutOfScenariosError, \ MIN_V, MAX_V, MIN_V_SCALED, MAX_V_SCALED, _scale_vol...
#python ''' This file serves to declutter plasmid_map_viewer.py by adding detailed functionality, specifically on adding visuals to the Plasmid Circle for specific parts (promoter, terminator, CDS, etc). Consider: https://sbolstandard.org/wp-content/uploads/2017/04/SBOL-Visual-2.1.pdf ''' import math import logging ...
<reponame>dangervon/neutron<gh_stars>0 # Copyright (c) 2015 Red Hat 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 ...
validating any provided loading and runtime contexts, and considering all Workflow steps if applicable, or the single application otherwise. :param package_dict: package content representation as a json dictionary. :param package_name: name to use to create the package file. :param data_source: identifier of the d...
#!/usr/bin/env python3 """scan2pdf Usage: scan2pdf -L scan2pdf --create-configuration DEVICE [CONFIG] scan2pdf [--debug] [-C CONFIG] DEVICE TARGET Options: -L, --list-devices show available scanner devices DEVICE device to use for scanning TARGET target filename for scan CONFIG configuration file -C CONFIG, ...
from src.PhaseIdentification.common import * from sklearn.cluster import AgglomerativeClustering, KMeans from sklearn_extra.cluster import KMedoids from sklearn.preprocessing import StandardScaler from sklearn.metrics import silhouette_samples, silhouette_score from sklearn.mixture import GaussianMixture import seaborn...
result.e != None: raise result.e raise TApplicationException(TApplicationException.MISSING_RESULT, "get_row failed: unknown result"); def get_row_as_arrays(self, ns, name, row): """ Alternative interface using array as cell Parameters: - ns - name - row """ self.send_get_row_as_arrays(ns, name, row) retur...
<reponame>abderrahmane8/ByRequests<gh_stars>1-10 # UPDATED 2018-10-04 chrome_ua = [ "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.90 Safari/537.36",...
Ohio",3714), ("Mount Pleasant village, Ohio",420), ("Mount Repose CDP, Ohio",4446), ("Mount Sterling village, Ohio",1988), ("Mount Vernon city, Ohio",16669), ("Mount Victory village, Ohio",590), ("Mowrystown village, Ohio",353), ("Mulberry CDP, Ohio",3772), ("Munroe Falls city, Ohio",5065), ("Murray City village, Ohio"...
<reponame>google-cloud-sdk-unofficial/google-cloud-sdk # -*- coding: utf-8 -*- # # Copyright 2019 Google LLC. 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://w...
use_stdin: write('\n'.join(diff)) return exit_code, diff def compute_unified_diff(filename, content2, **kwargs): # type: (str, bytes, **Any) -> Tuple[int, Iterable[str]] diff = () # type: Iterable[str] exit_code = ERROR kw = kwargs.copy() if 'n' not in kwargs: # zero context lines kw['n'] = 0 try: content1...
# coding=utf-8 # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------...
# # Copyright (c) 2018, Intel Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of source code must retain the above copyright notice, this # list of conditions and t...
of the SMTP credential. :param UpdateSmtpCredentialDetails update_smtp_credential_details: (required) Request object for updating a SMTP credential. :param str if_match: (optional) For optimistic concurrency control. In the PUT or DELETE call for a resource, set the `if-match` parameter to the value of the etag ...
trainers=2) self.run_params = { 'sync_mode': 'async', 'cpu_num': 2, 'num_threads': 2, 'slice_var_up': False, 'enable_dc_asgd': False, 'split_method': True, 'runtime_split_send_recv': True, 'geo_sgd': True, 'wait_port': True, 'use_hierarchical_allreduce': False, 'push_nums': 25 } self.test_ctr_2ps_2tr_asyn...
"GMP", "RKSW" : "", "FMCZ" : "DZA", "FMCV" : "AJN", "GOGS" : "CSK", "YSHK" : "MJK", "FMCN" : "YVA", "FMCH" : "HAH", "FMCI" : "NWA", "GOGG" : "ZIG", "DNIM" : "QOW", "DNIL" : "ILR", "DNIB" : "IBA", "ZSCN" : "KHN", "ZSCG" : "CZX", "KPLN" : "PLN", "BIKR" : "SAK", "LRCV" : "CRA", "OAUZ" : "UND", "BIKF" : ...
== (4, 4, 3) v1 = heatmaps_drawn[0, 1] v2 = heatmaps_drawn[0, 0] v3 = heatmaps_drawn[1, 1] for y, x in [(0, 1), (0, 2), (1, 0), (1, 3), (2, 0), (2, 3), (3, 1), (3, 2)]: assert np.allclose(heatmaps_drawn[y, x], v1) for y, x in [(0, 0), (0, 3), (3, 0), (3, 3)]: assert np.allclose(heatmaps_drawn[y, x], v2) for ...
access_type='online', response_type='token' ) authorize_url = flow.step1_get_authorize_url() parsed = urllib.parse.urlparse(authorize_url) q = urllib.parse.parse_qs(parsed[4]) self.assertEqual('client_id+1', q['client_id'][0]) self.assertEqual('token', q['response_type'][0]) self.assertEqual('foo', q['scope'][...
<gh_stars>10-100 """Test structure prediction module""" import itertools import json import logging import os import pickle import unittest from contextlib import contextmanager from operator import itemgetter from random import sample import numpy as np import pandas as pd import pymatgen from pandas....
# 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, Dict, List, Mapping, Optional, Tuple, Union from .. import ...
[u'f'] , u'圪' : [u'g'] , u'螵' : [u'p'] , u'昴' : [u'm'] , u'媷' : [u'r'] , u'㔾' : [u'j'] , u'槁' : [u'k', u'g'] , u'譂' : [u'c'] , u'燑' : [u't'] , u'鍒' : [u'r'] , u'噔' : [u'd'] , u'蛟' : [u'j'] , u'敞' : [u'c'] , u'姡' : [u'k'] , u'㑨' : [u'y'] , u'棫' : [u'y'] , u'詬' : [u'h', u'g'] , u'䵮' : [u'y'] , u'烻' : [u'y', u's'] , u'鉼' ...
<filename>tencentcloud/cii/v20210408/models.py # -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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 L...
<filename>tool/tests/clusterfuzz/reproducers_test.py """Test the reproducers.""" # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/license...
'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00248228, 'Renaming Unit/Peak Dynamic': 3.58947, 'Renaming Unit/Runtime Dynamic': 0.252667, 'Renaming Unit/Subthreshold Leakage': 0.0552466, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0276461, 'Runtime Dynamic': 4.45786, 'S...
# main imports import numpy as np import sys # image transform imports from PIL import Image from skimage import color from sklearn.decomposition import FastICA from sklearn.decomposition import IncrementalPCA from sklearn.decomposition import TruncatedSVD from numpy.linalg import svd as lin_svd from scipy.signal impo...
foo, bar, and sus will all treat their return values safely*/""" elif suffix == "callee": comm_suffix = """ /*In this test, foo and bar will treat their return values safely, but sus will not, through invalid pointer arithmetic, an unsafe cast, etc*/""" elif suffix == "caller": comm_suffix = """ /*In this test, fo...
<reponame>CoderHuo/asn1tools import unittest from .utils import Asn1ToolsBaseTest import asn1tools import sys from copy import deepcopy import string sys.path.append('tests/files') sys.path.append('tests/files/3gpp') from rrc_8_6_0 import EXPECTED as RRC_8_6_0 from lpp_14_3_0 import EXPECTED as LPP_14_3_0 from x691_a...
values are the full section names. layout : dict Layout of the header. Similar to `header`, but instead of the lines, contains the layout of the line. comments : dict Comments in the LAS header. The keys are the linenumber of the comment and the values are the comments themselves. See Also -------- _getlinel...
<filename>LittleGarden_Code/Backend/app.py # pylint: skip-file from repositories.DataRepository import DataRepository from flask import Flask, request, jsonify from flask_socketio import SocketIO from flask_cors import CORS from helpers.sensors.MeasureHelper import MeasureHelper from helpers.devices_id.DeviceHelper im...
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
# # Defines data that is consumed by the header2whatever hooks/templates # to modify the generated files # import enum from typing import Dict, List, Tuple, Optional from pydantic import validator from .util import Model, _generating_documentation class ParamData(Model): """Various ways to modify parameters""" #...
<gh_stars>0 # Подсчитать, сколько было выделено памяти под переменные # в ранее разработанных программах в рамках первых трех уроков. # Проанализировать результат и определить программы с наиболее # эффективным использованием памяти. # Примечание: Для анализа возьмите любые 1-3 ваших программы # или несколько вариантов...
Bay city, Texas",4083), ("Natalia city, Texas",1198), ("Navarro town, Texas",193), ("Navasota city, Texas",7432), ("Nazareth city, Texas",300), ("Nederland city, Texas",17371), ("Needville city, Texas",3063), ("Nesbitt town, Texas",117), ("Netos CDP, Texas",0), ("Nevada city, Texas",814), ("Newark city, Texas",1326), (...
<gh_stars>0 # -*- coding: utf-8 -*- # 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...
proxy Configuration describe a connection to an external proxy server which provides internet access cluster members. It's applied for package manager and Ambari too This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please define a `callback` function to be invoked when r...
<reponame>fleurgaudfernau/Deformetrica_multiscale import os import sys # sys.path.append(os.path.dirname(os.path.abspath(__file__)) + os.path.sep + '../../../') import torch import math import xml.etree.ElementTree as et from xml.dom.minidom import parseString from numpy.random import poisson, exponential, normal imp...
], [ nan, 12000, 4000, nan, 4.61, nan ], [ nan, 15000, 5000, nan, 8.27, nan ], [ nan, 18000, 6000, nan, 13.19, nan ], [ nan, 21000, 7000, nan, 19.71, nan ], [ nan, 24000, 8000, nan, 28.21, nan ], [ nan, 27000, 9000, nan, 38.61, nan ], [ nan, 100, 300, nan, 0.00, nan ], [ nan, 200, 600, nan, 0.02, nan ], [ nan,...
<reponame>dvssajay/Semantic-Segmentation-of-Urban-Scene-Images-Using-Recurrent-Neural-Networks # coding: utf-8 # In[1]: import torch import torch.nn as nn import torch.nn.functional as F from torchvision import models import numpy as np import sys, time, os, warnings from skimage.segmentation import mark_boundarie...
1 + 2*5^2 + 5^3 The floating point case is similar to the fixed modulus type in that elements do not trac their own precision. However, relative precision is truncated with each operation rather than absolute precision. On the contrary, the lattice type tracks precision using lattices and automatic differentiati...
<reponame>djangowebstudio/emma<gh_stars>0 # encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Image' db.create_table('interface_image', ( ('id', self.gf('django.db.m...
~np.isnan(cor_matrix[psv_i]) mask_j = ~np.isnan(cor_matrix[psv_j]) mask = np.logical_and(mask_i, mask_j) mask_size = np.sum(mask) if not mask_size: if np.sum(mask_i) > np.sum(mask_j): use_psvs[psv_j] = False else: use_psvs[psv_i] = False break else: dist_matrix[psv_i, psv_j] = dist_matrix[psv_j, psv_i] = \ ...
<gh_stars>1-10 import taichi as ti import numpy as np from functools import reduce # from sph_base import SPHBase # ti.init(arch=ti.cpu) # Use GPU for higher peformance if available ti.init(arch=ti.gpu, device_memory_GB=4, packed=True) # 因为邻居搜索的网格不会做,所以尺寸数据只好也沿用助教的写法 # res = (720,720) res = (512,512) ...
ignored. Default: ``True`` in group chats and ``False`` in private chats. """ self._quote(kwargs) return self.bot.send_message(self.chat_id, *args, **kwargs) def reply_photo(self, *args, **kwargs): """ Shortcut for ``bot.send_photo(update.message.chat_id, *args, **kwargs)`` Keyword Args: quote (Optional[bool...
# ============LICENSE_START======================================================= # org.onap.dcae # ================================================================================ # Copyright (c) 2019 AT&T Intellectual Property. All rights reserved. # ==================================================================...
you; your; yours; nimma ೕವ her; him; his; it; its; one; she; their; them; they; we; you; your; nivu ಅದರ her; his; its; adara ಅವಳ her; him; his; it; its; she; their; them; they; you; your; avalu ಅವಳನು her; him; his; it; its; she; their; you; your; avalannu itself ತನೇ thannanne ಸತಃ even; itself; self; svathh j jacket ಕವಚ...
in provisioned_vms: vms.append(self.info(vm['name'], vm=vm, ignore_volumes=True, floating_ips=floating_ips)) return sorted(vms, key=lambda x: x['name']) def console(self, name, tunnel=False, web=False): try: vm = self._get_vm(name) if vm is None: error("VM %s not found" % name) return None except ApiException...
:param feature_names (string): part of filename that all feature files have in common :param label_names (string): part of filename that all label files have in common :param tt_split_ratio (float): split ratio of training and testing data files (value between 0. and 1.) :param train_shard_size (int): approximate tf...
<filename>server/analysis/preprocessing.py # # OtterTune - preprocessing.py # # Copyright (c) 2017-18, Carnegie Mellon University Database Group # from abc import ABCMeta, abstractmethod from itertools import chain, combinations, combinations_with_replacement import numpy as np from sklearn.preprocessing import MinMax...
[self.output] self.sample_counter = self.sample_counter + 1 # In the train mode we want to continue appending the outputs by calling forward function # The outputs will be saved internally in the network instance as a list # Otherwise we want to transform outputs list to a tensor and return it return self.output ...
<gh_stars>1-10 # BSD 3-Clause License; see https://github.com/scikit-hep/awkward-1.0/blob/main/LICENSE # v2: replace with src/awkward/_v2/_connect/numba/arrayview.py import operator import numba import numba.core.typing import numba.core.typing.ctypes_utils import awkward as ak np = ak.nplike.NumpyMetadata.instanc...
if not java_threading.currentVMThread == "main_no_init": java_threading.currentVMThread.STATE =make_String("WAITING", loader) temp = java_threading.currentVMThread interp.interp_lock.release() # if there is an other thread it will get the # exc. control here! interp.interp_lock.acquire() java_threading.current...
transform = transforms.Compose( [transforms.RandomResizedCrop(size=224, scale=scale), transforms.RandomHorizontalFlip(), get_color_distortion(s=color_distortion), get_gaussian_blur(ks=23), transforms.ToTensor()]) else: transform = transforms.Compose( [transforms.Resize(size=256), transforms.CenterCrop(size=224...
import codecs import pickle import optparse import os import re import sys from collections import OrderedDict import numpy as np models_path = "./models" eval_path = "./evaluation" eval_temp = os.path.join(eval_path, "temp") # TODO: Move this to a better configurational structure eval_logs_dir = os.path.join(eval_t...
<filename>thred/models/thred/thred_model.py<gh_stars>100-1000 from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow.python.layers import core as layers_core from tensorflow.python.ops import variable_scope from .. import at...
time slot """ print ("\n**** test_schedule_premept_active_task ****") # used by cancel_schedules agentid = 'new_agent' taskid = 'task_high_priority2' cancel_schedules.append({'agentid': agentid, 'taskid': taskid}) # add low prority task as well since it won't get cancelled till # end of grace time cancel_sched...
<gh_stars>0 import asyncio import errno import logging import queue from socket import error as SocketError import time import pybalboa.messages as messages BALBOA_DEFAULT_PORT = 4257 M_START = 0x7e M_END = 0x7e C_PUMP1 = 0x04 C_PUMP2 = 0x05 C_PUMP3 = 0x06 C_PUMP4 = 0x07 C_PUMP5 = 0x08 C_PUMP6 = 0x09 C_LIGHT1 = 0x1...
<filename>tests/test_basic.py import pytest from parsita import * def test_literals(): class TestParsers(GeneralParsers): a = lit("a") bb = lit("bb") assert TestParsers.a.parse("a") == Success("a") assert TestParsers.bb.parse("bb") == Success("bb") assert TestParsers.bb.parse("bbb") == Failure("Expected end o...
11, 12, 13, 14, 15, 16, EOS, 0, 0, 0, 0, 0, 0 ], [ 4, 5, 6, 7, 8, 9, 10, 11, 12, EOS, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ]], dtype=np.int32), np.array( [[0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0], [0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0...
from yaglm.config.base_penalty import PenaltyConfig, WithPenSeqConfig, \ WithFlavorPenSeqConfig, ElasticNetConfig, \ SeparableSumConfig, InfimalSumConfig, OverlappingSumConfig from yaglm.pen_max.ridge import get_ridge_pen_max from yaglm.pen_max.lasso import get_lasso_pen_max from yaglm.autoassign import autoassign ...
NO AND DISCLAIMS ANY REPRESENTATION OR WARRANTY OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF MATPLOTLIB 3.3.2 WILL NOT INFRINGE ANY THIRD PARTY RIGHTS. # 5. MDT SHALL NOT BE LIABLE TO LICENSEE OR ANY OTHER USERS OF MATPLOTLIB 3.3.2 FOR ANY INCIDENTAL, SPECIAL, OR CONSEQUENTIAL DAMAGES OR...
_try_set(tokenvalue, color("<local> ", "blue"), lambda: format_py_obj(_resolve_identifier(f.f_locals, token))) tokenvalue = _try_set(tokenvalue, color("<global> ", "blue"), lambda: format_py_obj(_resolve_identifier(f.f_globals, token))) tokenvalue = _try_set(tokenvalue, color("<builtin> ", "blue"), lambda: format_py_...
<reponame>Willy5s/Pirates-Online-Rewritten from direct.directnotify.DirectNotifyGlobal import directNotify from direct.gui.DirectGui import * from pandac.PandaModules import * from pirates.piratesgui import PiratesGuiGlobals from pirates.piratesgui import GuiPanel, RedeemCodeGUI from pirates.piratesgui import GuiButton...
<reponame>kiuthed/qutip # -*- coding: utf-8 -*- # This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, <NAME> and <NAME>. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions...
<filename>kaldi_io/LDA_LPLDA.py<gh_stars>10-100 # -*- coding: utf-8 -*- from __future__ import print_function import numpy as np from scipy import linalg from sklearn.utils.multiclass import unique_labels from sklearn.utils import check_array, check_X_y from sklearn.utils.validation import check_is_fitted import LDA i...
from database.models import UserProfile, CommunityMember, EventAttendee, RealEstateUnit, Location, UserActionRel, Vendor, Action, Data, Community from _main_.utils.massenergize_errors import MassEnergizeAPIError, InvalidResourceError, ServerError, CustomMassenergizeError, NotAuthorizedError from _main_.utils.massenergi...
return self._target_endpoint @target_endpoint.setter def target_endpoint(self, target_endpoint): """Sets the target_endpoint of this QueryJobResp. :param target_endpoint: The target_endpoint of this QueryJobResp. :type: Endpoint """ self._target_endpoint = target_endpoint @property def net_type(self): """...
""" Precisely APIs Enhance & enrich your data, applications, business processes, and workflows with rich location, information, and identify APIs. # noqa: E501 The version of the OpenAPI document: 11.9.3 Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from com.pr...
import logging import tempfile from bzt import TaurusConfigError from bzt.modules import ConsolidatingAggregator from bzt.modules.aggregator import DataPoint, KPISet from bzt.modules.apiritif import ApiritifNoseExecutor from bzt.modules.apiritif.executor import ApiritifLoadReader, ApiritifFuncReader from tests import ...
[ "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00" ], 6: [ "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33" ], 7: [ "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#a65628" ], 8: [ "#e41a1c", "#377eb8", "#4daf4a", "#984ea3", "#ff7f00", "#ffff33", "#...
sum table3['listbar'] = 'bar' # default aggregation is list table3['bars'] = 'bar', strjoin(', ') ieq(expect2, table3) def test_aggregate_empty(): table = (('foo', 'bar'),) aggregators = OrderedDict() aggregators['minbar'] = 'bar', min aggregators['maxbar'] = 'bar', max aggregators['sumbar'...
# escludi multi hits exd=0 # escludi duplicati conc=0 # se presenti paired-end, usa solo quelle concordanti mq=0 # considera il map quality rmnuc=0 # rimuovi nucleotide a monte ed a valle delle read; connesso a rmp e rmpv blatr=0 # applica la correzione blat blatfolder='' rmsh=0 # rimuovi sostituzioni in omopolimeri di...
<reponame>Jexp97/Bisca_JV_num_01<filename>classes_base.py ################################################### # Arquivo base para jogos que usem cartas e baralho. # Autor: <NAME> # Ano: 2021 ################################################### from random import shuffle import os os.environ['TF_CPP_MIN_LOG_LE...
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agr...
import re import os import functools from itertools import chain from datetime import date, datetime, timedelta import yaml from flask import current_app, Markup from veripress import cache from veripress.model.models import Page, Post, Widget from veripress.model.parsers import get_standard_format_name, get_parser f...