input
stringlengths
2.65k
237k
output
stringclasses
1 value
# -*- coding: utf-8 -*- import logging import vtool as vt import numpy as np import utool as ut from vtool._pyflann_backend import pyflann as pyflann from os.path import basename, exists # NOQA from wbia.algo.hots import neighbor_index_cache # import mem_top (print, rrr, profile) = ut.inject2(__name__) logger = loggi...
for x in self) def random(self) -> Any: if len(self) == 0: return wrap('') return wrap(random.choice(self)) def last(self) -> Any: if len(self) == 0: return wrap('') return wrap(list.__getitem__(self, -1)) def pop(self) -> Any: if len(self) == 0: return wrap('') res = wrap(list.__getitem__(self, -1)) list.__...
# Importing the Kratos Library import KratosMultiphysics from KratosMultiphysics.python_solver import PythonSolver import KratosMultiphysics.python_linear_solver_factory as linear_solver_factory # Import applications import KratosMultiphysics.FluidDynamicsApplication as KratosCFD from KratosMultiphysics.FluidDynamicsA...
<reponame>dhermes/persistent-cal<gh_stars>1-10 #!/usr/bin/python # Copyright (C) 2010-2012 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
<reponame>okotaku/timmextension<gh_stars>0 # -------------------------------------------------------- # Model from official source: https://github.com/Chenglin-Yang/LESA_classification # noqa # -------------------------------------------------------- import math import torch import torch.nn.functional as F import torc...
{"xoff": "31744", "xon":"19456"}, "pg_lossless_25000_300m_profile": {"xoff": "44032", "xon":"19456"}, "pg_lossless_40000_300m_profile": {"xoff": "55296", "xon":"19456"}, "pg_lossless_50000_300m_profile": {"xoff": "63488", "xon":"19456"}, "pg_lossless_100000_300m_profile": {"xoff": "102400", "xon":"19456"}} }, "sp...
<reponame>karlam123/DBImport<filename>bin/Schedule/Airflow.py # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the ...
import os, sys, time, copy, glob from collections import deque import gym from gym import spaces import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from ppo.a2c_ppo_acktr import algo from ppo.a2c_ppo_acktr.arguments import get_args from ppo.a2c_ppo_acktr....
mark_mean: array_like array of the mean value of `data_arr`. Only returned if `return_mean_std == True` mark_std: array_like array of the St. Dev. value of `data_arr`. Only returned if `return_mean_std == True` """ ## Creating dictionary for saving `sigma`s sigma_dict = {} for ii in range(len(perc_arr)): sig...
"august" : { "nodetype" : "namednumber", "number" : "8" }, "september" : { "nodetype" : "namednumber", "number" : "9" }, "october" : { "nodetype" : "namednumber", "number" : "10" }, "november" : { "nodetype" : "namednumber", "number" : "11" }, "december" : { "nodetype" : "namednumber", "number" : "12"...
<filename>src/operation.py<gh_stars>1-10 # -*- coding:utf-8 -*- """ * Copyright@2016 Jingtum Inc. or 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.ap...
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from zzz_perception_msgs/TrackingBox.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import zzz_perception_msgs.msg import geometry_msgs.msg class TrackingBox(genpy.Messa...
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ This module defines the two default GLM passes of fmristat The results of both passes of the GLM get pushed around by generators, which know how to get out the (probably 3D) data for each slice, or par...
":cur_option", reg0), (str_store_string, s3, s0), (str_store_string, s2, "str_s2_s3"), (try_end), (try_end), (create_text_overlay, reg0, s2, tf_scrollable), (overlay_set_color, reg0, 0xFFFFFF), (position_set_x, pos1, 230), (position_set_y, pos1, 425), (overlay_set_position, reg0, pos1), (position_s...
# Pyrogram - Telegram MTProto API Client Library for Python # Copyright (C) 2017-2021 Dan <https://github.com/delivrance> # # This file is part of Pyrogram. # # Pyrogram is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Softw...
<gh_stars>10-100 from contextlib import contextmanager from flask import current_app, url_for from redis import StrictRedis from woodwind import util from woodwind.extensions import db from woodwind.models import Feed, Entry import sqlalchemy import bs4 import datetime import feedparser import itertools import json imp...
depth of depressions. Tricky thing is that one might be # devoured by another, so would need to be removed from the list. def _identify_depressions_and_outlets(self, reroute_flow=True): """Find depression and lakes on a topographic surface. Find and map the depressions/lakes in a topographic surface, given a pr...
from PyQt5.QtWidgets import QDialog, QApplication, QMainWindow, QPushButton, QLabel, QVBoxLayout, QWidget from PyQt5 import QtWidgets, QtCore,QtGui #from PyQt5 import uic import sys from PyQt5.uic import loadUi import os # We need sys so that we can pass argv to QApplication import pandas as pd from pyqtgraph impor...
self.country_list})\ .filter(sex__in=self.male_female_ids)\ .filter(victim_or_survivor='Y')\ .exclude(survivor_of__in=[0,9])\ .annotate(n=Count('id')) for row in rows: counts.update({(row['sex'], self.recode_country(row[country])): row['n']}) secondary_counts['Not a victim'] = counts self.tabulate_secondary_c...
N, 2) Q_ij = uv_i.matvecmult(n_j - n_i) # (N, N, 2) # Concatenate: PQ_ij = P_ij.concat(Q_ij) # (N, N, 2+2) # Covariances, with a scale-dependent weight: PPt_PQt_ij = P_ij.tensorprod(PQ_ij) # (N, N, 2*(2+2)) PPt_PQt_ij = window_ij * PPt_PQt_ij #  (N, N, 2*(2+2)) # Reduction - with batch support: PPt_PQt_ij.ran...
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # Copyright (C) 2006 Fluendo, S.A. (www.fluendo.com). # Copyright 2006, <NAME> <<EMAIL>> # Copyright 2018, <NAME> <<EMAIL>> ''' Devices ======= This module contains two classes describing UPnP devices. :class:`Device` --------------- ...
64 chunk_size = 16 def get_scores_once(feats, points, values): # sample points inside voxels sampled_xyz = offset_points(points, self.voxel_size / 2.0, bits=bits) sampled_idx = torch.arange(points.size(0), device=points.device)[:, None].expand(*sampled_xyz.size()[:2]) sampled_xyz, sampled_idx = sampled_xyz.resha...
operating_system self.registered_date_time = registered_date_time class MicrosoftGraphPrintDocument(MicrosoftGraphEntity): """printDocument. :param id: Read-only. :type id: str :param additional_properties: Unmatched properties from the message are deserialized to this collection. :type additional_properties:...
(rad)") if component == "dt13_resid": htemp.SetYTitle("#Deltax^{local} (mm)") if component == "dt13_slope": htemp.SetYTitle("#Deltadx/dz^{local} (mrad)") if component == "dt2_resid": htemp.SetYTitle("#Deltay^{local} (mm)") if component == "dt2_slope": htemp.SetYTitle("#Deltady/dz^{local} (mrad)") htemp.GetXaxis()....
<reponame>jmichuda/bmi-214-final-project #!/usr/bin/python ## taken from https://github.com/oncokb/oncokb-annotator/blob/master/AnnotatorCore.py ## used under GNU license import json import sys import csv from enum import Enum import requests import os.path import logging import re import matplotlib matplotlib.use('A...
#!/usr/bin/python3 # -*- coding: utf-8 -*- """ .. module:: vision :platform: Unix :synopsis: the top-level submodule of T_System that contains the classes related to T_System's vision ability. .. moduleauthor:: <NAME> <<EMAIL>> """ import time # Time access and conversions import cv2 import face_recognition import...
#! /usr/bin/env python # -*- coding: utf-8 -*- """ CLINGON Command Line INterpreter Generator for pythON Compatible python 2 and 3 (c) <NAME>, https://github.com/francois-vincent """ from __future__ import print_function, absolute_import from future.utils import listitems, iteritems from past.builtins import basestri...
<gh_stars>10-100 import numpy as np from classes.Utils import calculate_average, distance_2points, innerDBSCAN class FeatureBuilder(object): # speed group features speedgroup = { 'all_avrg_x':-1, 'all_avrg_y':-1, 'all_avrg_speed':-1, 'all_avrg_direction_x':0, 'all_avrg_direction_y':0, 'all_inner_dis_to_avr...
obj = union_set(ctx=ctx, ptr=res) return obj def get_domain(arg0): return arg0.domain() @staticmethod def from_domain(arg0): try: if not arg0.__class__ is union_set: arg0 = union_set(arg0) except: raise ctx = arg0.ctx res = isl.isl_schedule_from_domain(isl.isl_union_set_copy(arg0.ptr)) obj = schedule(ctx=c...
Greaves": "", # "Ebonwood Helmet": "", # "Ebonwood Breastplate": "", # "Ebonwood Greaves": "", # "Rich Mahogany Helmet": "", # "Rich Mahogany Breastplate": "", # "Rich Mahogany Greaves": "", # "Pearlwood Helmet": "", # "Pearlwood Breastplate": "", # "Pearlwood Greaves": "", # "Amethyst Staff": "", # "Topaz S...
# -*- coding:utf-8 -*- # Author: hankcs # Date: 2020-11-29 17:48 import json from typing import Union, List, Optional, Dict, Any, Tuple from urllib.error import HTTPError from urllib.parse import urlencode from urllib.request import Request, urlopen from hanlp_common.document import Document try: # noinspection PyUnr...
is None and not r.id: resource.configure(editable = False, deletable = False ) # JS to show/hide Cook Island fields s3.scripts.append("/%s/static/themes/DRRPP/js/drrpp.js" % current.request.application) if r.method == "read": table_pl = s3db.project_location table_l = s3db.gis_location countries = [row.name...
# Find cutoff if clim is None: self.__cutoff = cutoff * np.max(vx ** 2 + vy ** 2) else: self.__cutoff = cutoff * clim[1] # Plot _, _, self.__plot = plot_vector(vx, vy, extent = extent, scale = scale, fig = self.__fig, ax = self.__ax, cmap = cmap, clim = clim, cutoff = cutoff) # Updates a vector field # #...
to repartition") @derived_from(pd.Series) def fillna(self, value): return self.map_partitions(M.fillna, value=value) def sample(self, frac, replace=False, random_state=None): """ Random sample of items Parameters ---------- frac : float, optional Fraction of axis items to return. replace: boolean, optional...
= DummyOperator1(((1, 1), (3, 0), (8, 1)), 0.5) multiplier = 0.6j res1 = op * multiplier res2 = multiplier * op self.assertTrue(res1.isclose(res2)) def test_rmul_scalar_npfloat64(self): op = DummyOperator1(((1, 1), (3, 0), (8, 1)), 0.5) multiplier = numpy.float64(2.303) res1 = op * multiplier res2 = multiplie...
<reponame>patriotemeritus/LO-PHI """ Class for controlling virtual machines using libvirt (c) 2015 Massachusetts Institute of Technology """ # Native import multiprocessing import logging logger = logging.getLogger(__name__) import time import os import shutil from subprocess import call # 3rd Party try: import l...
of optimal hard threshold for singular values. (Gavish & Donoho, IEEE Transactions on Information Theory 60.8 (2014): 5040-5053.) This only takes effect if auto_nuisance is True. nureg_zscore: boolean, default: True A flag to tell the algorithm whether data is z-scored before estimating the number of nuisance reg...
<reponame>tied/jira-groovy-scripts-2<filename>script-risk-register/MonteCarloAfterMitigation.py import sys, getopt import numpy as np import datetime import locale import platform import time import getpass from random import randrange from matplotlib import pyplot as plt from matplotlib import ticker from ma...
<gh_stars>0 #!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: <NAME> # @Date: 2014-05-01 16:00:07 # @Last Modified by: <NAME> # @Last Modified time: 2015-03-14 22:40:14 import numpy as np from scipy.signal import butter, lfilter from scipy import interpolate, fftpack # from sklearn import preprocessing # fr...
<filename>.venv/lib/python3.8/site-packages/jeepney/io/trio.py<gh_stars>0 import array from contextlib import contextmanager import errno from itertools import count import logging from typing import Optional try: from contextlib import asynccontextmanager # Python 3.7 except ImportError: from async_generator import...
# Copyright (c) 2012-2016, <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, including without limitation the rights # to use, copy, modify, merge, publ...
<gh_stars>0 import numpy as np import pandas as pd from interflow.reader import * def convert_kwh_bbtu(value: float) -> float: """converts energy in kWh to energy in billion btu. :param value: value in kilowatt-hours of energy :type value: float :return: value in bbtu """ bbtu = value * 0.000003412140 retur...
<reponame>timgates42/bokeh #----------------------------------------------------------------------------- # Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors. # All rights reserved. # # The full license is in the file LICENSE.txt, distributed with this software. #----------------------------------------...
import SCons.Script as scons import sys import os.path import subprocess import copy import collections import shutil sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) import scons_common as common class DependancyRegistry(object): """Class for maintaining build dependancies.""" def __...
db.engine.execute(global_statistics_table.update(where, new)) else: db.engine.execute(global_statistics_table.insert(new)) def get_global_statistics_for_day(travelled_distances_rows, time): time_end = time + timedelta(days=1) time_start = time_end - timedelta(days=7) query = ''' SELECT COUNT(DISTINCT user_id) ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cisco Systems, 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 req...
import numpy as np import tensorflow as tf import librosa import matplotlib.pyplot as plt import matplotlib.ticker as ticker from mpl_toolkits.axes_grid1 import make_axes_locatable import os import sys import json import glob from Input import Input import Models.UnetAudioSeparator import Models.UnetSpectrogramSepara...
Output the chat y = curses.LINES - (2 + cy_chat_area) for txt in chat_out: if txt.startswith(">> ") or txt.startswith(" "): clr = CLR_CHAT_RESP else: clr = CLR_CHAT_QUERY scr.addstr(y, 1, handleNonAscii(txt), clr) y += 1 if show_gui and curses.COLS > 20 and curses.LINES > 20: _do_gui(curses.COLS - 20) # Co...
<filename>fonctions a copier.py "A copier" 1 = """ robot = IA(ter.position_vert,type.vert,im.vert_sprinter,im.vert_fighter,im.vert_tank,im.attak_vert,im.explosion_vert,"rouge","vert") global groupe_lignes, groupe_chute groupe_lignes = [] line = False for i in range(60, (len(ter.contenu)-6)*30 +15, 15 ): robot....
of Abel transform to be performed Returns ------- A : n × n numpy array matrix of the Abel transform (forward or inverse) """ global _bs_prm, _bs, _trf_prm, _trf, _tri_prm, _tri sigma = float(sigma) # (ensure FP format) nbf = _nbf(n, sigma) M = None # Check whether basis for these parameters is already loa...
# coding: utf-8 """ NEF_Emulator No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501 OpenAPI spec version: 0.1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F401 # ...
<gh_stars>1-10 """ Copyright 2019 <NAME> 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, softwar...
# -*- coding: utf-8 -*- """ flask.json ~~~~~~~~~~ :copyright: 2010 Pallets :license: BSD-3-Clause """ import codecs import io import uuid from datetime import date from datetime import datetime from itsdangerous import json as _json from jinja2 import Markup from werkzeug.http import http_date from .._compat import ...
<reponame>sot/mica<gh_stars>0 # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Generalized module for fetching and archiving obsid-organized telemetry such as asp_l1 and obspar products. """ import os import tempfile from glob import glob import re import logging import shutil import numpy as np impo...
restrict min(nio) # Z update? # C_Z function # prediction function # test uMDL regression function # test DNML regression return Out ################################################################################ ####### #### def fit_UMDL(tr_y2train,tr_X2train,tr_X2train_cl,lambdas, sigmap, par, cli=0): #pa...
<reponame>rfrye-github/ixnetwork_restpy # MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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...
# Gamma curve highest seg slope _OV7670_REG_GAM_BASE = const(0x7B) # Gamma register base (1 of 15) _OV7670_GAM_LEN = const(15) # Number of gamma registers _OV7670_R76_BLKPCOR = const(0x80) # REG76 black pixel corr enable _OV7670_R76_WHTPCOR = const(0x40) # REG76 white pixel corr enable _OV7670_REG_RGB444 = const(0x8C) ...
# 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>kareem1925/pennylane<filename>pennylane/operation.py<gh_stars>0 # Copyright 2018-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.a...
in change.items(): self.fs.rename(oripath, fullpath) self.nodes = [self.header_node] + self.sort_nodes( self.nodes) + [self.footer_node] self.render() self.set_clineno_by_node(oriNode) Vim.command('setlocal nomodifiable') return True def cut(self, nodes): for node in nodes: node.cut() self.highlight_outdat...
'scale': 1, 'description': '', 'visibility': []}, 107: {'type': 'zone', 'name': 'dwToOilRoom', 'comment': '', 'parentEntId': 0, 'scale': 1, 'description': '', 'visibility': []}, 108: {'type': 'zone', 'name': 'dwFromBoilerRoom', 'comment': '', 'parentEntId': 0, 'scale': 1, 'description': '', ...
lambda tstep, tind: self.ClosureP_j.value(), datatype = 'stringdict', category = 'Policies & Actions') """ 2 - HEALTH PARAMETERS """ self.BaseContactR = SD_object('Base Contact Rate', units = 'people/(day*person)', init_value = 5, obtype = 'variable', func = lambda tstep, tind: self.BaseContactR.value(), ...
# 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 applicable law or agreed t...
Foto 29" rel="galeria"> <img src="/uploads/coberturas/XV-Edicao/mini.20130919-084713-14.jpg" title="Fotos BIXURRASCO - XV Edicao - FATEC - 14/09/2013 - Foto 29" alt="Fotos BIXURRASCO - XV Edicao - FATEC - 14/09/2013 - Foto 29"/></a> <a href="/uploads/coberturas/XV-Edicao/20130919-084713-15.jpg" ...
'addHCtsBut', #'widgetType':Tkinter.Button, #'text': 'Add A Hard Constraint:\n(only 1 possible per torsion)', #'command': self.getNewHardTorCts, #'gridcfg':{'sticky':Tkinter.W+Tkinter.E,'row':-1, 'column':2, 'columnspan':4}}) ifd.append({'name': 'acceptB', 'widgetType': tkinter.Button, 'text':'Accept', 'wcfg':{...
will be updated, then ignored self._sync(new_json_list) _, updated_count, skipped_count, _ = \ self._sync_with_results(new_json_list) self.assertEqual(skipped_count, 1) self.assertEqual(updated_count, 0) class TestOpportunityNoteSynchronizer(TestCase, SynchronizerTestMixin): synchronizer_class = sync.Opportuni...
# coding=utf-8 import struct from ..base import BaseTopazTest class TestArrayObject(BaseTopazTest): def test_to_s(self, space): w_res = space.execute("return [].to_s") assert space.str_w(w_res) == "[]" w_res = space.execute("return [[1]].to_s") assert space.str_w(w_res) == "[[1]]" w_res = space.execute("ret...
<reponame>JediKoder/coursera-CodeMatrix # version code 9913d98afecb+ coursera = 1 # Please fill out this stencil and submit using the provided submission script. from vecutil import list2vec from GF2 import one from solver import solve from matutil import listlist2mat, coldict2mat from mat import Mat from vec import V...
<reponame>gandhiy/lipMIP """ General all-purpose utilities """ import sys import torch import torch.nn.functional as F import numpy as np import gurobipy as gb import matplotlib.pyplot as plt import io import contextlib import tempfile import time import re import pickle import inspect import glob import os COMPLETE...
"""helper functions for Microsoft Graph""" # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. # See LICENSE in the project root for license information. # Note: This started from an ADAL sample and is being customized once I learned # ADAL Python sucks and MSAL Python is the way to go (...
:param is_spot: :code:`<code>true</code>` if App Service plan is for Spot instances; otherwise, :code:`<code>false</code>`. :type is_spot: bool :param capacity: Target capacity of the App Service plan (number of VMs). :type capacity: int :param hosting_environment: Name of App Service Environment where app or App ...
json.loads(ipam_response.text)['message'].startswith('IP address not in selected subnet'): # The IP address we're trying to add does not belong to the parent IPAM subnets print_with_timestamp_and_log("%s. Skipping it" % json.loads(ipam_response.text)['message'], log_file) else: # The IPAM server returned a 5xx stat...
= None, last_modified: Optional[str] = None, e_tag: Optional[str] = None, **kwargs ): """ :keyword name: :paramtype name: str :keyword last_modified: :paramtype last_modified: str :keyword e_tag: :paramtype e_tag: str """ super(FileSystem, self).__init__(**kwargs) self.name = name self.last_modified = la...
tol = 1e-4, by_param = False, rev = False, add = True, infa = False, dim = 3 ): """ Description: Creates a tip viscous layer volume following a foil edge. Arguments: # dist Description: The offset distance normal to the wing tip. Type: Float GUI selection: - Selection by name: - Recursive: - ...
self.getConfigureOption('sp executable') + ' --print-log' # PROBLEM, SOLVER prob_name = self.getConfigureOption('sensor placement') solver_name = self.getConfigureOption('solver') # OBJECTIVE for i in range(len(self.getProblemOption('objective'))): obj_name = self.getProblemOption('objective', prob_name) ...
(pointA[0] + self.backpackSlot9ItemTypeW, pointA[1] + self.backpackSlot9ItemTypeH) cv2.rectangle(self.image, pointA, pointB, self.regionColor, self.regionThickness) def drawRegionBackpackSlot9ItemAmount(self): pointA = (self.backpackSlot9ItemAmountX1, self.backpackSlot9ItemAmountY1) pointB = (pointA[0] + self.back...
except Exception: return None else: raise PreventUpdate @app.callback( ServersideOutput('UploadedDF','data'), Output('filename_append','children'), Output('dataset-info-open','disabled'), Input('model_select','value'), Input('upload_data','filename'), Input('upload_data','contents'), Input('DOE...
16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22...
color: #444; text-decoration: none; /* 2 */ outline: none; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1); } /* * Active * `li` needed for higher specificity to override hover */ .uk-subnav-pill > .uk-active > * { background: #009dd8; color: #fff; box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2); } /* Disabled state ...
<gh_stars>0 # File: volatility_connector.py # # Copyright (c) 2014-2016 Splunk 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 r...
0x1b7c), Register('spr2e0', 4, 0x1b80), Register('spr2e1', 4, 0x1b84), Register('spr2e2', 4, 0x1b88), Register('spr2e3', 4, 0x1b8c), Register('spr2e4', 4, 0x1b90), Register('spr2e5', 4, 0x1b94), Register('spr2e6', 4, 0x1b98), Register('spr2e7', 4, 0x1b9c), Register('spr2e8', 4, 0x1ba0), Register('spr2e9', 4, ...
=\n{}'.format(ub.repr2(result.cpu().numpy(), precision=2))) >>> print(result.shape) Ignore: import xdev globals().update(xdev.get_func_kwargs(warp_tensor)) >>> # xdoctest: +REQUIRES(module:torch) >>> import cv2 >>> inputs = torch.arange(9).view(1, 1, 3, 3).float() + 2 >>> input_dims = inputs.shape[2:] >>> #ou...
<reponame>woolfson-group/isambard<gh_stars>1-10 """Base class for bio-inspired optimizers.""" import operator import random from deap import creator, tools import numpy from optimisation.base_evo_opt import BaseOptimizer, Parameter, default_build class DE(BaseOptimizer): """Differential evolution optimisation alg...
(only to ensure they are consistent) so the mapping of integers to physical surface types is irrelevant. colMeasField: The string for the field associated with a column measurement. This can be any field with exactly one extra dimension, provided it has NaN's at the same levels as other fields where appropriate...
3 - - / - - - - - - # 7 - - 1 1 1 - / - 4 4 4 4 - / - 6 6 6 6 - # 6 - - 1 1 1 - / - 4 4 4 4 - / - 6 6 6 6 - # 5 - - 1 1 1 - / - 4 4 4 4 - / - - - - - - # 4 - - - - - - / - 4 4 4 4 - / - 7 7 7 7 - # 3 - 2 2 2 2 - / - 4 4 4 4 - / - 7 7 7 7 - # 2 - 2 2 2 2 - / - 4 4 4 4 - / - 7 7 7 7 - # 1 - 2 2 2 2 - / - - - - - -...
set using the type string given""" from collections import defaultdict self.typestr = typestr self.ndims = 0 self.funcs = [] self.types = self.__class__.expandFTypeStr(typestr) #log("For typestr %s, got types of %s" % (typestr, self.types)) self.funcs = [self.parse(s) for s in self.types] self.times = defaultdi...
"opt-application" ], "template": "user-application", "template_variables": { "OK1": "foo", "OK2": "com.example.foo" } } } } }''' self._verify_manifest(m, expected=True) def test_verify_manifest_full_bad(self): '''Test verify_manifest (full bad)''' m = '''{ "security": { "profiles": { "/com.example.foo"...
<reponame>ashishdhngr/baserow from unittest.mock import patch, call, ANY import pytest from django.db import transaction from baserow.contrib.database.api.constants import PUBLIC_PLACEHOLDER_ENTITY_ID from baserow.contrib.database.rows.handler import RowHandler from baserow.contrib.database.views.handler import ViewH...
%s=%s__tmp;' % (t, key, key), 'ALTER TABLE %s DROP COLUMN %s__tmp;' % (t, key)] else: query = None if query: logfile.write('timestamp: %s\n' % datetime.datetime.today().isoformat()) self._db['_lastsql'] = '\n'.join(query) for sub_query in query: logfile.write(sub_query + '\n') self._db._execute(sub_query) i...
import os import platform import sys from cffi import FFI __all__ = ['ffi', 'libca'] ffi = FFI() # cadef.h ffi.cdef(""" typedef void *chid; typedef chid chanId; typedef long chtype; typedef double ca_real; typedef void *evid; /* arguments passed to user connection handlers */ struct connection_handler_args { chanI...
line to the point. :rtype: float .. rubric:: Code Example .. code-block:: python # 2D example >>> from crossproduct import Point, Vector, Line >>> l = Line(Point(0,0), Vector(1,0)) >>> result = l.distance_to_point(Point(0,10)) >>> print(result) 10 # 3D example >>> from crossproduct import Point, Vec...
<gh_stars>1000+ import os import platform import logging import asyncio from functools import partial from collections import namedtuple from io import StringIO, BytesIO from urllib.parse import urlparse, parse_qsl, urlencode, urlunparse from http.client import responses try: import ssl BaseSSLError = ssl.SSLError ex...
a search # engine name (such as `DEFAULT`, or `ddg`) to a URL with a `{}` # placeholder. The placeholder will be replaced by the search term, use # `{{` and `}}` for literal `{`/`}` braces. The following further # placeholds are defined to configure how special characters in the # search terms are replaced by safe char...
["loads"], ["sectionid", "devicenumber", "loadtype", "connection"], mapp_loads, ) ) ######################################### # # # CUSTOMER LOADS # # # ######################################### # self.customer_loads.update( self.parser_helper( line, ["customer_loads"], [ "sectionid", "devicenumber", ...
__gen_func_exp__(x,table_name) if tmp_exp is None: print >>sys.stderr,"Internal Error:__gen_func_exp__" exit(29) new_list.append(tmp_exp) else: new_list.append(x) ret_exp = ystree.YFuncExp(exp.func_name,new_list) return ret_exp ##generate a new list ,which contains the exps with the specified table name. ...
constants.APP_LIFECYCLE_TYPE_RBD self.app_lifecycle_actions(None, None, rpc_app, lifecycle_hook_info_app_remove) # Perform app resources actions lifecycle_hook_info_app_remove.relative_timing = constants.APP_LIFECYCLE_TIMING_POST lifecycle_hook_info_app_remove.lifecycle_type = constants.APP_LIFECYCLE_TYPE_RESOURCE...
# -*- coding: utf-8 -*- # A sample to demo CTC in keras # modified from https://github.com/mbhenry/keras/blob/master/examples/image_ocr.py '''This example uses a convolutional stack followed by a recurrent stack and a CTC logloss function to perform optical character recognition of generated text images. I have no evid...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ##...
from . import abitypes import uuid import numbers import random import hashlib import binascii import string import re import os from . import Manticore from .manticore import ManticoreError from .core.smtlib import ConstraintSet, Operators, solver, issymbolic, istainted, taint_with, get_taints, BitVec, Constant, opera...
m.x1976 - m.b3014 <= 0) m.c1978 = Constraint(expr= m.x1977 - m.b3014 <= 0) m.c1979 = Constraint(expr= m.x1978 - m.b3014 <= 0) m.c1980 = Constraint(expr= m.x1979 - m.b3014 <= 0) m.c1981 = Constraint(expr= m.x1980 - m.b3014 <= 0) m.c1982 = Constraint(expr= m.x1981 - m.b3014 <= 0) m.c1983 = Constraint(expr= m.x1982 ...