input
stringlengths
2.65k
237k
output
stringclasses
1 value
import csv import re from collections import defaultdict from copy import deepcopy from enum import Enum import vcf from rck.core.io import EXTERNAL_NA_ID, SVTYPE, write_adjacencies_to_destination, COPY_NUMBER, parse_segment_extra from rck.core.structures import Strand, Position, Adjacency, AdjacencyType, Phasing, Se...
from math import ceil from os import ( urandom, ) from os.path import ( dirname, join as ojoin, realpath, ) from eth_account.account import ( Account, ) from eth_account.hdaccount.deterministic import ( PRIVATE, bip32_ckd, bip32_deserialize, bip32_master_key, bip32_privtopub, ) from eth_account.hdaccount.mne...
# -*- coding: utf-8 -*- import sys import os import numpy as np import fourier as ff import matplotlib import warnings from matplotlib import pyplot as plt from os.path import isfile matplotlib.use('Agg') def warn(*args, **kwargs): print('WARNING: ', *args, file=sys.stderr, **kwargs) def fit_validate_model(model,...
s += "N" * (3 - (len(s) % 3) ) segment.mCds.append(cds_fragment) assert(len(segment.mCds) == len(segment.mFragments)) # sanity check: are all sequence segments the same? # do not compare boundary residues, as they might be different # due to alternative splicing. xset = set() for x in segment.mFragments: xse...
= 12098618010582908146005387418068214530897837924954238474768639057877490835545707924234415267192522442378424554055618356812999593976451240454748132615211091 p2 = 114078116454996138073318170170395300151527904793534256191938789983399536922395777111499295202803369554422196999085171496293035396121701314031895628788412353...
*/ onTouchStart : $.empty, /** @type {function (): undefined} */ onTouchMove : $.empty, /** @type {function (): undefined} */ onTouchEnd : $.empty, /** @type {function (): undefined} */ onMouseWheel : $.empty }; Options.Navigation = { $extend : false, enable : false, type : "auto", panning : false, zoomin...
<filename>backend/dataProcess/tool.py<gh_stars>0 ''' Description: Writer = "plh" Data:2021/8/28 ''' import pandas as pd import os.path as osp import os import numpy as np import json import time import glob import yaml def bit(): import blocksmith key = '<KEY>' address = blocksmith.EthereumWallet.generate_address...
<gh_stars>0 import re from inspect import isclass from textwrap import dedent from scheme import * from mesh.address import * from mesh.constants import * from mesh.endpoint import * from mesh.exceptions import * from mesh.util import * class Configuration(object): """A resource configuration scheme. :param dict ...
image.shape[dimension]. Values beyond 0 and 1 are possible and even recommended) :param max_strength: scaling of the intensity gradient. Determines what max(abs(add_gauss)) is going to be float: fixed value (float, float): sampled from [max_strength[0], max_strength[1]] callable: you decide. Will be called as max_...
<gh_stars>10-100 """ DeepImageJ https://deepimagej.github.io/deepimagej/ Conditions of use: DeepImageJ is an open source software (OSS): you can redistribute it and/or modify it under the terms of the BSD 2-Clause License. In addition, we strongly encourage you to include adequate citations and acknowled...
self.match(self.input, 75, self.FOLLOW_75_in_do_while_stmt669) if self._state.backtracking == 0: stream_75.add(char_literal69) self._state.following.append(self.FOLLOW_expr_in_do_while_stmt671) expr70 = self.expr() self._state.following.pop() if self._state.backtracking == 0: stream_expr.add(expr70.tree) ...
import time from selenium import webdriver from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import Select from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException from selenium.common....
self.directed else self.alpha[link[1]] if not self.poisson_me: if self.hawkes_me: lambda_ij[link] += 0 if not after_first_event else np.sum(scaled_exponential(t-self.node_ts[link[0]][:(max_ind+1)], self.mu[link[0]],self.phi[link[0]])) lambda_ij[link] += 0 if not after_first_event_prime else np.sum(...
a max of 2^29 pixels, or 23170 on a side # recompute max_dpi max_dpi = int(23000 / max(fig_height, fig_width)) h, w = im.shape[:2] # try to set dpi to native resolution of imagery desired_dpi = max(default_dpi, 1.0 * h / fig_height) #desired_dpi = max(default_dpi, int( np.max(im.shape) / max(fig_height, fig_widt...
<filename>sprcom.py import numpy as np import pymc3 as pm import matplotlib.pyplot as plt import theano.tensor as tt from scipy.linalg import eigvalsh from scipy.sparse import csr_matrix from theano.sparse import as_sparse_variable from theano.sparse import dot as t_sparse_dot from theano import shared from seaborn im...
# Authors: <NAME> <<EMAIL>> # # Copyright (C) 2006 Red Hat # see file 'COPYING' for use and warranty information # # 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; version 2 only # # This program...
# import your word dictionary here from another file # The game is started (this function is called) by the last line in this file # TODO: part 1 def init_wordle_ai(): # during this project, you may want to initialize global variables here at the beginning # global vars can be accessed anywhere in this file. # to...
one with only `start` set in which case the access is identical to :func:`Trie.itervalues` invocation with prefix argument. Example: >>> import pygtrie >>> t = pygtrie.StringTrie() >>> t['foo/bar'] = 'Bar' >>> t['foo/baz'] = 'Baz' >>> t['qux'] = 'Qux' >>> t['foo/bar'] 'Bar' >>> list(t['foo':]) ['Baz', 'Bar'...
% (o[0]-ovhx, o[1]-ovhy, o[2]+z-ovhz) overhangs[0] += " %s %s %s" % (o[0]+x+ovhx, o[1]-ovhy, o[2]+z-ovhz) overhangs[0] += " " + p[5] overhangs[0] += " " + p[4] overhangs[0] += " %s %s %s" % (o[0]-ovhx, o[1]-ovhy, o[2]+z-ovhz) interior.append(None) overhangs.append("") overhangs[1] += "%s %s %s" % (o[0]+x+ovhx, ...
<gh_stars>1-10 """ .. /------------------------------------------------------------------------------\ | -- FACADE TECHNOLOGIES INC. CONFIDENTIAL -- | |------------------------------------------------------------------------------| | | | Copyright [2019] Facade Technologies Inc. | | All Rights Reserved. | | | |...
<filename>sysopt/symbolic/symbols.py """Functions and factories to create symbolic variables.""" import weakref from abc import ABCMeta, abstractmethod from collections import defaultdict from inspect import signature import numpy as np from scipy.sparse import dok_matrix, spmatrix from typing import Union, List, Call...
and self.last_point else None @property def xdelta_direct(self): """direct x-distance between end points the sign is only meaningful for directed edges :return: distance in pixels """ return None if not self.xrange_direct or not self.xrange_direct[0] or not self.xrange_direct[1] \ else self.xrange_direct[1] - ...
json files) files_sounds = os.listdir('./sounds/') files_analysis = os.listdir('./analysis/') files_baskets = os.listdir('./baskets/') files_baskets_pickle = os.listdir('./baskets_pickle/') files_analysis_stats = os.listdir('./analysis_stats/') settings = SettingsSingleton() settings.local_sounds = [] settings...
<gh_stars>1-10 # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you may redistribute it, and/or # modify it, under the terms of the GNU General Public License # as published by the Free Software Foundation - either version 2 # of the License, or (at your option) any later version. # # This progr...
JOB_RESTAURANT_DINER: 'CommonGameTag' = 2145 JOB_VENUE: 'CommonGameTag' = 1464 JOB_VET_PATIENT: 'CommonGameTag' = 57442 JOB_WALKBY: 'CommonGameTag' = 1463 LIFESTYLES_DANGEROUS_CAREER: 'CommonGameTag' = 69711 LIFESTYLES_HIGH_ENERGY_CAREER: 'CommonGameTag' = 69683 LIFESTYLES_INDOORSY_CAREER: 'CommonGameTag' = 69733...
3807 9.07011961409955084755857370765622E-2293 4.53505980704977542377928685382811E-2293 3808 2.267529903524887711889643426914055E-2293 1.133764951762443855944821713457028E-2293 3809 5.66882475881221927972410856728514E-2294 2.83441237940610963986205428364257E-2294 3810 1.417206189703054819931027141821285E-2294 7.08...
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from termcolor import cprint,colored from danpy.sb import dsb,get_terminal_width from pendulum_eqns.init_FF_sinusoid_model import * N_seconds = 10 N = N_seconds*10000 + 1 Time = np.linspace(0,N_seconds,N) dt = Time[1]-Time[0] ...
<reponame>CSUFTitanRover/TitanRover2018<filename>rover/core/servers/ArduinoSocketServer/misc/NvidiaJoystick_SocketCall.py #!/bin/sh ### BEGIN INIT INFO # Provides: RoverMobilityServer # Required-Start: $remote_fs $network $syslog # Required_Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Shor...
import os import sys import time import calendar import copy import math import Tkinter as Tk import tkMessageBox import re import cPickle as pickle try: import Pmw except ImportError: pmwpath = "./Pmw" sys.path.append(pmwpath) import Pmw # Configure taf_out_file = './taf_out_file/' tafdir2 = './tafout2/' hrrr_f...
function, where it is stored, where it travels and how unavailability or unauthorised access, modification or deletion would adversely impact the essential function. This also applies to third parties storing or accessing data important to the operation of essential functions.", # noqa: E501 "answers": [{ "answer": "...
<gh_stars>10-100 import numpy as np import scipy.linalg as la import cvxpy as cp import torch import torch.optim as optim import argparse import setproctitle import os from gym import spaces import tqdm import policy_models as pm import disturb_models as dm import robust_mpc as rmpc from envs.random_nldi_env import R...
+ d_a_xa - d_x_xa - d_ka_a - d_b_kb if d >= -negligeable: return False # villes à déplacer ech = [] bp = b if bp < a: bp = b + nb for i in range(a, bp + 1): ech.append(chemin[i % nb]) ech.reverse() diff = bp - a + 1 xp = x if xp < b: xp += nb for le in range(b + 1, xp + 1): ll = le % nb bp = (a + le...
be defined within a single Note. ''' def __init__(self, number=None): MusicXMLElement.__init__(self) self._tag = 'lyric' # attributes # can be a number for mult line or name (e.g. chorus) self._attr['number'] = None # entities self.syllabic = None # begin, middle, end, or single self.text = None def filterL...
<filename>google/maps/fleetengine/v1/maps-fleetengine-v1-py/maps/fleetengine_v1/types/vehicle_api.py # -*- coding: utf-8 -*- # Copyright 2020 Google 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 L...
"""The scaled dot-product attention mechanism defined in Vaswani et al. (2017). The attention energies are computed as dot products between the query vector and the key vector. The query vector is scaled down by the square root of its dimensionality. This attention function has no trainable parameters. See arxiv.org/...
parent_window=self.main_ui) elif self.action_type == ACTION_RECOVER_FROM_WORDS_SAFE: device_id, cancelled = recovery_device(self.hw_type, self.hw_device_id_selected, self.word_count, self.hw_action_use_passphrase, self.hw_action_use_pin, self.hw_action_label, parent_window=self.main_ui) elif self.action_type == ...
<reponame>konchunas/pytezos import json import logging from decimal import Decimal from functools import lru_cache from os.path import exists, expanduser from typing import Any, Callable, Dict, List, Optional, Union from urllib.parse import urlparse import requests from cached_property import cached_property # type: i...
<gh_stars>100-1000 # # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 Google 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: # # 1. Redistributions of source code must reta...
<reponame>jhurley13/automating-cbc # taxonomy # from taxonomy import Taxonomy import sys import traceback from pathlib import Path from typing import Tuple, Optional, Any, List from IPython.display import display # https://pandas.pydata.org/pandas-docs/stable/user_guide/categorical.html from pandas.api.types import C...
<reponame>marza-animation-planet/das<gh_stars>1-10 import das import re import fnmatch import math NoUI = False try: import Qt # pylint: disable=import-error from Qt import QtCore # pylint: disable=import-error from Qt import QtGui # pylint: disable=import-error from Qt import QtWidgets # pylint: disable=import-e...
= next_ids[i] - 1 transitions[nid] = next_ids return Network(nodes, transitions) def delete_nodes(self, node_ids): # Make sure no duplicates. for i in range(len(node_ids)): assert node_ids[i] not in node_ids[i+1:] network = Network(self.nodes, self.transitions) # Delete from high to low so the node_ids don't g...
98.81 SOURCE3 2 2.1583 cc-ss-ss 74.9 93.80 CORR_SOURCE5 31 0.9858 cd-ss-cd 78.0 90.24 SOURCE3_SOURCE5 652 1.5043 cd-ss-n 96.8 93.58 SOURCE3_SOURCE5 6 2.0175 cd-ss-na 93.8 99.33 SOURCE3 18 2.5847 cd-ss-nd 99.5 93.22 CORR_SOURCE5 25 1.5563 cd-ss-os 94.7 98.81 SOURCE3 2 cd-ss-ss 74.9 93.80 CORR_SOURCE5 31 0.9858 cl-ss-cl ...
""" genome_mutation_test.py Test gene-specific operations. """ import os import unittest import numpy as np from config import Config from population.utils.genome_util.genes import ConnectionGene, GruNodeGene, OutputNodeGene, SimpleNodeGene from utils.dictionary import * def get_connection_gene(key, config): retu...
os.path.split(file_name)[-1] mol = self.vf.getMolFromName(tmp_mol_name.replace('-','_')) f = self.cmdForms['default'] address = f.descr.entryByName['web service address']['widget'].get() address = address.strip() global APBS_ssl if address.find('https://') != 0: #first check to see if APBS Web Services is up and...
back to r # Inspired by the Adafruit examples. # def color_wheel(self, pos): pos = 255 - pos if pos < 85: return (255 - pos* 3, 0, pos * 3) elif pos < 170: pos -= 85 return (0, pos * 3, 255 - pos * 3) else: pos -= 170 return (pos * 3, 255 - pos * 3, 0) # # Returns a new, random wheel index with a minimum...
##--------------------Coding References---------------------## # Percentage of borrowed code: 5% - Parts of the MC-dropout and data preprocessing normalisation step are borrowed, # The UNET model is adapted from my own previous work on 3D UNETs. It was modified to include 2D convolution layers and dropout layers. ...
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = '<EMAIL> (<NAME>)' from datetime import datetime from datetime import time i...
<filename>cyanophage-light-dark-transcriptomics/code/RNAseq_parser_gff_directional.py #!/usr/bin/env python ''' <NAME>, Dec 2010 - Oct 2011, Feb 2012 Usage: RNAseq_parser_gff.py -i <input SAM-formatted alignment file> -o <output> -d <dir with gff files> -p <tells it to print out intergenics) IMPORTANT: Script require...
= nodeNumber self.referencePosition = referencePosition self.referenceRotation = referenceRotation self.visualization = visualization def __iter__(self): yield 'objectType', 'Mass1D' yield 'name', self.name yield 'physicsMass', self.physicsMass yield 'nodeNumber', self.nodeNumber yield 'referencePosition', se...
is not None: out = d_mini[self._invs[0]] # AM out[self._dipoles[0]] -= d_mini[self._invs[1]] # AN out[self._dipoles[1]] -= d_mini[self._invs[2]] # BM out[self._dipoles[0] & self._dipoles[1]] += d_mini[self._invs[3]] # BN else: out = d_mini return out def _mini_survey_dataT(self, v): if self._mini_survey is no...
<gh_stars>0 # """ # This script contains the function generated by cvxopt package. # 1 The Logistic function is to solve the logistic lasso (L1) regression problem with only feature and labels (No comparison included). # 2 The Log_Log is to solve logistic lasso (L1) regression with Bradley Terry comparison model. # 3 T...
# Plan Trial (+-), Plan Trial Metered Feature (+-), # Plan After Trial (+), Metered Features After Trial (+) document_entries = DocumentEntry.objects.all() assert len(document_entries) == 6 doc = document_entries[0] # Plan trial (+) assert doc.unit_price == Decimal('57.14') doc = document_entries[1] # Plan tria...
+= 'x' if (len(perms) > 0): self.write_attribute(PERMISSIONS, perms) has_contents = (self.options.MemoryContent.checked == True and self.check_if_seg_contents(seg) == True) self.close_tag(has_contents) if (has_contents == True): self.export_memory_contents(os.path.basename(binfilename), self.binfile, seg.start_...
<filename>email_reply_parser/__init__.py """ email_reply_parser is a python library port of GitHub's Email Reply Parser. For more information, visit https://github.com/zapier/email-reply-parser """ import re class EmailReplyParser(object): """ Represents a email message that is parsed. """ @staticmethod def ...
# -*- coding: utf-8 -*- """Total generation plots. This module plots figures of total generation for a year, month etc. @author: <NAME> """ import logging import numpy as np import pandas as pd import matplotlib.pyplot as plt import matplotlib as mpl from matplotlib.patches import Patch import matplotlib.ticker as ...
The category will be determined automatically in the former case. Depending on the assertion, the order of the items may matter. Parameters ---------- solver : Solver The solver that this assertion operates in. item1 : The first item of interest. item2 : The second item of interest. category : The label o...
# -*- coding: utf-8 -*-. """ pygsheets.cell ~~~~~~~~~~~~~~ This module contains cell model """ # import warnings from .custom_types import * from .exceptions import (IncorrectCellLabel, CellNotFound, InvalidArgumentValue) from .utils import format_addr class Cell(object): """ An instance of this class represent...
(symbol, count)) elif period == 30: count: int = 0 i: int = 0 loop_len = len(stock_day) - 1 while i < loop_len: timestamp: pd.Timestamp = pd.to_datetime(stock_day[i]) time_point = datetime.datetime(year=timestamp.year, month=timestamp.month, day=timestamp.day, hour=timestamp.hour, minute=timestamp.minute, secon...
from collections import OrderedDict from functools import partial from inspect import Parameter, Signature, signature import opcode import sys from types import CodeType, FunctionType, SimpleNamespace from typing import ( cast, Any, Callable, Dict, Generic, Iterable, List, NamedTuple, NoReturn, Optional, Tuple, TYPE_...
# MIT License # # Copyright (c) 2020 <NAME> <tony[dot]wu(at)nyu[dot]edu> # # 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 us...
self.getAddTool(pathname).getAdditionalMetaData(pathname) additional.update(preferences) nname = self.G.add_node(pathname, xpos=xpos, ypos=ypos, nodetype='base', **additional) added.append(nname) ypos += 50 if ypos == 450: ypos = initialYpos xpos += 50 if filename == baseImageFileName: self.start = nname self...
the method is called asynchronously, returns the request thread. """ all_params = ['notification_id', 'expand'] all_params.append('callback') params = locals() for key, val in iteritems(params['kwargs']): if key not in all_params: raise TypeError( "Got an unexpected keyword argument '%s'" " to method get_co...
= None self.__pRkd = None self.__pthres = None self.__pslope = None @Property def thin (): "Thinning: Subsample chains to reduce autocorrelation" def fget (self): return self.__thin def fset (self,t): self.__thin = t # Set all values that depend on thin to None. This way, they are recomputed # on access s...
''' Manage web apps. ''' from .. pyaz_utils import _call_az from . import auth, config, connection, cors, deleted, deployment, hybrid_connection, identity, log, traffic_routing, vnet_integration def create(name, plan, resource_group, assign_identity=None, deployment_container_image_name=None, deployment_local_git=Non...
import unittest from data_structures.linked_list import InsertPositions, SearchPositions from data_structures.linked_list.circular_linked import ( CircularDoublyLinkedList, CircularSinglyLinkedList ) class CircularSinglyLinkedListTests(unittest.TestCase): def setUp(self): self.linked_list = CircularSinglyLinkedLi...
presses have been made Pauses program execution in mean time. Example: res = bits.statusBoxWaitN(5) will suspend all other activity until 5 button presses have been recorded and will then return a list of Dicts containing the 5 results. Results can be accessed as follows: structure:: res[0].dir, res[...
"""Text Summarization related modeling class""" from typing import List, Optional, Union import torch from fairseq import hub_utils from torch import nn from pororo.models.brainbert.BrainRoBERTa import BrainRobertaHubInterface from pororo.tasks import download_or_load from pororo.tasks.utils.base import ( PororoFac...
# coding: utf-8 # Copyright 2020. ThingsBoard # # # 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 agr...
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from .import attestation_pb2 as attestation__pb2 from .import beacon_block_pb2 as beacon__block__pb2 from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2 from .import validator_pb2 as validator__pb2 class BeaconN...
<gh_stars>0 # -*- coding: utf-8 -*- """ Module with class definitions for Sequence, Gene, mRNA and Transcript by <NAME> <EMAIL> Last update 3/10/2022 """ class Sequence(): """DNA sequence Class""" def __init__(self, seq_type, seq_range, orientation): """Sequence class constructor. Parameters ...
self, process_code: str = None, ): # 表单的唯一码 self.process_code = process_code def validate(self): pass def to_map(self): _map = super().to_map() if _map is not None: return _map result = dict() if self.process_code is not None: result['processCode'] = self.process_code return result def from_map(self,...
from . import cilast as ast from . import visitor from .scope import VariableInfo from .mipsutils import datatype, op, reg class Cil2MipsVisitor: def __init__(self, context): self.dotdata = [] self.dotcode = [] self.context = context # ====================================================================== # =[...
else: perso = False user = await self.bot.safe_fetch('user', id) or id if user: name = user else: name = m['created_by_name'] autoplname = m['name'] nbvote = len(m.get('upvote', [])) if perso: embed.description += f'`{i}.` ' + get_str(ctx, 'plfind-result-vote{}'.format( 's' if nbvote != 1 else '')).format(a...
<filename>dgen_os/python/diffusion_functions_elec.py """ Name: diffusion_functions Purpose: Contains functions to calculate diffusion of distributed wind model (1) Determine maximum market size as a function of payback time; (2) Parameterize Bass diffusion curve with diffusion rates (p, q) set by payback time; (3) ...
3565, 3566, 3572, 3571) model.createElement(560, 3596, 3597, 3603, 3602, 3566, 3567, 3573, 3572) model.createElement(561, 3597, 3598, 3604, 3603, 3567, 3568, 3574, 3573) model.createElement(562, 3598, 1161, 1162, 3604, 3568, 1156, 1157, 3574) model.createElement(563, 905, 3599, 3605, 904, 900, 3569, 3575, 899) model.cr...
to perform the operation on. :param file input_file5: Fifth input file to perform the operation on. :param file input_file6: Sixth input file to perform the operation on. :param file input_file7: Seventh input file to perform the operation on. :param file input_file8: Eighth input file to perform the operation on. ...
this is a transient dependency or not. :param value: the new value for the transient property; ``True`` if this is a transient dependency or ``False`` if not. """ self._transient = value def derive_from(self, group: str, name: str, version: str) -> 'Dependency': """ A function that creates a dependency object...
<reponame>m-yuhas/interview_questions<filename>shuffle.py<gh_stars>0 #!/usr/bin/env python from itertools import product from random import randint from sys import modules from typing import Any, Callable, List try: from matplotlib import pyplot except: pass class Card(object): """A playing card. Arguments:...
bace_user_specified_features = [ 'MW', 'AlogP', 'HBA', 'HBD', 'RB', 'HeavyAtomCount', 'ChiralCenterCount', 'ChiralCenterCountAllPossible', 'RingCount', 'PSA', 'Estate', 'MR', 'Polar', 'sLi_Key', 'ssBe_Key', 'ssssBem_Key', 'sBH2_Key', 'ssBH_Key', 'sssB_Key', 'ssssBm_Key', 'sCH3_Key', 'dCH2_Key', 'ssCH2_Key', 'tCH_Ke...
<filename>pongAI.py #PONG pygame import random import pygame, sys from pygame.locals import * import pong_config pygame.init() fps = pygame.time.Clock() #colors WHITE = (255,255,255) RED = (255,0,0) GREEN = (0,255,0) BLACK = (0,0,0) #globals WIDTH = pong_config.WIDTH HEIGHT = pong_config.HEIGHT BALL_RADIUS = pong_c...
<reponame>jarmovanlenthe/imagemounter<gh_stars>0 #!/usr/bin/env python # # This CLI is a total mess. If you want a simple example, please refer to simple_cli.py # from __future__ import print_function from __future__ import unicode_literals import argparse import glob import logging import sys import os from imagemo...
form = SystemImporterFileCsvConfigForm( data={ 'csv_column_system': '1', 'csv_import_path': '/tmp', 'csv_import_filename': 'systems.csv', 'csv_import_username': str(testuser), 'csv_default_systemstatus': str(systemstatus_1), 'csv_default_analysisstatus': str(analysisstatus_1), 'csv_default_tagfree_systemstatus'...
<filename>DragandDrop-imageold.py # -*- coding: utf-8 -*- """ Created on Mon Oct 23 14:24:31 2017 @author: guarind """ import cv2 import os import sys import numpy as np from PyQt5 import QtWidgets from PyQt5 import QtGui from PyQt5 import QtCore from PyQt5.QtCore import QFile, QTextStream from mini_Emotrics impo...
import os import torch.multiprocessing torch.multiprocessing.set_sharing_strategy('file_system') import torch.backends.cudnn as cudnn cudnn.benchmark = False os.environ["CUDA_VISIBLE_DEVICES"] = "0" import sys import os import json import time import argparse import random from decimal import Decimal import numpy as np...
<reponame>saikrishnawanted/mybot<gh_stars>10-100 from __future__ import absolute_import import threading from time import sleep import sys from datetime import datetime from os.path import getmtime import atexit import signal from bitmex_bot import bitmex, indicators from bitmex_bot.settings import settings from bitme...
np.array(wl.dec_hi) regx = totalmatrix(self.dim, levels, g, h) regy = sp.csc_matrix((1, self.dim * self.dim)) regx = sp.csc_matrix(regx) regy = sp.csc_matrix(regy) self.radonoperator = sp.csc_matrix(self.radonoperator) alpha = alpha self.Q.Lx = regx self.Q.b = 0.0000 self.Q.Ly = regy self.Q.a = alpha self.Q....
'861594995':{'en': 'Zaozhuang, Shandong', 'zh': u('\u5c71\u4e1c\u7701\u67a3\u5e84\u5e02')}, '861594996':{'en': 'Yantai, Shandong', 'zh': u('\u5c71\u4e1c\u7701\u70df\u53f0\u5e02')}, '861594997':{'en': '<NAME>', 'zh': u('\u5c71\u4e1c\u7701\u70df\u53f0\u5e02')}, '861594998':{'en': '<NAME>', 'zh': u('\u5c71\u4e1c\u7701\...
:param title_desc: boolean that indicate group info sync :param contributors: boolean that indicate contribuors :param lock_node: True ... use locker.lock_node() :return: True on success, False on sync skip condition ''' logger.debug('mapcore_sync_map_group(\'' + utf8(node.title) + '\') started.') # check Node ...
root guard on the interfaces', 'arguments': [ { 'name': 'action', 'doc': ( 'enable Enable the root guard on the interfaces' 'disable Disable the root guard on the interfaces' ), } ], }, { 'command': 'no spanning-tree root-guard {action}', 'doc': 'Enable/Disable the root guard on the interfaces', 'argument...
<gh_stars>0 # -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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...
type, then it must be explicitly specified in databooks and program books.' % (pop["label"], pop["type"]) for obj_type, df in zip(["comps", "characs", "pars"], [framework.comps, framework.characs, framework.pars]): for spec_name, spec in zip(df.index, df.to_dict(orient="records")): if spec_name in self.pops: raise...
<reponame>Loop3D/LoopStructural<filename>LoopStructural/visualisation/model_plotter.py from LoopStructural.utils import getLogger from LoopStructural.utils import LoopImportError logger = getLogger(__name__) import numpy as np try: from skimage.measure import marching_cubes except ImportError: logger.warning("Using...
<gh_stars>100-1000 # (C) Datadog, Inc. 2020-present # All rights reserved # Licensed under Simplified BSD License (see LICENSE) import json import os from collections import namedtuple from tempfile import gettempdir import click import yaml from ...console import CONTEXT_SETTINGS, abort, echo_debug, echo_info, set_d...
# -*- coding: utf-8 -*- """ Author ------ <NAME> Email ----- <EMAIL> Created on ---------- - Fri Nov 25 12:53:24 2016 Modifications ------------- - re-organized on Tue May 23 21:00:00 2017 Aims ---- - utils for apertures """ import numpy as np from .background import apbackground from .extract import (get_apert...
== Node.ELEMENT_NODE and nodeName_ == "directory2D": obj_ = XSDataFile() obj_.build(child_) self.setDirectory2D(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeName_ == "directoryMisc": obj_ = XSDataFile() obj_.build(child_) self.setDirectoryMisc(obj_) elif child_.nodeType == Node.ELEMENT_NODE and nodeN...
# -*- coding: utf-8 -*- """Data_preprocess.ipynb Automatically generated by Colaboratory. # DATA """ import numpy as np import glob import random import struct import csv from tensorflow.core.example import example_pb2 import tensorflow as tf from threading import Thread from queue import Queue import time import ...
#!/usr/bin/env python """ Squidpeek - Per-URL Squid Logfile Metrics <NAME> <<EMAIL>> """ __license__ = """ Copyright (c) 2006-2013 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Softwa...
def update_planet_resources(self, planet): self.miniSleep() try: resp = self.br.open(self._get_url('resources', planet)) soup = BeautifulSoup(resp) metal = int(soup.find(id='resources_metal').text.replace('.', '')) self.RESOURCESTOSEND['metal']=metal crystal = int(soup.find(id='resources_crystal').text.replace('...
#!/usr/bin/env python """ ImageNet Training Script This is intended to be a lean and easily modifiable ImageNet training script that reproduces ImageNet training results with some of the latest networks and training techniques. It favours canonical PyTorch and standard Python style over trying to be able to 'do it all...
<filename>src/ctransformer.py """ Performs C code transformations using pycparser. All the transformations are applied in-place on the AST. Currently supported code transformations: - Function call creation Creates a statement representing a function call. - Havoc block creation Creates a block where every variab...