input
stringlengths
2.65k
237k
output
stringclasses
1 value
<gh_stars>10-100 import numpy as np from scipy.optimize import minimize from scipy.linalg import null_space from pymoo.model.algorithm import Algorithm from pymoo.model.duplicate import DefaultDuplicateElimination from pymoo.model.individual import Individual from pymoo.model.initialization import Initialization from m...
-121.61 59.0 200 0 | -0.81 0.33 -40.64 0.79 | UsedTime: 132 | ID Step maxR | avgR stdR avgS stdS | expR objC etc. 1 1.60e+03-1267.96 |-1267.96 329.7 200 0 | -2.67 0.88 0.56 1.00 1 8.48e+04 -171.79 | -182.24 63.3 200 0 | -0.30 0.32 -30.75 0.64 1 1.19e+05 -171.79 | -178.25 116.8 200 0 | -0.31 0.16 -22.52 0.4...
raise TypeError(f"difference argument is not iterable, got {iterable!r}") set_: typing.Set[T] if isinstance(self._set, set): set_ = self._set.difference(*iterables) else: set_ = set(self._set) set_.difference_update(*iterables) return type(self).from_iterable(set_, self.key) @classmethod def from_iterable(cls...
import sys import re import operator import itertools from os import path from FileTools import loadAirlineCallsigns reOpenTag = re.compile('^<([a-z_]+)>$') reOpenAnyTag = re.compile('^<([a-z_="]+)>$') reCloseTag = re.compile('^</([a-z_]+)>$') xml_temp = '.*<{0}>([a-z ]+)</{0}>.*' xml_temp2 = '.*<{0}>([a-z ]*?)</{0}>...
1, Ns)) write_eq(Symbol(r'{C_{p,k}}^{\circ}'), cp[k]) write_eq(cp[k], cpfunc, sympy=True) write_eq(cp[k], expand(cpfunc)) write_eq(diff(cp[k], T), simplify(diff(cpfunc, T))) dcpdT = R * \ (a[k, 1] + T * (2 * a[k, 2] + T * (3 * a[k, 3] + 4 * a[k, 4] * T))) dcpdT = assert_subs(diff(cpfunc, T), ( diff(cpfunc, T), ...
# -*- coding:utf-8 -*- import os import stat import copy import re import shutil import zipfile from os.path import join, getsize from flask import current_app, session from openpyxl import Workbook, load_workbook from robot.api import TestData from robot.parsing.model import Step from utils.file import get_projectd...
<reponame>abrikoseg/batchflow """ Progress notifier. """ import sys import math from time import time, gmtime, strftime from tqdm import tqdm from tqdm.notebook import tqdm as tqdm_notebook from tqdm.autonotebook import tqdm as tqdm_auto import numpy as np import matplotlib.pyplot as plt try: from IPython import dis...
function] cls.add_method('InitEndDeviceInfo', 'ns3::LoRaWANEndDeviceInfoNS', [param('ns3::Ipv4Address', 'arg0')]) ## lorawan-gateway-application.h (module 'lorawan'): void ns3::LoRaWANNetworkServer::PopulateEndDevices() [member function] cls.add_method('PopulateEndDevices', 'void', []) ## lorawan-gateway-ap...
0) m.e43 = Constraint(expr= m.x7 - m.x81 - m.x84 - m.x87 - m.x90 == 0) m.e44 = Constraint(expr= m.x7 - m.x82 - m.x85 - m.x88 - m.x91 == 0) m.e45 = Constraint(expr= m.x7 - m.x83 - m.x86 - m.x89 - m.x92 == 0) m.e46 = Constraint(expr= m.x8 - m.x93 - m.x96 - m.x99 - m.x102 == 0) m.e47 = Constraint(expr= m.x8 - m.x94 - m.x9...
= oldLDFlags updateMakeFileForDarwin("CA/src/c_make.as", addedCFlags, addedLDFlags) os.system("bash install.sh") fileOptions = utils.getCommandOutput("file -b --mime-type INSTALL.py", False) if fileOptions == "": fileOptions = utils.getCommandOutput("file -b --mime INSTALL.py", False) if fileOptions != "": # fi...
import os import sys import locale try: from configparser import ConfigParser except ImportError: from ConfigParser import SafeConfigParser as ConfigParser try: from importlib import reload except ImportError: pass import logging from resources.extensions import * class SMAConfigParser(ConfigParser, object): de...
<gh_stars>1-10 from keras.layers import Input from keras.models import Model from keras.layers import Dense, Dropout, Reshape, Permute from keras.layers.convolutional import Convolution2D from keras.layers.convolutional import MaxPooling2D, ZeroPadding2D from keras.layers.normalization import BatchNormalization from ke...
<reponame>azeem59/MDFlakerForPaperUpdated import csv import matplotlib.pyplot as plt import mysql_handler as mh from prettytable import PrettyTable import click import datetime import os from pathlib import Path from changes_github import func_timer def save_csv(file_path, headers, rows): with open(file_path, 'w', e...
data (no time-format in first column) df = df.loc[df['Heures'].str.len() == 11] # drop daylight saving time hours (no data there) df = df.loc[(df['Éolien terrestre'] != '*') & (df['Solaire'] != '*')] # just display beginning of hours df['Heures'] = df['Heures'].str[:5] # construct full date to later use as ind...
- shape [len, batch] ################################## programs_input = programs[:-1] programs_target = programs[1:] full_answers_input = full_answers[:-1] full_answers_target = full_answers[1:] # print("programs_input.size()", programs_input.size()) # print("programs_target.size()", programs_target.size()) # ...
= np.argmin(dis, axis=1) for attack_ind, track_id in enumerate(dets_ids): if track_id is None or self.multiple_ori_ids[track_id] <= self.FRAME_THR \ or dets_ids[ious_inds[attack_ind]] not in self.multiple_ori2att \ or track_id not in self.multiple_ori2att: continue if ious[attack_ind, ious_inds[attack_ind]] > sel...
Constraint(expr=m.x186*m.x2516 + m.x811*m.x2522 + m.x1436*m.x2528 + m.x2061*m.x2534 <= 8) m.c2705 = Constraint(expr=m.x187*m.x2516 + m.x812*m.x2522 + m.x1437*m.x2528 + m.x2062*m.x2534 <= 8) m.c2706 = Constraint(expr=m.x188*m.x2516 + m.x813*m.x2522 + m.x1438*m.x2528 + m.x2063*m.x2534 <= 8) m.c2707 = Constraint(expr=m...
import re import sys from io import StringIO import numpy as np import scipy.sparse as sp from scipy import linalg from sklearn.decomposition import NMF, MiniBatchNMF from sklearn.decomposition import non_negative_factorization from sklearn.decomposition import _nmf as nmf # For testing internals from scipy.sparse im...
from .vefm_271 import mesh, vertex, edge, face from math import pi, acos, sin, cos, atan, tan, fabs, sqrt def check_contains(cl, name, print_value=False): dir_class = dir(cl) for el in dir_class: if el.startswith("_"): pass else: if print_value: tmp = getattr(cl, el) print(name, " contains ==>", el, " value =...
_cond2, _cond3, _cond4)): return True return False def extra_space_exists(str1: str, str2: str) -> bool: """ Return True if a space shouldn't exist between two items """ ls1, ls2 = len(str1), len(str2) if _extra_space_exists(str1, str2, ls1, ls2): return True # 36010G20 KT _vrb: bool = str1.startswith('VRB'...
# -*- coding: utf-8 -*- # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://ete.cgenomics.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public Li...
###################################################################### # Author: Dr. <NAME> <NAME>, <NAME> # Username: heggens alfarozavalae, jamalie # # Assignment: A08: UPC Barcodes # # Purpose: Determine how to do some basic operations on lists # ######################################################################...
""" Toolbox for simulating compositional data from ScRNA-seq This toolbox provides data generation and modelling solutions for compositional data with different specifications. This data might e.g. come from scRNA-seq experiments. For scenarios 1-4, we first generate composition parameters (b_true, w_true) and a covar...
<filename>ztfquery/sedm.py #! /usr/bin/env python # """ Access SEDM data from pharos """ PHAROS_BASEURL = "http://pharos.caltech.edu" import os import requests import json import numpy as np import pandas import warnings from . import io SEDMLOCAL_BASESOURCE = io.LOCALSOURCE+"SEDM" SEDMLOCALSOURCE = SEDMLOCAL_BASES...
<filename>server.py<gh_stars>1-10 # coding: utf-8 import argparse import json # std from datetime import datetime # web from flask import Flask, render_template, request from flask import jsonify from flask_cors import CORS, cross_origin from flask_frozen import Freezer from flask import Response from flask_htpasswd ...
# -*- coding: utf-8 -*- import os import mab.gd.logging as logging import emcee from numpy import * import numpy import scipy from mab.gd import gdfast_schw from kaplot import * logger = logging.getLogger("gd.schw.solution2") class Dummy(object): pass dummy = Dummy() def lnprob(u): x = exp(u) x /= sum(x) logp =...
execution uncertain_nodes.append(other_node) return uncertain_nodes @staticmethod def _defines_name_raises_or_returns( name: str, handler: nodes.ExceptHandler ) -> bool: """Return True if some child of `handler` defines the name `name`, raises, or returns. """ def _define_raise_or_return(stmt: nodes.NodeNG)...
""" Implements an asynchronous interface for a Frontier Silicon device. For example internet radios from: Medion, Hama, Auna, ... """ import asyncio from asyncio.exceptions import TimeoutError import typing as t import logging from afsapi.exceptions import ( FSApiException, InvalidPinException, InvalidSessionExcep...
j] = 0.125 * np.sum([.5 * G[i-2, j],\ # -1. * G[i-1, j-1], -1. * G[i-1, j+1], \ # -1. * G[i, j-2], 4. * R[i, j-1], 5. * G[i,j], 4. * R[i, j+1], -1. * G[i, j+2], \ # -1. * G[i+1, j-1], -1. * G[i+1, j+1], \ # .5 * G[i+2, j]]) # # # B at Green locations in Red rows # B[i, j] = 0.125 * np.sum([-1. * G[i-2, j], \ # -1. * G[...
zoomed out. # Triplets (rgb) or quadruplets (rgba) of integers 0-255. "zoomed_out_fill_colour": [150, 180, 200, 160], # Time Zone. In hours added to UTC (maybe negative) # Used for rounding off scene times to a date. # 9 is good value for imagery of Australia. "time_zone": 9, # Extent mask function # Determines...
<filename>moirai/webapi/api.py # -*- coding: utf-8; -*- # # Copyright (c) 2016 <NAME> # # 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 r...
for the get_builds method :param value: :type value: :class:`<[Build]> <azure.devops.v5_1.build.models.[Build]>` :param continuation_token: The continuation token to be used to get the next page of results. :type continuation_token: str """ self.value = value self.continuation_token = continuation_token def q...
<reponame>arsh-khokhar/Bayesian-Nets-Fraud-Detection """ File name: Factor.py Author: <NAME>, <NAME> Date last modified: 21 March, 2021 Python Version: 3.8 This script contains the Factor class with necessary utility functions for doing inference using variable elimination or enumeration. """ from enum import I...
#!/usr/bin/env python """ ================================================ ABElectronics Expander Pi Requires smbus2 or python smbus to be installed ================================================ """ from __future__ import absolute_import, division, print_function, \ unicode_literals try: from smbus2 import SMBus...
<gh_stars>1-10 """Provides a class for constructing simulations based on Firedrake. Simulations proceed forward in time by solving a sequence of Initial Boundary Values Problems (IBVP's). Using the Firedrake framework, the PDE's are discretized in space with Finite Elements (FE). The symbolic capabilities of Fired...
filter_obj def apply_options_obj(options, obj, dest): """Updates an object with options Parameters ---------- options : dict * dict containing options definition obj : :class:`taniumpy.object_types.base.BaseType` * TaniumPy object to apply `options` to dest : list of str * list of valid destinations (i.e. `...
s.define(monom + t*t*t) sage: t.define(monom + s*s) sage: [s.coefficient(i) for i in range(9)] [0, 1, 0, 1, 3, 3, 7, 30, 63] sage: [t.coefficient(i) for i in range(9)] [0, 1, 1, 0, 2, 6, 7, 20, 75] Test Recursive 3 :: sage: s = L() sage: s._name = 's' sage: s.define(one+monom*s*s*s) sage: [s.coefficient(i...
import numpy as np import logging import six import loopy as lp import cantera as ct from nose.plugins.attrib import attr from unittest.case import SkipTest from parameterized import parameterized try: from scipy.sparse import csr_matrix, csc_matrix except ImportError: csr_matrix = None csc_matrix = None from pyja...
# Import kivy tools from kivy.app import App from kivy.uix.boxlayout import BoxLayout from kivy.uix.gridlayout import GridLayout from kivy.uix.recycleboxlayout import RecycleBoxLayout from kivy.uix.label import Label from kivy.uix.button import Button from kivy.uix.checkbox import CheckBox from kivy.uix.spinner import ...
import logging import pandas as pd from django.contrib import messages from django.contrib.auth.decorators import login_required, user_passes_test from django.core.exceptions import ObjectDoesNotExist from django.core.paginator import Paginator from django.db.models import Count, Prefetch, Q from django.forms import f...
"NULL", ""] try: schNo = getattr(Parcel,schDistNoField) schNa = getattr(Parcel,schDistField) pinToTest = getattr(Parcel,pinField) year = getattr(Parcel,yearField) if schNo is not None and schNa is not None: '''schNa = schNa.replace("SCHOOL DISTRICT", "").replace("SCHOOL DISTIRCT", "").replac...
r.Link('%(bar)s', 'blah', '%(foo)s') """ self.reset() (built, d) = self.buildRecipe(recipestr2, "TestLink") for p in built: self.updatePkg(self.workDir, p[0], p[1]) a = os.lstat(util.joinPaths(self.workDir, 'foo')) b = os.lstat(util.joinPaths(self.workDir, 'bar')) c = os.lstat(util.joinPaths(self.workDir, 'blah'...
Target Variable for Neural Network - this is the target variable # ## ------------------------------------------------------------------------------------------------------ # In[30]: Declare some functions def setTarget(df, targetVariable): y = df[targetVariable] return y # In[31]: Set target variable y = set...
<reponame>ginking/archimedes-1 # -*- coding: utf-8 -*- # NOTE TRADINGKING IS NOW ALLY PROGRESS AS NORMAL AS INCORPORATED CHANGES IN PLACE from __future__ import unicode_literals from datetime import datetime from datetime import timedelta from holidays import UnitedStates from lxml.etree import Element from lxml.etree...
'CaPjVaQrpyN138TarQ7CYBqBOz0ZF7.png', u'Sport 1 Cz': logobase + 'kCLlfkFz3Ba3BL9Jc9ZPgUKXh2piyv.png', u'Sport 1 LT': logobase + 'nRFc87aOV1vRnjEqmQZUneZe4HiCqn.png', u'Sport 1 Select': logobase + '899pteevSriMFxe4omDA4G6l9i0czY.png', u'Sport 1 Voetbal HD': logobase + '0WEqpl3cqObcLs2J0l5DDhVPZalvXx.png', u'Sport 2...
# standard library import socketserver import logging import threading import time import socket import struct import binascii from uuid import getnode as get_mac # third party # from this package # ####################################### # THE HANDLERS FOR THE ACTUAL CONNECTIONS # #################################...
<filename>main.py<gh_stars>0 #!/usr/bin/env python # If you keep OpenSCAD in an unusual location, uncomment the following line of code and # set it to the full path to the openscad executable. # Note: Windows/python now support forward-slash characters in paths, so please use # those instead of backslashes which creat...
"fit_prior": Categorical([True, False]), "alpha": Real(0, 1, prior='uniform') } }, { "id": 11, "type": "classification", "model": GaussianNB(), "search_space": { "var_smoothing": Real(0, 1, prior='uniform') } }, { "id": 12, "type": "classification", "model": BernoulliNB(), "search_space": { "fit_prio...
freedom] ''') self.assertRaises(PFAException, lambda: engine.action(0.4)) engine, = PFAEngine.fromYaml(''' input: double output: double action: - prob.dist.chi2CDF: [input, -3] #[input, degrees of freedom] ''') self.assertRaises(PFAException, lambda: engine.action(0.4)) engine, = PFAEngine.fromYaml(''' input: do...
<filename>template/plugin/file.py # # The Template-Python distribution is Copyright (C) <NAME> 2007-2008, # derived from the Perl Template Toolkit Copyright (C) 1996-2007 Andy # Wardley. All Rights Reserved. # # The file "LICENSE" at the top level of this source distribution describes # the terms under which this file ...
<reponame>bell-bot/audio_adversarial_examples<filename>datasets.py # -*- coding: future_fstrings -*- import os from re import L from typing import Dict, Tuple import sys import logging import numpy import regex as re # import torchaudio.datasets.tedlium as tedlium import librosa from Data import tedlium_local as ted...
<gh_stars>0 import json import os from django.conf import settings from django.contrib import messages from django.contrib.auth import authenticate, login as li, logout as lo from django.contrib.auth.decorators import login_required, user_passes_test from django.contrib.auth.hashers import make_password from django.co...
import ast from threading import Thread import sys from queue import Queue, Empty from subprocess import Popen, PIPE import time import datetime import traceback class PipeToJava: def __init__(self, headless=True): self.buffer = [] on_posix = 'posix' in sys.builtin_module_names args = ['java', '-jar', '../BotTest...
<filename>scripts/msct_register.py<gh_stars>0 #!/usr/bin/env python ######################################################################################### # Various modules for registration. # # --------------------------------------------------------------------------------------- # Copyright (c) 2015 NeuroPoly, Po...
return self.getErrorItem("Value should be set") value = properties[propertyName] defaultValue = recommendedDefaults[propertyName] if defaultValue is None: return self.getErrorItem("Config's default value can't be null or undefined") if not checkXmxValueFormat(value) and checkXmxValueFormat(defaultValue): # Xmx is...
"""This module tests SyntaxErrors. Here's an example of the sort of thing that is tested. >>> def f(x): ... global x Traceback (most recent call last): SyntaxError: name 'x' is local and global (<doctest test.test_syntax[0]>, line 1) The tests are all raise SyntaxErrors. They were created by checking each C call tha...
library".format(showName), verbosity=self.logVerbosity) currentShowValues = self.SearchTVLibrary(showName = showName) if currentShowValues is None: self._ActionDatabase("INSERT INTO TVLibrary (ShowName) VALUES (?)", (showName, )) showID = self._ActionDatabase("SELECT (ShowID) FROM TVLibrary WHERE ShowName=?", (sh...
<gh_stars>0 from torch_struct import ( CKY, CKY_CRF, DepTree, LinearChain, SemiMarkov, Alignment, deptree_nonproj, deptree_part, ) from torch_struct import ( LogSemiring, CheckpointSemiring, CheckpointShardSemiring, KMaxSemiring, SparseMaxSemiring, MaxSemiring, StdSemiring, EntropySemiring, ) from .exte...
<filename>03_conv_nets/3-1_introduction/lesson_1_37_CNN_for_CIFAR.py ### Convolutional Neural Networks ''' In this notebook, we train a CNN to classify images from the CIFAR-10 database. The images in this database are small color images that fall into one of ten classes; some example images are pictured below. ...
<gh_stars>0 import os import sys import json import copy import mdtraj import numpy as np import time import pandas as pd import pickle import mdtraj as md import multiprocessing as mp try: import cupy as cp cudaExists = True import kernel except ImportError as e: cudaExists = False print("Can't load CuPy, contact...
}, 89: { 'col_and_row': u'D17', 'row': 4, 'col': 17, 'well_id': 89, }, 90: { 'col_and_row': u'D18', 'row': 4, 'col': 18, 'well_id': 90, }, 91: { 'col_and_row': u'D19', 'row': 4, 'col': 19, 'well_id': 91, }, 92: { 'col_and_row': u'D20', 'row': 4, 'col': 20, 'well_id': 92, }, 93: { 'col_and_row'...
yet made a choice.\nThe current line is: " + currentLine) print("Make sure this Dependent section depends upon a Random section, and make sure that Random section must always be visited before this Dependent section.\n") return -26 if chosenSubelement >= myNumChoices: print("\nError! This Dependent section does not...
<reponame>illbebach/Dying-Bullish-Euphoria<gh_stars>1-10 # Program for testing "no new highs lately" or "dying bullish euphoria" (DBE) # strategy. # Author: <NAME> # Date: June 2019 # New to version 2.0 # * Added a ticker price threshold for reentry. When the ticker (index) falls # below a user entered perce...
#!/usr/bin/env python # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012, Cloudscaling # 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.apa...
Task = property(__Task.value, __Task.set, None, None) # Attribute Name uses Python identifier Name __Name = pyxb.binding.content.AttributeUse(pyxb.namespace.ExpandedName(None, u'Name'), 'Name', '__avm_Workflow__Name', pyxb.binding.datatypes.string) __Name._DeclarationLocation = pyxb.utils.utility.Location(u'...
= typeidlist[str(fulldetails["structureTypeID"])] systemName = ESI.getSystemName(geographicinformation, str(fulldetails["solarSystemID"])) regionName = ESI.getRegionName(geographicinformation, str(fulldetails["solarSystemID"])) notifyingMessage = (pinger + " Sovereignty Structure Destroyed - [" + timestamp + "]\n" ...
layer.nshapes == shape[0] assert np.all(layer.data[0] == data[0]) assert layer.ndim == shape[2] assert np.all([s == 'rectangle' for s in layer.shape_type]) # Test (list of rectangles, shape_type) tuple shape = (10, 4, 2) vertices = 20 * np.random.random(shape) data = (vertices, "rectangle") layer = Shapes(data...
user, user_connections in six.iteritems(self.connections[project_id]): if user == '': # do not collect anonymous connections continue for uid, client in six.iteritems(user_connections): if client.examined_at and client.examined_at + project.get("connection_lifetime", 24*365*3600) < now: to_return.add(user) ra...
self.get_index(date1) S2 = self.get_index(date2) print("removing "+str(S1+(self.n_t-S2-1))+" time points") new_datax = self.x[S1:S2+1,:,:] new_datay = self.y[S1:S2+1,:,:] new_dates = self.dates[S1:S2+1] if type(self.mask) == bool: # just return the data because it's not masked new_mask = self.mask else: ...
<gh_stars>0 """ main file to create an index from the the begining """ import json import logging import logging.config import multiprocessing import os import tempfile import uuid from typing import Any, Dict, List, Optional, Tuple, Union, cast import faiss import fire import fsspec import numpy as np import pandas ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ <NAME>, <NAME>, <NAME> Sandia National Laboratories December 12, 2019 Sudoku Board and Cell data structures. """ # import json import uuid import config_data import copy import logging logger = logging.getLogger(__name__) class Cell(): """ A single cell on a Sudo...
using an exec based plugin. :param flocker: Flocker represents a Flocker volume attached to a kubelet's host \ machine and exposed to the pod for its usage. This depends on the Flocker \ control service being running :param gce_persistent_disk: GCEPersistentDisk represents a GCE Disk resource that \ is attached to...
else: result = backtrack(lexerbuf) return result def _sedlex_rnd_152(lexerbuf: lexbuf): result = -1 result = _sedlex_st_61(lexerbuf) return result def _sedlex_rnd_151(lexerbuf: lexbuf): result = -1 result = _sedlex_st_60(lexerbuf) return result def _sedlex_st_59(lexerbuf: lexbuf): result = -1 state_id = _s...
""" The portalpy module for working with the ArcGIS Online and Portal APIs.""" from __future__ import absolute_import import copy import json import imghdr import logging import os import tempfile from .connection import _ArcGISConnection, _normalize_url from .connection import _is_http_url from .connection import _...
Description: 查询os通过当前云 Summary: 查询os通过当前云 """ UtilClient.validate_model(request) return deps_models.QueryBuildpackFindosbycurrentcloudResponse().from_map( self.do_request('1.0', 'antcloud.deps.buildpack.findosbycurrentcloud.query', 'HTTPS', 'POST', f'/gateway.do', TeaCore.to_map(request), headers, runtime) ) as...
osid.resource.ResourceLookupSession.get_resources_by_genus_type # NOTE: This implementation currently ignores plenary view collection = JSONClientValidated('authorization', collection='Authorization', runtime=self._runtime) result = collection.find( dict({'genusTypeId': str(authorization_genus_type)}, **self._vi...
<MappingProjection>` between them, in which supervised learning is used to modify the `matrix <MappingProjection.matrix>` parameter of the `MappingProjections <MappingProjection>` in the sequence, so that the input to the first ProcessingMechanism in the sequence generates an output from the last ProcessingMechanism th...
|_ __ _ __ _ ___ ___ # \___ \| __/ _` |/ _` |/ _ / __| # ___) | || (_| | (_| | __\__ \ # |____/ \__\__,_|\__, |\___|___/ # |___/ # ################################################################################################ @app.route('/workflow/stage', cors=True, methods=['POST'], authorizer=authorizer) def creat...
script example_section_data.append( Code(entries, "\n".join(item.out), ce_status) ) if figname: example_section_data.append(Fig(figname)) else: assert isinstance(item.out, list) example_section_data.append(Text("\n".join(item.out))) # TODO fix this if plt.close not called and still a ligering figure. fig_man...
script will be completely wiped, and replaced with the new one. """ def __init__(self): self.version = 5.0 def check_update(self): """Sends the request to the github repository, and checks to see if the script needs and update.""" print(SquidNet.logo.fget()) print("[+] Checking for updates.....") versio...
are used rule elements. Constant groups et cetera """ @staticmethod def single_position(): """ Single position N. 0...9 for 0...9 A...Z for 10...35 * for max_length - for (max_length - 1) + for (max_length + 1) a...k user-defined numeric variables (with the "v" command) l initial or updated word's length ...
<gh_stars>0 from io import BytesIO import os from collections import OrderedDict from typing import List from pathlib import Path import random from sslib.bzs import parseBzs, buildBzs import nlzss11 from sslib.u8file import U8File from sslib import parseMSB, buildMSB, Patcher, AllPatcher EXTRACT_ROOT_PATH='actual-ex...
{"ExonicFunc_ensGene": ["frameshift_deletion", "frameshift_insertion", "stopgain", "stoploss"]}}, {"terms": {"ExonicFunc_refGene": ["frameshift_deletion", "frameshift_insertion", "stopgain", "stoploss"]}}, {"term": {"Func_ensGene": "splicing"}}, {"term": {"Func_refGene": "splicing"}} ], "minimum_should_match": 1 ...
utilitiesquantumgates import quantumgates from utilitiesquantumgates import utilities from tensorboardutilities import tensorboardutilities from datetime import datetime import time #%% datatypes npdatatype=np.complex64 tfdatatype=tf.complex64 tfrealdatatype=tf.float32 # to use double switch aboe to complex128...
<reponame>meGregV/blpapi-python # service.py """A service which provides access to API data (provide or consume). All API data is associated with a 'Service'. A service object is obtained from a Session and contains zero or more 'Operations'. A service can be a provider service (can generate API data) or a consumer s...
True: return ( 65739, # {U_io_bind1} None, None, None, _idris_Python_46_Prim_46_next(None, e8), (65753, e10, e9, e8) # {U_{Python.Prim.iterate:iter:0_lam5}1} ) # Prelude.List.reverse, reverse' def _idris_Prelude_46_List_46_reverse_58_reverse_39__58_0(e0, e1, e2): while True: if e2: # Prelude.List.:: in0, in...
# 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 Apache License, Version 2.0 (the # "License"); you may not use...
from django.apps import apps from django.contrib.auth.management import create_permissions from project import settings # def post_migrate_create_organization(sender, **kwargs): # for app_config in apps.get_app_configs(): # create_permissions(app_config, apps=apps, verbosity=0) # # Organization = sender.get_model("Or...
= getResultPercentage(testSetData) resultSet.append(["Condition (Multi Agent Attributes)", testSetPercentage, copy.deepcopy(testSetData)]) #Creating source metamemes via the script facade testSetData = testSourceCreateMeme('SourceCreateMeme.atest') testSetPercentage = getResultPercentage(testSetData) resultSet.a...
102, 195, 251, 219, 219, 126, 60], 9718: [60, 102, 195, 223, 219, 219, 126, 60], 9719: [60, 126, 219, 219, 223, 195, 102, 60], 9720: [255, 198, 204, 216, 240, 224, 192, 128], 9721: [255, 99, 51, 27, 15, 7, 3, 1], 9722: [1, 3, 7, 15, 27, 51, 99, 255], 9723: [0, 124, 108, 108, 108, 124, 0, 0], 9724: [0, 124, 124, ...
import copy import datetime import logging from dataclasses import dataclass from enum import Enum from typing import Dict, List, Sized, Callable from googleapiwrapper.gmail_api import ThreadQueryResults from pythoncommons.file_utils import FileUtils from pythoncommons.html_utils import HtmlGenerator from pythoncommon...
- ans) / S print 'Case #%s: %.16f' % (test + 1, ans) infile.close() return s def func_aafe1dd3eefe46588c6a04ec53f17d6d(infile): for test in range(int(infile.readline())): N, p, q, r, s = map(int, infile.readline().split()) D = [((i * p + q) % r + s) for i in range(N)] S = sum(D) ans = S A, B, C = 0, 0, S a ...
kmeans.cluster_centers_ else: return None, None def _log_interesting_stats(self, stats): """ # Provide interesting insights about the data to the user and send them to the logging server in order for it to generate charts :param stats: The stats extracted up until this point for all columns """ for col_name i...
@param **kw Further keyword arguments are used in case of ``algo==proper_x_dist`` and are supplied to the x_distance() method calls. """ if algo == 'circumference': f = self.circumference elif algo in ('coord', 'proper_x_dist'): f = lambda param: self(param)[0] else: raise ValueError("Unknown algorithm: %s" %...
#!/usr/bin/env python """ Copyright (c) 2016, <NAME> All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions an...
(1 - alpha) x = ts.to_numpy()[:i + 1] ema = sum(weights * x) / sum(weights) debias_fact = sum(weights) ** 2 / (sum(weights) ** 2 - sum(weights ** 2)) var = debias_fact * sum(weights * (x - ema) ** 2) / sum(weights) std[i] = np.sqrt(var) std[0] = np.NaN return std dates = [ date(2019, 1, 1), date(2019, 1, 2),...
True) self.update_treestore.set_value(iter, 1, sepolicy.boolean_desc(bools)) self.update_treestore.set_value(iter, 2, action[self.cur_dict["boolean"][bools]['active']]) self.update_treestore.set_value(iter, 3, True) niter = self.update_treestore.append(iter) self.update_treestore.set_value(niter, 1, (_("SELinux na...
import keras from keras.models import Sequential, Model, load_model from keras.layers import Dense, Dropout, Activation, Flatten, Input, Lambda from keras.layers import Conv2D, MaxPooling2D, BatchNormalization, Concatenate, Reshape, Softmax from keras import backend as K import keras.losses import os import pickle...
stc.StyleSetSpec(wx.stc.STC_P_STRING, "fore:%(strfg)s,face:%(mono)s" % faces) stc.StyleSetSpec(wx.stc.STC_P_CHARACTER, "fore:%(strfg)s,face:%(mono)s" % faces) stc.StyleSetSpec(wx.stc.STC_P_WORD, "fore:%(keywordfg)s,bold" % faces) stc.StyleSetSpec(wx.stc.STC_P_TRIPLE, "fore:%(q3sfg)s" % faces) stc.StyleSetSpec(wx.st...
REM @ider def _get_all_{tbl}_rowids({self}): r""" all_{tbl}_rowids <- {tbl}.get_all_rowids() Returns: list_ (list): unfiltered {tbl}_rowids TemplateInfo: Tider_all_rowids tbl = {tbl} Example: >>> # ENABLE_DOCTEST >>> from {autogen_modname} import * # NOQA >>> {self}, config2_ = testdata_{autogen_key}() >...