input
stringlengths
2.65k
237k
output
stringclasses
1 value
row = tdata.pop(0) if not row: continue row = row.split(",") # neglect if error string if len(row) < 2: continue s1, s2 = row[0].split(':', 1) if not s1.isdigit(): m = re.search(ns_hist_pattern, s1) if m: ns = m.group(1) hist_name = m.group(2) else: ns = None hist_name = s1 if ns_set and (not ns or n...
import os import re from cs50 import SQL from flask import Flask, flash, redirect, render_template, request, session from flask_session import Session from tempfile import mkdtemp from werkzeug.exceptions import default_exceptions, HTTPException, InternalServerError from werkzeug.security import check_password_hash, ge...
<reponame>alexmplastow/RNACircos #!/usr/bin/env python import argparse import sys import os import matplotlib.pyplot as plt import matplotlib.patches as mpatches from matplotlib.legend_handler import HandlerLine2D from matplotlib.patches import Circle import matplotlib.image as img from matplotlib.colors import Linea...
range(collection_num): suffix = "".join(random.choice(string.ascii_letters + string.digits) for _ in range(5)) collection_names.append(collection_name + "_" + suffix) # ##### ni_per = collection["ni_per"] build_index = collection["build_index"] # TODO: debug for c_name in collection_names: milvus_instance = Mil...
#!/usr/bin/env python # -*- coding: utf-8 -*- ######################################### # # function: run phenix.refine in parallel and more # author: <NAME> # created: 2014/7/8 # updated: 2015/2/17 # updated: 2016/12/10 # updated: 2017/1/5 # updated: 2017/1/25 # updated: 2017/12/14 # ##################################...
<filename>blender/arm/write_data.py<gh_stars>0 import glob import json import os import shutil import stat import html from typing import List import bpy import arm.assets as assets import arm.make_state as state import arm.utils if arm.is_reload(__name__): import arm assets = arm.reload_module(assets) state = ar...
b'h si d') # like b'd is h' but reverted self.assertEqual(bytes(c2), b'h si d') self.assertEqual(c2.size, (6,)) self.assertEqual(c2.stride, (-2,)) def test_convert_memoryview(self): a = b'World is hell!' a_refcount = sys.getrefcount(a) b = containers.StridedArrayView1D(a) b_refcount = sys.getrefcount(b) self...
<reponame>uw-it-aca/spotseeker_server # Copyright 2021 UW-IT, University of Washington # SPDX-License-Identifier: Apache-2.0 from django.test import TestCase from django.conf import settings from django.test.client import Client from spotseeker_server.models import Spot import simplejson as json from decimal import * ...
:type testcolor: TestColor color :param testcolor: Optional TestColor ascii color scheme ''' alines = "" blines = "" for x in xrange(0,b): blines=blines+"\n" for x in xrange(0,a): alines=alines+"\n" line = "-------------------------------------------------------------------------" out = blines+line+"\n"+msg...
Murder at the Vicarage by <NAME>(genre-Crime)', 'The Secret Adversary by <NAME>(genre-Crime)', 'The Woman in White by <NAME>(genre-Crime)', 'The Moonstone by <NAME>(genre-Crime)', 'A Study in Scarlet by <NAME>(genre-Crime)', 'The Hound of the Baskervilles by <NAME>(genre-Crime)', 'The Sign of Four by <NAME>(genre...
<reponame>exarkun/coveragepy<filename>coverage/sqldata.py<gh_stars>1-10 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt """Sqlite coverage data.""" # TODO: get sys_info for data class, so we can see sqlite versi...
return js class ExplanationOfBenefitAddItem(backboneelement.BackboneElement): """ Insurer added line items. The first-tier service adjudications for payor added product or service lines. """ resource_type = "ExplanationOfBenefitAddItem" def __init__(self, jsondict=None, strict=True): """ Ini...
<filename>sparv/modules/hist/hist.py import sparv.modules.saldo.saldo as saldo import sparv.util as util import sparv.diapivot as diapivot import re import itertools import os # The minimun precision difference for two annotations to be considered equal PRECISION_DIFF = 0.01 def annotate_variants(word, out, spellmod...
<reponame>home-suite-home/Home-Suite-Home #!/usr/bin/env python import sys import json import time import dash import urllib import dash_daq as daq import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output, State, MATCH from Email_Component import Email_Component...
<gh_stars>1-10 import numpy as np import math import shap from .base_plotting import PlotStructure from ..common.utils import combine_like_features import matplotlib.pyplot as plt from .dependence import dependence_plot from matplotlib.lines import Line2D import matplotlib import re from shap.plots import colors def ...
) root_1 = self._adaptor.nil() root_1 = self._adaptor.becomeRoot( self._adaptor.createFromType(DIR_, "DIR_") , root_1) self._adaptor.addChild(root_1, stream_ID.nextNode() ) # /home/tux/PycharmProjects/ProtoGen_public/Parser/ProtoCC.g:203:23: ( objset_decl )* while stream_objset_decl.hasNext(): self._adapto...
# Copyright 2021 United States Government as represented by the Administrator of the National Aeronautics and Space # Administration. No copyright is claimed in the United States under Title 17, U.S. Code. All Other Rights Reserved. r""" This module provides utilities for visually inspecting star identification and a...
<gh_stars>1-10 import os import time import shutil import pickle import numpy as np import matplotlib.pyplot as plt import torch import torch.nn.functional as F import torch.nn.utils as utils from tqdm import tqdm from torch.optim.lr_scheduler import ReduceLROnPlateau from tensorboard_logger import configure, log_val...
<reponame>CoderPat/structured-neural-summarization import argparse from opengnn.models import GraphToSequence, SequencedGraphToSequence from opengnn.encoders import GGNNEncoder, SequencedGraphEncoder from opengnn.decoders.sequence import RNNDecoder, HybridPointerDecoder from opengnn.inputters import TokenEmbedd...
seeking medical " "advice about treatment/care because of this service. Rely on info at your " "own risk.", "1. Next", ] ) app.messages = [] msg = Message( content="invalid", to_addr="27820001002", from_addr="27820001001", transport_name="whatsapp", transport_type=Message.TRANSPORT_TYPE.HTTP_API, ) [repl...
from config import BAD_ACTOR_NOTIFICATION_URL from datetime import datetime from decimal import Decimal from pytz import timezone from wtforms import validators import pytest from batch import amount_to_charge from npsp import RDO, Contact, Opportunity, SalesforceConnection, Account from util import clean, construct_...
> 0): for key_indicator in compute_other_key_indicators: for _id, _type in zip(key_indicator.target.score_ids, key_indicator.target.scores): _kpiKI = { "kpiId": _id, "type": _type, "kpiFamily": key_indicator.target.indicator_family, "scoreType": _type, "kpiType": key_indicator.target.indicator_type, "output": ...
<filename>fiftyone/core/plots/matplotlib.py """ Matplotlib plots. | Copyright 2017-2021, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ import itertools import logging import warnings import numpy as np import matplotlib as mpl from matplotlib.widgets import Button, LassoSelector from matplotlib.path imp...
import numpy as np import matplotlib.pyplot as plt from astropy import units as u import scipy.integrate from sys import float_info import warnings class Baseliner: """ A class for interactive baseliner of spectroscopic data. The class works by being fed a spectrum and a matplotlib axis on which it should be pl...
5 Under 4%", "Payment 6 Over 5%"] },{ "name": "Payment 6 Less Than 5%", "taxonomy": ["Payment 1 Over 0%", "Payment 2 Over 1%", "Payment 3 Over 2%", "Payment 4 Over 3%", "Payment 5 Under 4%", "Payment 6 Less Than 5%"] },{ "name": "Payment 6 Over 5%", "taxonomy": ["Payment 1 Over 0%", "Payment 2 Over 1%", "Payment ...
<reponame>Technologicat/unpythonic<filename>unpythonic/funutil.py<gh_stars>10-100 # -*- coding: utf-8 -*- """Function call and return value related utilities.""" __all__ = ["call", "callwith", "Values", "valuify"] from functools import wraps from .lazyutil import passthrough_lazy_args, islazy, maybe_force_args, for...
a final feature map size of %s" % (feature_map_size, )) interp_block1 = interp_block(res, 1, feature_map_size, input_shape) interp_block2 = interp_block(res, 2, feature_map_size, input_shape) interp_block3 = interp_block(res, 3, feature_map_size, input_shape) interp_block6 = interp_block(res, 6, feature_map...
""" * Copyright 2019 EPAM Systems * * 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,...
load data that will be used for evaluating the recognition # accuracy of the base categories. data_base = np.load(file_train_categories_val_phase_data) labels_base = load_data(file_train_categories_val_phase_labels) # load data that will be use for evaluating the few-shot recogniton # accuracy on the novel ca...
) ): continue # Resolve lookups - use lookup variable instead of index variable if variable_name.endswith('_index') | hasattr(variable, 'lookup'): # Index variable found # Use lookup variable name for output try: short_name = variable.lookup # Use lookup attribute except AttributeError: short_name = re.sub('...
rootEventselector(sourceList, destFileName, destPathSplit, \ compress=None, recreate=False, first=0, last=-1, selectionString="", branchinclude="", branchexclude=""): # Check arguments if sourceList == [] or destFileName == "": return 1 if recreate and destFileName in sourceList: logging.error("cannot recreate de...
%s: Trans. prob. is INCREASED by a factor of %.4f; P %s %f, MD = %f, CI(%f, %f)' % (states[si], states[sj], Mod[si-1, sj-1], s, val, md, cil, cih)) else: print('%s -> %s: Trans. prob. is increased by a factor of %.4f; P %s %f, MD = %f, CI(%f, %f)' % (states[si], states[sj], Mod[si-1, sj-1], s, val, md, cil, cih)) ...
i in range(times): if are_segments_synchronized(): return time.sleep(sleeptime) raise Exception('segments are not in sync after %d seconds' % (times * sleeptime)) @when('at least one segment is resynchronized') @then('at least one segment is resynchronized') @given('at least one segment is resynchronized') def i...
**params) self._spec_log = [] if self.timestamp == (0,)*9: self.timestamp = tuple(time.localtime()) self.pprint_args(['batch_name','args','command'], ['description', 'tag', 'output_directory', 'subdir','metadata']) self.dynamic = isinstance(args, DynamicArgs) def get_root_directory(self, timestamp=None): """ ...
== 'fx'`` force `w_time_range` to be ``True``. If ``self.table_id = '*'`` or set multi values and you want force <time_range> part to be omitted, set ``w_time_range=False`` explicitly. Examples: Usual case; >>> str(drs.DRS(**drs.sample_attrs).fileName()) 'tas_Amon_MIROC6_piControl_r1i1p1f1_gn_320001-329912.n...
places.nm", ) zalias = zips.alias("main_zip") qlat = select( [zips.c.latitude], zips.c.zipcode == zalias.c.zipcode ).as_scalar() qlng = select( [zips.c.longitude], zips.c.zipcode == zalias.c.zipcode ).as_scalar() q = select( [ places.c.id, places.c.nm, zalias.c.zipcode, func.latlondist(qlat, qlng).label(...
# -*- coding: utf-8 -*- from ebu_tt_live.bindings.raw._ebuttdt import * from ebu_tt_live.bindings.raw import _ebuttdt as ebuttdt_raw from datetime import timedelta from decimal import Decimal import re, logging import six from pyxb.exceptions_ import SimpleTypeValueError, SimpleFacetValueError from ebu_tt_live.errors i...
sanitized_identifier[11:14] if ( len(sanitized_identifier) > 14 ): readable_identifier += "-" + sanitized_identifier[14:18] return readable_identifier def truncate_to_study_id( identifier ): sanitized_identifier = sanitize_identifier( identifier ) return sanitized_identifier[0:8] def truncate_to_series_id( ident...
"""Configuration for a stack.""" # Copyright (C) 2015 <NAME>, <NAME> and <NAME>. # Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd. # Copyright (C) 2015--2019 The Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in complianc...
isinstance(args[0], tuple): return [symbol, (None, [oplist, args[0]]) + kwargs] else: return [symbol, (None, args + kwargs)] method = [m for m in methods_supporting_dtype if symbol.find(m, 0) == 0] if len(method) == 1: symbol = symbol.replace(method[0], method[0] + dtype) return [symbol, args + kwargs] # def...
# Copyright Amazon.com, Inc. or its affiliates. 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 applic...
# Copyright (c) 2018, 2019, Nordic Semiconductor ASA # # SPDX-License-Identifier: Apache-2.0 '''West configuration file handling. West follows Git-like conventions for configuration file locations. There are three types of configuration file: system-wide files apply to all users on the current machine, global files a...
of the posts that match our criteria try: cursor.execute(query) except Exception as e: # Display information print('Failed to report posts: {:s}'.format(str(e))) # Specify that we failed to deliver return False # Compute the number of posts that the user needs need = g_PostCount * 2 if userid in g_MultiList el...
# -*- coding: utf-8 -*- import os from sympy.printing.pycode import PythonCodePrinter from sympy import Abs, Mul, Symbol, conjugate from Definitions import mSymbol, splitPow from Logging import loggingCritical class PythonExport(): def __init__(self, model, latexSubs={}, cpp=None): self._Name = model._Name.replac...
None and not isinstance(results_, (bytes, str, list)): raise Exception("Expected results_ to be a Sequence, received: {}".format(type(results_))) self.results = results_ self.unknown_fields = unknown_fields class ConfigValue(Type): _toSchema = {'source': 'source', 'value': 'value'} _toPy = {'source': 'source',...
import numpy as np import helper import tensorflow as tf from tensorflow.python.layers.core import Dense from datetime import datetime # Build the Neural Network # Components necessary to build a Sequence-to-Sequence model by implementing the following functions below: # # - model_inputs # - process_decoder_input # -...
aug_det.augment_images(images_list) assert (observed[0][outer_pixels] < 25).all() assert (observed[0][inner_pixels] > 200).all() observed = aug.augment_keypoints(keypoints) assert keypoints_equal(observed, keypoints_aug) observed = aug_det.augment_keypoints(keypoints) assert keypoints_equal(observed, keypoints_...
0.5*m.b166*m.b318 + 0.5*m.b166*m.b334 + 0.5*m.b166*m.b337 + 0.5*m.b166*m.b357 + 0.5*m.b166*m.b374 + 0.5*m.b166*m.b383 + 0.5*m.b166* m.b397 + 0.5*m.b166*m.b402 + 0.5*m.b166*m.b410 + 0.5*m.b166*m.b411 + 0.5*m.b166*m.b505 + 0.5* m.b166*m.b509 + 0.5*m.b166*m.b510 + 0.5*m.b166*m.b530 + 0.5*m.b166*m.b536 + 0.5*m.b166*m.b5...
<filename>generators/generate_pybind11_bindings.py import os import platform import shutil import sys from collections import Counter from collections import defaultdict, OrderedDict from os.path import join from typing import List, Dict, Set from CppHeaderParser import CppHeaderParser from CppHeaderParser.CppHeaderPa...
local algos last_papers = prev_papers available_papers = all_vecs[:] rank_err = 0 if ranking_type == "CRP": predicted_order = ranking_model.rank_on_clusters(last_papers, available_papers) else: predicted_order = ranking_func(last_papers, available_papers) prediction_error = error_func(predicted_o...
<reponame>maaku/elements #!/usr/bin/env python2 import sys, os, json, traceback, decimal sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../../python-bitcoinrpc")) from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from rotating_consensus import RotatingConsensus from thre...
from collections import namedtuple, OrderedDict import re import os import functools import stat import sys import zipfile import io import csv import string import codecs import datetime import time import argparse import fnmatch EOL = '\n' COLSEP = '\t' COLUMN_SEPARATOR = COLSEP g_logs = [] # get with get_log() g_a...
add data to object if freqs is not None and power_spectra is not None: self.add_data(freqs, power_spectra, freq_range) # If 'verbose', print out a marker of what is being run if self.verbose and not progress: print('Running FOOOFGroup across {} power spectra.'.format(len(self.power_spectra))) # Run linearly if...
by side coronavirus_in_my_collection_Nouns_Left = [] for word in Nouns_LEFT_clean: if word in coronavirus: coronavirus_in_my_collection_Nouns_Left.append(word) len(coronavirus_in_my_collection_Nouns_Left)/len(Nouns_LEFT_clean) #0.0012387557935397597 coronavirus_in_my_collection_Nouns_Right = [] for word in Nouns_...
" "orders_1.user_id AS orders_1_user_id, " "orders_1.address_id AS orders_1_address_id, " "orders_1.description AS orders_1_description, " "orders_1.isopen AS orders_1_isopen, items_1.id AS items_1_id, " "items_1.description AS items_1_description FROM users " "JOIN orders ON users.id = orders.user_id, " "orders...
<gh_stars>10-100 import os import sys import pickle import argparse import time from torch import optim from torch.utils.tensorboard import SummaryWriter sys.path.append(os.getcwd()) from utils import * from motion_pred.utils.config import Config from motion_pred.utils.dataset_h36m_multimodal import DatasetH36M from m...
<filename>src/blueprints/telegram_bot/_common/yandex_oauth.py import base64 import secrets from enum import Enum, auto from typing import Union from flask import current_app import jwt from src.api import yandex from src.extensions import db from src.database import ( User, YandexDiskToken, UserQuery, ChatQuery )...
else: pytest.fail("Unknown job grouping 'service' value: {}".format(categories[service_or_provider])) self.assert_equal_with_jobs_diffs(grouped_jobs["jobs"], expect) # noqa def test_get_jobs_valid_grouping_by_service(self): self.template_get_jobs_valid_grouping_by_service_provider("service") def test_get_jobs_va...
if unexpected status code """ url = '{blobep}{container_name}/{blob_name}{saskey}'.format( blobep=self.blobep, container_name=container_name, blob_name=blob_name, saskey=self.saskey) reqheaders = {'Content-MD5': content_md5} reqparams = {'comp': 'block', 'blockid': blockid} response = azure_request( req...
import torch import torch.nn as nn import torch.nn.functional as F from torch import distributions as dist from layers import (CResnetBlockConv1d, CBatchNorm1d, CBatchNorm1d_legacy) import resnet import numpy as np class VoxelDecoder64(nn.Module): ''' Voxel64 Decoder with batch normalization (BN) class. Args: z_dim...
c2 = filt['c2'] r2 = filt['r2'] if 'r3' not in filt.keys(): r3 = 0 c3 = 0 else: c3 = filt['c3'] r3 = filt['r3'] if 'r4' not in filt.keys(): r4 = 0 c4 = 0 else: c4 = filt['c4'] r4 = filt['r4'] coeffs = calculateCoefficients( c1=c1, c2=c2, c3=c3, c4=c4, r2=r2, r3=r3, r4=r4, flt_type=filt['flt_type'...
keys are `"ABCD"` and `"ABGH"`, respectively, but only `"AB"` was transmitted before the experiment ended. Therefore, each key in the dict maps to a list of experiments, in case a single key (`"AB"`) maps to multiple experiments in the MCS data. The user would then need to disambiguate between them. Each item in...
#!/usr/bin/env python3 import argparse import logging import os import stat import subprocess import sys import time import yaml import paramiko ''' { config: { max_instance_count: 10, min_instance_count: 0, name: sprout_group, scaling_config_action: [ { ns_config_primitive_name_ref: Sprout Scaling Ops, trigger...
args): ret = self.performCustomStep("prepublish", args) if not ret: return ret self.loadModifiedFiles(args) # Commit any files that may have been added to the main repo. # The custom prepublish step is responsible for performing the git add for any # modified files. # Submodules and nested subprojects are not ...
track_wires: Union[WireArray, List[WireArray]], *, min_len_mode: Optional[MinLenMode] = None, debug: bool = False) -> Union[Optional[WireArray], List[Optional[WireArray]]]: """Connect all given WireArrays to the given WireArrays on adjacent layer. Parameters ---------- wire_arr_list : Union[WireArray, List[Wire...
4: { 600: [-0.065, 0.063, 6.9e-4, -0.298], 831: [-0.034, 0.060, 6.9e-4, -0.196], 900: [-0.064, 0.083, 6.9e-4, -0.277], 1200: [-0.052, 0.122, 6.9e-4, -0.294], 'other': [-0.050, 0.080, 6.9e-4, -0.250] } } # Return calbirated roll, yaw, and tilt return orientation_coeffs[slider][_ruling][0], \ orientation_coeffs[s...
# AUTOGENERATED! DO NOT EDIT! File to edit: notebooks_dev/dag.ipynb (unless otherwise specified). __all__ = ['pickle_load', 'pickle_dump', 'recursive_dict', 'undefault_dict', 'recursive_assign', 'folder_to_dict', 'dict_to_folder', 'BaseDAG', 'model_to_dot', 'DAGEstimator'] # Cell from warnings import warn from shuti...
attribute telling until when the version is valid. Not used if None. Default: None - tofinder: a function(targetconnection, row, namemapping) returning a value for the toatt. If not set, fromfinder is used (note that if fromfinder is None, it is set to a default function -- see the comments about fromfinder. The p...
<reponame>ouyang-w-19/decogo<filename>tests/examples/minlplib/supplychainp1_022020.py # MINLP written by GAMS Convert at 04/21/18 13:54:26 # # Equation counts # Total E G L N X C B # 5301 861 840 3600 0 0 0 0 # # Variable counts # x b i s1s s2s sc si # Total cont binary integer sos1 sos2 scont sint # 2941 2481 460 0 ...
+ 3)*ido); tr2 = ref(cc,4*k*ido) + ref(cc,ido-1 + (4*k + 3)*ido); tr3 = ref(cc,ido-1 + (4*k + 1)*ido) + ref(cc,ido-1 + (4*k + 1)*ido); tr4 = ref(cc,(4*k + 2)*ido) + ref(cc,(4*k + 2)*ido); ch[k*ido] = tr2 + tr3; ch[(k + l1)*ido] = tr1 - tr4; ch[(k + 2*l1)*ido] = tr2 - tr3; ch[(k + 3*l1)*ido] = tr1 + tr4; } if (...
*/ /* add_event() ! " */ /* get() ! " */ /* . */ /* . */ /* . */ /* flush_io() ! send get requests */ /* ! optional parallel processing */ /* . ! " */ /* . ! " */ /* pend_io() ! wait for replies from get requests */ /* . ! access to requested data */ /* . ! " */ /* pend_event() ! wait for reque...
<filename>alf/utils/dist_utils.py # Copyright (c) 2020 Horizon Robotics and ALF Contributors. 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/li...
LOG.debug("Sending %s to switch %s", cmds, switch_ip) response = self._session.post( eapi_server_url, verify=self._verify, timeout=self._conn_timeout, json=data) try: return response.json()['result'] except KeyError as e: msg = ("Unexpected EAPI error - KeyError {} - result was {}" "".format(e, response.json(...
it will be most efficient to scan all entities below the ancestor and load them into memory first. Use ORDER_FIRST if the query has a sort order and the result set is large or you only plan to fetch the first few results. In that case, we shouldn't try to load all of the results into memory; instead, we should sc...
Control, Number), UnaryExpression(Keyword('not'), Boolean, Boolean), UnaryExpression(Keyword('numberofenginesrtd'), Object, Number), UnaryExpression(Keyword('numbertodate'), Array, Array), UnaryExpression(Keyword('objectcurators'), Object, Array), UnaryExpression(Keyword('objectfromnetid'), String, Object), Unary...
''' end = min(car1['Frame #'].iloc[-1],car2['Frame #'].iloc[-1]) start = max(car1['Frame #'].iloc[0],car2['Frame #'].iloc[0]) if end <= start: # if no overlaps in time return -1 car1 = car1.loc[(car1['Frame #'] >= start) & (car1['Frame #'] <= end)] car2 = car2.loc[(car2['Frame #'] >= start) & (car2['Frame #'] <...
#!/usr/bin/env python2 """ Synopsis: Generate Python classes from XML Schema definition. Input is read from in_xsd_file or, if "-" (dash) arg, from stdin. Output is written to files named in "-o" and "-s" options. Usage: python generateDS.py [ options ] <xsd_file> python generateDS.py [ options ] - Options: -h, -...
<filename>video_prediction/savp/models/savp_model.py import collections import functools import itertools from collections import OrderedDict import numpy as np import tensorflow as tf from tensorflow.python.util import nest from video_prediction.savp import ops, flow_ops from video_prediction.savp.models import Vide...
# Copyright (c) 2012 OpenStack Foundation. # # 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...
<filename>find_leaks.py # -*- Mode: Python; tab-width: 4 -*- # Copyright (c) 2002-2011 IronPort Systems and Cisco Systems # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restrictio...
lines and comments. if line == "" or line.startswith("#"): continue entry = line.split(None, 1) # Format is FILENAME *CHECKSUM if len(entry) != 2: logger.error("%s: Invalid %s manifest entry: %s", self, alg, line) continue entry_hash = entry[0] entry_path = os.path.normpath(entry[1].lstrip("*")) entry_path...
# -*- coding: utf-8 -*- """ Zenoss template_router """ from zenossapi.apiclient import ZenossAPIClientError from zenossapi.routers import ZenossRouter class TemplateRouter(ZenossRouter): """ Class for interacting with the Zenoss template router """ def __init__(self, url, headers, ssl_verify): super(TemplateR...
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
for the end game buttons to either return to main menu or start a new game""" if event.type == pygame.MOUSEBUTTONDOWN: pop_menu = [x for x in self.popup_menu if x.collidepoint(event.pos)] replay_menu = [x for x in self.popup_replay if x.collidepoint(event.pos)] # print(event.pos, pop_menu, replay_menu) if pop...
<reponame>balena-io/support-shift-scheduler<filename>algo-core/ortools_solver.py """ Copyright 2020 Balena Ltd. 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/LICEN...
list of sprites # (currently set to ignore duplictes), make it list on return sprites.add(thing.sprite) return thingsList, list(sprites) # Some other functions used in for drawing ############################################ def getImageSizeOffset(vertexes, linedefs, sidedefs, sectors, options): '''C...
<filename>tests/test_lin_rg.py import unittest import os from numpy.testing import assert_allclose from numpy import ones, zeros, float64, array, append, genfromtxt from ml_algorithms.lin_rg import (normal_eqn, cost_func, reg_cost_func, grad, reg_grad, predict, h) from ml_algorithms.utils import numerical_grad TE...
'uliana': uliana.send_chat_action(id, 'typing') time.sleep(4) uliana.send_message(-1001351496983, 'Как здорово! Спасибо за помощь, [' + x['pionername'] + '](tg://user?id=' + str( x['id']) + ')!' + \ '', parse_mode='markdown') users.update_one({'id': x['id']}, {'$inc': {'Uliana_respect': random.randint(4, 5)}}) ...
numbers (Z2, Beckman Coulter, Villepinte, France).", {"entities": []}), ("The result was not statistically significant (p > .05)", {"entities": []}), ("One-Way ANOVA revealed F(2,32)=1.203, p > .05", {"entities": []}), ("There was a large effect of stimulation of the nucleus of darkschewitz (p < .01, **)", ...
0, 1) self.copy_from = [self.parent_w.current_obj.name] # Preselect the current selected MEEG self.copy_tos = list() self.listw1 = CheckList(self.all_files, self.copy_from, ui_buttons=False, one_check=True) self.listw2 = CheckList(self.all_files, self.copy_tos) layout.addWidget(self.listw1, 1, 0) layout.addWid...
<gh_stars>10-100 import bisect from collections import deque import logging import os import pprint import random import warnings from functools import partial from typing import Union, Tuple import h5py import numpy as np from omegaconf import DictConfig import pandas as pd import torch from opencv_transforms import ...
<filename>color pattern with threading.py import time import random from multiprocessing import pool from playsound import playsound from threading import Thread i = -1 l = 0 count = 0 class loops: def loop(self): print(" ", end="") def A(self): global i global l global i for j in range(i, 5): for k in ...
import hashlib import json import sys import time import types import warnings try: from urllib.request import build_opener, HTTPRedirectHandler from urllib.parse import urlencode from urllib.error import URLError, HTTPError string_types = str, integer_types = int, numeric_types = (int, float) text_type = str ...
The array for direction xi has shape (n_xi, p+1, der + 1). global_spans : List of ndarray List of 1D arrays, one per direction, containing the index of the last non-vanishing basis function in each cell. The array for direction xi has shape (n_xi,). cell_indexes : list of ndarray List of 1D arrays, one per dire...
1465 SAI_PORT_STAT_ETHER_STATS_PKTS_128_TO_255_OCTETS = (SAI_PORT_STAT_ETHER_STATS_PKTS_65_TO_127_OCTETS + 1) # /home/omer/P4/SAI/inc/saiport.h: 1465 SAI_PORT_STAT_ETHER_STATS_PKTS_256_TO_511_OCTETS = (SAI_PORT_STAT_ETHER_STATS_PKTS_128_TO_255_OCTETS + 1) # /home/omer/P4/SAI/inc/saiport.h: 1465 SAI_PORT_STAT_ETHER_S...
'forbes island': 0.0, 'foreign cinema': 0.0, 'frances': 0.0, 'franchino': 0.0, 'franciscan crab restaurant': 0.0, 'frascati': 0.0, 'fresca': 0.0, 'fringale': 0.0, 'fujiyama ya japanese restaurant': 0.0, 'gajalee': 0.0, 'gamine': 0.0, 'garcon restaurant': 0.0, 'g<NAME>': 0.0, 'gitane': 0.0, 'golden era res...
# coding: utf-8 # Copyright (C) 2016 UKP lab # # Author: <NAME> (ukp.tu-darmstadt.de/ukp-home/) # import os import ast, json import numpy as np np.random.seed(1) from keras import layers, models, optimizers from keras import backend as K from keras import regularizers import tqdm from core import embeddings from grap...
m.x47)*m.x449) + m.x448) == 0) m.c248 = Constraint(expr=m.x450 - (0.0025*(m.x47*(m.x248 - 10*m.x449) - (1 - m.x47)*m.x449 + m.x48*(m.x249 - 10*m.x450) - (1 - m.x48)*m.x450) + m.x449) == 0) m.c249 = Constraint(expr=m.x451 - (0.0025*(m.x48*(m.x249 - 10*m.x450) - (1 - m.x48)*m.x450 + m.x49*(m.x250 - 10*m.x451) - (1 - ...
from numpy import prod import cupy from cupy.cuda import cufft from cupy.fft import config from cupy.fft._fft import (_convert_fft_type, _default_fft_func, _fft, _get_cufft_plan_nd, _get_fftn_out_size, _output_dtype) from cupy.fft._cache import get_plan_cache def get_fft_plan(a, shape=None, axes=None, value_type='...
<filename>tests/integration/test_image_filters.py # encoding: utf-8 # ------------------------------------------------------------------------ # Copyright 2022 All Histolab Contributors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License...