input
stringlengths
2.65k
237k
output
stringclasses
1 value
'modelPath': 'phase_9/models/cogHQ/PaintMixer', 'modelScale': Point3(0.8, 0.8, 0.8), 'motion': 'easeInOut', 'offset': Point3(7, 0, 0), 'period': 8.0, 'phaseShift': 0.0, 'shaftScale': 2.5, 'waitPercent': 0.1}, 10020: {'type': 'paintMixer', 'name': 'second', 'comment': '', 'parentEntId': 10015, 'pos...
''' t[0] = ' ' + str(t[1]) + ' ' def p_ORDER2(t): ''' orden : ASC ''' t[0] = ' ' + str(t[1]) + ' ' #? #################################################################### # TODO EXPRESION DATOS - FALTA #? #################################################################### def p_sin_some_any(t): '''sin_s...
# coding: utf-8 """ Licensed to Cloudera, Inc. under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Cloudera, Inc. licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this ...
= self.session.run( self.ldif_gradients, feed_dict={ self.target_class_ph: batch_gt_class, self.sif_input: cur_vector, self.optimizer_samples: batch_samples })[0] vis_this_time = vis >= 2 or (vis >= 1 and (i == 0 or i == step_count - 1)) print_this_time = verbosity >= 2 or (verbosity >= 1 and not i % 1000) if ...
<reponame>SimplyVC/panic import copy import datetime import json import logging import unittest from queue import Queue from unittest import mock import pika import pika.exceptions from freezegun import freeze_time from parameterized import parameterized from src.alerter.alerters.system import SystemAlerter from src....
(0.89020, 0.00392, 0.00784), (0.90196, 0.00392, 0.00784), (0.90980, 0.00392, 0.00784), (0.91765, 0.00392, 0.00784), (0.92941, 0.00392, 0.00784), (0.93725, 0.00392, 0.00784), (0.94510, 0.00392, 0.00784), (0.95686, 0.00784, 0.00784), (0.95686, 0.00784, 0.00784), (0.96078, 0.00784, 0.00784), (0.96471, 0.00784, 0...
= self._get_param_datetime() self.status = field_datetime > param_datetime def get_message(self): return self.message.format(VALUE=self.field_value, FIELD=self.field_name, DATETIME=self.args[0]) def _get_field_datetime(self): return datetime.datetime.strptime(self.field_value, self.field_format_str) def _get_p...
<filename>utils/replace.py import re import copy from utils.infos import Infos class Replace: def variableDeduplication(self, fileContent, funcDict, contractDict, contractFunctionDict): #print(contractFunctionDict) fileContentCopy = copy.deepcopy(fileContent) pattern4Variables = re.compile( r'(\W|\A)(address|...
<reponame>kedarisetti/mp4viewer from __future__ import absolute_import import sys from . import box class MovieHeader(box.FullBox): def parse(self, buf): super(MovieHeader, self).parse(buf) if self.version == 1: self.creation_time = buf.readint64() self.modification_time = buf.readint64() self.timescale = buf.r...
ext=1, sky_iter=10, iter_atol=1.e-4): """Subtract sky background from grism exposures Implementation of grism sky subtraction from ISR 2015-17 TBD """ import numpy.ma import scipy.ndimage as nd #from sklearn.gaussian_process import GaussianProcess from sklearn.gaussian_process import GaussianProcessReg...
show_points: It's boolean option, If false, points of record will be hidden. height: It's an integer option, It will determine heigth of chart in pixel. width: It's an integer option, It will determine width of chart in pixel Returns: A string contains chart js code and import code of C3 static files, if it di...
import os import requests from urllib.error import URLError from urllib.parse import urlparse from urllib.request import urlopen from luigi import Target, LocalTarget from hashlib import sha1 from tasks.util import (query_cartodb, underscore_slugify, OBSERVATORY_PREFIX, OBSERVATORY_SCHEMA) from tasks.meta import (OB...
save_output=save_output, output_format=output_format, structure_style="filenames", ) def test_list_nmtokens_min_length_4_nistxml_sv_iv_list_nmtokens_min_length_5_4(mode, save_output, output_format): """ Type list/NMTOKENS is restricted by facet minLength with value 10. """ assert_bindings( schema="nistData/li...
match """ matches = {} name = item.data.get("name") if not name: return matches db = current.db s3db = current.s3db table = item.table # Search by name lower_name = s3_unicode(name).lower() query = (table.name.lower() == lower_name) & \ (table.deleted == False) rows = db(query).select(table.id, table....
from __future__ import print_function from skimage.util.dtype import img_as_float32 from tensorflow.keras.preprocessing.image import ImageDataGenerator, img_to_array, load_img import numpy as np import os import glob import skimage.io as io import skimage.transform as trans from skimage.util import img_as_uint from pat...
# Avoid negative density raise ValueError("Static density {}kg/m**3 cannot be negative".format(static_density)) else: rho = static_density qi = 0.5*rho*vel**2 return qi def dynamic_pressure_from_statpress(self, mach, static_pressure, static_temperature=None): """ Calculates the dynamic pressure of the flow...
areas " + \ validTime phraseType = "NEW" # # Phrase for EXT # elif eachHazard['act'] == 'EXT': phraseType = "NEW" #prevExpPhrase = self.getHourAMPMTimeZone(\ # eachHazard['previousEnd'], eachHazard['id']) prevRec = copy.deepcopy(eachHazard) prevRec['endTime'] = eachHazard['previousEnd'] prevExpPhrase = s...
<filename>heat/core/tests/test_manipulations.py import numpy as np import torch import heat as ht from .test_suites.basic_test import TestCase class TestManipulations(TestCase): def test_column_stack(self): # test local column_stack, 2-D arrays a = np.arange(10, dtype=np.float32).reshape(5, 2) b = np.arange(15, ...
""" Created on 2019-08-23 Updated on 2019-08-23 Company: DOSIsoft Author: Jiacheng """ # =================Library============================== # ====Basic librairie======= import time import os import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable # =====Pour Neur...
import logging from logging.handlers import QueueHandler from multiprocessing import Queue import numpy as np import os import signal from time import time from utils.analyzer import VideoAnalyzer from utils.signalstateanalyzer import SignalVideoAnalyzer from utils.event import Trip from utils.io import IO from utils.t...
= "#FFE2E2") pid_label.grid(row = 0, column = 0, padx = 5, pady = 3, sticky = W) name_label.grid(row = 1, column = 0, padx = 5, pady = 3, sticky = W) age_label.grid(row = 2, column = 0, padx = 5, pady = 3, sticky = W) gender_label.grid(row = 3, column = 0, padx = 5, pady = 3, sticky = W) contact_label.grid(row = ...
somename in group.items(): usename = somename offset = 0.0 stratigraphic = False if somename in strat: logger.info("Found <%s> in stratigraphy", somename) usename = strat[somename].get("name", somename) stratigraphic = strat[somename].get("stratigraphic", False) offset = rel[item].get("offset", 0.0) else: log...
<filename>szndaogen/data_access/manager_base.py import typing from ..tools.log import Logger from .db import DBI from .model_base import ModelBase from ..config import Config class ManagerException(BaseException): pass class ViewManagerBase: MODEL_CLASS = ModelBase def __init__(self, dbi: DBI = None): """ I...
) self.buttons["add_domain"] = self._add_button( "Add selected", action=self._add_domain, width=self._width, tooltip="Add a selected mesh as a domain", ) self.buttons["delete_domain"] = self._add_button( "Delete", action=self._delete_domain, width=self._width, tooltip="Delete a selected domain", ) self....
import logging import os import warnings import typing from collections import defaultdict, namedtuple from typing import Any, Dict, List, Optional, Text, Tuple, Union import rasa.utils.io as io_utils from rasa.core.domain import Domain from rasa.nlu.constants import ( EXTRACTOR, ENTITY_ATTRIBUTE_VALUE, ENTITY_ATTR...
<reponame>gyang21/tailor #!/usr/bin/python # # Copyright (C) 2020 ByteDance 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 requ...
'reverse_domain': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'reverse_ptr_set'", 'blank': 'True', 'to': "orm['cyder.Domain']"}), 'ttl': ('django.db.models.fields.PositiveIntegerField', [], {'default': '3600', 'null': 'True', 'blank': 'True'}), 'views': ('django.db.models.fields.related.ManyT...
"silent", "qdbus", "sse2", "sse3", "sse4.1", "sse4.2", "ssse3", "static", "static-runtime", "strip", "syncqt", "sysroot", "testcocoon", "use-gold-linker", "warnings-are-errors", "Werror", "widgets", "xplatform", "zlib", "eventfd", "glib", "icu", "inotify", "journald", "pcre", "posix-ipc", "pps...
'''Module containing core functions to perform the P-GPFA fit. .. module:: engine :synopsis: A useful module indeed. .. moduleauthor: <NAME> <<EMAIL>> ''' import inference import learning import util import numpy as np import scipy.io as sio import scipy.optimize as op import scipy as sp import matplotlib.pyplot a...
of form: obs_modality1: dict feature_dimension: int core_class: str core_kwargs: dict ... ... obs_randomizer_class: str obs_randomizer_kwargs: dict ... ... obs_modality2: dict ... """ # parameters specific to GMM actor self.num_modes = num_modes self.min_std = min_std self.low_noise_eval = low_noise_...
+ m.b17 - m.b62 <= 0) m.c2339 = Constraint(expr= - m.b2 + m.b18 - m.b63 <= 0) m.c2340 = Constraint(expr= - m.b2 + m.b19 - m.b64 <= 0) m.c2341 = Constraint(expr= - m.b2 + m.b20 - m.b65 <= 0) m.c2342 = Constraint(expr= - m.b2 + m.b21 - m.b66 <= 0) m.c2343 = Constraint(expr= - m.b2 + m.b22 - m.b67 <= 0) m.c2344 = Co...
mutation at nuc_pos - codon_start_pos: 1based genome position of beginning of codon containing the mutation at nuc_pos - codon_end_pos: 1based genome position of end of codon containing the mutation at nuc_pos - ref_nuc_seq_dict: SeqIO dict SeqIO Dict containing reference genomic sequence. Should have format {"M...
import networkx as nx import numpy as np import scipy from numba import jit from scipy.sparse import isspmatrix from scipy.special import comb from . import comdet_functions as cd from . import cp_functions as cp def compute_neighbours(adj): lista_neigh = [] for ii in np.arange(adj.shape[0]): lista_neigh.append(a...
<gh_stars>0 # # Copyright 2019 The FATE 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 app...
0.20000000000000018), (0.911600133406095, 2.805616723070703, 0.09999999999999964), (0.9270509831248424, 2.8531695488854605, 0.0), (0.9425018328435897, 2.900722374700218, 0.09999999999999964), (0.9579526825623371, 2.948275200514976, 0.20000000000000018), (0.9734035322810846, 2.995828026329734, 0.3000000000000007), ...
import unittest import saspy import os import pandas as pd from IPython.utils.tempdir import TemporaryDirectory from pandas.util.testing import assert_frame_equal class TestSASdataObject(unittest.TestCase): @classmethod def setUpClass(cls): cls.sas = saspy.SASsession(results='HTML') #cfgname='default') #cls.asse...
relevant orbitals were generated and that no duplicates (2p and 2p_x) are " "present" ) kpoints_array = [] for ifilename, filename in enumerate(filenames): with zopen(filename, "rt") as f: contents = f.read().split("\n") if ifilename == 0: self.nbands = int(parameters[6]) self.number_kpts = kpoints_object.nu...
""" The process handler module implements the ProcessHandler class Created on Jan 21, 2016 @author: <NAME> """ import datetime import multiprocessing import os from multiprocessing import Process import time import queue from bson.objectid import ObjectId from of.common.logging import write_to_log, EC_BREAKIN, SEV...
<filename>kairon/shared/account/processor.py from datetime import datetime from typing import Dict, Text from loguru import logger as logging from mongoengine.errors import DoesNotExist from mongoengine.errors import ValidationError from pydantic import SecretStr from validators import ValidationFailure from validator...
= situation_object(CAR) situation = HighLevelSemanticsSituation( ontology=GAILA_PHASE_1_ONTOLOGY, salient_objects=[baby, ball, car], actions=[ Action( action_type=TAKE, argument_roles_to_fillers=[(AGENT, baby), (THEME, ball)] ) ], after_action_relations=[near(ball, car)], ) assert generated_tokens(situatio...
<reponame>ksmit799/POTCO-PS<filename>pirates/quest/DistributedQuestGiver.py<gh_stars>1-10 from panda3d.core import * from direct.showbase.ShowBaseGlobal import * from direct.directnotify.DirectNotifyGlobal import directNotify from direct.distributed.ClockDelta import * from direct.interval.IntervalGlobal import * from ...
- **MaxConcurrency** *(string) --* The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time. If a new instance st...
import subprocess, ffmpy, pycountry, unidecode, shutil, re, requests, json, os, argparse, time, sys, base64, configparser, glob, pycaption, m3u8 from collections import OrderedDict from natsort import natsorted from titlecase import titlecase from pydisney.disneyplus_api import DSNP from pydisney.disneyplus_parser impo...
from kivy.config import Config Config.set('input', 'mouse', 'mouse,disable_multitouch') Config.set('kivy','exit_on_escape', 0) Config.set('kivy', 'desktop', 1) Config.set('graphics', 'window_state', 'maximized') Config.write() from kivymd.app import MDApp from kivymd.uix.datatables import MDDataTable from kivymd.uix.s...
"""Tests for SequenceSessionizerSketchPlugin.""" from __future__ import unicode_literals import mock from timesketch.lib.analyzers.psexec_sessionizers \ import DestPsexecSessionizerSketchPlugin from timesketch.lib.analyzers.sequence_sessionizer \ import SequenceSessionizerSketchPlugin from timesketch.lib.testlib i...
list(user_ids_by_email.values()) if framework_constants.DELETED_USER_ID in user_ids: raise exceptions.InputException( 'Reserved deleted_user_id found in deletion request and' 'should not be deleted') if not user_ids: logging.info('Emails %r not found in DB. No users deleted', emails) return # The operations ma...
""" Access to the platform 2.0 API for PV monitoring Works for m.ginlong.com. Should also work for the myevolvecloud.com portal (not tested) For more information: https://github.com/hultenvp/solis-sensor/ """ import binascii import hashlib from http import HTTPStatus import logging import struct import sys import...
"EEBF85" }, "275" : { "number" : "275", "name" : "fishcake", "title" : u"\u306a\u308b\u3068", "sjis" : "F6C6", "unicode" : "E4ED", "jis-email" : "7648", "sjis-email" : "EBC6", "utf-8" : "EEBF86" }, "276" : { "number" : "276", "name" : "footmark", "title" : u"\u8db3\u8de1(\u72ac)", "sjis" : "F6C7", "uni...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (c) 2018 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
see lines 4355-4363 in calendrica-3.0.cl def chinese_location(tee): """Return location of Beijing; time zone varies with time, tee.""" year = gregorian_year_from_fixed(ifloor(tee)) if (year < 1929): return location(angle(39, 55, 0), angle(116, 25, 0), mt(43.5), hr(1397/180)) else: return location(angle(39, 55, 0...
<gh_stars>0 # -*- coding:utf-8 -*- """ IG Markets REST API Library for Python http://labs.ig.com/rest-trading-api-reference Original version by <NAME> - 2014 - http://uk.linkedin.com/in/lewisbarber/ Modified by <NAME> - 2014-2015 - https://github.com/femtotrader/ """ import json import time import urllib from base64...
0x89, 0xA7, 0xE6, 0x80, 0xA1, 0xE6, 0x83, 0xA0, 0xE5, 0x89, 0xBF, 0xE8, 0x94, 0xAC, 0xE8, 0x96, 0xAF, 0xE8, 0x94, 0xA5, 0xE7, 0x8A, 0xA7, 0xE7, 0x89, 0xB2, 0xE6, 0x89, 0xB9, 0xE6, 0x85, 0xB7, 0xE8, 0x8C, 0x85, 0xE5, 0xBB, 0xAC, 0xE7, 0xB2, 0xB9, 0xE8, 0x9C, 0x87, 0xE8, 0xB9, 0x8B, 0xE7, 0x80, 0x9D, 0xE6, 0xA0, 0xBD,...
"""The test for the here_travel_time sensor platform.""" import logging from unittest.mock import patch import urllib import herepy import pytest from homeassistant.components.here_travel_time.sensor import ( ATTR_ATTRIBUTION, ATTR_DESTINATION, ATTR_DESTINATION_NAME, ATTR_DISTANCE, ATTR_DURATION, ATTR_DURATION_...
"""Module that handles shared information for all network objects.""" import xml.etree.ElementTree as et import numbers import numpy as np import pandas as pd import scipy.sparse as sps from paminco.utils.readin import parse_number, xml_find_root from paminco.utils.misc import Cache from paminco.utils.typing import s...
Response from the API. Successful operation Raises: APIException: When an error occurs while fetching the data from the remote API. This exception includes the HTTP Response code, an error message, and the HTTP body that was received in the request. """ # Validate required parameters self.validate...
<gh_stars>1-10 """Provides the hardware abstraction layer""" from time import sleep import time import numpy as np import pystorm from pystorm.PyDriver import bddriver as bd from pystorm.hal.neuromorph.core import Core from pystorm.hal.neuromorph.core_pars import CORE_PARAMETERS from pystorm.hal.cal_db import Calibrat...
"""Performing spectral clustering on neural networks and calculating its p-values.""" import numpy as np import math #from multiprocessing import Pool from pathos.multiprocessing import ProcessPool import scipy.sparse as sparse from utils import splitter, load_weights, compute_pvalue from sklearn.cluster import Spect...
#------------------------------------------------------------------------- # Description: HSF (High Seas Forecast) #------------------------------------------------------------------------- # Copying: # This software is in the public domain, furnished "as is", without technical # support, and with no warranty, express ...
# -*- coding: utf-8 -*- """ Created on Sat May 13 15:35:42 2016 @version:0.2.4./pyc @author: Nackel """ import sys import re import time import os from itertools import combinations_with_replacement, permutations, product import numpy as np from data import index_list from util_sc import is_rnasc_list from util_sc impo...
import torch import os import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import time import sys import pandas as pd import numpy as np import keras from sklearn.preprocessing import LabelEncoder from sklearn.preprocessing import OneHotEncoder from Levenshtein import distan...
""" return LRange ( vmin , vmax , n ) # ============================================================================= ## loop over values between xmin and xmax in log-scale # @code # for v in lrange ( vmin , vmax , 200 ) : ## ditto # print (v) # @endcode def lrange ( vmin , vmax , n = 100 ) : """:oop over values ...
<filename>pyke/keppca.py from .utils import PyKEArgumentHelpFormatter from . import kepmsg, kepio, kepkey, kepplot import re import numpy as np from astropy.io import fits as pyfits from scipy import optimize as opt from matplotlib import pyplot as plt from tqdm import tqdm import random __all__ = ['keppca'] def ke...
<filename>main_esvit.py # coding=utf-8 # Modified by <NAME> (<EMAIL>) # # Copyright (c) Facebook, Inc. and its affiliates. # # 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.apa...
import tensorflow as tf from .activations import swish, mish from tensorflow.keras.layers import Dense from Nn.layers import Noisy, mlp from GCN.layers import GraphConvolution from Attention.attention import MultiHeadAttention import numpy as np activation_fn = 'tanh' initKernelAndBias = { 'kernel_initializer': tf.ra...
<reponame>hamzy/OpenBMC #!/usr/bin/env python """ Object library to interact with an OpenBMC controller. """ # 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...
783143, 783149, 783151, 783191, 783193, 783197, 783227, 783247, 783257, 783259, 783269, 783283, 783317, 783323, 783329, 783337, 783359, 783361, 783373, 783379, 783407, 783413, 783421, 783473, 783487, 783527, 783529, 783533, 783553, 783557, 783569, 783571, 783599, 783613, 783619, 783641, 783647, 783661, 783677, 783...
#-*- coding:utf-8 -*- # Copyright (c) 2010-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 appl...
<filename>smart-site-web/db.py<gh_stars>0 # !/usr/bin/env python3 # -*- coding: utf-8 -*- # @file: db.py # @date: 2020/12/2 import json import os import time from typing import List import redis import config from utils import id_to_key, key_to_id, random_id, random_employee_id # decode_responses设置取出为字符串 pool = redi...
'action': {'key': 'action', 'type': 'str'}, } def __init__( self, *, name: Optional[str] = None, value: Optional[str] = None, action: Optional[Union[str, "TagAction"]] = None, **kwargs ): super(FilteringTag, self).__init__(**kwargs) self.name = name self.value = value self.action = action class Identity...
<filename>dq/redis.py import json import logging import redis from dq.config import Config from dq.logging import error logger = logging.getLogger(__name__) def init_redis(key): """Initialize a Redis connection. :param string key: The config key. The entry should at least contain the host, port and db number o...
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: cp1252 -*- ''' Created on 13.03.2018 GUI_forms.py components for forms and dialogs @author: <NAME> ''' # import modules: import sys, os, shutil, time from shutil import copyfile from collections import namedtuple from PyQt5.QtWidgets import (QApplication, QFileDi...
r is not s2 True >>> >>> single2 = class_() >>> single2.bind(SingleLinked, {"next": (single2, None)}, ... recreate_object = False) >>> r = check_type(s1, single2) >>> r is s1 True >>> r = check_type(s2, single2) >>> r is s2 True >>> >>> single_to_double = class_() >>> >>> def _modify_node(o): ... if o.n...
""" Gauss-Patterson quadrature rule. Adapted from <NAME>'s implementation in Fortran Licensing --------- This code is distributed under the GNU LGPL license. """ import numpy import chaospy.quad def quad_gauss_patterson(order, dist): """ Generate sets abscissas and weights for Gauss-Patterson quadrature. Args...
numbers literals are agnostic of their bit width this allows us to create the proper-width value. Returns: The resulting interpreter value. Raises: EvaluateError: If the type context is missing or inappropriate (e.g. a tuple cannot be the type for a number). """ logging.vlog(4, 'number: %s @ %s', expr, expr....
<filename>tests/validation/tests/rke/test_update_roles.py from .conftest import * # NOQA from .common import * # NOQA def test_update_roles_1(test_name, cloud_provider, rke_client, kubectl): """ Update cluster adding a worker node Before Update: Create three node cluster, each node with a single role node0 - cont...
<reponame>f-tonini/py-spatial<gh_stars>10-100 # coding: utf-8 """ Tool Name: Exploratory Regression Source Name: ExploratoryRegression.py Version: ArcGIS 10.0 Author: Environmental Systems Research Institute Inc. """ ################ Imports #################### import sys as SYS import copy as COPY import os as OS im...
gaw_pagename = '0-20008-0-{}'.format(self.gaw_id) return { 'id': self.station_id, 'type': 'Feature', 'geometry': point2geojsongeometry(self.x, self.y, self.z), 'properties': { 'woudc_id': self.station_id, 'gaw_id': self.gaw_id, 'name': self.station_name.name, 'type': self.station_type, 'country_name_en': sel...
# 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, software # distributed under the Li...
<reponame>Heckie75/kodi-addon-sane-scanner<gh_stars>0 #!/usr/bin/python3 # -*- coding: utf-8 -*- import datetime import os import re import shutil import subprocess import sys import time import urllib.parse import xbmc import xbmcgui import xbmcplugin import xbmcaddon import xbmcvfs __PLUGIN_ID__ = "plugin.picture....
glGetTransformFeedbacki64_v(xfb, pname, index, param): pass @params(api='gl', prms=['mode', 'count', 'type', 'constindices', 'drawcount']) def glMultiDrawElements(mode, count, type, constindices, drawcount): pass @params(api='gl', prms=['n', 'bufs']) def glDrawBuffers(n, bufs): pass @params(api='gl', prms=['fr...
nothing.', 'Most people think neither of Death nor nothingness.', 'Until they stand on the edge of life and see the Darkness.', 'I see. We must make an idol of our fear, and call it God.', 'You are uneasy.', 'Death visited me this morning. We are playing chess. This respite enables me to perform a vital errand.', ...
just 6 linear layers. # if model_type == "CGBERT": # optimizer_parameters.append( # {'params': model.classifier.parameters(), 'lr': 1e-4}, # ) # elif model_type == "QACGBERT": # new_lr = 2e-4 # optimizer_parameters.append( # {'params': model.classifier.parameters(), 'lr': new_lr}, # ) # for layer_module in mo...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import math, copy, time from torch.autograd import Variable from utils import outputActivation import pdb # Customizations # - DONE Embeddings: linear transform d_feats -> d_model features # - DONE Generator # - DONE Batching # D...
# #-*- coding: utf-8 -*- # # ------------------------------------------------------------------------- # # ------------------------------------------------------------------------- import math import numpy as np # import matplotlib # matplotlib.use('agg') # import matplotlib.pylab as plt def solveForComponents(fc,...
GAAGCAAAGT (non-indel_read_2) For indel_read_1 and non-indel_read_1, left edit_dist(TAGTAT, TAGTAT) = 0 right edit_dist(AAGCAA, GAAGCA) = 2 indel complexity = left edit_dist + right edit_dist = 2 Calculate for indel_read_i nad non-indel_read_j and take mininum. """ # first compare with reference # i...
Create user request """ def __init__(self, headers=None, avatar=None, description=None, email=None, nick_name=None, phone=None, role=None, status=None, user_data=None, user_id=None, user_name=None): self.headers = headers # type: Dict[str, str] # 头像 self.avatar = avatar # type: str # 描述信息 self.description = des...
# Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
import sys, pygame, config, time import sprites, audio from heart import Heart #The player class class Player(): def __init__(self): # Initialiazion of content self.load_content() def load_content(self) -> None: # Loades once self.setPlayerPos(100, config.SCREEN_HEIGHT-80) # player position self.crouchReduc...
# Copyright Contributors to the OpenCue Project # # 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 ...
<gh_stars>1-10 import os import itertools from datetime import datetime from collections import ChainMap from math import isnan import glob import json import locale from shutil import copyfile import pandas as pd from pandas.api.types import is_numeric_dtype from cowidev.utils import paths from cowidev.utils.utils i...
import numpy as np def freq_gen(high_freq, low_freq, decades=7): ''' Function that generates the frequency range used to investigate the impedance response of an electrical circuit Frequency Generator with logspaced freqencies Parameters ---------- high_freq : single value (int or float) initial frequency va...
#!/usr/bin/env python # -*- coding: utf-8 -*- ################################################################################ # Copyright (c) 2020 PaddlePaddle 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 Lic...
<filename>src/pickle_parser.py<gh_stars>1-10 ''' ####################################################################################################### ####################################################################################################### Copyright 2018 Northeastern University Licensed under the Apac...
#!/usr/bin/env python3 """Main script for gaze direction inference from webcam feed.""" import argparse import os import queue import threading import time from gazedb import GazeDB import coloredlogs import cv2 as cv import numpy as np import tensorflow as tf from tensorflow.python.client import device_lib import kera...
<reponame>AusDTO/observatory-app # Pyhton 3.6.4 script to ingest accounts data stream from BigQuery to DTA # cloud.gov RDS # schedule interval for datasets are as follows from __future__ import print_function import datetime import os # import tablib import pathlib from airflow import models from airflow.models impo...
<gh_stars>0 import itertools import subprocess import django from django.core.signals import request_started from django.core.wsgi import get_wsgi_application from django.db import close_old_connections from django.test import modify_settings from django.test import override_settings from django.test.client import Req...
<filename>sdk/python/pulumi_azure_native/insights/alert_rule.py<gh_stars>0 # coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** 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, ...
<reponame>mannuan/beryllium # -*- coding:utf-8 -*- import warnings from selenium import webdriver from selenium.webdriver.remote.webelement import WebElement from pyvirtualdisplay import Display import random from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support.ui import WebD...
<filename>src/chaospy/distributions/baseclass.py """ Constructing custom probability distributions is done in one of two ways: Sublcassing the :class:`~chaospy.distributions.Dist` or by calling :func:`~chaospy.distributions.construct`. They work about the same except for one methods are defined, while in the other, fun...
<reponame>deepankur797/random import numpy as np import pandas as pd import matplotlib.pyplot as plt #%matplotlib inline plt.rcParams['figure.figsize'] = (10.0, 8.0) import seaborn as sns from scipy import stats from scipy.stats import norm train = pd.read_csv("D:\\cygwin\\COLLEGE STUFF(A)\\8th sem\\major 2\\...