input
stringlengths
2.65k
237k
output
stringclasses
1 value
#!/usr/bin/python # -*- coding: UTF-8 -*- # # Methods comonly shared by the tool scripts # import codecs import operator # only for sortedDict() import sys # only for raw_encoded_input() import locale # only for raw_encoded_input() import json # for loadJsonConfig def loadJsonConfig(filename='config.json'): ''' Loa...
= 1269 _strings['device name'] = 1271 _strings['use password protection'] = 1272 _strings['airplay'] = 1273 _strings['airtunes'] = 1274 _strings['filter %s'] = 1275 _strings['custom audio device'] = 1300 _strings['custom passthrough device'] = 1301 _strings['temperature'] = 1375 _strings['pressure'] = 1376 _strings['pr...
import os from os.path import join as pjoin import scipy.io as sio from itertools import permutations, product from torch.utils.data import DataLoader, IterableDataset from helpers.preprocessing import * import itertools class AudioDataset(IterableDataset): def __init__(self, data_dir, rir_path, is_train=True, trai...
all plugin devices.") for dev in indigo.devices.itervalues("self"): try: dev.updateStateImageOnServer(indigo.kStateImageSel.SensorOff) indigo.device.enable(dev, value=False) except Exception as sub_error: self.plugin_error_handler(sub_error=traceback.format_exc()) self.logger.error(u"Exception when trying to ki...
<reponame>xkmato/py77<filename>pylib/zeus/runner.py #!/usr/bin/env python """Handles run.""" __author__ = '<EMAIL> (<NAME>)' __copyright__ = 'Copyright 2012 Room77, Inc.' import itertools import json import os import re import sys import time from pylib.base.flags import Flags from pylib.base.exec_utils import Exec...
import heterocl as hcl import numpy as np import time import user_definer_3D_Q as UD import os ###################################### USER-DEFINED FUNCTIONS ###################################### # Given state and action, return successor states and their probabilities # sVals: the coordinates of state # bounds: t...
def getEmbeddedType(cls, fieldName): embeddedTypes = {} return embeddedTypes[fieldName] __slots__ = [ 'description', 'id', 'info', 'instrumentDataFile', 'instrumentModel', 'library', 'libraryLayout', 'molecule', 'name', 'platformUnit', 'recordCreateTime', 'recordUpdateTime', 'runTime', 'selection', 'sequencin...
no flattened fields. if not isinstance(request, certificate_manager.GetCertificateRequest): request = certificate_manager.GetCertificateRequest(request) # If we have keyword arguments corresponding to fields on the # request, apply these. if name is not None: request.name = name # Wrap the RPC method; this adds...
# Positions at first time step time0 = min(dpos_data[:, 0]) id_t0 = numpy.where(dpos_data[:, 0] == time0) pos_t0 = pos_data[id_t0, 0:9] except ValueError: # this is for the case simulation hass not been ran and # time does not exists time0 = 0 id_t0 = None pos_t0 = numpy.array([ numpy.hstack(([0., io.instanc...
code.append(indent(1) + var_prefix + 'bus_t' + str(idx) + '* ' + res_name + ',\n') # idx += 1 # code.append(indent(1) + 'bool init,\n') # code.append(indent(1) + 'unsigned int FILTER_S\n') # code.append('){\n') code.append('#pragma HLS DATAFLOW\n\n') code.append(indent(1) + '// FIFOs\n') idx = 0 for op_name in des...
#!/usr/bin/env python import sys, os, time, json, socket, select, random, subprocess, string, hashlib, bisect, atexit VERSION = "0.6" REPLICA_PROG = './3700kvstore' NUM_CLIENTS = 8 ####################################################################################################### # Parses and validates config ...
<filename>edacom.py #!/usr/bin/env python """ Runs on one Raspberry Pi inside each of the beamformer control boxes, to send pointing commands to the eight beamformers connected to that box. On startup, it: -Checks that the hostname (as reported by 'hostname -A') is either 'eda1com or 'eda2com', and exits if not. -U...
""" Smart Virtual Thermostat FOR trv python plugin for Domoticz Author: Erwanweb, adapted from the SVT By Logread V0.4.4 and Anthor, see: https://github.com/999LV/SmartVirtualThermostat http://www.antor.fr/apps/smart-virtual-thermostat-eng-2/?lang=en https://github.com/AntorFr/SmartVT Version: 0.0.1: alpha 0.0.2: ...
#------------------------------------------------------------------------------- # $Id$ # # Project: EOxServer <http://eoxserver.org> # Authors: <NAME> <<EMAIL>> # <NAME> <<EMAIL>> # #------------------------------------------------------------------------------- # Copyright (C) 2013 EOX IT Services GmbH # # Permission...
prev_vert2 and \ not circle_full: # force quads, otherwise won't make it to end of loop2 tri, quad = 1, 0 else: # calculate if tri or quad gives shortest edge tri, quad = [(mesh.vertices[loop1[i+1]].co - mesh.vertices[loop2[j]].co).length for j in range(prev_vert2, prev_vert2+2)] # triangle if tri < quad: ...
<gh_stars>0 # Copyright 2015 Open Platform for NFV Project, Inc. and its contributors # This software is distributed under the terms and conditions of the 'Apache-2.0' # license which can be found in the file 'LICENSE' in this package distribution # or at 'http://www.apache.org/licenses/LICENSE-2.0'. import copy impo...
# Copyright (c) <NAME> # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import torch import numpy as np from decoding_algorithms.ctc_decoder_base import CTCDecoderBase class CTCScopeSearchLengthControlDecoder(CTCDecoderBase): """ An equiv...
#!/usr/bin/python import matplotlib.pyplot as plt import numpy as np import sys import optparse import os import subprocess import test_results import stats import graph_utilities def calc_sums(epochs): sum_list = [] sum_list.append(epochs[0][1]) #num_epochs sum_list.append(epochs[0][1]) #epoch_number #each of ...
URLBase.schemas(garbage) assert isinstance(schemas, set) is True assert len(schemas) == 0 def test_apprise_notify_formats(tmpdir): """ API: Apprise() Input Formats tests """ # Caling load matix a second time which is an internal function causes it # to skip over content already loaded into our matrix and thef...
'GET', 'servers': None, }, params_map={ 'all': [ 'project_id', 'location_id', 'disk_id', ], 'required': [ 'project_id', 'location_id', 'disk_id', ], 'nullable': [ ], 'enum': [ ], 'validation': [ ] }, root_map={ 'validations': { }, 'allowed_values': { }, 'openapi_types': { 'project_id': (str,...
<filename>pyshgp/push/instruction.py<gh_stars>10-100 """Concrete implementations of the Instruction Atom type.""" from abc import ABC, abstractmethod from typing import Callable, Set, Sequence from pyshgp.push.atoms import InstructionMeta from pyshgp.push.config import PushConfig from pyshgp.push.type_library import R...
# -*- coding: utf-8 -*- """ MIT License Copyright (c) 2019-2021 Terbau 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 restriction, including without limitation the rights to use, copy, ...
or the main thread. """, filename="/mp/simics-3.0/src/core/common/generic_commands.py", linenumber="4208") # # ------------ wait-for-cycle ------------ # def wait_for_cycle_command(obj, cycle): if conf.python.iface.python.in_main_branch(): SIM_command_has_problem() print ("The wait-for-cycle command is only allowe...
('', 'Other (type below)'), ) travel_reimbursement = models.CharField( max_length=STR_MED, verbose_name='How will instructors\' travel and accommodations be ' 'managed?', choices=TRAVEL_REIMBURSEMENT_CHOICES, blank=True, default='', ) travel_reimbursement_other = models.CharField( max_length=STR_LONG, verbos...
% ( alpha, cutoff, len(self.scored_filters)) NUM_FILTERS_TO_SHOW = 10 def evaluate(self, *args, **kwargs): verbosity = kwargs.get('verbosity', 0) if not self.scored_filters: if verbosity >= 0: print (' %s ' % self.name).center(75, '=') print ' (No filters!)' return 0 else: cm_score = ConfidenceMetric.evalua...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
# Copyright 2019 <NAME>. All rights reserved. # Use of this source code is governed by the GNU-GPL # license that can be found in the LICENSE file. # Date created: July 21, 2019 import json import os import platform import random import shutil import subprocess import time import _thread import threading from os.pa...
<gh_stars>0 # Copyright 2020 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
0, (1, 1))/3 + sqrt(2)*JzKetCoupled( 1, 0, (1, 1))/2 + sqrt(6)*JzKetCoupled(2, 0, (1, 1))/6 assert couple(TensorProduct(JzKet(1, 0), JzKet(1, 1))) == \ -sqrt(2)*JzKetCoupled( 1, 1, (1, 1))/2 + sqrt(2)*JzKetCoupled(2, 1, (1, 1))/2 assert couple(TensorProduct(JzKet(1, 0), JzKet(1, 0))) == \ -sqrt(3)*JzKetCoupled( ...
<reponame>NECOTIS/CRITICAL # Copyright (c) 2018, NECOTIS # 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...
allowed. Scalar (=non-array) properties may have a value of NULL (= `None`), any primitive CIM type, reference type, and string type with embedded instance or embedded object. Array properties may be Null or may have elements with a value of NULL, any primitive CIM type, and string type with embedded instance or...
Parameters ---------- forces : 3xN :obj:`numpy.ndarray` set of forces on object in object basis torques : 3xN :obj:`numpy.ndarray` set of torques on object in object basis normals : 3xN :obj:`numpy.ndarray` surface normals at the contact points soft_fingers : bool whether or not to use the soft finger contact ...
<reponame>dbirman/cs375 from __future__ import division, print_function, absolute_import import os, sys import numpy as np import tensorflow as tf import cPickle from tfutils import base, data, optimizer import json import copy import argparse from utils import * from data_provider import * sys.path.append('../nor...
# -*- coding: utf-8 -*- # (C) Copyright 2020, 2021 IBM. All Rights Reserved. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modificatio...
<gh_stars>0 from typing import List from urllib import response import discord from discord import app_commands, TextStyle from discord.ext import commands, tasks from discord.ext.commands import Cog import sys sys.path.append('../') from main import config_load, increment_command_counter, ClanBankTransaction, Guild f...
# -*- coding: utf-8 -*- """ Created on Fri Sep 25 16:29:19 2020 @author: muell018 """ from flask import Blueprint, session, render_template, url_for, flash, redirect, request, jsonify, json, current_app, send_from_directory from flask_login import login_required, current_user from ..io.cts import Cts impo...
<reponame>Rancerle/Clarkson_Magenta # 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...
<reponame>Princeton-CDH/ppa-django<filename>ppa/archive/forms.py import json from django import forms from django.core.cache import cache from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.db.models import Max, Min from django.utils.html import conditional_...
# -*- coding: utf-8 -*- # Copyright (C) 2009-2010 <NAME> (<EMAIL>) # # 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...
<gh_stars>0 import pytest from labgrid import Environment from labgrid.consoleloggingreporter import ConsoleLoggingReporter from labgrid.protocol import CommandProtocol from labgrid.driver.exception import ExecutionError from autonx import NSHStrategy, SimConsoleDriver import os import re simple_pass = r".*(pass|P...
# Copyright 2018 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Driver for common sequences for image management on switchable usb port.""" import glob import os import shutil import subprocess import tempfile impo...
<filename>hvm/vm/base.py from __future__ import absolute_import from abc import ( ABCMeta, abstractmethod ) import contextlib import functools import logging from typing import ( # noqa: F401 List, Type, Tuple, Optional, Union, ) from hvm.constants import CREATE_CONTRACT_ADDRESS import time import rlp_cython a...
np.array([1,0,0,0,1,0,0,0,1,0,0,0]) import subprocess if 'win' in sys.platform[:3]: elastix_bin = os.path.join(elastix_dir,'elastix.exe') elif 'lin' in sys.platform[:3]: elastix_bin = os.path.join(elastix_dir,'bin/elastix') os.environ['LD_LIBRARY_PATH'] = os.path.join(elastix_dir,'lib') elif 'dar' in sys.platfo...
np.sum(np.power(Actual[:,0] - Truth[:,0], 2.0)) print(t, '%10.4e' % sse) return sse if (False) : # optimize.brute ranges = (slice(0.18, 0.50, 0.05), slice(0.001, 0.01, 0.001), slice(2,4+1,1), slice(2,5+1,1)) # [0.43 0.007 2. 3. ] 1.225e+06 ranges = (slice(0.38, 0.48, 0.005), slice(0.006, 0.008, 0.0001), slice(2...
(size_a < size_b || (size_a == size_b && a['ob_digit'][size_a-1] < b['ob_digit'][size_b-1])) { // |a| < |b| pdiv['ob_size'] = 0; prem['ob_digit'] = a['ob_digit']['slice'](0); prem['ob_size'] = a['ob_size']; return 0; } if (size_b == 1) { rem = [0]; prem['ob_digit'] = [0]; prem['ob_size'] = 1; z = divrem1(a...
None: imds = eom.make_imds() t1, t2 = imds.t1, imds.t2 t1a, t1b = t1 t2aa, t2ab, t2bb = t2 nkpts, nocc_a, nvir_a = t1a.shape nkpts, nocc_b, nvir_b = t1b.shape kconserv = imds.kconserv Hr1a = -np.diag(imds.Foo[kshift]) Hr1b = -np.diag(imds.FOO[kshift]) Hr2aaa = np.zeros((nkpts,nkpts,nocc_a,nocc_a,nvir_a), dty...
<reponame>DavidChoi76/hydrofunctions """ hydrofunctions.usgs_rdb ~~~~~~~~~~~~~~~~~~~~~~~ This module is for working with the various USGS dataservices that use the rdb text format. These include the statistics service, the field measurements service, the rating curve service, and the peak discharge service. """ import...
0 #aqui tenho que ver o caso dos novos registos, pois o index começa por 0 tambem #print('selected_ids', selected_ids) for rec_id in selected_ids: if str(rec_id[1]) == str(self.main_key): record_num = rec_id[0] #print('my record_num e', record_num) #print('4') #penso que podemos substituir esta merda aqui pelo i...
<reponame>espenhgn/SpikeSort #!/usr/bin/env python #coding=utf-8 import numpy as np from scipy import interpolate, signal import tables import tempfile import os from warnings import warn class ZeroPhaseFilter: """IIR Filter with zero phase delay""" def __init__(self, ftype, fband, tw=200., stop=20): self.gstop=...
import copy import cmath import numpy import scipy.linalg from pauxy.estimators.thermal import greens_function, one_rdm_from_G, particle_number from pauxy.estimators.mixed import local_energy from pauxy.walkers.stack import PropagatorStack from pauxy.walkers.walker import Walker from pauxy.utils.linalg import regularis...
by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.get_escalation_chain_list_with_http_info(async_req=True) >>> result = thread.get() :param async_req bool :param str fields: :param int size: :param int offset: :param str filter: :return: EscalationChainPaginationRes...
from core.himesis_utils import graph_to_dot from util.decompose_graph import decompose_graph from core.himesis_utils import build_traceability from core.new_match_algo import NewHimesisMatcher from copy import deepcopy from collections import defaultdict class Slicer: def __init__(self, rules, transformation, s...
<reponame>benyaboy/sage-graphics ############################################################################ # # SAGE UI - A Graphical User Interface for SAGE # Copyright (C) 2005 Electronic Visualization Laboratory, # University of Illinois at Chicago # # All rights reserved. # # Redistribution and use in source and...
''' Stuff for driving MS office applications from Python using COM Currently just Excel but Word will come soon. ''' from win32com.client import Dispatch from types import * from string import uppercase class Excel: ''' Wrapper for MS Excel derived from that in Python Programming on Win32 ''' def _...
PROCEDURE {}(@sent_data nvarchar(max), @message_type smallint, @guild_id int, @message_mode smallint, @dm_reason nvarchar(max), @channels t_tmp_channel_log READONLY) AS /* Procedure that saves the log * This is done within sql instead of python for speed optimization */ BEGIN BEGIN TRY DECLARE @exis...
<gh_stars>0 # # Mask R-CNN - Train on Shapes Dataset # # # This notebook shows how to train Mask R-CNN on your own dataset. To keep things simple we use a synthetic dataset of shapes (squares, triangles, and circles) which enables fast training. You'd still need a GPU, though, because the network backbone is a Resnet...
<gh_stars>100-1000 #!/usr/bin/env python # coding=utf-8 # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Runs strace or dtrace on a test and processes the logs to extract the dependencies from the so...
#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- """ @file py102-example2-zernike.py @brief Fitting a surface in Python example for Python 102 lecture @author <NAME> (<EMAIL>) @url http://python101.vanwerkhoven.org @date 20111012 Created by <NAME> (<EMAIL>) on 2011-10-12 Copyright (c) 2011 <NAME>. All rights reserved...
first_pitch, "last_pitch_thrown": last_pitch, "since_game_start": since_start, "at_bat_duration": dur, "is_complete_at_bat": final_pbp_event["is_complete_at_bat"], "score": first_pbp_event["score"], "outs_before_play": first_pbp_event["outs_before_play"], "runners_on_base": first_pbp_event["runners_on_base"], "...
len(x) - 1: break update_1 = False update_2 = False update_3 = False change_1_0 = max(0, status_1[0] - 1) change_1_1 = max(0, status_1[1] - 1) change_2_0 = max(0, status_2[0] - 1 if status_1[1] != 0 else status_2[0]) change_2_1 = max(0, status_2[1] - 1 if status_1[1] != 0 else status_2[1]) cha...
<gh_stars>0 import discord from discord.ext import commands from discord.ext.commands import cooldown,BucketType from aiohttp import request from discord.ext.commands import MemberConverter import aiohttp import asyncio import wikipedia from howdoi import howdoi import base64 import urllib.parse from cogs.usefullTools....
<reponame>ibobak/shap import pandas as pd import numpy as np import scipy as sp import sys import warnings import copy import operator import sklearn from slicer import Slicer, Alias, Obj # from ._order import Order from .utils._general import OpChain # slicer confuses pylint... # pylint: disable=no-member op_chain...
#!/usr/bin/env python #=============================================================================== # Copyright (c) 2014 Geoscience Australia # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # ...
# Variable names start with ## variable_name variable_text, format # The format is integer, number, text, boolean, integer choice, text choice, rfile # Then some help text starting with "# " # Then a list of possible value#explain with the default first # Then a blank line to end. self.format4name = {} self.form...
burstraw = np.zeros_like(tarr) f_default = self.default_frequency for segment in self._burst: t0, t1 = segment[0] if start <= t0 and t1 <= end: t_shift = self.time_global(t0)-t0 amp, phase, freq, env = segment[1] envarr = np.zeros_like(tarr) if env == "rec": freq += f_default envarr[np.argmin(np.abs...
<gh_stars>1-10 import copy class Space: def __init__(self, schema = {}, name = "myspace"): """ schema must contain the names of the dimensions in the space as keys furthermore, we need type_checkers, and class instantiators for each dimension it should suffice form the values to be dtype objects """ self.name ...
their rotten smoke?", "Tis not enough that through the cloud thou break,", "To dry the rain on my storm-beaten face,", "For no man well of such a salve can speak,", "That heals the wound, and cures not the disgrace:", "Nor can thy shame give physic to my grief;", "Though thou repent, yet I have still the lo...
DEBUG = False import sys import re import threading import os import time if True: from tkinter import * import tkinter.filedialog as tkFileDialog import tkinter.messagebox as tkMessageBox import tkinter.font as tkFont _next_method_name = '__next__' import Pmw from pymol.wizard import cleanup from pmg_tk.Sett...
about three or more feauture comparision ? For this purpose we can use pair grid plot. Also it seems very cool :) # And we discover one more thing **radius_worst**, **perimeter_worst** and **area_worst** are correlated as it can be seen pair grid plot. We definetely use these discoveries for feature selection. # %% _c...
test_result: phone_disabled_tooltip = phone_test.tooltip msg = create_pie_menu_message(sim, None, reference_id, None, failure_tooltip=phone_disabled_tooltip(sim)) break if msg is None: shift_held = bool(shift) context = client.create_interaction_context(sim, shift_held=shift_held) can_queue_interactions = sim.qu...
objs_dict['float'].transform(X_new) assert_frame_equal(X_new, X_expected) @pytest.mark.koalas def test_full_ks(data_full_ks): objs_dict, X, X_expected = data_full_ks X_new = objs_dict['object'].transform(X) X_new = objs_dict['int'].transform(X_new) X_new = objs_dict['float'].transform(X_new) assert_frame_equal(...
<filename>gpyrn/covfunc.py """ Covariance functions to use on the GPRN """ from gpyrn.meanfunc import array_input import numpy as np class covFunction(): """ A base class for covariance functions (kernels) used for nodes and weights in the GPRN. """ def __init__(self, *args): """ Puts all kernel arguments in an...
return self.copy() else: result = self._new_like_me(_get_common_dtype(self, other)) return self._axpbz(1, other, result) __radd__ = __add__ def __sub__(self, other): """Substract an array from an array or a scalar from an array.""" if isinstance(other, GPUArray): result = self._new_like_me(_get_common_dtype(...
<filename>tf_agents/networks/network.py # coding=utf-8 # Copyright 2018 The TF-Agents 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 #...
'http://www.die-boersenformel.com/', # Why: #2649 in Alexa global 'http://www.watchcartoononline.com/', # Why: #2650 in Alexa global 'http://www.abclocal.go.com/', # Why: #2651 in Alexa global 'http://www.techrepublic.com/', # Why: #2652 in Alexa global 'http://www.just-fuck.com/', # Why: #2653 in Alexa global...
<gh_stars>0 #! /usr/bin/python3 # -*- coding: utf-8 -*- #-------------------------------------------------------------------------------------------------- # Python client library of Tkrzw-RPC # # Copyright 2020 Google LLC # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file # exc...
coefficient (visible) expfac = F.expression( 'sqrt(ameanv) * akb * F', {'ameanv': ameanv, 'akb': akb, 'F': F}) xnum = F.expression( '(rbcpyv * rbcpyv - 1.0) * exp(-expfac)', {'rbcpyv': rbcpyv, 'expfac': expfac}) xden = F.expression( '(rbcpyv * rsoilv - 1.0) + ' 'rbcpyv * (rbcpyv - rsoilv) * exp(-2.0 * expfac)'...
<reponame>delfick/delfick_project # coding: spec from delfick_project.app import CliParser, Ignore, BadOption from delfick_project.errors_pytest import assertRaises from contextlib import contextmanager from itertools import combinations from unittest import mock import sys import re import os describe "CliParser": ...
'C', (2,3),'AN'], ['CIV13', 'C', 35,'AN'], ['CIV14', 'C', (3,3),'AN'], ['CIV15', 'C', (2,3),'AN'], ['CIV16', 'C', 35,'AN'], ['CIV17', 'C', 80,'AN'], ], 'CL': [ ['BOTSID', 'M', 3,'AN'], ['CL01', 'M', (2,5),'AN'], ], 'CL1': [ ['BOTSID', 'M', 3,'AN'], ['CL101', 'C', 1,'AN'], ['CL102', 'C', 1,'AN'], ['CL103', 'C...
"""Generated message classes for gkehub version v1alpha1. """ # NOTE: This file is autogenerated and should not be edited by hand. from apitools.base.protorpclite import messages as _messages from apitools.base.py import encoding from apitools.base.py import extra_types package = 'gkehub' class AuditConfig(_messa...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------- # Name: sfp_accounts # Purpose: Identify the existence of a given acount on various sites thanks # to Micah Hoffman's (https://github.com/WebBreacher) list. # # Author: <NAME> <<EMAIL>> # # Created: 18/02/2015 # Co...
= self._vtf_importer.stage( params["$bumpmap2"], vmt_data.param_open_texture("$bumpmap2"), 'Non-Color' ) if "$bumptransform2" in params: transform = vmt_data.param_as_transform("$bumptransform2") if transform.scale != (1, 1) or transform.rotate != 0 or transform.translate != (0, 0): texture_inputs["$bumpmap2"] = ...
<filename>py_dataset/libdataset.py<gh_stars>1-10 #!/usr/bin/env python3 # # libdataet.py is a C type wrapper for our libdataset.go is a C shared. # It is used to test our dataset functions exported from the C-Shared # library libdataset.so, libdataset.dynlib or libdataset.dll. # # @author <NAME>, <<EMAIL>> # # Copyri...
<filename>ops/dataset.py # Code for "TSM: Temporal Shift Module for Efficient Video Understanding" # arXiv:1811.08383 # <NAME>*, <NAME>, <NAME> # {jilin, <EMAIL>, <EMAIL> import torch.utils.data as data from PIL import Image import os import numpy as np from numpy.random import randint # intesities = ['BL1', 'PA1', '...
import typing import os import sys import select import io import warnings import logging from collections import namedtuple import functools import shlex import subprocess import google.auth import paramiko import shutil import time import numpy as np import pandas as pd import requests import hashlib def isatty(*str...
is only one player in the category. Add a dummy None player full_set.add(None) full_list = list(full_set) for category_combo in itertools.combinations(full_list, int(math.ceil(len(full_list)/2.0))): yield (category_combo, tuple(full_set.difference(category_combo))) def generate_team_combinations(deviation_categor...
<filename>asr1k_neutron_l3/plugins/l3/service_plugins/l3_extension_adapter.py # Copyright 2017 SAP SE # # 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.a...
<gh_stars>0 import ast import base64 import json from datetime import datetime import dicttoxml from django.db.models import Q from django.http import HttpResponse from django.shortcuts import render from django.views import View import MySQLdb as db # The main view that handles Private API requests import redis fr...
# -*- coding: utf-8 -*- # Copyright 2016 OpenMarket 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/LICENSE-2.0 # # Unless required by applicable law or...
1 on edge 1 and # point 2 on edge 2, and assign. sp_12 = len_1 if len_1 > len_2: sp_12 = len_2 nearest[p1, p2] = sp_12 if symmetric: # Mirror the upper and lower triangle when symmetric. nearest[p2,p1] = nearest[p1,p2] # Populate the main diagonal when symmetric. if symmetric: if fill_diagonal == None: np....
<filename>google/cloud/bigquery/v2/bigquery-v2-py/google/cloud/bigquery_v2/services/model_service/async_client.py # -*- 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 ...
<reponame>calbach/curation<filename>data_steward/analytics/table_metrics/Table_Metrics_part_1.py # --- # jupyter: # jupytext: # formats: ipynb,py:light # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.2.1 # kernelspec: # display_name: Python 2 # language: python...
""" var, name, freq = fields print name outputMeter = ops.Meter(model) outputMeter.setMeterFileOnly(False) outputMeter.setName(name.strip()) outputMeter.setReportingFrequency(freq.strip()) def setOutputs(self, simulationOutputs, model): if simulationOutputs == []: return else: for output in simulationOut...
# wcurve.py - basic arithmetic on elliptic curves in short Weiertsrass form. # # Copyright (c) 2010-2011 <NAME> <<EMAIL>> # # 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 restriction...
email_flow_folder, **kwargs): # noqa: E501 """Insert email flow folder # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.insert_email_flow_folder(storefront_oid, email_flow_folder, async_req=True) >>> result = th...
<filename>qutip/fortran/mcsolve_f90.py # 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 are # ...
# ## # Copyright 2016 <NAME>, 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 applicab...
(self == other) class next_row_result: """ Attributes: - success - e """ thrift_spec = ( (0, TType.LIST, 'success', (TType.STRUCT,(Cell, Cell.thrift_spec)), None, ), # 0 (1, TType.STRUCT, 'e', (ClientException, ClientException.thrift_spec), None, ), # 1 ) def __init__(self, success=None, e=None,): self.su...
import sys sys.path.append('/home/george2/Raise/ProgramRepair/CodeSeer/projects/src/main/python') from CodeJam.Y14R5P1.kusano.A import * def func_423b915d9ce740ba94f31ad435e988c2(D): a -= 1 B += D[a] return B def func_b94e6667fda54c809e409e83d306253b(D): a -= 1 B += D[a] return a def func_01f4c9980c1e402db83...
1j * t_values[2])) + (R4 / (1 + w * 1j * t_values[3])) + (R5 / (1 + w * 1j * t_values[4])) + (R6 / (1 + w * 1j * t_values[5])) + (R7 / (1 + w * 1j * t_values[6])) + (R8 / (1 + w * 1j * t_values[7])) + (R9 / (1 + w * 1j * t_values[8])) + (R10 / (1 + w * 1j * t_values[9])) + (R11 / (1 + w * 1j * t_values[10])) +...