text
stringlengths
1
927k
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
import re import smtplib from email.message import EmailMessage from email.mime.text import MIMEText from typing import Union from pywhatkit.core.exceptions import UnsupportedEmailProvider def send_mail( email_sender: str, password: str, subject: str, message: Union[str, MIMEText], email_receiver...
def convert_h1(element, text): """ Add '=' to the bottom of text """ if text: text = text + '\n' + '=' * len(text) return text
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-02 13:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('EkList', '0001_initial'), ] operations = [ migrations.RemoveField( ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, ...
import torch import numpy as np import ubelt as ub from netharn.util.nms import py_nms from netharn.util import profiler from netharn.util.nms import torch_nms import warnings _impls = {} _impls['py'] = py_nms.py_nms _impls['torch'] = torch_nms.torch_nms _automode = 'py' try: from netharn.util.nms import cpu_nms ...
# qubit number=2 # total number=16 import cirq import qiskit from qiskit import IBMQ from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi import numpy a...
#coding: utf-8 import os import sys redis_passwd = "foobared" nc_servers = { 'redis-ms': {'host': '127.0.0.1', 'port': 32121}, 'redis-shards': {'host': '127.0.0.1', 'port': 32122}, 'mc-shards': {'host': '127.0.0.1', 'port': 32123} } redis_servers = { 'redis-master': {'host'...
""" Copyright Digisim, Computer Architecture team of South China University of Technology, 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 ...
# Copyright 2017 DGT NETWORK 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 writ...
""" Sensor from an SQL Query. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.sql/ """ import decimal import datetime import logging import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const imp...
# coding: utf-8 import pprint import re import six from huaweicloudsdkcore.sdk_response import SdkResponse class CreateDeploymentResponse(SdkResponse): """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (...
from setuptools import setup setup( name="mquery", version="0.1.0", description="CLI for reading and filtering your mBank history exports.", author="Piotr Wasilewski", author_email="piotrek@piotrek.io", url="https://github.com/piotrekio/mquery", license="MIT", python_requires=">=3.8", ...
from selenium import webdriver from selenium.webdriver.common.by import By import os import time import json import pandas as pd import sys chrome_options = webdriver.ChromeOptions() chrome_options.add_argument("--headless") chrome_options.add_argument("--no-sandbox") chrome_options.add_argument("--disable-dev-shm-usa...
#!/usr/bin/env python3 # Copyright 2016 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. """Tries to evaluate global constructors, appl...
#%% def ich_haette_gerne_so_viele_katzen(anzahl: int) -> str: text = "Ich hätte gerne {} Katze".format(anzahl) if anzahl > 1: text += "n" return text # %% # Damit können wir schon ein kleines Spiel bauen. # Hier wird eine Zufallszahl zwischen 1 und 20 gewählt: import random zufallszahl = random.ran...
from Bio import Alphabet COUNT = 1 FREQ = 2 ################################################################## # A class to handle frequency tables # Copyright Iddo Friedberg idoerg@cc.huji.ac.il # Biopython (http://biopython.org) license applies # Methods to read a letter frequency or a letter count file: # Example fi...
# Copyright (c) 2014 Mirantis 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 writ...
# -*- test-case-name: twisted.conch.test.test_recvline -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Basic line editing support. @author: Jp Calderone """ import string from zope.interface import implementer from twisted.conch.insults import insults, helper from twisted.python im...
r""" From previous experiments, we saw that ephemeral pseudo-labelling helped boost accuracy despite starting with only 20 points. We could kick-start BALD with 85% accuracy with 24 iterations but it seems like using 80% accuracy at 10 iterations is a good trade-off. It's harder to gain more accuracy as the number of i...
"""total= 0 for num in range(101): total = total + num print (total) """ i = 0 while i < 5: print ('Jimmy', str(i)) i = i + 1
# -*- coding: utf-8 -*- __all__ = ["kipping13", "vaneylen19"] import numpy as np import pymc3 as pm import theano.tensor as tt from ..citations import add_citations_to_model from .base import UnitUniform def kipping13( name, fixed=False, long=None, lower=None, upper=None, model=None, **kwargs ): """The bet...
import tensorflow as tf from tensorflow import keras from . import Operation class Dense(Operation): """Multi Layer Perceptron operation. Help you to create a perceptron with n layers, m units per layer and an activation function. Args: units (int): number of units per layer. activation...
#!/usr/bin/env python '''Farmware Tools: Farmware API utilities used by `device` for FarmBot OS v8.''' import sys import json import struct import socket import threading from time import time, sleep from uuid import uuid4 try: import paho.mqtt.client as mqtt except ImportError: pass from .env import Env ENV...
# Copyright (c) 2019-2021 Intel Corporation # # 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...
import logging from urllib import urlencode import datetime import mimetypes import cgi from pylons import config from genshi.template import MarkupTemplate from genshi.template.text import NewTextTemplate from paste.deploy.converters import asbool import paste.fileapp import ckan.logic as logic import ckan.lib.base ...
# DO NOT EDIT! This file is automatically generated import datetime import enum import typing from commercetools.types._abstract import _BaseType from commercetools.types._common import BaseResource if typing.TYPE_CHECKING: from ._common import CreatedBy, LastModifiedBy, Reference from ._message import UserP...
# Copyright 2021 The Couler Authors. All rights reserved. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# write_NAICS_from_useeior.py (scripts) # !/usr/bin/env python3 # coding=utf-8 """ 3 scripts: A script to get NAICS names and a NAICS 2-3-4-5-6 crosswalk. - from useeior amd store them as .csv. - Depends on rpy2 and tzlocal as well as having R installed and useeior installed. Loops through the source crosswalks to ...
from .tts import Tts from .slots import Slots from .intents import Intents from .config import Config import json class Lang_config: def __init__(self, dir_path): DEFAULT_PATH = '{}/{}.json' ASSISTANT = '/var/lib/snips/assistant/assistant.json' lang = 'en' try: with open...
# -*- coding:utf-8 -*- # # Copyright (C) 2021, Saarland University # Copyright (C) 2021, Maximilian Köhl <koehl@cs.uni-saarland.de> from __future__ import annotations import typing as t import pathlib import random import click from momba import engine, jani from . import console, model @click.group() def main(...
# Software License Agreement (BSD License) # # Copyright (c) 2013, Open Source Robotics Foundation, 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: # # * Redistributions of source code mus...
__version__ = "1.0.7" def check_user_agent(user_agent, requirements): import httpagentparser from pkg_resources import parse_version if not user_agent: return True if not requirements: return True if type(user_agent) == httpagentparser.Result or type(user_agent) == di...
# Copyright 2021, UChicago Argonne, LLC # All Rights Reserved # Software Name: repast4py # By: Argonne National Laboratory # License: BSD-3 - https://github.com/Repast/repast4py/blob/master/LICENSE.txt from . import core __version__ = '1.0.0.beta1'
#! /usr/bin/env python # Copyright (c) 2017 Huazhuo Xu. # Licensed under the GNU General Public License, Version 2 # # 03/20/2017 Huazhuo Xu Created this. # # Functionality wise, this is the same to the previous perl verison of the # post processing tool. In this python veriosn, an interactive mode is # introduced. T...
# Mathematics > Linear Algebra Foundations > Linear Algebra Foundations #4- Matrix Multiplication # Matrix Multiplication of 2x2 Matrices # # https://www.hackerrank.com/challenges/linear-algebra-foundations-4-matrix-multiplication/problem # import numpy as np a = np.matrix([[1,2,3], [2,3,4], [1,1,1]]) b = np.matrix([...
from random import shuffle from copy import deepcopy class Deck: def __init__(self, cards = []): self.cards = cards def shuffle(self, times = 1): result = deepcopy(self.cards) for _ in range(times): shuffle(result) return Deck(result) def top(self, number = 1)...
import os import logging import math import psutil try: from ConfigParser import RawConfigParser, NoOptionError, NoSectionError except ImportError: from configparser import RawConfigParser, NoOptionError, NoSectionError import mod_wsgi from .platform import Client from ..sampler import Sampler from ..statist...
# -*- coding: utf-8 -*- SECRET_KEY = '_' USE_TZ = True DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # 'NAME': ':memory:', 'NAME': 'test.db' }, } INSTALLED_APPS = ( 'django.contrib.contenttypes', 'django.contrib.auth', 'robokassa_merchant', 'test_...
# Copyright (c) 2019 Works Applications 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 law or a...
import unittest import tkinter from test.support import requires, swap_attr from tkinter.test.support import AbstractDefaultRootTest from tkinter.simpledialog import Dialog, askinteger requires('gui') class DefaultRootTest(AbstractDefaultRootTest, unittest.TestCase): def test_askinteger(self): @staticme...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # 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 ...
{ 'targets': [{ 'target_name': 'internalIO', 'sources': [ 'addon.cc', 'InternalInWrapper.cc', 'InternalOutWrapper.cc', 'InternalIOWrapper.cc', 'InternalConfig.cc', '../../../core/owt_base/InternalIn.cpp', '../../../core/owt_base/InternalOut.cpp', '../../../core/...
class Selectors(object): def setup_bot(self, settings, spec, items, extractors, logger): self.logger = logger self.selectors = {} # { template_id: { field_name: {..} } for template in spec['templates']: template_id = template.get('page_id') self.selectors[template_id...
import os from time import sleep, time from lelo import parallel DELAY = .2 @parallel def loiter(serial, delay): pid = os.getpid() print('%2d pid = %d' % (serial, pid)) sleep(delay) return pid t0 = time() results = [] for i in range(15): res = loiter(i, DELAY) results.append(res) print('Pr...
# Generated by Django 3.1.4 on 2020-12-14 20:51 from django.db import migrations, models import users.models class Migration(migrations.Migration): dependencies = [ ('users', '0002_customuser_weight'), ] operations = [ migrations.AddField( model_name='customuser', ...
''' Created on May 7, 2021 @author: mballance ''' import cocotb from fwnoc_tests.fwnoc.fwnoc_test_base import FwnocTestBase from fwnoc_bfms.fwnoc_channel_bfm import FwNocPacket class SingleInflightP2P(FwnocTestBase): async def run(self): for src_x in range(self.size_x): for src_y in range...
import requests, time from pythontools.core import logger, tools def uploadToHastebin(content): url = 'https://hastebin.com' data = "" if type(content) == str: data = content elif type(content) == list: for i in content: data += str(i) + "\n" else: logger.log("§...
# -*- coding:utf-8 -*- """ SunPy PlotMan GUI Plots FITS data using sunpy.make_map in a Qt interface, and provides tools for graphical plot manipulation. Author: Matt Earnshaw <matt@earnshaw.org.uk> """ from __future__ import absolute_import import sunpy from matplotlib import pyplot as plt from PyQt4.QtCore import p...
import numpy as np import torch import torch.optim as optim import torch.nn as nn from torch.autograd import Variable import time import re import os import sys import cv2 import bdcn from datasets.dataset import Data import argparse import cfg def test(model, args): test_root = cfg.config_test[args.dataset]['dat...
#!/usr/bin/env python3 # Copyright (c) 2016-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Create a blockchain cache. Creating a cache of the blockchain speeds up test execution when running mu...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.postgres.fields.jsonb from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('auditlog', '0004_logentry_detailed_object_repr'), ] operations = [ migrations.Al...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "backend_api.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that ...
import django_otp from two_factor.utils import default_device from django_otp import user_has_device from django.contrib.auth.decorators import user_passes_test as django_user_passes_test from django.contrib.auth.models import AnonymousUser from django.utils.translation import ugettext as _ from django.http import Htt...
# # Created by Maciej Ziółkowski on 28.12.2018 # import sys import math barracks = "barracks" tower = "tower" mine = "mine" def pythagoras(a, b): return math.sqrt(a * a + b * b) def print_debug(text): print(text, file=sys.stderr) def build(site_id, building_type): build_str = "BUILD " if buildi...
""" Use Bayesian Inference to trigger a binary sensor. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/binary_sensor.bayesian/ """ import logging from collections import OrderedDict import voluptuous as vol import homeassistant.helpers.config_validation...
from django.urls import path from . import views app_name = 'cart' urlpatterns = [ path('', views.cart_detail, name='cart_detail'), path('add/<int:product_id>/', views.cart_add, name='cart_add'), path('remove/<int:product_id>/', views.cart_remove, name='cart_remove') ]
#!/usr/bin/env python3 # encoding: utf-8 import os import cv2 import argparse import numpy as np import torch import torch.multiprocessing as mp from config import config from utils.pyt_utils import ensure_dir, link_file, load_model, parse_devices from utils.visualize import print_iou, show_img from engine.inferencer...
#encoding=utf-8 import tensorflow as tf def should_continue(t, timestaps, *args): return tf.less(t, timestaps) def get_extend_source_ids(source_words, source_ids, source_unk_id, oringin_vocab_size): new_source_ids = [] source_oov_words_list = [] unk_num_list = [] extend_source_ids = [] for source_id, so...
from typing import List, Tuple import pytest from pytest_mock import MockFixture from utils import create_event_from_dict from eventbus import config from eventbus.config import TopicMapping from eventbus.topic_resolver import TopicResolver SIMPLIFIED_MAPPING_TYPE = Tuple[str, List[str]] @pytest.mark.parametrize( ...
# Write a program to find the root of a number n to the power 1/x where x and n are the numbers input by the user # example n = 10000, x = 4 root = 10 # for more info on this quiz, go to this url: http://www.programmr.com/roots def get_root(x, n): return n ** (1/x) if __name__ == "__main__": print(int(get_r...
import _plotly_utils.basevalidators class OpacitysrcValidator(_plotly_utils.basevalidators.SrcValidator): def __init__( self, plotly_name='opacitysrc', parent_name='scatterpolargl.marker', **kwargs ): super(OpacitysrcValidator, self).__init__( plotly_name=p...
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 2 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class DedupeSettingsExtended(obj...
# -*- coding: utf-8 -*- ######################################################################################################################## # # Copyright (c) 2014, Regents of the University of California # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are...
import pytest from allennlp.common.util import ensure_list from allennlp_models.nli.quora_paraphrase_reader import QuoraParaphraseDatasetReader from tests import FIXTURES_ROOT class TestQuoraParaphraseReader: @pytest.mark.parametrize("lazy", (True, False)) def test_read_from_file(self, lazy): reader...
# -*- coding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apach...
r"""*Core test objects for* ``pent`` *test suite*. ``pent`` Extracts Numerical Text. **Author** Brian Skinn (bskinn@alum.mit.edu) **File Created** 3 Sep 2018 **Copyright** \(c) Brian Skinn 2018-2019 **Source Repository** http://www.github.com/bskinn/pent **Documentation** http://pent.readthedo...
import numpy as np from collections.abc import Iterable import itertools import openmdao.api as om from pycycle.thermo.cea import species_data from pycycle.thermo.thermo import Thermo from pycycle.flow_in import FlowIn from pycycle.passthrough import PassThrough from pycycle.constants import AIR_ELEMENTS, BTU_s2HP, H...
from datetime import datetime, timedelta from mock import patch, ANY from django_webtest import WebTest from django.contrib.admin import AdminSite from django.contrib.messages.storage.fallback import FallbackStorage from django.test.utils import override_settings from django.test.client import RequestFactory from djan...
from pygame import image from pygame.mixer import Sound class GameObject: """A super class for hero, enemies, boss and bullets. Any subclasses has methods below: blit() move() play_sound() update() """ def __init__(self, x, y, picture, speed=(0, 0), sound=None, channel=None): ...
import asyncio import os from pprint import pprint import omnivox """ Demonstration for the Vanier Omnivox wrapper. """ async def run(): # login to Omnivox using credentials sess = await omnivox.login( os.environ.get("OMNIVOX_ID", default=""), os.environ.get("OMNIVOX_PASSWORD", default="") ...
from paddlenlp.transformers import PretrainedTokenizer from paddlenlp.datasets import MapDataset from paddlenlp.data import Stack, Tuple, Pad from paddle import nn from dotmap import DotMap from functools import partial from utils.utils import create_data_loader, load_label_vocab import numpy as np import paddle import...
from time import sleep from colner import Guild, Restart, Copy words = "\x1b[6;30;42m[ This tool made by: H A Z E M#1629 ]\x1b[0m\nSupport: https://discord.gg/8BpjPtUeAX\n" for char in words: sleep(0.1) print(char, end='', flush=True) token = input("Insert token here: ") commands = { "restart": { ...
import math import numbers import torch from torch import nn from torch.nn import functional as F class GaussianSmoothing(nn.Module): """ Apply gaussian smoothing on a 1d, 2d or 3d tensor. Filtering is performed seperately for each channel in the input using a depthwise convolution. Arguments: ...
# -*- coding: UTF-8 -*- from github import Github import json import sys courses_json = "./courses.json" grade_urls = [ "/courses/grade-1/", "/courses/grade-2/", "/courses/grade-3/", "/courses/grade-4/" ] grade_dirs = ["." + x for x in grade_urls] with open(courses_json, encoding="utf8") as f: courses = ...
import tracker from events.registry import build_job tracker.subscribe(build_job.BuildJobCreatedEvent) tracker.subscribe(build_job.BuildJobUpdatedEvent) tracker.subscribe(build_job.BuildJobStartedEvent) tracker.subscribe(build_job.BuildJobStartedTriggeredEvent) tracker.subscribe(build_job.BuildJobSoppedEvent) tracker...
""" Anonymises a copy of the checked images showing progress with a status bar. """ from pydicom.dataset import Dataset def main(weasel): list_of_images = weasel.images() # get the list of images checked by the user for i, image in enumerate(list_of_images): # Loop over Series in the list...
#!/usr/bin/env python # -*- coding: utf-8 -*- # __coconut_hash__ = 0x7342c229 # Compiled with Coconut version 1.3.1 [Dead Parrot] # Coconut Header: ------------------------------------------------------------- from __future__ import print_function, absolute_import, unicode_literals, division import sys as _coconut_s...
import os import sys import errno from concurrent import futures import time def make_sure_path_exists(path): try: os.makedirs(path) except OSError as exception: if exception.errno != errno.EEXIST: raise def run_klee_34(filename): os.system("clang -I ../../include -emit-llvm -O...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 29.py # 2016/10/12(水) # walkingmask import json # load json data from file articles = [] for jsons in open("jawiki-country.json", 'r'): articles.append(json.loads(jsons)) # U.K. for country in articles: if country['title'] == 'イギリス': break import re lineFlag ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # BLACK-SCHOLES FRAMEWORK # ------------------------------------------------------------------------------ # IMPORTS import numpy as np from numpy import inf from math import sqrt, log, e, p...
from osgeo import osr, gdal import numpy as np import struct from datetime import datetime, timedelta import statistics from utilities import * from constants import * from pyrate.configuration import Configuration import time import multiprocessing as mp import pathlib import gamma import roipac if __name__ == "__mai...
from numba.experimental import jitclass from numba import float64 # spec = [ ('p_cx1', float64), ('p_dx1', float64), ('p_dx3', float64), ('p_ex1', float64), ('p_kx1', float64), ('p_hx1', float64), ('p_vx1', float64), ('r_bx1', float64), ('r_bx2', float64), ('r_cx1', float64), ...
import bz2 import os.path import re import sys import argparse from functools import partial from itertools import chain from multiprocessing import Pool from django.apps import apps as django_apps from django.conf import settings from django.core.management.base import BaseCommand from django.utils import timezone fr...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Thu Nov 8 15:25:03 2018 @author: bathmann """ from .TreeDynamicTimeStepping import TreeDynamicTimeStepping from .ExternalDynamicTimeStepping import ExternalDynamicTimeStepping from .TreeDynamicTimeLoop import TreeDynamicTimeLoop from .SimpleTimeLoop.Simpl...
# Copyright (c) 2020, Huawei Technologies.All rights reserved. # # Licensed under the BSD 3-Clause License (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://opensource.org/licenses/BSD-3-Clause # # Unless required by applicable law...
import sys from collections import deque N, M = map(int, sys.stdin.readline().split()) def pprint(arr): for line in arr: print(line) def bfs(): mx = [1, 0, -1, 0] my = [0, 1, 0, -1] q = deque([(0,0,1)]) visited = [(0,0)] cnt = 0 while q: x, y, c = q.popleft() cnt = ...
# uncompyle6 version 3.2.0 # Python bytecode 2.4 (62061) # Decompiled from: Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:19:30) [MSC v.1500 32 bit (Intel)] # Embedded file name: otp.chat.TalkMessage class TalkMessage: __module__ = __name__ def __init__(self, messageId, timeStamp, body, senderAvatarId, ...
# -*- coding: utf-8 -*- """ Created on Tue Nov 9 16:26:33 2021 @author: alpha """ import os, glob, zarr, warnings import numpy as np from numcodecs import Blosc compressor = Blosc(cname='zstd', clevel=9, shuffle=Blosc.BITSHUFFLE) # ## Open fullres fmost CH1 # location = r"/CBI_Hive/globus/pitt/bil/CH1" # location ...
""" Copyright (c) 2020, Daniela Szwarcman and IBM Research * Licensed under The MIT License [see LICENSE for details] - Distribute population eval using MPI. """ import time import numpy as np from mpi4py import MPI from cnn import train from util import init_log class EvalPopulation(object): def __in...
import itertools import numpy as np from scipy.sparse import lil_matrix, csr_matrix from .base import DynamicalModel, SystemOperator from ..operator_tools import (SubspaceError, n_excitations, full_liouville_subspace) from ..utils import memoized_property def liouville_subspace_index(liou...
algorithm='ddpg' env_class='UnityMLVector' model_class='LowDim2x' environment = { 'name': 'compiled_unity_environments/Reacher_Linux/Reacher.x86_64' } model = { 'state_size': 33, 'action_size': 4, } agent = { 'action_size': 4, 'update_every': 2, 'buffer_size': int(1e5), } train = { 'n_ep...
#!/usr/bin/env python from nose.tools import eq_ as eq from nose.tools import ok_ as ok import subprocess import os import pytest @pytest.mark.slowTest def test_MeshAdaptRestart_generateMesh(verbose=0): """Generate Mesh for PUMI""" currentPath = os.path.dirname(os.path.abspath(__file__)) runCommand = "cd...
""" This file offers the methods to automatically retrieve the graph Candidatus Komeilibacteria bacterium RIFCSPLOWO2_02_FULL_48_11. The graph is automatically retrieved from the STRING repository. References --------------------- Please cite the following if you use the data: ```bib @article{szklarczyk2019string,...
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """ Test BIP 37 """ from test_framework.messages import ( CInv, COIN, MAX_BLOOM_FILTER_SIZE, M...
import frappe def validate(doc, event): update_expense_account(doc) validate_expense_account(doc) def on_cancel(doc, event): cancel_sle(doc) cancel_commission_invoice(doc) def cancel_sle(doc): filters = { "voucher_type": "Purchase Invoice", "voucher_no": doc.name, "docstatus": 1 } for name, in frappe.g...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from . import __version__ as app_version app_name = "business_theme" app_title = "Business Theme" app_publisher = "Randy Lowery" app_description = "General theme for frappe" app_icon = "octicon octicon-file-directory" app_color = "orange" app_email = "ran...
#!usr/bin/python # -*- coding: utf-8 -*- # import os import sys import optparse import codecs # ninja/miscにパスを通す sys.path.append(os.path.join(os.path.dirname(__file__),'..','..','..','thirdparty','ninja','misc')) from ninja_syntax import Writer def main(): print("{}".format(os.path.basename(__file__))) current_...
#!/usr/bin/env python # encoding: utf-8 """ Advent of Code 2019 - Day 12 - Challenge 1 https://adventofcode.com/2019/day/12 Solution: 8625 PEP 8 compliant """ __author__ = "Filippo Corradino" __email__ = "filippo.corradino@gmail.com" from aocmodule import LunarSystem def main(): system = LunarSystem.import_mo...
#coding:utf-8 """The Google Translate Implementation.""" from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support.ui import WebDriverWait from selenium.common.exceptions i...