input
stringlengths
2.65k
237k
output
stringclasses
1 value
<reponame>dombold/MyHydropi-Blog<filename>Website_Code/Sensors/Hydropi_Sensors_Only.py<gh_stars>0 #!/usr/bin/env python ############################################################################## # # Written by <NAME> for the Raspberry Pi - 2016 # # Website: myhydropi.com # Contact: <EMAIL> # # Feel free to use and...
<filename>examples/fluid_sim.py<gh_stars>0 """ An example of a fluid simulation built using this library. The FluidSim class below implements Position Based Fluids. The main function sets up and runs the simulation. Unfortunately this library does not come with any visualization tools, so it only prints the average po...
<reponame>Saadmairaj/TKtictac<filename>__main__.py<gh_stars>1-10 ## DISCLAIMER: This was my first ever game after learning the basic of python so the current .py file is not optimized __version__ = '0.0.2' import platform import random as rnd from tkinter import * from tkinter import ttk from tkinter.font import Fon...
<reponame>danielegrandi-adsk/material-gnn import os import time import torch import torch.nn as nn import argparse from tqdm import tqdm import numpy as np import json import random from pathlib import Path import pandas as pd from partial_algorithm.dataloader import DataSet, set_experiment, set_lazy_loading from parti...
<filename>salt/modules/mac_service.py # -*- coding: utf-8 -*- ''' The service module for Mac OS X .. versionadded:: 2016.3.0 ''' from __future__ import absolute_import # Import python libs import logging import os import re import plistlib from distutils.version import LooseVersion # Import salt libs import salt.util...
predictions_per_grid=2, do_sqrt=True, grid_number=7, coord_scale=None, object_scale=None, prediction_not_a_object_scale=None, class_scale=None, detection_threshold=None, iou_threshold=None, random_boxes=False): ''' Generates a deep learning model with the Tiny Yolov1 architecture. Tiny Yolov1 is a very small mode...
import os import sys import time import json import base64 import psutil import datetime from copy import deepcopy from contextlib import contextmanager from dateutil.parser import parse as parse_datetime from typing import Optional, Tuple, Union, Dict, Any import requests from typing import List import lightwood from...
cap.isOpened(): raise IOError("Cannot open webcam") while True: ret, frame = cap.read() frame = cv2.resize(frame, None, fx=0.5, fy=0.5, interpolation=cv2.INTER_AREA) cv2.imshow('Black Lotus camera', frame) c = cv2.waitKey(1) if c == 27: break cap.release() cv2.destroyAllWindows() #-------------------------...
specs["repo"] graphicsRelative = specs["graphicsRelative"] graphicsModule = [(org, repo, graphicsRelative)] if graphicsRelative else [] specs["zip"] = ( [repo] + [(m["org"], m["repo"], m["relative"],) for m in moduleSpecs] + graphicsModule ) for (dKey, method) in ( ("dataDisplay", getDataDefaults), ("typeDis...
import numpy as np from fastai.basic_train import Recorder from fastai.core import ifnone, defaults, Any from fastai.torch_core import to_np from fastai.vision import * import matplotlib.pyplot as plt from typing import Optional import scipy import itertools def model_cutter(model, select=[]): cut = select[0] ll = ...
<filename>pycloudmessenger/ffl/fflapi.py<gh_stars>0 #!/usr/bin/env python3 #author <EMAIL> """FFL protocol handler. /* * 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 copyrigh...
None for p in patch: if '/ifclass' == p['path']: temp_interface['ifclass'] = p['value'] elif '/sriov_numvfs' == p['path']: sriov_numvfs = p['value'] temp_interface['sriov_numvfs'] = sriov_numvfs elif '/sriov_vf_driver' == p['path']: sriov_vf_driver = p['value'] temp_interface['sriov_vf_driver'] = sriov_vf_driv...
<reponame>g10f/sso import datetime import logging import uuid from sorl import thumbnail from current_user.models import CurrentUserField from django.conf import settings from django.contrib.auth.models import Permission, PermissionsMixin, AbstractBaseUser, BaseUserManager from django.contrib.auth.validators import U...
""" Copyright (c) 2015-2017 Wind River Systems, Inc. SPDX-License-Identifier: Apache-2.0 """ from configutilities.common.configobjects import DEFAULT_NAMES from configutilities.common.configobjects import NETWORK_PREFIX_NAMES from configutilities.common.configobjects import OAM_TYPE from configutilities.common.config...
N, H]. paddings: [B, T], or None if there is no padding. segment_mask: [B, 1, T, S] or None. Not used right now. per_step_padding: A mask used by decoder self-attention to prevent information flow from future (causal padding). It has shape [B, 1, T] if not None. Not used right now. time_step: A scalar, the curren...
<gh_stars>0 """ Copyright (c) 2020 <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 rights to use, copy, modify, merge, publish, distri...
llx0, llx1, lly0, lly1 = ax.get_extent(ccrs.PlateCarree()) sbllx = (llx1 + llx0) / 2 sblly = lly0 + (lly1 - lly0) * scale_loc[1] tmc = ccrs.TransverseMercator(sbllx, sblly) x0, x1, y0, y1 = ax.get_extent(tmc) sbx = x0 + (x1 - x0) * scale_loc[0] sby = y0 + (y1 - y0) * scale_loc[1] # print(sbx, sby) sbxe = (...
matters for the differencing. If False, then the control file order is used. If observation names have a datetime suffix, make sure the format is year-month-day to use this sorting. Default is True long_names (`bool`, optional): flag to use long, descriptive names by concating the two observation names that are bei...
if not self.proposal.can_assess(request.user): raise exceptions.ProposalNotAuthorized() self.processing_status = 'recalled' self.save() send_referral_recall_email_notification(self, request) # TODO Log proposal action self.proposal.log_user_action(ProposalUserAction.RECALL_REFERRAL.format(self.id, self.proposal.l...
#!/usr/local/bin/python # filename: clonify.py # # Copyright (c) 2015 <NAME> # License: The MIT license (http://opensource.org/licenses/MIT) # # 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 w...
<gh_stars>1-10 #!/usr/bin/env python3 # -*- coding: utf-8 -*- """ ############################################################################### # Checkers.py # # Revision: 1.00 # Date: 11/11/2020 # Author: Alex # # Purpose: Contains all functions necessary to implement the Checkers # game environment. # # Notes: # 1....
<filename>test-framework/test-suites/integration/tests/add/test_add_pallet.py import json from operator import itemgetter from contextlib import ExitStack from textwrap import dedent class TestAddPallet: def test_no_pallet(self, host): # Call add pallet with nothing mounted and no pallets passed in result = host....
<gh_stars>10-100 ''' eep.py Utilities to downsample stellar evolution tracks to Equivalent Evolutionary Phase (EEP) basis, according to the method of Dotter (2016). The default EEP functions are contained in eep.default_eep_functions. They are default_eep_functions = { 'prems': get_PreMS, 'zams': get_ZAMS, 'eams...
quick access to the data without reading the csvs over and over again. init_unit_data() #Initializes the event calendar by pulling event data from SEGA's website. #Sets the scheduler to update the calendar every 24 hours in case there are unannounced changes to the calendar #Note: They retired scheduled e...
<reponame>Kexin-Wei/spinnup import os import json import numpy as np import itertools import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.art3d import Line3DCollection from mpl_toolkits import mplot3d def liver_dump_init(env, name = None): liver = {'x':[],'Fes':[],'Fis':[],'Ficp':[],'volume':[],'col_p_...
from __future__ import print_function import unittest import logging import os import sys import subprocess import math import numpy as np import random import time import csv import glob import shutil import json from osgeo import gdal from osgeo import ogr from nose.plugins.skip import SkipTest import invest_test_...
import numpy as np import copy import os from up.utils.general.registry_factory import AUGMENTATION_REGISTRY from up.data.datasets.transforms import Augmentation from up.extensions.python import iou3d_nms_utils from up.tasks.det_3d.data.box_utils import boxes3d_kitti_fakelidar_to_lidar, enlarge_box3d, remove_points_in_...
#!/usr/bin/env python """An object representing EE Geometries.""" # Using lowercase function naming to match the JavaScript names. # pylint: disable=g-bad-name import collections import json import numbers import apifunction import computedobject import ee_exception import ee_types import serializer # A sentinel...
""" Holds Delegate and Accessor Logic """ import os import copy import uuid import shutil import datetime import tempfile import pandas as pd import numpy as np from ._internals import register_dataframe_accessor, register_series_accessor from ._array import GeoType from ._io.fileops import to_featureclass, from_featur...
= numSubseqs numOutputCols = wordLen return applyToEachCol(saxify1D, X, numOutputRows, numOutputCols, length, wordLen, cardinality) # ------------------------ sparse sax words def sparseSaxify1D(seq, length, wordLen, cardinality): words = saxify1D(seq, length, wordLen, cardinality) return sparsifySaxWords(wor...
children2_combined)) and \ np.all(np.isin(children22001, children2_combined)) @pytest.mark.timeout(30) def test_get_root(self, gen_graph_simplequerytest): cgraph = gen_graph_simplequerytest root10000 = cgraph.get_root(to_label(cgraph, 1, 0, 0, 0, 0), time_stamp=None) root11000 = cgraph.get_root(to_label(cgrap...
warning, but it is still recommended to use `seed` now. Outdated since 0.4.0. deterministic : bool, optional Deprecated since 0.4.0. See method ``to_deterministic()`` for an alternative and for details about what the "deterministic mode" actually does. Examples -------- >>> import imgaug.augmenters as iaa >...
# Copyright 2019 TerraPower, LLC # # 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, ...
that was allowed.') screen.refresh() wait() elif xc >= 8 and yc >= 8: while True: try: prompt_str = 'Which direction do you want your ship to extend in? Enter up or left: ' l = len(prompt_str) screen.addstr(0, 0, prompt_str) zc = screen.getstr(0, l).lower() while zc != 'up' and zc != 'left': screen.clear() ...
<gh_stars>0 import csv import json import numpy as np from parse import * import sys import argparse from argparse import RawTextHelpFormatter # import matplotlib.pyplot as plt # import pandas as pd # import numpy as np def CSVreader(path): with open(path) as f: reader = csv.reader(f, delimiter='|', quoting=csv.QUO...
from HPC_Task import Task, Workloads from HPC_Cluster import Cluster import os import math import json import time import sys import random from random import shuffle import numpy as np import tensorflow as tf import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import scipy.signal import gym from gym import ...
'\\r').replace('\n', '\\n') csv_json = json.loads(post_data.get('csv_json').encode('utf-8').replace('\t', '\\t').replace('\r', '\\r').replace('\n', '\\n')) print >> sys.stderr, post_data #setup Dictionaries for post import self-referential needs #setup a dict for hierarchy value hierarchyDict = {} #setup a re...
<reponame>xw285cornell/buckit #!/usr/bin/env python2 # Copyright 2016-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 fil...
%s items' % str(len(last_all_alerts_set))) except: logger.error(traceback.format_exc()) logger.error('error :: metrics_manager :: failed to generate a list from the analyzer.last_all_alerts Redis key') last_all_alerts_set = None all_alerts_set = None if all_alerts: try: all_alerts_list = [list(row) for row in a...
+ m.b103 - m.b202 <= 0) m.c3363 = Constraint(expr= - m.b96 + m.b104 - m.b203 <= 0) m.c3364 = Constraint(expr= - m.b96 + m.b105 - m.b204 <= 0) m.c3365 = Constraint(expr= - m.b96 + m.b106 - m.b205 <= 0) m.c3366 = Constraint(expr= - m.b96 + m.b107 - m.b206 <= 0) m.c3367 = Constraint(expr= - m.b96 + m.b108 - m.b207 <=...
{"dst": dst_mac, "src": src_mac}}, {"IP": {"tos": 0x00}}, {"TCP": {}})) pack_list.append(({"Ethernet": {"dst": dst_mac, "src": src_mac}}, {"IP": {"tos": 0x0f}}, {"TCP": {}})) pack_list.append(({"Ethernet": {"dst": dst_mac, "src": src_mac}}, {"IP": {"tos": 0x1f}}, {"TCP": {}})) pack_list.append(({"Ethernet": {"dst":...
# The Hazard Library # Copyright (C) 2012-2018 GEM Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at your option) any later version. #...
<reponame>bmdepesa/validation-tests<gh_stars>0 from common_fixtures import * # NOQA from requests.auth import AuthBase import ast if_test_ad = pytest.mark.skipif(not os.environ.get('API_AUTH_AD_SERVER'), reason='API_AUTH_AD_SERVER is not set') if_do_key = pytest.mark.skipif( not os.environ.get('DIGITALOCEAN_KEY'), ...
"""Building blocks for various Neural Network architectures. Author: <NAME> Contact: <EMAIL> Date: May 2018 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import itertools import numpy as np import tensorflow as tf from . import _globa...
global 'http://www.govome.com/', # Why: #1515 in Alexa global 'http://www.copyscape.com/', # Why: #1516 in Alexa global 'http://www.minecraftforum.net/', # Why: #1517 in Alexa global 'http://www.mit.edu/', # Why: #1518 in Alexa global 'http://www.cvs.com/', # Why: #1519 in Alexa global 'http://www.timesjobs....
<reponame>bansan85/ocr-book-tests<gh_stars>0 import unittest import numpy as np from diptych.angle import Angle from diptych.cv2ext import charge_image from diptych.fsext import get_absolute_from_current_path from diptych.print_interface import ConstString from tests.mock_separate_page import MockDisableSeparatePage ...
return libvlc_media_get_meta(self, e_meta, e) if hasattr(dll, 'libvlc_media_get_state'): def get_state(self): """Get current state of media descriptor object. Possible media states are defined in libvlc_structures.c ( libvlc_NothingSpecial=0, libvlc_Opening, libvlc_Buffering, libvlc_Playing, libvlc_Paused, libvlc_S...
<filename>faas_exp.py import os import sys import time import datetime import csv import json import logging import subprocess import io from statistics import median from pathlib import Path import click import requests import pandas as pd import numpy as np from scipy.stats import wilcoxon as wilcoxon_cal from scipy...
True. _check_return_type (bool): specifies if type checking should be done one the data received from the server. Default is True. _spec_property_naming (bool): True if the variable names in the input data are serialized names, as specified in the OpenAPI document. False if the variable names in the input data a...
# Copyright 2020 <NAME> # SPDX-License-Identifier: Apache-2.0 import typing from direct.showbase import DirectObject from panda3d import core from .. import cameras, dialogs, edit_menu, edit_mode, editor, map_data from .. import menu as context_menu from ..editor import highlighter, map_editor, map_objects, operati...
<gh_stars>1-10 # Copyright 2020 Huawei Technologies Co., Ltd # # 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 l...
<gh_stars>1000+ #!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2021 4Paradigm # # 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 # # Un...
#!/usr/bin/env python # coding=utf-8 # Copyright 2022 The HuggingFace Team 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 ...
import discord import asyncio import requests import time from datetime import datetime, date import string import random import copy import re import json import asyncpg from bs4 import BeautifulSoup from discord.ext import commands from cogs.locale import * from cogs.const import * from cogs.help import * from cogs.i...
""" Python module for computing thermocouple emf values from temperatures. This module just contains the generic thermocouple class and helper functions. """ __author__ = "<EMAIL>" __copyright__ = "public domain" import numpy as np # scipy.optimize will be imported when needed. optimize = None def ensure_import_op...
<reponame>onegreyonewhite/drf-yasg import inspect import logging from rest_framework import serializers from .. import openapi from ..utils import force_real_str, get_field_default, get_object_classes, is_list_view #: Sentinel value that inspectors must return to signal that they do not know how to handle an object ...
""" Base classes for documents that back dataset contents. | Copyright 2017-2021, Voxel51, Inc. | `voxel51.com <https://voxel51.com/>`_ | """ from copy import deepcopy import json import re from bson import json_util, ObjectId import mongoengine import pymongo import fiftyone.core.utils as fou import eta.core.seria...
<gh_stars>1-10 # coding: utf-8 import numpy import scipy from scipy import ndimage import numpy as np from scipy import misc from PIL import Image from pyinterp2.interp2 import interp2linear # In[36]: import numpy import scipy #noinspection PyPep8Naming import matplotlib.pyplot as plt # I...
<gh_stars>0 def triedctk(): """ Les méthodes ctk : Cartes Topologiques de Kohonen findbmus : Détermine les référents les plus proches (Best Match Units) mbmus : Trouve les multiples bmus dans l'ordre des plus proches errtopo : Erreur topologique (cas d'une carte rectangulaire uniquement) findhits : Calcu...
<reponame>libcommon/sqlalchemy-dbutils-py ## -*- coding: UTF8 -*- ## manager.py ## Copyright (c) 2020 libcommon ## ## 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, incl...
<gh_stars>100-1000 """Generates SidechainNet files. SidechainNet is an all-atom protein structure prediction dataset for machine learning. SidechainNet extends ProteinNet, including angles and coordinates that describe both the backbone and sidechain components of each protein structure. The procedure is as follows: ...
<= 1').exists('rid >= 1') is True def test_exists_6(db_interactions_with_mult_cols): assert db_interactions_with_mult_cols.exists('timestamp >= 950.52') is True def test_exists_7(db_interactions_with_mult_cols): assert db_interactions_with_mult_cols.exists('timestamp >= 9500.52') is False def test_exists_8(db_i...
<gh_stars>1-10 # Copyright 2021 United States Government as represented by the Administrator of the National Aeronautics and Space # Administration. No copyright is claimed in the United States under Title 17, U.S. Code. All Other Rights Reserved. r""" This submodule provides utility constants and functions for worki...
from pm4py.objects.conversion.log import converter as log_converter from pm4py.algo.filtering.log.attributes import attributes_filter from copy import deepcopy class Discover: def __init__(self): self.graph = { 'events': {}, 'conditionsFor': {}, 'milestonesFor': {}, 'responseTo': {}, 'includesTo': {}, 'exclud...
re.compile(atom) # match any one atom character def __init__(self, addr, defaultDomain=None): if isinstance(addr, User): addr = addr.dest if isinstance(addr, Address): self.__dict__ = addr.__dict__.copy() return elif not isinstance(addr, types.StringTypes): addr = str(addr) self.addrstr = addr # Tokenize a...
536: {'five_min_cpu': 0.0, 'five_sec_cpu': 0.0, 'invoked': 549, 'one_min_cpu': 0.0, 'pid': 540, 'process': 'LDP Background', 'runtime': 266, 'tty': 0, 'usecs': 484}, 537: {'five_min_cpu': 0.0, 'five_sec_cpu': 0.0, 'invoked': 254919, 'one_min_cpu': 0.0, 'pid': 541, 'process': 'MCP RP EFP proce', 'runtime'...
<reponame>ferreirajoaouerj/gp-openai-gym #-*- coding:utf-8 -*- """ Documentation """ ###################################################################################################### import os import pickle import time import copy from collections import defaultdict import random import operator ...
a user-suitable label for the item, and (3) an # ordering index: self.attrs = { 'title': [None, 'Title', 0], 'url': [None, 'URL', 1], 'year': [None, 'Year', 2], 'num_citations': [0, 'Citations', 3], 'num_versions': [0, 'Versions', 4], 'cluster_id': [None, 'Cluster ID', 5], 'url_pdf': [None, 'PDF link', 6], 'u...
i,script in enumerate(scripts): jobname = os.path.splitext(os.path.split(script)[1])[0] #Use input SLURM configuration for threadsafe tasks, otherwise call srun with single node and single thread if threadsafe[i]: write_sbatch(script,'--config {0}'.format(TMP_CONFIG),nodes=nodes,tasks=ntasks_per_node,mem=mem,plane...
on data/information recieved # function(self, Data): # GetData = Data system_log = pyqtSignal(str) progress = pyqtSignal(str) query_result = pyqtSignal(object) query_result2 = pyqtSignal(object) def __init__(self, query_cat, query_input1, query_input2, parent = None): super(QueryThread, self).__init__(p...
<filename>src/sentry/utils/services.py from __future__ import absolute_import import functools import inspect import itertools import logging import threading import six from django.utils.functional import empty, LazyObject from sentry.utils import warnings from sentry.utils.concurrent import FutureSet, ThreadedExec...
<reponame>castarco/unit-e<gh_stars>10-100 #!/usr/bin/env python3 # Copyright (c) 2018-2019 The Bitcoin Core developers # Copyright (c) 2019 The Unit-e developers # Distributed under the MIT software license, see the accompanying # file COPYING or https://opensource.org/licenses/MIT. import argparse import os import su...
<reponame>bentheiii/mystic<filename>mysticCLI/commands.py from __future__ import annotations from typing import Dict, Type import re import textwrap import os.path import cryptography try: import pyperclip except ImportError: pyperclip = None try: import tkinter as tk from tkinter import filedialog as tk_filedi...
Leakage': 0.00611897, 'Renaming Unit/Int Front End RAT/Subthreshold Leakage with power gating': 0.00348781, 'Renaming Unit/Peak Dynamic': 4.56169, 'Renaming Unit/Runtime Dynamic': 0.228254, 'Renaming Unit/Subthreshold Leakage': 0.070483, 'Renaming Unit/Subthreshold Leakage with power gating': 0.0362779, 'Runtime ...
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
self.lineBarriers), ('polygon_barriers', self.polygonBarriers), ('use_hierarchy_in_analysis', self.useHierarchy), ('restrictions', self.restrictions), ('attribute_parameter_values', self.attributeParameterValues), ('travel_mode', self.portalTravelMode), ('populate_route_lines', self.populateRouteLines), ('route_...
rhyme)) elif not rhyme: words = self.assemble_from_db('where stress = ? and type = ?', (stress, word_type)) else: words = self.assemble_from_db('where stress = ? and rhyme = ? and type = ?', (stress, rhyme, word_type)) return words def get_word_count(self, stress, rhyme=None): if rhyme: query_n_param = ('sele...
<reponame>vandreykiv/openpilot<gh_stars>0 #!/usr/bin/env python3 import argparse import os import sys import struct import binascii from tqdm import tqdm from enum import IntEnum import time from selfdrive.car.modules.CFG_module import load_bool_param from panda import Panda from panda.python.uds import UdsClient, Mes...
['DAD02', 'M', 1,'AN'], ['DAD03', 'M', (6,6),'DT'], ['DAD04', 'C', (6,6),'DT'], ['DAD05', 'C', (10,10),'AN'], ['DAD06', 'C', (9,9),'AN'], ['DAD07', 'C', 2,'AN'], ['DAD08', 'C', 15,'R'], ['DAD09', 'C', 30,'AN'], ['DAD10', 'C', 30,'AN'], ['DAD11', 'C', (2,2),'AN'], ['DAD12', 'C', (3,12),'AN'], ['DAD13', 'C', 3...
# -*- coding: utf-8 -*- # encoding: utf-8 from __future__ import unicode_literals import itertools from one_fm.api.notification import create_notification_log from frappe import _ import frappe, os, erpnext, json, math from frappe.model.document import Document from frappe.utils import get_site_base_path from erpnext.h...
API reference*. """ vector_type = MMVector space_name = "MV" check_errors = { -1: "Bad input value p", -2: "A one bit outside a field has been found", -3: "A subfield has an illegal nonzero entry at index >= 24", -4: "Illegal nonzero diagonal entry", -5: "Symmetric part of vector is not symmetric", } d...
<filename>openerp/addons/base_calendar/base_calendar.py # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it a...
<filename>training/RL.py import tensorflow as tf from tensorflow.keras.layers import Dense, LSTM from tensorflow.keras.backend import set_value import numpy as np from tensorflow.keras.activations import relu, softmax from copy import deepcopy from config.loader import Default from game.state import PlayerState class...
<gh_stars>1-10 # This script will use community detection algorithms from networkx.community module # (and maybe other modules too) to find communities in the Global Trade Network data. # # (0). Import packages and libraries import numpy as np import networkx as nx import community as c # python-louvain module ...
##################################################################### # # # /labscript_devices/IMAQdxCamera/blacs_workers.py # # # # Copyright 2019, Monash University and contributors # # # # This file is part of labscript_devices, in the labscript suite # # (see http://labscriptsuite.org), and is licensed under the # ...
# -*- coding: utf-8 -*- """ Created on Wed Nov 21 21:30:31 2018 @authors: <NAME> and <NAME> """ # sklearn library from sklearn import datasets from sklearn import decomposition from sklearn.model_selection import StratifiedKFold from sklearn.metrics import accuracy_score from sklearn.preprocessing import OneHotEncod...
cancer_types_samples[mut_info[2]] = [mut_info[5]] cancer_types_samples_count[mut_info[2]] = 1 '''the last column in the mutation info contains annotations''' state = "NA" if 'ChromHMM:' in mut_info[-1]: for x in mut_info[-1].split('|'): if x.startswith("ChromHMM:"): state = x try: samples_per_chromhmm[state...
= dmass else: strMessage = ( "ERROR! XSDataRamboTainer.setDmass argument is not XSDataDouble but %s" % dmass.__class__.__name__ ) raise BaseException(strMessage) def delDmass(self): self._dmass = None dmass = property(getDmass, setDmass, delDmass, "Property for dmass") def export(self, outfile, level, name...
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # ChemPy - A chemistry toolkit for Python # # Copyright (c) 2012 by <NAME> (<EMAIL>) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associ...
existing finalizer set in the metadata.finalizers and the resource-specific default policy. :return: V1Status If the method is called asynchronously, returns the request thread. """ kwargs['_return_http_data_only'] = True if kwargs.get('callback'): return self.delete_namespaced_cron_job_with_http_info(name, name...
import ast from collections import OrderedDict from io import StringIO from typing import List, Dict, Any, Tuple, Optional import dectree.propfuncs as propfuncs from dectree.config import CONFIG_NAME_INPUTS_NAME, CONFIG_NAME_OUTPUTS_NAME, CONFIG_NAME_PARAMS_NAME from .config import get_config_value, \ CONFIG_NAME_VEC...
<reponame>SPIDER-CMB/xfaster<filename>xfaster/batch_tools.py<gh_stars>1-10 import os import stat import shutil import subprocess as sp import tempfile import re import datetime as dt from warnings import warn import numpy as np import argparse as ap __all__ = ["get_job_logfile", "batch_sub", "batch_group", "JobArgumen...
<gh_stars>1-10 # Copyright (C) 2020 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Create, description, representation and equal of entities.""" # pylint: disable=too-many-arguments # pylint: disable=too-few-public-methods # pylint: disable=inconsistent-return-statements ...
/ 1000000 OOoOO0 = round ( OOoOO0 , 2 ) if 99 - 99: IiII / OoO0O00 % Oo0Ooo * iIii1I11I1II1 if 89 - 89: I1Ii111 + Oo0Ooo - ooOoO0o if 63 - 63: oO0o + OoOoOO00 - oO0o - Ii1I % ooOoO0o * I1Ii111 if 92 - 92: IiII % IiII / o0oOOo0O0Ooo * OoO0O00 % OoOoOO00 if 12 - 12: I1IiiI iI1IiIiIIII11 = self . normalize ( self ....
"1905:19"): "metadataonly", ("prop", "1905:2"): "metadataonly", ("prop", "1905:20"): "metadataonly", ("prop", "1905:21"): "metadataonly", ("prop", "1905:22"): "metadataonly", ("prop", "1905:24"): "metadataonly", ("prop", "1905:25"): "metadataonly", ("prop", "1905:27"): "metadataonly", ("prop", "1905:28"): "meta...
+ name + "_energy.csv", index=31)) # sa D energy_list.append(return_indexed_elems(input_csv=path + name + "_energy.csv", index=32)) # sa L # bandwidth my_dpi = 300 if a == "eyeriss": fig_h = 1.6 else: fig_h = 1.3 fig_w = 3.3115 bp_color = "#7A81FF" bs_color = "#FF7F7F" u6_color = "#666666" u7_color = "#88...
import argparse import copy import json import logging import os import os.path as osp import random import time from collections import OrderedDict from functools import partial import numpy as np import paddle from paddlenlp.data import Dict, Pad from paddlenlp.datasets.dataset import load_dataset from paddlenlp.tra...
<gh_stars>0 from models import * from random import randint FFBSKT_URL = '<KEY>' BASKETBALL_GROUP_URL = '<KEY>' def start(self): self.Clear(Answer()) #key = ndb.Key(Group, '<EMAIL>', Group, 'General parametrs') group = GroupStat(name='General parametrs', st_name=['name', 'content','rate'], st_opt=['name','0','his...
ifelse(anno$status == "down.both", "darkGreen", sidecols)''') R('''sidecols <- ifelse(anno$status == "down.DNA", "blue", sidecols)''') R('''sidecols <- ifelse(anno$status == "up.DNA", "orange", sidecols)''') # scale data R('''dat.s <- data.frame(t(apply(dat,1,scale)))''') R('''dat.s <- dat.s[rownames(anno),]''') ...
"" for n in range(w_firstp.shape[1]-2*seq_slide): w_firstp[-1, s + n] = seq_matrix_w1[z, n] w_firstp_info = seq_info_sharper(seq_freq(w_firstp[:, seq_slide+left_gap:seq_slide+left_gap+seq_length])) ### if w_firstp_info>w_firstp_info_max: wbest_firstp = np.zeros(w_firstp.shape) wbest_firstp = ...