input
stringlengths
2.65k
237k
output
stringclasses
1 value
frlig.close() countp = countp + 1 else: continue f.close() # make inputfile for foldx4 with mutchain for calculating folding free energy def inputfoldx(): os.chdir(path) f = open(in_file + ".cleaned", 'r') f.next() for line in f: ff = line.split("\t") mut = ff[11][:-1] # GA9A pdb = ff[8] # 1A43 with open(...
backend service is used by a urlMap. response = backends.delete(project=args.project, backendService=name).execute() logging.info("response = %r", response) expired.append(name) except Exception as e: # pylint: disable=broad-except logging.error(e) in_use.append(name) else: unexpired.append(name) if not "nex...
"2013-12-11T22:14:00Z", }, { "id": "MnePSAXVEeiR2Ef5_SqrnA", "created": "2013-12-13T00:17:53Z", "updated": "2013-12-13T00:17:53Z", }, { "id": "M2eSpAXVEeimGd_D5lc7_g", "created": "2013-12-13T01:01:20Z", "updated": "2013-12-13T01:01:20Z", }, { "id": "NCbIXgXVEei-YvOb79ehXg", "created": "2013-12-14T03:20:48...
storage[ name ] = h info( newline( '=== Added local host', h ) ) return h def add_remote_host( self, name, user, server, **params ): """ Adds a new remote host to the current topology and returns a RemoteHostConfig object representing it. - name : a textual representation of the host - user : the name of the ...
method we need # to call to hide various head parts fix = None # load the appropriate file if (headStyle == "dls"): # dog, long head, short muzzle filePrefix = HeadDict["dls"] headHeight = 0.75 elif (headStyle == "dss"): # dog, short head, short muzzle filePrefix = HeadDict["dss"] headHeight = 0.5 elif (he...
from sotd_indicators.indicators import * from arcgis.gis import GIS from arcgis.geometry import Geometry, filters import configparser import time import datetime import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context class Indicator: def __init__(self): # GIS Resources self...
= dict() container.update({ "name": f"{key} {datetime.utcnow().strftime(GC_DATE_FORMAT)}", "artifacts": artifacts }) ret_val, message, cid = self.save_container(container) self.debug_print(f"save_container (with artifacts) returns, value: {ret_val}, reason: {message}, id: {cid}") return ret_val, message, cid ...
in view_clades.') messages.error(request, 'Sorry, the server had problems ' 'updating at least on clade: %s' % e) # Updating language clade relations for changed clades: if cladeChanged: updateLanguageCladeRelations() # Adding a new clade: elif 'addClade' in request.POST: cladeCreationForm = CladeCreationForm(r...
"""Abstract classes.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import copy import yaml import random import subprocess import numpy as np import tensorflow as tf from tensorflow.contrib.tensorboard.plugins import projector from tensorflo...
= None, transcript_id: Optional[str] = None, transcript_symbol: Optional[str] = None, transcript_type: Optional[Biotype] = None, sequence_guid: Optional[UUID] = None, sequence_name: Optional[str] = None, protein_id: Optional[str] = None, product: Optional[str] = None, guid: Optional[UUID] = None, transcript_gu...
if U.type=='oper': U=Ucorrection*U inner = U.dag()*U_target part_idx = [0, 1, 3, 4] # only computational subspace ptrace = 0 for i in part_idx: ptrace += inner[i, i] dim = 4 # 2 qubits comp subspace return np.real(((np.abs(ptrace))**2+dim*(1-L1))/(dim*(dim+1))) elif U.type=='super': U=qtp.to_super(Ucorrect...
<filename>file_knowledge/process/knowledge_extraction_sample.py # coding=utf-8 """ @ license: Apache Licence @ github: invoker4zoo @ author: invoker/cc @ wechart: whatshowlove @ software: PyCharm @ file: knowledge_extraction_sample.py @ time: $18-9-21 下午3:23 """ import thulac import os import sys sys.path.append('..')...
<gh_stars>10-100 #!/user/bin/env python '''interaction_extractor.py This class creates dataset of ligand - macromolecule and macromolecule - macromolecule interaction information. Criteria to select interactions are specified by the InteractionFilter. ''' __author__ = "<NAME>" __version__ = "0.3.0" __status__ = "expe...
_host_index (int/None): specifies the index of the server that we want to use. Default is read from the configuration. async_req (bool): execute request asynchronously Returns: [IamActor] If the method is called asynchronously, returns the request thread. """ kwargs['async_req'] = kwargs.get( 'async_req', Fa...
""" Import as: import oms.broker as ombroker """ import abc import collections import logging from typing import Any, Dict, List, Optional, Tuple, cast import pandas as pd import helpers.hasyncio as hasynci import helpers.hdbg as hdbg import helpers.hsql as hsql import market_data as mdata import oms.oms_db as ooms...
import numpy as np from scipy.linalg import block_diag import math class rJoint: def __init__(self, alpha, a, theta, d, type, inertia, m, r): self.alpha = alpha self.a = a self.theta = theta self.d = d self.type = type self.inertia = inertia self.m = m self.r = r class cartesian: def __init__(self, x, y, z...
<reponame>chanul13/EDMFTF<filename>src/python/sjoin.py<gh_stars>1-10 #!/usr/bin/env python import utils,indmffile,sys,re,os import optparse from scipy import * import numpy nv = map(int,numpy.__version__.split('.')) if (nv[0],nv[1]) < (1,6): loadtxt = io.read_array def savetxt(filename, data): io.write_array(filen...
import base64 import os import re import urllib.request import xml.etree.ElementTree as ET from datetime import datetime from io import StringIO, BytesIO import requests from lxml import etree import base.utils as utils_module from base.models import WPS, Task, InputOutput, Artefact, Process, STATUS, Workflow, Edge f...
reader = csv.reader(csvfile, delimiter=self._separator) heads = next(reader) # find index of each target field name idx_cols = field2idx(cols, heads) assert len(idx_cols) == len(cols), \ "one or more field names are not found in {}".format(self._input) cols = idx_cols else: reader = csv.reader(csvfile, delimit...
<reponame>moble/mktheapidocs import inspect, os, pathlib, importlib, black, re, click, enum from numpydoc.docscrape import NumpyDocString, FunctionDoc, ClassDoc from functools import cmp_to_key def get_line(thing): """ Get the line number for something. Parameters ---------- thing : function, class, module Ret...
self.d1 = self.d_val_lead_aborp[self.energy_count] self.b2 = self.b_val_tun_aborp[self.energy_count] self.c2 = self.c_val_tun_aborp[self.energy_count] self.a2 = self.a_val_tun_aborp[self.energy_count] self.xk2 = self.Xk_val_tun_aborp[self.energy_count] self.d2 = self.d_val_tun_aborp[self.energy_count] s...
import collections import itertools import json from pathlib import Path import re import sqlite3 import string import attr import nltk import numpy as np def clamp(value, abs_max): value = max(-abs_max, value) value = min(abs_max, value) return value def to_dict_with_sorted_values(d, key=None): return {k: sor...
#!/usr/bin/python import time import smbus # =========================================================================== # ST_VL6180x ToF ranger Class # # Originally written by <NAME> # References Arduino library by <NAME> of SparkFun: # https://github.com/sparkfun/ToF_Range_Finder-VL6180_Library\ # =================...
# Copyright INRIM (https://www.inrim.eu) # See LICENSE file for full licensing details. import sys from typing import Optional from fastapi import FastAPI, Request, Header, HTTPException, Depends, Form from fastapi.responses import RedirectResponse, JSONResponse from .ContentService import ContentService from .main.bas...
# # BitBake Toaster Implementation # # Copyright (C) 2016 Intel Corporation # # SPDX-License-Identifier: GPL-2.0-only # # Please run flake8 on this file before sending patches import os import re import logging import json import subprocess from collections import Counter from shutil import copyfile from orm.models i...
<filename>nasws/cnn/policy/cnn_general_search_policies.py<gh_stars>1-10 # ======================================================== # CONFIDENTIAL - Under development # ======================================================== # Author: <NAME> with email <EMAIL> # All Rights Reserved. # Last modified: 2019/11/27 下午12:05 ...
# Copyright 2016 The TensorFlow 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 applicable ...
#!/usr/bin/env python import pygtk pygtk.require('2.0') import gtk import os, sys import time import cairo import igraph from gtk import gdk from util import * import logs from math import * import custom from visual import * import matplotlib.pyplot as plt import numpy as np import micavis.ipython as ipython import ...
9, 10, 11, f1_gyro_x, f1_gyro_y, f1_gyro_z, # 12, 13, 14, f2_gyro_x, f2_gyro_y, f2_gyro_z, # 15, 16, 17, f3_gyro_x, f3_gyro_y, f3_gyro_z, # 18, 19, 20, f1_state_position, f1_state_speed, f1_state_effort, # 21, 22, 23, f2_state_position, f2_state_speed, f2_state_effort, # 24, 25, 26, f3_state_position, f3_state_sp...
temperature sensor", [636]), }, "CartilaginousAndOsseousChange": { "111309": ("Cartilaginous and osseous change", [6030, 6033]), }, "CaseSensitivity": { "111088": ("Case Sensitivity", [6048]), }, "CaseSpecificity": { "111090": ("Case Specificity", [6048]), }, "CassetteBasedProjectionRadiographySystem": { "1...
""" General components. """ # Copyright (c) 2019 <NAME>. All rights reserved. from typing import Tuple, List, Union, Callable import numpy as np import trimesh from modeling import util from modeling.types import Point3, Vec3, Verts2D, Verts, Faces, Mesh, MeshExtended def surface_revolution( xy_points: np.ndar...
<reponame>vsevolodpohvalenko/home-assistant """Click-based interface for Songpal.""" import ast import asyncio import json import logging import sys from functools import update_wrapper import click from songpal import Device, SongpalException from songpal.common import ProtocolType from songpal.containers import Set...
mp.get_hist_n_bins(fh,i) self.hist_list[-1].n_events = mp.get_hist_n_events(fh,i) self.hist_list[-1].fs_per_bin = mp.get_hist_fs_per_bin(fh,i) self.hist_list[-1].s_per_bin = mp.get_hist_sec_per_bin(fh,i) self.hist_list[-1].t0_ps = mp.get_hist_t0_ps(fh,i) self.hist_list[-1].t0_bin = mp.get_hist_t0_bin(fh,i) se...
<gh_stars>1-10 from collections import Counter import getopt import math import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages import numpy as np import os import pandas as pd import scipy.stats import statsmodels.api as sm import statsmodels.formula.api as smf import sys def get_codes(...
<gh_stars>10-100 #!/usr/bin/env python3 # -*- coding: utf-8 -*- # # # Copyright © 2018 Dell Inc. or its subsidiaries. All rights reserved. # Dell, EMC, and other trademarks are trademarks of Dell Inc. or its subsidiaries. # Other trademarks may be trademarks of their respective owners. # # Licensed under the Ap...
mod, typ, name, default = match.groups() return mod, typ.strip(), name.strip(), default def get_index_text(self, sig, name, typ): rname = '{} (C# {})->{}'.format(name, _('variable'), typ) return rname def get_obj_name(self, sig): _, typ, name, _ = self.parse_signature(sig) return name, typ class CSharpProper...
# -*- coding: utf-8 -*- """ Created on Tue May 24 20:20:03 2022 @author: d4kro """ #%%-----------0. loading package----------------------------------------------- import pandas as pd import numpy as np import scipy.sparse import matplotlib.pyplot as plt from sklearn import preprocessing from sklearn....
<filename>ipvs.py # Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. """IPV...
<filename>strax/storage/common.py """Base classes for storage backends, frontends, and savers in strax. Please see the developer documentation for more details on strax' storage hierarchy. """ from ast import literal_eval from concurrent.futures import wait import logging from packaging import version import time impo...
<filename>cnosolar/gui_config.py ############################### # CONFIGURATION GUI # ############################### import json import pytz import pvlib import requests import traitlets import numpy as np import pandas as pd import ipywidgets as widgets from tkinter import Tk, filedialog from IPython.display import...
<filename>extensions/aria_extension_tosca/simple_v1_0/functions.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 t...
contain a valid structure: {}".format(self.job_name) ) def db_entry(self): """ Generate the initial database entry Returns: (dict): db_dict """ db_dict = super(AtomisticGenericJob, self).db_entry() if self.structure: if isinstance(self.structure, Atoms): parent_structure = self.structure.get_parent_basis()...
f: f.write(content) except Exception as e: LOGERR(e) def format_json(resultset, single_record=False, field_filter=0): """Return results in JSON format. Parameters ---------- resultset : list Search results from DB query. single_record : bool, optional If True, indicates only one record. Default is False. ...
specified axis(es). Equivalent to CAReduce(scalar.and_, axis=axis) """ def __init__(self, axis=None): CAReduce.__init__(self, scalar.and_, axis) def _output_dtype(self, idtype): return "int8" def __str__(self): if self.axis is None: return "All" else: return "All{%s}" % ", ".join(map(str, self.axis)) de...
on channel 2 computed from CAL1. CS_l1b_mds['Data']['R_inst_range'] = np.ma.zeros((n_records,n_blocks),dtype=np.int32) # Instrument Gain Correction: transmit-receive antenna (dB/100) # Calibration correction to gain on channel 1 computed from CAL1 CS_l1b_mds['Data']['TR_inst_gain'] = np.ma.zeros((n_records,n_blocks...
""" This module module provides functionality to load data from a container into memory in chunks. """ import gc import random import numpy as np import audiomate from audiomate import containers from audiomate.utils import units class PartitioningContainerLoader: """ Load data from one or more containers in par...
args): """ Enable a host """ host = client.hosts.perform_action(args.id, 'disable') utils.print_dict(host) @utils.arg('id', metavar='<HOST_ID>', help='ID of host to delete') def do_host_delete(client, args): """ Delete a host """ host = client.hosts.delete(args.id) utils.print_dict(host) @utils.arg('id', meta...
mod_node = helper.make_node("Mod", inputs=["x", "y"], outputs=["z"], fmod=fmod) onnx_dtype = TensorProto.FLOAT if dtype == "float32" else TensorProto.INT32 graph = helper.make_graph([mod_node], "mod_test", inputs=[helper.make_tensor_value_info("x", onnx_dtype, list(x_shape)), helper.make_tensor_value_info("y"...
createInstance(clazz, instance_creator) self._pyroInstances[clazz] = instance return instance elif instance_mode == "session": # Create and use one instance for this proxy connection # the instances are kept on the connection object. # (this is the default instance mode when using new style @expose) instance = c...
= 73 self._errHandler.sync(self) la_ = self._interp.adaptivePredict(self._input,0,self._ctx) if la_ == 1: self.state = 70 self.declare_note() pass elif la_ == 2: self.state = 71 self.declare_chord() pass elif la_ == 3: self.state = 72 self.declare_melody() pass self.state = 77 self._errHandler.sync...
""" Integration test for a battery+motor example that demonstrates phase branching in trajectories. """ from __future__ import print_function, division, absolute_import import os import unittest from openmdao.api import Problem, pyOptSparseDriver, ScipyOptimizeDriver, DirectSolver from openmdao.utils.assert_utils imp...
## ## Name: test_scrubby.py ## Purpose: Unit tests for scrubby.py ## ## Copyright (C) 2009, <NAME>, All Rights Reserved. ## import scrubby as S import unittest, functools # {{ class test_scanner class test_scanner(unittest.TestCase): """Low-level tests for the markup_scanner class. Only tests the internal methods;...
""" lipydomics/stats.py <NAME> 2019/02/03 description: A set of functions for performing statistical analyses on the lipidomics data. Generally, these functions should produce one or more columns to associate with the data, as well as a label describing the analysis performed (what groupings are used, normaliz...
pool to be deleted. The parameter must be an identifier for the resource type: ``ResourcePool``. :raise: :class:`com.vmware.vapi.std.errors_client.Error` If the system reports an error while responding to the request. :raise: :class:`com.vmware.vapi.std.errors_client.NotFound` If the resource pool is not found....
"http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897419630.htm", "short": "Prefetch Memory (immediate)", }, { "instr": "PRFM", "link": "http://www.keil.com/support/man/docs/armclang_asm/armclang_asm_pge1427897420050.htm", "short": "Prefetch Memory (literal)", }, { "instr": "PRFM", "link"...
dict2.get(key, default2)) for key in keys3} return dict3 def dict_accum(*dict_list): accumulator = defaultdict(list) for dict_ in dict_list: for key, val in dict_.items(): accumulator[key].append(val) return accumulator dict_isect = dict_intersection def dict_filter_nones(dict_): r""" Removes None values ...
<gh_stars>10-100 # -*- coding: utf-8 -*- import mock from mock import call, sentinel, ANY import odooly from ._common import XmlRpcTestCase, OBJ AUTH = sentinel.AUTH ID1, ID2 = 4001, 4002 STABLE = ['uninstallable', 'uninstalled', 'installed'] def _skip_test(test_case): pass def imm(method, *params): return ('ob...
278222430, 72996, -61288, 278280917, 73004, -1, 278342495, 72966, 278532263, 274501173, -1, 278597798, 278489215, -1, 278663327, 278531857, -1, -61283, 278628503, 73023, -61282, 278675549, 73020, -1, 278728465, 73009, 278925473, 278628503, 73012, -1, 278890647, 73013, 279056547, 2788721...
self.NextName('log'), shape=[], values=[msg_or_blob]) else: blob = msg_or_blob self.Print(blob, []) def add_attribute(self, name, obj): """ Add `obj` to the list of attributes in this net under the given `name`. Attributes are user-defined objects and have no pre-defined semantics. """ self._attr_dict[name]....
if data_trend_df.empty: trend_ret_list = [] else: trend_ret_list = score_trend_pandas_groupby(data_trend_df, filter_dataset_dict, score_type) return Response( { "score_trend": trend_ret_list, "level_distribution": { "x": x, "y": bin_result_list, "z": z, "sum_count": sum_count, }, } ) class LevelDistribu...
"""Command line interface for osxphotos """ import csv import datetime import json import os import os.path import pathlib import pprint import sys import time import unicodedata import click import osxmetadata import yaml import osxphotos from ._constants import ( _EXIF_TOOL_URL, _OSXPHOTOS_NONE_SENTINEL, _PHOT...
from collections import OrderedDict import itertools from typing import Any, Generator, List, Optional, Type from typing import OrderedDict as ODict # Prevent naming conflicts import bpy.types from bpy.props import * from nodeitems_utils import NodeItem from arm.logicnode.arm_sockets import ArmCustomSocket import arm...
then should new joins be allowed. Args: roomNum (int): Index in request[rooms] for target room. seatNum (int): Target seat number. """ roomNum = int(roomNum) # Arg `roomNum` is sent as unicode from browser room = self.getRoomByNumber(roomNum) if room is None: self.emit('err', 'That room does not exist.') r...
The protocol returned by `protocol_factory`. Raises ------ ValueError - If `server_host_name` parameter is given, but `ssl` isn't. - If `ssl` parameter is given, but `server_host_name` is not. - If `socket`'s is not an unix domain stream socket. NotImplementedError Not supported on windows by the library. ""...
], service_endpoint=self.context.settings.get( "default_endpoint") ) ], ) # Create create-did message create_did_message = CreateDIDMessage( from_did=from_did.did, to_did=to_did.did, created_time=round(time.time() * 1000), body=did_doc ) # Sign did doc using local did verkey to prove ownership await cr...
container self.blocks = None def reset(self): """set data to initial form""" # current question id, id is blockname::qname self.question_id = None # current question name within that block self.qname = None # qform the questions get saved in self.qform = None # current concrete question container self.concr...
<gh_stars>0 # -*- coding: utf-8 -*- from __future__ import unicode_literals import os import pdfkit import logging from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.db.models import Q from django import forms from django.forms import ModelForm from entidades.model...
<gh_stars>0 import os import pytest from boltons.dictutils import OMD from boltons.iterutils import (first, remap, research, default_enter, default_exit, get_path) from boltons.namedutils import namedtuple CUR_PATH = os.path.abspath(__file__) isbool = lambda x: isinstance(x, bool) isint = lambda x: isinstance...
Provide an alternate name for the status code in the response body which can vary between services due to the spec still being in draft. The default is `b"statusCode"`. :type status_code_field: bytes or str :param description_fields: Provide an alternate name for the description in the response body which can vary...
instancecreated + [Instance.InstanceName] # # # # Instance.ReadFromFile("01", "Lumpy", 2, 25, e="n", rk=50, leadtimestructure=0, lostsale=20, capacity= 5, longtimehoizon = True ) # Instance.SaveCompleteInstanceInExelFile() # instancecreated = instancecreated + [Instance.InstanceName] # # # # Instance.ReadFromFile...
<gh_stars>0 #!/usr/bin/env python # vim: set fileencoding=utf-8 : # # Check the location of hot pixels in NRES images. This simple test will # help identify readout problems with nres01. # # <NAME> # Created: 2017-08-11 # Last modified: 2017-08-13 #-----------------------------------------------------------------------...
<filename>dash_docs/chapters/dash_datatable/width/index.py<gh_stars>100-1000 from collections import OrderedDict import dash_core_components as dcc import dash_html_components as html import pandas as pd import dash_table from dash_docs import reusable_components as rc from dash_docs import datasets Display = rc.Crea...
<reponame>shamimmamun/qosftask4<filename>qosftask4.py #!/usr/bin/env python # coding: utf-8 # In[2]: import numpy as np from qiskit.circuit import QuantumCircuit from qiskit.circuit.library import TGate, HGate, TdgGate,SGate from qiskit.converters import circuit_to_dag, dag_to_circuit from qiskit.transpiler.passes.s...
import copy import os import re import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import shutil import time import replica_status_test from . import session from . import settings from .. import lib from .. import test from ..configuration import IrodsConfig from .resource_...
<reponame>industrial-optimization-group/offline_data_driven_moea import numpy as np import pickle import os from joblib import Parallel, delayed import matplotlib.pyplot as plt import csv from IGD_calc import igd, igd_plus from non_domx import ndx from pygmo import hypervolume as hv from scipy import stats from mpl_too...
open(l, "a+") as f: f.write(vector_information) os.chdir(cwd) def we_analysis(): """ Runs short MD simulation for saved inpcrd files. """ cwd = os.getcwd() os.chdir(cwd + "/" + "westpa_dir") dir_list = [ "dihedral_threshold_lower", "dihedral_threshold_upper", "dual_threshold_lower", "dual_threshold_up...
#!/usr/bin/env python # -*- coding: utf-8 -*- from google.appengine.ext import ndb from google.appengine.api import users from google.appengine.api import memcache import datetime import calendar import pickle import json import logging import bulbware_lib import user_model class BulbwareProject(ndb.Model): app_na...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'verbose_libraries_build%': 0, 'instrumented_libraries_jobs%': 1, 'instrumented_libraries_cc%': '<!(cd <(DEPTH) && pwd -P)/<(make_clang_...
per_channel=0.5) seen = [0, 0] for _ in sm.xrange(200): observed = aug.augment_image(np.zeros((1, 1, 100), dtype=np.uint8)) uq = np.unique(observed) if len(uq) == 1: seen[0] += 1 elif len(uq) > 1: seen[1] += 1 else: assert False assert 100 - 50 < seen[0] < 100 + 50 assert 100 - 50 < seen[1] < 100 + 50 def...
import ast import logging from re import template import warnings import numpy as np import pandas as pd from idaes.core import FlowsheetBlock from idaes.core.util.model_statistics import degrees_of_freedom import os from pyomo.environ import Var, Expression, NonNegativeReals, Block, ConcreteModel, Constraint, Objecti...
from __future__ import print_function from __future__ import division from __future__ import absolute_import import os import json import shutil from crds.bestrefs import BestrefsScript from crds.tests import test_config """ Bestrefs has a number of command line parameters which make it operate in different modes. ...
<reponame>alexchartier/digital_rf #!python # ---------------------------------------------------------------------------- # Copyright (c) 2017 Massachusetts Institute of Technology (MIT) # All rights reserved. # # Distributed under the terms of the BSD 3-clause license. # # The full license is in the LICENSE file, dist...
import pandas as pd import numpy as np import dash import dash_core_components as dcc import dash_html_components as html import dash_table as dt from dash.dependencies import Input, Output, State import plotly.graph_objects as go import plotly.express as px import datetime external_stylesheets = ['https://codepen.io...
<filename>evoMPS/tdvp_gen.py # -*- coding: utf-8 -*- """ Created on Thu Oct 13 17:29:27 2011 @author: <NAME> TODO: - Adaptive step size. """ from __future__ import absolute_import, division, print_function import copy as cp import scipy as sp import scipy.linalg as la import scipy.optimize as opti import scipy.spa...
import datetime import time import csv from operator import attrgetter from django.db.models import Q from django.http import Http404 from django.views.generic import list_detail from django.http import HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.core.urlresolver...
<filename>poc-hostapd/pub_api.py<gh_stars>10-100 """ pub_api.py """ from lib import * log.setLevel(logging.DEBUG) NC_PT_TYPES = [ # NOTE: encrypted 'eka', 'ewd', 'eha', 'esh', 'esh2', 'ewl', 'pay', 'pay2', # NOTE: not encrypted 'kep1', 'kep2', 'kep3', 'kep4', 'iw', ] class RemoteAdvertiser: """ Used ...
vegan.summary_simper(simper_ret) species_stats = self._generate_species_stats(df, simper_ret, grouping_names) report_output = self._generate_simper_report(workspace_id, simper_ret, simper_sum, species_stats, grouping_names) return report_output def perform_rarefy(self, params): logging.info('Start performing ...
# not accounting for scr refresh text_10.frameNStop = frameN # exact frame index win.timeOnFlip(text_10, 'tStopRefresh') # time at next scr refresh text_10.setAutoDraw(False) # check for quit (typically the Esc key) if endExpNow or defaultKeyboard.getKeys(keyList=["escape"]): core.quit() # check if ...
<gh_stars>1-10 import argparse import math import os import pickle import random import sys import numpy as np import torch import torch.backends.cudnn as cudnn from torch import nn from torch.optim import lr_scheduler from torch.utils import data import torchvision.transforms as transforms import transforms as exten...
Professional Experience found': 'ကြ်မ္းက်င္မႈအေတြ႕အၾကံဳမေတြ႕ရွိေသးပါ', 'No Profiles currently have Configurations for this Layer': 'ဤအလႊာအတြက္သီးသန္႔စီစဥ္ထားသည့္အညႊန္းမရွိေသးပါ', 'No Projections currently defined': 'လက္ရွိသတ္မွတ္ထားသည့္ ခန္႔မွန္းေျခမ်ားမရွိေသးပါ', 'No Ratings for Skill Type': 'ကြ်မ္းက်င္မႈစံနႈန္းအမ်ိဳး...
import six import os import contextlib import eventlet import ConfigParser from collections import OrderedDict import psutil import mysql.connector from simpleutil.log import log as logging from simpleutil.config import cfg from simpleutil.utils import systemutils import goperation from gopdb import common from gopd...
""" XPath selectors based on lxml """ import sys import six from lxml import etree, html from .utils import flatten, iflatten, extract_regex, shorten from .csstranslator import HTMLTranslator, GenericTranslator class CannotRemoveElementWithoutRoot(Exception): pass class CannotRemoveElementWithoutParent(Exceptio...
) > 0: joint_grp = self.am.find_node( char, 'Joint_Grp' ) or [ ] joints = mc.listRelatives( joint_grp, c = True, ad = True, typ = 'joint' ) attrs = [ 'controlSize', 'controlSizeX', 'controlSizeY', 'controlSizeZ', 'controlOffset', 'controlOffsetX', 'controlOffsetY', 'controlOffsetZ' ] for handle in handles: ...
import sys import multiprocessing as mp import numpy as np import time import os from rllab.algos.base import RLAlgorithm import rllab.misc.logger as logger import rllab.plotter as plotter from rllab.misc import ext from sandbox.ex2.parallel_trpo.sampler import WorkerBatchSampler from sandbox.ex2.parallel_trpo.simple_...
* ``Vh``: (if ``full == True``) the Arnoldi basis with ``Vh.shape == (N, n+d-k)``. * ``F``: (if ``full == True``) the perturbation matrix :math:`F=-Z\hat{R}\hat{V}_n^* - \hat{V}_n\hat{R}^*Z^*`. """ n = self.n n_ = self.n_ d = self.d k = Wt.shape[1] # get orthonormal basis of Wt and Wt^\perp if k > 0: Wto, _...
<filename>code_artyom/unet_17_depth_coord.py #!/usr/bin/python3.6 import os, pickle, random, subprocess, sys from typing import Any import numpy as np, pandas as pd from sklearn.model_selection import StratifiedKFold from tqdm import tqdm from skimage.io import imread, imshow from skimage.transform import resize f...
load("//ocaml:providers.bzl", "OcamlArchiveProvider", "OcamlImportProvider", "OcamlSignatureProvider", "OcamlLibraryProvider", "OcamlModuleProvider", "OcamlNsArchiveProvider", "OcamlNsLibraryProvider", "OcamlNsResolverProvider", "PpxArchiveProvider", "PpxExecutableProvider", "PpxLibraryProvider", "PpxModule...
""" model selection: trains models that classify birdsong syllables, using algorithms and other parameters specified in config file """ # from standard library import os import copy # from dependencies import numpy as np from sklearn.preprocessing import StandardScaler from sklearn.metrics import accuracy_score from ...
# -*- coding: utf-8 -*- """ Created on Mon Sep 17 14:32:52 2018 @author: <NAME> Decision level ensemble classifiers of base GFMM-AGGLO-2 DecisionLevelEnsembleClassifier(numClassifier, numFold, gamma, teta, bthres, simil, sing, oper, isNorm, norm_range) INPUT numClassifier The number of classifiers numFold The n...
<filename>matrix_calc_201128.py #!/usr/bin/env python3 # -*- coding: utf-8 -*- # File name: matrix_calc.py """ Created on Thu May 7 20:56:54 2020 @author: Neo(<EMAIL>) Some codes for calculating various matrix & array needed in the LSQ preocess. The normal equation is writtern as A * x = b where A is the normal mat...