input
stringlengths
2.65k
237k
output
stringclasses
1 value
<gh_stars>10-100 from matplotlib import pyplot as plt from numpy import arange max = 40 size = list(range(1, max + 1)) bellon_t1 = [0.48506527797917526, 0.539530414354991, 0.562222514659963, 0.5609855410602803, 0.5630940004565627, 0.5660941266116702, 0.5628153328347215, 0.5638083537539417, 0.566130467884174, 0.5669...
""" Market Data Provider. This module contains implementations of the DataProvider abstract class, which defines methods by which market information can be requested and presented. """ from abc import abstractmethod from io import StringIO import os import pathlib import time from typing import Any, Dict import pand...
""" FILES IN PACKAGE: snn-stdp.py get-networks-accuracy.py read-pkl-spikes.py iris-train.txt iris-test.txt README.md Files generated after training: results/input.pkl results/output.pkl Files generated after testing: results/inputTest.pkl results/outputTest.pkl Author: <NAME> Supervisor: Professor Dr. <NAME> (https:...
<reponame>windskyer/k_nova # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # ================================================================= # ================================================================= """ IBM PowerVM VLAN VIF driver - IVM implementation. IBMPowerVMVlanVIFDriver is a IBM PowerVM based VIF dr...
<filename>tensorflow_federated/python/core/impl/types/type_conversions.py # Copyright 2018, The TensorFlow Federated Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.ap...
<reponame>landdafku11/CogAlg import os import cv2 import argparse import numpy as np from scipy import misc from time import time from collections import deque ''' Temporal blob composition over a sequence of frames in a video: pixels are compared to rng adjacent pixels over lateral x, vertical y, temporal t coordin...
57 - 57: oO0o . I11i . i1IIi if 42 - 42: I11i + I1ii11iIi11i % O0 if 6 - 6: oO0o raise Exception ( 'key must be either 16 or 32 bytes' ) oOOo0oOo0 = [ 0 ] * 16 if len ( key ) == 16 : II = list ( struct . unpack ( '<4I' , key ) ) oOOo0oOo0 [ 0 ] = self . TAU [ 0 ] oOOo0oOo0 [ 1 ] = self . TAU [ 1 ] oOOo0oOo0 [ ...
1) * self.args['lr_decay'])) patience += 1 self.eval_task(test_data, model_, 'stm') if exp == 1: curr_score = self.eval_task(dev_data, model_, 'stm') if curr_score >= best_score: best_score = curr_score best_model.load_state_dict(model_.state_dict()) # tested, no need to deepcopy! best_epoch[1] = epoch patie...
""" coral_model - utils @author: <NAME> @contributor: <NAME> """ import os # TODO: Restructure all utils-related files, methods, and methods. import numpy as np from netCDF4 import Dataset class SpaceTime: """Spacetime-object, which validates the definition of the spacetime dimensions.""" __spacetime = None def...
<reponame>sxw031/fullstack-nanodegree-vm import httplib2 import json from flask import Flask, g, render_template, request, redirect, url_for, flash, jsonify from sqlalchemy import create_engine, asc from sqlalchemy.orm import sessionmaker from database_setup import Base, Category, CategoryItems, User # imports for Goog...
<azure.batch.models.UserAccount>` :param metadata: A list of name-value pairs associated with the pool as metadata. The Batch service does not assign any meaning to metadata; it is solely for the use of user code. :type metadata: list of :class:`MetadataItem <azure.batch.models.MetadataItem>` :param package_refer...
<gh_stars>0 """ @file coi-services/mi.idk/comm_config.py @author <NAME> @brief Comm Configuration object used to gather and store connection information for the logger. Usage: # # Create a CommConfig object. Use the factory method to get the correct object type. # comm_config = get_config_from_type(filename, 'etherne...
= aggregator_contract.functions.latestRoundData() \ .call() # Construct the latest round data data[proxy_address] = { 'contractVersion': 3, 'aggregatorAddress': aggregator_address, 'latestRound': latest_round_data[0], 'latestAnswer': latest_round_data[1], 'latestTimestamp': latest_round_data[3], 'answeredInRo...
replaced_genes.append((gene, copied_segment2[i])) elif direction == "B": # I invert the segment and I replace gene by gene the segment inverted = True copied_segment2 = copied_segment2[::-1] for gene in copied_segment2: gene.change_sense() i = 0 for position in positions: # First I inactivate the gene gene ...
to wait on. These should be valid values for :py:attr:`~oci.core.models.Vcn.lifecycle_state` :param dict operation_kwargs: A dictionary of keyword arguments to pass to :py:func:`~oci.core.VirtualNetworkClient.delete_vcn` :param dict waiter_kwargs: A dictionary of keyword arguments to pass to the :py:func:`oci.wai...
"""Unit tests for the NullTransformer.""" from unittest.mock import patch import numpy as np import pandas as pd from rdt.transformers import NullTransformer class TestNullTransformer: def test___init__default(self): """Test the initialization without passing any default arguments. When no arguments are passe...
range(3)] while True: stop = True for p in range(max(params[0] - i_val_inc[0] // 2, 0), min(w // 2, i_val[0]), 2): for l in range(max(params[1] - i_val_inc[1] // 2, 0), min(n - k - (w - 2 * p), min(i_val[1], n - k))): for p1 in range(max(params[2] - i_val_inc[2] // 2, (p + 1) // 2), min(w, i_val[2])): if mmt and ...
########################################################################## # # Copyright (c) 2014-2015, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributio...
<reponame>davidrigie/twixreader # Generated from XProtParser.g4 by ANTLR 4.7.1 # encoding: utf-8 from antlr4 import * from io import StringIO from typing.io import TextIO import sys def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\3\32") buf.write("\u00ab\4\...
<filename>lib/couchbase_helper/subdoc_helper.py #!/usr/bin/env python import copy import random import json import sys from .random_gen import RandomDataGenerator class SubdocHelper(): def __init__(self): self.randomDataGenerator = RandomDataGenerator() def _find_data_type(self, data, data_type = "any"): if data_...
dictionaries (copy replicas found in new LFC to previously found replicas in previous LFC) for guid in new_file_dict.keys(): if not guid in file_dict.keys(): file_dict[guid] = new_file_dict[guid] for guid in new_replicas_dict.keys(): if not guid in replicas_dict.keys(): replicas_dict[guid] = new_replicas_dict[gui...
<filename>porth.py #!/usr/bin/env python3 import os import sys import subprocess import shlex from os import path from typing import * from enum import IntEnum, Enum, auto from dataclasses import dataclass from copy import copy from time import sleep import traceback PORTH_EXT = '.porth' DEFAULT_EXPANSION_LIMIT=1000 ...
bounds[1]) max_val[0] = max(max_val[0], bounds[2]) max_val[1] = max(max_val[1], bounds[3]) if method == "quick": if ( not isinf(min_val[0]) and not isinf(min_val[1]) and not isinf(max_val[0]) and not isinf(max_val[0]) ): pts += [ (min_val[0], min_val[1]), (min_val[0], max_val[1]), (max_val[0], min_val[1]),...
""" This module contains functions related to gathering information from non NHL APIs & websites (ex - lineups, officials, etc). """ import logging from datetime import datetime, timedelta import requests from bs4 import BeautifulSoup from dateutil.parser import parse from fake_useragent import UserAgent from request...
<reponame>qabach/coen-342-project<gh_stars>10-100 import os import cv2 import sys import torch import argparse import torchvision import numpy as np import torch.nn as nn import scipy.io as sio from PIL import Image from tqdm import tqdm from datetime import datetime from collections import defaultdict from torch.optim...
<gh_stars>1-10 # Rhye's and Fall of Civilization - Historical Victory Goals from CvPythonExtensions import * from StoredData import data from Consts import * from RFCUtils import utils import heapq import Areas import CityNameManager as cnm import DynamicCivs as dc import BugCore AdvisorOpt = BugCore.game.Advisors Ale...
0) if qty == None: qty = 0 else: qty = int(search) return qty * multiplier def passControl(card, player): ## Remote call for taking control of cards you don't yet control mute() card.controller = player ################################## #Card Functions -- Autoscripted ################################## def ...
<reponame>tcpedersen/deephedging # -*- coding: utf-8 -*- import tensorflow as tf import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd from functools import partial from time import perf_counter from tensorflow_probability.python.internal import special_math from constants impor...
<gh_stars>0 # -*- coding: utf-8 -*- """ Created on Wed Dec 4 14:50:33 2019 @author: lfiorito """ import io import shutil import os from functools import reduce from tempfile import TemporaryDirectory import logging from urllib.request import urlopen, Request, urlretrieve from zipfile import ZipFile import re import py...
from __future__ import absolute_import, division, print_function from mmtbx.geometry import topology import unittest class TestAtom(unittest.TestCase): def test_1(self): foo = object() bar = object() a = topology.Atom( foo = foo, bar = bar ) self.assertEqual( a.foo, foo ) self.assertEqual( a.bar, bar ) cl...
# Copyright 2016 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/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, soft...
Mexico, USA) Channels (4): IU.ANMO.00.BHZ, IU.ANMO.00.LHZ, IU.ANMO.00.UHZ, IU.ANMO.00.VHZ >>> inventory[0].plot_response(min_freq=1E-4) # doctest: +SKIP .. plot:: from obspy import UTCDateTime from obspy.clients.fdsn import Client client = Client() starttime = UTCDateTime("2001-01-01") endtime = UTCDateTime...
<filename>connector/mqtt/locust/src/scripts/generate_certs.py """ Certificate creation for Locust. """ import argparse import glob import multiprocessing import time import uuid import shutil import sys import os from typing import List, Tuple import redis from src.ejbca.thing import Thing from src.config import CONF...
bool: """ (Read Only) A boolean indicating whether :meth:`~pyto_ui.WebView.go_forward` can be performed. :rtype: bool """ return self.__py_view__.canGoForward @property def is_loading(self) -> bool: """ (Read Only) A boolean indicating whether the Web View is loading content. :rtype: bool """ return sel...
<reponame>Yzhbuaa/DAGSfM from cnn_wrapper.network import Network class ResNet50(Network): def setup(self): (self.feed('data') .conv(7, 64, 2, padding=3, relu=False, name='conv1') .batch_normalization(relu=True, scale=True, center=True, name='bn_conv1') .max_pool(3, 2, name='pool1') .conv(1, 256, 1, biased=False,...
process by lighting (activating) the laser. Valid in the standby state. Returns ------- code : int Command status code description : str Command status description Examples -------- >>> laser.laser_state() (0, 'Standby state') >>> status, description = laser.activate() >>> status 0 >>> description 'N...
<reponame>hhhsu0825/gt4sd-core<filename>src/gt4sd/algorithms/conditional_generation/guacamol/implementation/__init__.py """GuacaMol algorithms implementation module.""" import json import logging import os from typing import Any, Dict, List, Tuple, Type, Union from guacamol_baselines.graph_ga.goal_directed_generation...
-3, -2): None, (1, 32, -3, -1): None, (1, 32, -3, 0): None, (1, 32, -3, 1): None, (1, 32, -3, 2): None, (1, 32, -3, 3): None, (1, 32, -3, 4): None, (1, 32, -3, 5): None, (1, 32, -2, -5): None, (1, 32, -2, -4): None, (1, 32, -2, -3): None, (1, 32, -2, -2): None, (1, 32, -2, -1): None, (1, 32, -2, 0): None, ...
import json import platform import ssl import time import urllib3 import six from typing import List, Optional from ...exceptions import PureError from ...keywords import Headers, Responses from ...responses import ValidResponse, ErrorResponse, ApiError, ItemIterator from ...token_manager import TokenManager from ...a...
<reponame>dataversioncontrol/dataversioncontrol import filecmp import os import re import shutil from pathlib import Path from unittest.mock import patch import pytest from dvc.cli import main from dvc.dvcfile import DVC_FILE, Dvcfile from dvc.exceptions import ( CyclicGraphError, ReproductionError, StagePathAsOut...
<reponame>WuphonsReach/BeggarsDiplomacy from ID_items import * from ID_quests import * from ID_factions import * from compiler import * ############################################################## # These constants are used in various files. # If you need to define a value that will be used in those files, # just de...
to self. """ self._obj = _pyom.physical_process_add_mediator(self._obj, physical_entity_reference.encode(), uri_type) propagate_omexmeta_error(self._obj) return self def delete(self) -> None: """Clear up resources used by this :class:`PhysicalProcess`""" return _pyom.physical_process_delete(self._obj)...
# -*- coding: utf-8 -*- """ @author: <NAME>, University of Bristol, <EMAIL> This programme will take an input array of peaks in 1D I vs q data (such as those returned from the finder programme), and returns a dictionary of possible phases that the data can take on, along with the miller plane index and the peaks ...
<reponame>IronFireFA/spiderfoot<filename>sfscan.py # -*- coding: utf-8 -*- # ----------------------------------------------------------------- # Name: sfscan # Purpose: Scanning control functionality # # Author: <NAME> <<EMAIL>> # # Created: 11/03/2013 # Copyright: (c) <NAME> 2013 # License: MIT # ---------------------...
``TimePeriodList`` containing the given time period record ``Type``. In plenary mode, the returned list contains all known time periods or an error results. Otherwise, the returned list may contain only those time periods that are accessible through this session. :param time_period_record_type: a time period rec...
from collections import OrderedDict import uuid from unittest.mock import patch, mock_open import json import datetime from django.urls import reverse from django.utils import timezone from django.utils.http import urlencode from django.contrib.auth import get_user_model from django.conf import settings from freezegun...
* hCoefY isBack = False # Middle part (wall proper) if frontSideDef < len(sidedefs) and \ sidedefs[frontSideDef].middle != "-\x00\x00\x00\x00\x00\x00\x00": fromTop = True sector = sidedefs[frontSideDef].sector # Floor and ceiling here - means bottom and top height of the wall floor = sectors[sector]...
from __future__ import absolute_import, division, print_function, unicode_literals import logging import numpy as np import six from madminer.utils.interfaces.madminer_hdf5 import load_madminer_settings, madminer_event_loader from madminer.utils.morphing import PhysicsMorpher, NuisanceMorpher from madminer.utils.vari...
True else: metrics_unchanged += 1 else: update_hash_key = True to_add_to_hash_key = True if update_hash_key: try: self.redis_conn.hset( custom_stale_metrics_hash_key, i_metric, int(float(i_stale_period))) if to_add_to_hash_key: metrics_added_to_hash_key += 1 else: metrics_updated_in_hash_key += 1 except ...
complete evt = ["deposit", address, amount] Notify(evt) return True def reduce_balance(address, amount): """ Called on withdrawal, to reduce the amount of LOOT in storage of an address. """ context = GetContext() if amount < 1: print("ERROR! Can only reduce a balance >= 1. ") return False # LOOT is mappe...
+ m.x793) - m.x189 + m.x190 == 0) m.c191 = Constraint(expr=-0.5*m.x1810*(m.x793 + m.x794) - m.x190 + m.x191 == 0) m.c192 = Constraint(expr=-0.5*m.x1810*(m.x794 + m.x795) - m.x191 + m.x192 == 0) m.c193 = Constraint(expr=-0.5*m.x1810*(m.x795 + m.x796) - m.x192 + m.x193 == 0) m.c194 = Constraint(expr=-0.5*m.x1810*(m.x...
vectorized=False, rtol=self.rtol, atol=self.atol, ignore_inf_sign=self.ignore_inf_sign, nan_ok=True) break except AssertionError: if j >= len(dps_list)-1: reraise(*sys.exc_info()) finally: mpmath.mp.dps, mpmath.mp.prec = old_dps, old_prec def __repr__(self): if self.is_complex: return "<MpmathData: %s (com...
# -*- coding: utf-8 -*- """ Created on Thu Jul 4 17:39:45 2019 @author: badat """ import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import torch.autograd as autograd #%% import pdb #%% class ResNet_DAZLE(nn.Module): ##### # einstein sum notation ...
<reponame>Wacom-Developer/universal-ink-library # -*- coding: utf-8 -*- # Copyright © 2021 Wacom 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.a...
import sys import os import collections import re import time from datetime import date, datetime from shutil import rmtree from functools import reduce import yaml from tf.fabric import Fabric from tf.writing.transcription import Transcription from tf.convert.walker import CV HELP = "help" ARGS = { HELP: "print t...
1), dtype=np.uint8) * 80] assert array_equal_lists(observed, expected) observed = aug_det.augment_images(images) expected = np.ones((1, 3, 3, 1), dtype=np.uint8) * 80 assert np.array_equal(observed, expected) observed = aug_det.augment_images(images_list) expected = [np.ones((3, 3, 1), dtype=np.uint8) * 80] as...
tenu", "vous avez tenu", "ils ont tenu", "elles ont tenu",), "tondre": ("j'ai tondu", "tu as tondu", "il a tondu", "elle a tondu", "nous avons tondu", "vous avez tondu", "ils ont tondu", "elles ont tondu",), "tordre": ("j'ai tordu", "tu as tordu", "il a tordu", "elle a tordu", "nous avons tordu", "vous avez tordu",...
#!/usr/bin/env python #-*- coding: utf-8 -*- import meep_utils, meep_materials import numpy as np from meep_utils import in_sphere, in_xcyl, in_ycyl, in_zcyl, in_xslab, in_yslab, in_zslab """ """ class dielbar_model(meep_utils.AbstractMeepModel): #{{{ """ Array of dielectric bars or blocks #{{{ FD 2013-07-13 |PMLP...
" + entity_property_type + " type but " + value_type + " type expected", entity_property_type, ) return # check if the assigned definition is required then the assigning property is required if ( value_type is not None and definition.get(syntax.REQUIRED, True) and property_definition.get(syntax.REQUIRED, T...
target_name, audit_link('ENCODE ChIP-seq data standards', '/data-standards/chip-seq/') ) ) else: detail = ('Processed {} file {} produced by {} ' 'pipeline ( {} ) has {} usable fragments. ' 'The minimum ENCODE standard for each replicate in a ChIP-seq ' 'experiment targeting {} and investigated as ' 'a broad h...
<filename>pieces.py from board import * class Piece: """ Parent class for chess pieces. """ def __init__(self): """ Object instance constructor. """ # All pieces get rank, file, and captured attributes. self.rank = None self.file = None # Pawns class Pawn(Piece): """ Pawn parent class. """ def __init__(sel...
= func(*args) except: result = ExceptionInfo() result_queue.put((result, args)) # ---------------------------------------------------------------------------- class ThreadPool(object): def __init__(self, num_threads): assert num_threads >= 1 self.task_queue = Queue.Queue() self.result_queues = dict() self.nu...
# $Id$ #----------------------------------------------------------------------- # Copyright (C) 2004-2019 # Associated Universities, Inc. Washington DC, USA. # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Softwar...
# -*- coding: utf-8 -*- # @Time : 2019/3/30 9:57 PM # @Author : 章光辉 # @FileName: amap.py # @Software: PyCharm from multiprocessing import Manager from multiprocessing.pool import ThreadPool from time import sleep import logging import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import R...
stats def getlines(self, linetype='radio', **kwargs): """ Access a registered database of spectral lines. Will add an attribute with the name linetype, which then has properties defined by the speclines module (most likely, a table and a "show" function to display the lines) """ # this is somewhat unreadable,...
<reponame>gaybro8777/doaj<gh_stars>10-100 from doajtest.helpers import DoajTestCase from doajtest.fixtures import JournalFixtureFactory from doajtest.fixtures import ArticleFixtureFactory from portality import models from portality.app import app from lxml import etree from datetime import datetime, timedelta from free...
<filename>grr/server/grr_response_server/frontend_lib_test.py #!/usr/bin/env python """Tests for frontend server, client communicator, and the GRRHTTPClient.""" import array import logging import pdb import time from unittest import mock import zlib from absl import app from absl import flags import requests from gr...
# -*- coding: utf-8 -*- import os import re import sys import time from copy import copy import matplotlib import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas from scGBM_ui import Ui_scGBM from P...
<reponame>astamminger/aiida_core<filename>aiida/cmdline/commands/exportfile.py<gh_stars>0 # -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # # # The code is hosted on GitHu...
the reference axis is: %4.6f' %(self.refAxis[1])) if massCntr: print('The x-coordinate of the mass center is: %4.6f' %(self.x_m[0])) print('The y-coordinate of the mass center is: %4.6f' %(self.x_m[1])) if shearCntr: print('The x-coordinate of the shear center is: %4.6f' %(self.xs)) print('The y-coordinate of the...
<gh_stars>1-10 ## # Implements support for SFA records # # TODO: Use existing PLC database methods? or keep this separate? ## ### $Id$ ### $URL$ from types import StringTypes from sfa.trust.gid import * from sfa.util.rspec import * from sfa.util.parameter import * from sfa.util.xrn import get_authority from sfa.uti...
'Боевой модуль самоходной 120-мм РСЗО':1, 'Электрооборудование и средства связи дивизионной артиллерии':1, '|---Производство 120-мм РСЗО (на базе военного грузовика)':1, '-Длина колонны артиллерии (метров)':50, } metadict_detail['Армейская 220-мм РСЗО'] = { # http://rbase.new-factoria.ru/missile/wobb/uraga/uraga....
<gh_stars>1-10 # coding: utf-8 from __future__ import absolute_import, division, print_function __author__ = "<NAME>" __copyright__ = "Copyright 2015, <NAME>, Liu lab" __email__ = "<EMAIL>" __license__ = "MIT" import re, json, os import string import random, uuid import shutil import zipfile, gzip import numpy as np...
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 ...
<filename>_setup_support.py ''' ''' from __future__ import print_function import shutil from os.path import dirname, exists, join, realpath, relpath import os, re, subprocess, sys, time import versioneer # provide fallbacks for highlights in case colorama is not installed try: import colorama from colorama import...
#SHOWING THE ROI's for count, (regionOfInterest, x, y, w, h) in enumerate(self.roi_array): #iterate through the ROI array data = self.process_ROI(regionOfInterest, count) #process the ROI for letter regions if data is not None and get_chars: #check if the data is found and if the get_chars option is on str_arr.appe...
) def test_alpha_selfhosting_pivot_params(self): """ Test kuebadm.alpha_selfhosting_pivot with parameters """ result = {"retcode": 0, "stdout": "stdout"} salt_mock = { "cmd.run_all": MagicMock(return_value=result), } with patch.dict(kubeadm.__salt__, salt_mock): assert ( kubeadm.alpha_selfhosting_pivot( ce...
<gh_stars>0 # Copyright 2014 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. import json import logging import os import posixpath import shutil import tempfile import time import traceback from telemetry import value as ...
<reponame>workfloworchestrator/SuPA import unittest.mock from datetime import datetime, timedelta, timezone from json import dumps from typing import Any from uuid import uuid4 import pytest from google.protobuf.json_format import Parse from grpc import ServicerContext from sqlalchemy import Column from supa import c...
<reponame>fossabot/Taurus # -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created: Fri Jun 15 10:47:06 2012 # by: pyside-uic 0.2.13 running on PySide 1.1.1 # # WARNING! All changes made in this file will be lost! from PySide import QtCore, QtGui class Ui_MainWindow(ob...
7*m.b383 + m.x2064 <= 7) m.c5205 = Constraint(expr= 7*m.b384 + m.x2065 <= 7) m.c5206 = Constraint(expr= 7*m.b385 + m.x2066 <= 7) m.c5207 = Constraint(expr= 7*m.b386 + m.x2067 <= 7) m.c5208 = Constraint(expr= 7*m.b387 + m.x2068 <= 7) m.c5209 = Constraint(expr= 7*m.b388 + m.x2069 <= 7) m.c5210 = Constraint(expr= 7*...
[{ 'type': 'KBaseReport.Report', 'data': reportObj, 'name': reportName, 'meta': {}, 'hidden': 1, 'provenance': provenance}]})[0] # Build report and return self.log(console, "BUILDING RETURN OBJECT") report_ref = "{}/{}/{}" returnVal = {'report_name': reportName, 'report_ref': report_ref.format(report_obj_in...
LIMIT 1)', schema_name, table_name, column_name, vocabulary_schema, cvterm_name, column_name); execute format('ALTER TABLE %I.%I ADD CONSTRAINT %I_%I_fkey FOREIGN KEY (%I) REFERENCES %I.%I(dbxref)', schema_name, table_name, table_name, column_name, column_name, vocabulary_schema, cvterm_name); RETURN TRUE; EN...
<filename>tools/news_evaluation.py #!/usr/bin/python import codecs import sys import getopt from os.path import basename import xml.dom.minidom from xml.dom.minidom import Node # what we expect to find inside <TransliterationResults> tag... RESULT_HEADER_ATTR = ('SourceLang', 'TargetLang', 'GroupID', 'RunID', 'RunTyp...
fr.write('\t\t next_hop_type = "' + nhtype + '"\n') try: nhaddr=routes[j]["properties"]["nextHopIpAddress"] fr.write('\t\t next_hop_in_ip_address = "' + nhaddr + '"\n') except KeyError: pass fr.write('\t }' + '\n') # tags block try: mtags=azr[i]["tags"] fr.write('tags = { \n') for key in mtags.keys(): t...
<reponame>Chace-wang/bk-nodeman<gh_stars>10-100 # -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-节点管理(BlueKing-BK-NODEMAN) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License");...
path is constructed. * A simple Node with that path is constructed. """ if not isinstance(path, Path): path = Path(path) d = Drake.current res = d.nodes.get((drake.path_build() / path).canonize(), None) if res is None: if type is not None: res = type(path) else: extension = path.extension extension_type = N...
<filename>main.py import numpy as np import pandas as pd from scipy.stats import norm, multivariate_normal, uniform ## (x, loc, scale) import logging from Utils.Utils import load_object, save_object from collections import defaultdict import matplotlib.pyplot as plt import copy import time import numba from numba.decor...
<reponame>nellore/rail #!/usr/bin/env python """ Rail-RNA-align_readlets Follows Rail-RNA-align_reads Precedes Rail-RNA-junction_search Alignment script for MapReduce pipelines that wraps Bowtie. Aligns input readlet sequences and writes a single output line per readlet belonging to a distinct read sequence. THIS COD...
<filename>spinup/utils/algorithm_logging.py import numpy as np import pandas as pd import matplotlib.pyplot as plt from spinup.utils.constants import PlottingConstants class AlgorithmLogger: """ time_steps: number of time steps each episode lasted scores: obtained reward at each episode episode: number of episod...
class with `read()`, `readline()` and `seek()` methods that is both writeable and readable. The default implementation returns a temporary file if the total content length is higher than 500KB. Because many browsers do not provide a content length for the files only the total content length matters. :param tota...
#!/usr/bin/env python # -*- coding: utf-8 -*- import copy import abc import logging from .elastic_materials import ElasticMaterial from .composites import Laminate, FiberReinforcedPlastic, Layer # ==================== # Set up module logger # ==================== logger = logging.getLogger(__name__) class LayerFact...
(Goods Received Note) been completed?': 'O GRN (nota de mercadorias recebidas) foi concluído?', 'Hazard Pay': 'Pagar Risco', 'Hazardous Material': 'Material perigoso', 'Hazardous Road Conditions': 'Estradas em Condições de Risco', 'Header Background': 'Conhecimento de Chefia', 'Header background file %s missing!':...
# Why: #2453 in Alexa global 'http://www.giaoduc.net.vn/', # Why: #2454 in Alexa global 'http://www.manhub.com/', # Why: #2455 in Alexa global 'http://www.tatadocomo.com/', # Why: #2458 in Alexa global 'http://www.realitatea.net/', # Why: #2459 in Alexa global 'http://www.freemp3x.com/', # Why: #2460 in Alexa...
[5.2]: Function used for advanced extension def _checkNumericalTargetInputs(target_value: Optional[Union[int, List[int], Tuple]], name: str, maxValue: int, minValue: int = 0, **kwargs) -> Optional[Union[int, List[int], Tuple]]: # **kwargs: Argument need for function inputCheckRange if target_value is None: ret...
''' Created on Feb 9, 2011 @author: bartosz ''' import spike_sort as sort import base from spike_sort.io.filters import BakerlabFilter, PyTablesFilter from spike_sort import features from spike_sort.ui import plotting from spike_sort.ui import zoomer from spike_analysis import dashboard import numpy as np class Gen...
# -*- coding: utf-8 -*- # This file is auto-generated, don't edit it. Thanks. import time from Tea.exceptions import TeaException, UnretryableException from Tea.request import TeaRequest from Tea.core import TeaCore from antchain_alipay_util.antchain_utils import AntchainUtils from typing import Dict from antchain_sd...
import os, time, sys from Plugins.Configs.FireWall.Evil_TwiNinja import * #Banner Data B1 = "-----------------------------------------" B2 = "-----------------------------------------" B3 = "--- Cryptic Hats Hackers Organization ---" B4 = "--- BlackDoc V0.0.05 ---" B5 = "--- Security Level: 1.05+ ---" B6 = "-----------...
# -*- coding: utf-8 -*- """ Created on Sun May 19 18:18:31 2019 @author: Lee """ # Modules will pull all of the temperature versus time data from the original runs # Should put the data into HDF5 tables as discussed in class # Create a rank of the maximum average temperature (on full pot body) # This ...
'scan-build-%Y-%m-%d-%H-%M-%S-%f-' stamp = datetime.datetime.now().strftime(stamp_format) parent_dir = os.path.abspath(hint) if not os.path.exists(parent_dir): os.makedirs(parent_dir) name = tempfile.mkdtemp(prefix=stamp, dir=parent_dir) logging.info('Report directory created: %s', name) try: yield name fina...