text
stringlengths
3.07k
12.6k
import numpy as np from malcolm.compat import OrderedDict from malcolm.core import ( Alarm, BooleanArrayMeta, ChoiceArrayMeta, NumberArrayMeta, TimeStamp, Widget, camel_to_title, snake_to_camel, ) from ..pandablocksclient import TableFieldData from .pandafieldpart import ABlockName, AC...
# Copyright (c) Facebook, Inc. and its affiliates. import argparse import itertools import os import platform import random import socket import tempfile import unittest import pytorch_lightning as pl import torch from mmf.common.sample import Sample, SampleList from mmf.utils.general import get_current_device def ...
# # Copyright 2017-2018 Government of Canada # Public Services and Procurement Canada - buyandsell.gc.ca # # 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/LIC...
import datetime import serial import os import csv import subprocess from time import sleep from thermocouples_reference import thermocouples import dash from dash import Dash, dash_table from dash import dcc, html import dash_daq as daq import plotly import plotly.graph_objects as go from plotly.subplots import make_s...
#!/usr/bin/env python """ Copyright 2019 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 License at https://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to i...
import time import datetime as date from fabric import utils from fabric.api import * from fabric.contrib.project import rsync_project from fabric.contrib import files, console from fabric.operations import * from fabric.colors import * # globals env.colors = True env.cleaned = 5 env.format = '%Y%m%d%H%M%S' env.rele...
""" CP Static analysis reports endpoint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ """ import json from flask import request, g, current_app from app.core import ApiResponse from app.tasks import analysis from app.cp import cp from app.models import Sample, Report @cp.route('/analysis/static/<string:sha256>', metho...
#!/usr/bin/python3 ''' Update git-svn mirrors of a git repository, and then push them to mirrored GitHub repositories. Assumes that the git-svn clone is already setup with GitHub as a remote branch, SSH keys allow login to GitHub, and svn2git is installed. Options are currently set with constants in the script. To d...
#!/usr/bin/env python3 """ This module is used for parsing generated fusion files from fusion tools and generating supporting files needed for other tools like: create_mqc_section.py and generate_report.py """ import argparse import os.path import sys import json from yaml import dump TOOLS = ['star_fusion', 'fusionca...
from copy import deepcopy import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import utils # Used for Atari class Conv_Q(nn.Module): def __init__(self, frames, num_actions): super(Conv_Q, self).__init__() self.c1 = nn.Conv2d(frames, 32, kernel_size=8, stride=4) ...
# -*- coding: utf-8 -* # # Oracle's Decree Tutorial panel # # This will be called during main load and added to the oracle stack # # Text content from the adventure "Oracle's Decree" is Copyright © 2015 <NAME> # http://creativecommons.org/licenses/by-nc/3.0/ # Find more adventure locations at http://blog.trilemma.com #...
#!/usr/bin/env python # # Copyright (C) 2018 The Android Open Source Project # # 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 req...
""" """ import os from pathlib import Path import pandas as pd from pandas._testing import assert_frame_equal import matplotlib.pyplot as plt def generate_indices_plots(in_a_indices_df, in_b_indices_df, in_c_indices_df, i_title, prepare_and_filter, generate_df, plan): """Plot indices and write the DataFra...
# -*- coding: utf-8 -*- import os from cerberus import Validator import pprint pp = pprint.PrettyPrinter(indent=4) """ Utilities for validating parameters We use the `cerberus` schema validation library: http://docs.python-cerberus.org """ def validate_simple_report_params(params): """ Validate all parameters t...
# -*- coding: utf-8 -*- """ @author: <NAME> <<EMAIL>> """ from cornac.data import Reader from cornac.data import TrainSet from cornac.data import MatrixTrainSet from collections import OrderedDict import numpy as np def test_trainset(): """Test TrainSet""" uid_map = OrderedDict([('a', 0), ('b', 1)]) ii...
import requests from math import exp, ceil import least_connection_utils import weighted_least_connection_utils from heapq import heappush, heappop import random REQ_SCORE_TEST = 10 DEFAULT_COUNTER = 0 EPS = 100 ''' This load balancing algorithm does not take into consideration the characteristics of the applicat...
import digitalio import time import logger import gc class DigitalInSource: def __init__(self, pin: int): self._in = digitalio.DigitalInOut(pin) self._in.switch_to_input(pull=digitalio.Pull.UP) @property def value(self): return self._in.value class Mux: def __init__(self, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ ----------- Kipp Runner ----------- Collect scripts' running status into MongoDB Arguments: -t, --timeout (int): seconds to throw ``KippRunnerTimeoutException`` -l, --lock: only allow single process running Examples: :: cd code/postconvertor && TARS_ENV=...
from jinja2 import Template # Mapping post info into a readinglog import os.path # File manipulation import json import markdown #TODO thumbnail size #TODO clickable images import urllib.request import gzip import requests from sys import argv from bs4 import BeautifulSoup import re import ...
# Copyright 2010 New Relic, 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...
#prepare_split_aug_images.py #UPDATED CHECK from skimage import io import numpy as np from tqdm import tqdm import shutil import os import shutil import time import numpy import random from tqdm import tqdm from google.colab.patches import cv2_imshow from tqdm import tqdm from timeit import default_timer as timer impor...
import os import pronouncing import random import logging from twython import Twython, TwythonError import time APP_KEY = os.environ.get('TWYTHON_APP_KEY') APP_SECRET = os.environ.get('TWYTHON_APP_SECRET') OAUTH_TOKEN = os.environ.get('TWYTHON_OAUTH_TOKEN') OAUTH_TOKEN_SECRET = os.environ.get('TWYTHON_OAUTH_TOKEN_SECR...
# -*- coding: utf-8 -*- """ Created on Wed Sep 30 13:10:59 2020 @author: Jak """ import numpy as np import torch from sklearn.datasets import make_classification from sklearn.preprocessing import StandardScaler, normalize from sklearn.model_selection import train_test_split import smoothInfluence import time import o...
"""A collection of aggregated default methods and metadata accessors, used for both testing and default values """ import os import re import torch from torch._six import container_abcs, string_classes, int_classes def _simple(): def train_test_val_instances( split, directory, class_to_idx, index, is_val...
################################################################## # Creation Date: 13/12/2021 # Last Update: 14/12/2021 # Description: Retrieve all webservers on vcenters's virtualmachines # Interactive: No # Test command: # Run command: python3 Untitled-1.py -s vcenter.proute.com ##################################...
# ------------------------------------------------------------------------ # Train and eval functions used in main.py # ------------------------------------------------------------------------ # Modified from Deformable DETR (https://github.com/fundamentalvision/Deformable-DETR) # Copyright (c) 2020 SenseTime. All Righ...
# 2-electron VMC code for 2dim quantum dot with importance sampling # No Coulomb interaction # Using gaussian rng for new positions and Metropolis- Hastings # Energy minimization using standard gradient descent # Common imports import os # Where to save the figures and data files PROJECT_ROOT_DIR = "Results" FIGURE...
import cv2 import imutils import numpy as np from pyautogui import * from time import sleep from pathlib import Path from os import path directory = path.join(path.dirname(__file__)) directory = Path(__file__).parent def grab_screen(): try: screenshot(f"{directory}/data/screenshots/screen_shot.JPG") ...
import flask import re import werkzeug.exceptions from ..authenticated_blueprint_preparator import AuthenticatedBlueprintPreparator from .decorators import rest_endpoint from ..document_fragment import extract_fragment name = 'document' app = AuthenticatedBlueprintPreparator(name, __name__, template_folder=None) @a...
# Copyright 2015 Google Inc. 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 a...
"""@file strlabel2index_processor.py contains the Strlabel2indexProcessor class""" import os import subprocess import StringIO import scipy.io.wavfile as wav import numpy as np import processor from nabu.processing.feature_computers import feature_computer_factory import json class Strlabel2indexProcessor(processor...
""" Like http://www.eblong.com/zarf/mutagen/mutagen.js (More or less; assume 'less', for now.) The C version of Elite would be another thing-of-this-sort to study. This is here among the peglet examples just to interpret the outputs of mutagen_grammar.py. TODO: - better naming - documentation - compare to origi...
""" """ #| - Import Modules import os import sys import numpy as np import pandas as pd from scipy.spatial.distance import pdist from ase import io # ######################################################### from vasp.vasp_methods import read_ase_sort_dat # #######################################################...
from typing import Union, List, Type, T, Tuple import torch from .flow import Flow from copy import deepcopy from vae_lm.nn.activation import Activation from vae_lm.nn.feedforward import FeedForward from vae_lm.nn.recurrent import RecurrentCore from vae_lm.nn.transformer import TransformerDecoderLayer, PositionalEncodi...
# -*- coding: utf-8 -*- # Copyright 1999-2021 Alibaba Group Holding 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 require...
# Copyright 2018 The AI Safety Gridworlds 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 b...
import csv from collections import namedtuple, defaultdict import ipdb import spotipy from spotipy.oauth2 import SpotifyClientCredentials, SpotifyOAuth import settings SpotifyTrack = namedtuple('Track', ['id', 'title', 'artists', 'repr']) USER_ID = settings.USER_ID SCOPE = settings.SCOPE CLIENT_ID = settings.CLIENT_...
# Prints menu entries as a tree with its value in the .config file. This can be # handy e.g. for diffing between different .config files or versions of Kconfig files. # # Usage: # # $ make [ARCH=<arch>] scriptconfig SCRIPT=print_config_tree.py [SCRIPT_ARG=<.config>] # # If the variable WITH_HELP_DESC is modified to...
# MIT License # # 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, publi...
import torch from torch import nn import numpy as np def get_subdict(dictionary: dict, keys: list = None): """ Args: dictionary: dictionary of all keys keys: list of strings representing the keys to be extracted from dictionary Return: dict: subdictionary containing only input keys...
import h5py import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from numpy.fft import fft2, ifft2 def spectral_derivative(array, wvn): return ifft2((1j * wvn * (fft2(array)))) # ----------------------------------------------------------------------------------------------...
import io import aiohttp import urllib3 from PIL import Image, ImageFont, ImageDraw urllib3.disable_warnings() http = urllib3.PoolManager() def GetBlendColor(Rarity): if Rarity.lower() == "frozen": return 148, 223, 255 elif Rarity.lower() == "lava": return 234, 141, 35 elif Rarity.lower(...
# # Copyright 2012-2014 <NAME> # # 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, so...
''' BSD 3-Clause License Copyright (c) 2019, open-struct-engineer developers and <NAME> 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 must retain the above copyright ...
# Copyright (c) 2016 Civic Knowledge. This file is licensed under the terms of the # Revised BSD License, included in this distribution as LICENSE """Classes to build a Metatab document """ import logging import os import shutil import sys from genericpath import exists, isfile from os import makedirs from os.path imp...
""" Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. SPDX-License-Identifier: Apache-2.0 """ import logging import os import threading import time import unittest import pytest from botocore.session import get_session from graph_notebook.configuration.get_config import get_config from test.integrat...
# -*- coding: utf-8 -*- """ Created on Sun Oct 6 20:37:49 2019 @author: mauro """ import os import multiprocessing import pickle import itertools import random import json from time import time import numpy as np from nltk.probability import FreqDist import matplotlib.pyplot as plt from gensim.models.callbacks impor...
from __future__ import print_function from __future__ import division from . import _C import numpy as np import fuzzytools.files as ftfiles import fuzzytools.strings as strings from matplotlib import cm import matplotlib.pyplot as plt from copy import copy, deepcopy import fuzzytools.matplotlib.ax_styles as ax_styles...
import ee import time import numpy as np import time import sys import json import argparse def UTM_lookup(lon): assert (lon < 180.0) and (lon >= -180.0) # assuming lon in [-180,180) return int(np.floor((lon + 180.0)/6) + 1) def EPSG_lookup(lon,lat): utm_zone = UTM_lookup(lon) if lat >= 0: ...
''' <NAME> dvchou Multi-Threaded Bayes Minimum Risk Post-Pruning Of Decision Trees: Loss function - L_k - absolute difference between true class and predicted class. Probability - p_k - proportion of C_j in the current node. Store: Partitioned class output. ''' import sys import pickle import time import numpy as n...
import gzip as gz import struct as struct import tempfile import os from os.path import join from typing import List import numpy as np import wget from enum import Enum class DataSetType(Enum): TRAIN = 0 TEST = 1 class MnistDataDownloader: folder_path: str = None datapaths: List...
# Imports import torch import torchvision import torchvision.transforms as transforms import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torchvision.datasets import CIFAR10 import tqdm import zipfile import re from collections import defaultdict from math import sqrt import tqdm impo...
# Copyright 2019 The Keras Tuner Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
#!/usr/bin/env python import argparse import logging import os import time import matplotlib.pyplot as plt from pidanalyze import __version__, loader, plotter, analyzer # ---------------------------------------------------------------------------------- # "THE BEER-WARE LICENSE" (Revision 42): # <<EMAIL>> wrote this ...
"label (list of lists) functions" try: # The c version is faster... from la.cflabel import listmap except ImportError: # ...but perhaps it did not compile when you built the la package? So # we'll use the python version. If you are unsure which version you are # using, the doc string will tell you....
import taichi as ti import math import time import numpy as np from plyfile import PlyData, PlyElement import os import utils from engine.mpm_solver import MPMSolver import argparse def parse_args(): parser = argparse.ArgumentParser() parser.add_argument('-s', '--show', ...
import torch.nn as nn import numpy as np from unet import UNet class XTYTUNet(nn.Module): """ Create a XT,YT U-Net the network is used to process a 2D cine MR image of shape (1,2,Nx,Ny,Nt) the CNN first "rotates" the sample to the xt- and the yt-view, then applies a U-Net on the spatio-temporal slices a...
# -*- coding: utf-8 -*- """ Created on Wed Feb 23 20:02:25 2022 @author: dv516 """ from sklearn.gaussian_process import GaussianProcessRegressor from typing import List, Tuple import random import numpy as np from scipy.stats import norm from Functions.test_functions import f_d2, f_d3 def find_max(exp_improvements,...
from math import ceil import neo import numpy as np import quantities as pq from elephant.statistics import mean_firing_rate, isi class OnlineMeanFiringRate: def __init__(self, buffer_size=1): self.unit = 1 * pq.Hz self._current_mfr = 0 # in Hz self.buffer_counter = 0 self.buffe...
""" A control model to test whether the models I have developed create any improvement in accuracy """ import torch.nn as nn import torch import torch.optim as optim from torchvision import datasets from torchvision.transforms import ToTensor from torch.utils.data import DataLoader, random_split import time import tor...
#!/usr/bin/env python3 # -*- mode: python -*- # -*- 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 ...
import numpy as np import matplotlib.pyplot as plt from scipy.spatial.distance import cdist import sys from plot_area import plot_area COLOR = ['tab:blue', 'tab:orange', 'tab:green'] class BaseClassifier: d = -1 c = -1 def __init__(self, d): super().__init__() if (d <= 0): r...
""" This script creates a regression test over garage-TRPO and baselines-TRPO. Unlike garage, baselines doesn't set max_path_length. It keeps steps the action until it's done. So you need to change the baselines source code to make it stops at length 100. You also need to change the garage.tf.samplers.BatchSampler to ...
import pytest import autofit as af @pytest.fixture(name="mock_components_1") def make_mock_components_1(): return af.m.MockComponents() @pytest.fixture(name="mock_components_2") def make_mock_components_2(): return af.m.MockComponents() @pytest.fixture(name="instance") def make_instance(moc...
"""First in a series of four pipelines that tell a story in a 'gaming' domain. Concepts: batch processing; reading input from Google Cloud Storage and writing output to BigQuery; using standalone DoFns; use of the sum by key transform. In this gaming scenario, many users play, as members of different teams, over the...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Rectangular cap of a sphere =========================== :math:`\alpha, \beta` are the half-angles defining the width/height of the rectangular cap. :math:`R` is the radius of the sphere. Notes ~~~~~ This implementation uses inbuilt integration functions to calcula...
import argparse import atexit import errno import logging import os import signal import sys from time import sleep from traceback import print_exc from minipyp.minipyp import MiniPyP, Request, Server, Handler level = logging.INFO def start(args, config): if args.attached: MiniPyP(config).start() el...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os.path import json import pickle import datetime import urlparse import pytz import pycurl import requests import facebook from make_index import make_index def to_jst(datestring): date_obj = datetime.datetime.strptime(da...
from Proxy import validateData from Proxy import fetchData from Proxy import parseData from Core.Logger import log import time import threading import queue import configparser import logging # 代理信息键值字段 PROXY_ID = 'id' PROXY_IP = 'ip' PROXY_PORT = 'port' PROXY_ADDRESS = 'address' PROXY_PROTOCOL = 'proto...
import importlib import os import json import numpy as np import math import sys import pandas as pd import datetime import logging import time import torch # ===================================== Common Functions ===================================== def check_input(imgs, targets): import cv2 as cv import nu...
import torch from torchvision.models import resnet18 import numpy as np import pandas as pd import os def logic_learning(i2c_net, dataloader, device, optimizer, criterion, epoch, n_epochs, train=False): running_loss = 0.0 c_correct = 0 c_total = 0 preds = [] total_step = len(dataloader) for ba...
import requests import json import argparse import unicodecsv as csv api_version = "v6" base_url = "https://channelstore.roku.com/api/" + api_version + "/channels" categories_url = base_url + "/categories" key_id = "id" key_name = "name" key_category_type = "categoryType" key_price = "price" default_page_size = 24 ...
# --- For cmd.py from __future__ import division, print_function import os import subprocess import multiprocessing import collections import glob import pandas as pd import numpy as np import shutil import stat import re # --- Fast libraries from weio.weio.fast_input_file import FASTInputFile from weio.weio.fast_ou...
""" Project: kindle_scraper for Mandarin System Started: 19/02/2020 Summary: Scrape your highlights from Kindle's My Clippings.txt """ from sys import argv from csv import writer, DictWriter import os my_clippings = 'My Clippings.txt' # filename. def getLines(): """Returns list of all lines from file....
# Copyright 2020 The IREE Authors # # Licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception # This configure script wraps a normal CMake configure of the project for use # in CI pipelines, doing...
import os os.environ["CUDA_VISIBLE_DEVICES"] = '0' import taichi as ti ti.init(arch=ti.cuda, device_memory_fraction=0.5) # ti.init(arch=ti.cpu, debug=True, excepthook=True, cpu_max_num_threads=1) import random from scene import Scene from camera import Camera from renderer import Renderer from sphere import Sphere imp...
"""Tests for certbot.plugins.manual.""" import os import tempfile import unittest import mock from acme import challenges from acme import jose from certbot import achallenges from certbot import errors from certbot.tests import acme_util from certbot.tests import test_util KEY = jose.JWKRSA.load(test_util.load_v...
# Copyright (c) 2013, <NAME> and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import msgprint, _ def execute(filters=None): conditions, filters = get_conditions(filters) columns = get_column() data = get_data(c...
import logging import json from json.decoder import JSONDecodeError from shutil import copyfile import sqlite3 from .util import get_data_path, show_error from .enums import ItemType DATABASE_VERSION = 1 # decode item types stored in json. # this is still required for migrating json data to sqlite def decode_item...
''' Created on Feb 12, 2011 @author: <NAME> ''' import sys import os.path import datetime from math import log YEAR = 2011 MONTHS = {'Jan': 1, 'Feb': 2, 'Mar':3, 'Apr':4, 'May':5, 'Jun':6, 'Jul':7, 'Aug':8, 'Sep': 9, 'Oct':10, 'Nov':11, 'Dec':12} class SearchError(Exception): '''Custom error for when ...
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt from frappe.model.document import Document import json class PaymentTools(D...
import locale import sys, os from flask import Flask, render_template, redirect idx = os.getcwd().index("trade") PROJECT_HOME = os.getcwd()[:idx] + "trade/" sys.path.append(PROJECT_HOME) from common.global_variables import CLIENT_ID_UPBIT, CLIENT_SECRET_UPBIT, fmt, CoinStatus, WEB_DEBUG from common.utils import conve...
import os import sys from rich.console import Console try: import QuickStart_Rhy user_lang = QuickStart_Rhy.user_lang qs_flag = True except: user_lang = 'en' qs_flag = False if sys.platform.startswith('win'): is_win = True dir_char = '\\' else: is_win = False dir_char = '/' QproDe...
################################################### # Hiermit kann TIANE die Corona-Daten bis gestern # # für verschiedene Länder vorlesen. # ################################################### from urllib.request import urlopen, Request import json import datetime def isValid(text): text = text.low...
# Copyright 2020, Battelle Energy Alliance, LLC # ALL RIGHTS RESERVED """ utilities for use within heron """ import sys import importlib import xml.etree.ElementTree as ET import warnings from os import path def get_heron_loc(): """ Return HERON location @ In, None @ Out, loc, string, absolute locati...
from random import sample from tqdm import tqdm from feature import FeatureVector, Features, compute_features from model import decode, backtrack from data import sample_num EARLY_STOP_NO_IMPROVE_LIMIT = 3 def optimizer(update_func="ssgd", l2_lambda=0.01): # only for adagrad # a feature vector for accumul...
# -*- coding: utf-8 -*- from django.urls import reverse_lazy from django.shortcuts import redirect from djangoSIGE.apps.base.custom_views import CustomCreateView, CustomUpdateView, CustomTemplateView from djangoSIGE.apps.financeiro.models import PlanoContasGrupo, PlanoContasSubgrupo from djangoSIGE.apps.financeiro.f...
# !/usr/bin/env python3 ''' note: if run on ubuntu, do following code: export LC_CTYPE=C.UTF-8 ''' import os import sys sys.path.append('./bert/') sys.path.append('./') import tensorflow as tf import configparser from data import file_based_input_fn_builder from model import ChatModelConfig, ChatModel import bert fro...
# Copyright 2021 SpinQ Technology 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 agreed ...
import argparse import os from os.path import join as pjoin import pandas as pd from src.evaluation import Evaluator import zipfile import shutil debug_mode = 0 def mkdir(d): if not os.path.exists(d): os.makedirs(d) def build_ref_pred_pair(ref_dict, pred_dict): ref_list, pred_list = [], [] for ...
from ContactsSafe import app from ContactsSafe import db from flask import render_template, request, flash, redirect, url_for from ContactsSafe.forms import LoginForm, RegistrationForm, Add_contacts from ContactsSafe.database import User, UserAddContacts from flask_login import login_user, logout_user, login_required, ...
import datetime import re from bson.objectid import ObjectId from flask import request, redirect, url_for, flash, render_template, Response from pymongo import DESCENDING from web import captcha from web import client from web.queues import crawler_q from web.config import * from web.filters import * from web import...
""" Title: NewController.py Author: <NAME> Group: OUTREACH DEMOS """ """ ############################################################## ### LIBRARIES ### LIBRARIES ### LIBRARIES ### LI ############################################################## """ import threading import cv2 import time import numpy a...
# # Copyright (c) 2014 Juniper Networks. All rights reserved. # # sandesh_trace_dump.py # # gdb macros to dump the sandesh trace buffer import gdb import datetime import os import sys import re import fileinput from time import strptime import datetime from libstdcxx.v6.printers import * def _UTCTimestampUsecToSt...
from typing import Tuple, Union, Optional, Dict, Iterable import numpy as np import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from .base import * from .utils import style_env def tsne( features: np.ndarray, labels: np.ndarray, fp: FreePlot, index: Union[Tuple[int], str]...
from carla_utils import carla import numpy as np from typing import List, Any import pickle import os from os.path import join from ..basic import Data, YamlConfig from ..world_map import Role, get_topology from ..augment import GlobalPath from ..agents import AgentListMaster, BaseAgent from .scenario import Scenari...
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2017 <NAME> <<EMAIL>> # # Distributed under terms of the MIT license. from __future__ import print_function from __future__ import division from six.moves import range import chainer import chainer.functions as F import chainer.links as L...
from linepy import * import timeit from time import strftime import time client = LINE() client.log("Auth Token : " + str(client.authToken)) #client = LINE('email', 'password') oepoll = OEPoll(client) MySelf = client.getProfile() JoinedGroups = client.getGroupIdsJoined() print("My MID : " + MySelf.mid) whiteListed...
'''Objects to wrap the avram collection api''' import os from os.path import expanduser import json import ConfigParser import requests api_host = os.environ.get('REGISTRY_HOST', 'registry.cdlib.org') api_path = '/api/v1/' url_base = os.environ.get('URL_REGISTRY_API', ''.join(('https://', api_host))) class Resource...
import asyncio import json from unittest import mock from mmpy_bot import ExamplePlugin, Message, Settings, WebHookExample from mmpy_bot.driver import Driver from mmpy_bot.event_handler import EventHandler from mmpy_bot.wrappers import WebHookEvent def create_message( text="hello", mentions=["q<PASSWORD>"], ...