text
stringlengths
3.07k
12.6k
import math import time import kopf import collections import json import pandas as pd from kubernetes import client, config from utils import getAveragePodUsage, getCurrentReplicas, getMultiClusterDeployment, getMultiClusterService # Create federated HPA @kopf.daemon('fogguru.eu', 'v1', 'multiclusterhorizontalpodauto...
# coding=utf-8 # Copyright 2021 The TensorFlow Datasets Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
# Copyright (c) 2010 Infrae. All rights reserved. # See also LICENSE.txt. """ Router middleware. Its aims is to redirect mobile clients to a different hostname. ex: infrae.com => m.infrae.com It has to be below device detection middleware in the wsgy stack. >>> from mobi.devices.wsgi.router import RouterMiddleware ...
import matplotlib matplotlib.rcParams['text.usetex'] = True matplotlib.rcParams['text.latex.unicode'] = True import matplotlib.pyplot as plt import matplotlib.patches as patches from numpy import * from matplotlib.lines import Line2D from matplotlib.artist import Artist from matplotlib.mlab import dist_point_to_segment...
"""Play with class and object implementations.""" # using unfinished example classes # pylint: disable=assigning-non-slot # pylint: disable=attribute-defined-outside-init # pylint: disable=no-member # pylint: disable=protected-access # pylint: disable=too-few-public-methods # pylint: disable=unused-variable import ab...
from itertools import product import numpy as np from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas from matplotlib.figure import Figure from matplotlib import patches, lines import common PART_NUM = 6 def generate_fig1(): fig = Figure(figsize=(8, 4)) canvas = FigureCanvas(fig) ...
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import math import random import torch import torch.nn as nn import torch.nn.functional as F from .mlp import MLP from cogdl.layers import GINLayer from cogdl.utils import batch_mean_pooling, batch_sum_pooling, split_dataset_general from .. import BaseModel class Encoder(nn.Module): r"""Encoder stacked with GIN...
import sys from collections import defaultdict import re from vcfiterator.processors import NativeInfoProcessor, CsvAlleleParser from vcfiterator.util import Util # Official fields in specification SPEC_FIELDS = [ 'CHROM', 'POS', 'ID', 'REF', 'ALT', 'QUAL', 'FILTER', 'INFO', 'FORMA...
import os import subprocess import time from datetime import datetime from multiprocessing import Process from threading import Thread from typing import AnyStr, NoReturn, Union import requests from executors.alarm import alarm_executor from executors.automation import auto_helper from executors.conditions import con...
# TODO: make 'if point' better from functools import partial from divtable import DivTable def B0coset(*arg): return Bcoset_gen(*arg, B0=True) def Bcoset(point, C, curve, B0=False): start = [0 for i in range(curve.m)] if point == 'P': def update(div, minus_p, minus_q): delta_p = div.is...
import pickle import shlex from configs import kmeans_file_path, vectorizer_file_path, indices_file_path, duplicates_path, doc_vectors_path from core.corpus import sheet from core.processing import fix_compounds, stop_words, clean_token data_keys = ['date', 'title', 'source', 'summary', 'tags', 'content', 'thumbnail'...
import json import numpy as np from numpy import linalg as la # [1] <NAME>, <NAME>, <NAME>, <NAME> Mathematical Programming, 2011, # Volume 127, Number 1, Page 3. Pegasos: primal estimated sub-gradient solver for SVM. ###### Q1.1 ###### def objective_function(X, y, w, lamb): """ Inputs: - Xtrain: A 2 dimen...
from plasTeX.PackageResource import ( PackageResource, PackageCss, PackageJs, PackageTemplateDir) from plasTeX import Command, Environment from plasTeX.Base.LaTeX.Lists import List def ProcessOptions(options, document): context = document.context context.newcounter('section') context.newcounter('question'...
""" Justify text """ from typing import List import argparse import itertools import random import re import sys import textwrap VERSION = "0.9.0" LICENSE = """ Copyright 2019-2021 <NAME> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation fi...
from __future__ import print_function from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from builtins import range from builtins import input from builtins import int from builtins import str from future import standard_library standard_library.install_aliase...
from src import db from flask_login import UserMixin from werkzeug.security import generate_password_hash, check_password_hash from datetime import datetime class User(UserMixin, db.Model): __tablename__ = 'users' id = db.Column(db.Integer, primary_key=True) # User Authentication fields email = db.Col...
import logging import string from validate_email import validate_email from .convert import convert_book from .models import User from .response import ( NoResponse, UserNotFoundResponse, UserAuthorizedResponse, NewUserAdminNotification, BookNotFoundResponse, EmailSentResponse, EmailFailed...
# -*- coding: utf-8 -*- # pip install torequests pysocks PySimpleGUI import base64 import ctypes import json import socket import time import timeit from concurrent.futures import ThreadPoolExecutor from pathlib import Path from threading import Thread import psutil import PySimpleGUI as sg from torequests import tPo...
"""Utils for the test_runners.""" from __future__ import print_function import os import numpy from upload import result_info from upload import result_upload def report_config_defaults(report_config, test_harness=None): """Creates copy of report_config and sets defaults for missing entries.""" config = report_...
import json import tkinter as tk from tensorflow import GradientTape from tensorflow.keras.losses import mean_squared_error from tensorflow.keras.optimizers import Adam, SGD from .q_network import QNetwork from .policies import e_greedy, greedy from .replay_buffer import ReplayBuffer BATCH_SIZE = 1 class Agent: ...
import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import itertools from ..core.constants import ACTION_INDS class ReconstructionMSELoss(nn.Module): def __init__(self, **kwargs): super().__init__() def forward(self, predicted_modalities, input_moda...
import click import datetime import logging import os import sys from . import cli from .add import add_plugin from .params import project from meltano.core.config_service import ConfigService from meltano.core.runner.singer import SingerRunner from meltano.core.runner.dbt import DbtRunner from meltano.core.project im...
import os from galaxy_test.driver import integration_util THIS_DIR = os.path.dirname(__file__) PANEL_VIEWS_DIR_1 = os.path.join(THIS_DIR, "panel_views_1") class PanelViewsFromDirectoryIntegrationTestCase(integration_util.IntegrationTestCase): framework_tool_and_types = True allow_tool_conf_override = False...
import math import typing as tp from bisect import bisect_left from warnings import warn from .benchmark_data import make_groups from .benchmark_parser import ParameterValues, Parameter, Benchmark from .support import nan_filled class HeatMapData(Benchmark): def __init__(self, values: tp.List[fl...
# # Copyright 2021 Red Hat Inc. # SPDX-License-Identifier: Apache-2.0 # """Cache of worker tasks currently running.""" import logging import re from django.conf import settings from django.core.cache import caches from koku import CELERY_INSPECT TASK_CACHE_EXPIRE = 30 LOG = logging.getLogger(__name__) def create_s...
import logging from typing import Dict, List, Optional import hail as hl from gnomad.utils.vcf import make_label_combos, SORT_ORDER logging.basicConfig(format="%(levelname)s (%(name)s %(lineno)s): %(message)s") logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) def generic_field_check( ht: hl....
from flask import render_template, request, redirect, url_for, jsonify from app import app import pandas as pd import nltk import string import random from sklearn.feature_extraction.text import TfidfVectorizer from Sastrawi.Stemmer.StemmerFactory import StemmerFactory from Sastrawi.StopWordRemover.StopWordRemoverFacto...
#!/usr/bin/env python import subprocess import os import sys import argparse import string import shlex import json from datetime import datetime import math import time from warnings import warn from urllib.request import urlopen from urllib.parse import urlencode from urllib.error import HTTPError GH_USER = 'sc...
# Creating data Pipelines # A. Simple pipeline # Import the data to a DataFrame departures_df = spark.read.csv('2015-departures.csv.gz', header=True) # Remove any duration of 0 departures_df = departures_df.filter(departures_df['Actual elapsed time (Minutes)'] > 0) # Add an ID column departures_df = departures_df.wi...
import inspect import json import os from django.conf import settings from django.core.exceptions import ValidationError from django.core.files.storage import FileSystemStorage from django.core.validators import URLValidator from django.utils.translation import gettext as _ from ..fields import ImageWithThumbnailFiel...
"""2D and 3D vector classes. These are used to represent points in 2D and 3D, as well as directions for translations. """ from typing import Any, Iterable, Iterator, List, Optional, Sized, Tuple, Union # noqa import numpy as np from six.moves import zip if False: from .polygons import Polygon3D # noqa class...
import numpy as np import pandas as pd import h5py import os import sys import time import glob from test_persistence import * from criteria_precip import * # testing forecst accuracy by JMA hrncst def get_model_true_pairs(infile): # prep prediction from '00utc' dataset print("reading 00utc:",infile) if ...
""" CHECKING FEASIBLE PLACEMENT Base station has communication distance parameter. We need to check the link between all placed stations from left gateway to right gateway in tandem network """ from typing import Tuple, Any from bab.bst import Node import numpy as np def _in_range(place1: float, place2: float, ...
import matplotlib.pyplot as plt import matplotlib.image as mpimg import cv2 import numpy as np import math import os #function takes folder path with chessboard images and analyze the images to return the image points #and object points def get_obj_image_points(path ,nx,ny): #lists to hold the current image ob...
import unittest from dataclasses import dataclass from typing import Optional, List, Any, Iterator from forte.data.data_pack import DataPack from forte.data.multi_pack import MultiPack from forte.data.ontology import Generics, MultiPackGeneric, Annotation from forte.data.ontology.core import FList, FDict, MpPointer, P...
#import system modules import os, sys import adsk.core, adsk.fusion, adsk.cam, traceback from .GuitarEngineUI import UIElements, UIManager from .ParameterValues import ParameterValues from .DesignParameters import DesignParameters from .Builders import FretboardBuilder, BodyBlankBuilder, StringsBuilder, DimensionsBui...
# encoding: utf-8 # module cv2.xfeatures2d # from /home/davtoh/anaconda3/envs/rrtools/lib/python3.5/site-packages/cv2.cpython-35m-x86_64-linux-gnu.so # by generator 1.144 # no doc # no imports # Variables with simple values DAISY_NRM_FULL = 102 DAISY_NRM_NONE = 100 DAISY_NRM_PARTIAL = 101 DAISY_NRM_SIFT = 103 FREAK_...
#!/usr/bin/env python """ @author: <NAME> Based on `RohdeSchwarz_SpectrumAnalyzer` driver. """ from VISA_Driver import VISA_Driver import numpy as np __version__ = "0.0.2" class Error(Exception): pass class Driver(VISA_Driver): """ This class implements the Rohde&Schwarz Network Analyzer driver...
#!/usr/bin/env python3 from numpy.core.fromnumeric import size import rospy import argparse from std_msgs.msg import Int16 import cv2 import torch import numpy as np from sensor_msgs.msg import Image as TactileImage from PIL import Image from cv_bridge import CvBridge from handsnet_yolo.msg import Image_BB from handsne...
# Load the needed packages import random import numpy as np import pandas as pd np.random.seed(42) # Load the dataset as a DataFrame df = pd.read_excel('Programs.xlsx') ## This is to shape the datafarme to be more usefull df['Choice']=(df.Specialty + "; " +df.Region) df=df.drop(columns=["Specialty","Region"]) df['Var...
from __future__ import print_function from ripe.atlas.cousteau import ProbeRequest from ripe.atlas.cousteau import Probe import ipaddress from datetime import datetime import traceback import configparser import MySQLdb as pymysql from operator import itemgetter from contextlib import closing import random import time ...
# Copyright (c) 2020 PaddlePaddle 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 appli...
import sys import os import numpy as np sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))) from ks_convergence_analysis.convergence_analysis import ks_convergence_analysis, print_results from ks_convergence_analysis.helpers.plot import save_figure, create_figure, GridSpec d...
import torch import models import torch.nn as nn import torch.utils.data from trainer import train_autoencoder, test_autoencoder, train_classifier, test_classifier from print_util import Color, print_positives, print_rates from scipy.ndimage.filters import uniform_filter1d from data import all_devices, mirai_attacks, g...
# flake8: noqa E731 import pytest import numpy as np from sklearn.datasets import load_iris from sklearn.linear_model import LogisticRegression import tensorflow as tf import keras from alibi.explainers.counterfactual import _define_func from alibi.explainers import CounterFactual @pytest.fixture def logistic_iris()...
#!/usr/bin/env python import subprocess x64OnlyPackageList = [ "chromium-base", "crashpad" ] x86OnlyPackageList = [ ] packageList = [ (['mpi'], False), (['boost-locale[icu]', 'boost-regex[icu]', 'boost[mpi]', 'flatbuffers', 'freeglut', 'fruit', 'gettext[core,tools]', 'glew', 'glog', 'glui', 'gtest', 'hunspell...
import numpy as np import os from constants import * import pickle import json object_types = pickle.load(open(root_folder+"object_types.pkl","rb")) vocab=json.load(open(processed_data_folder+"npz.annotation.txt.annotation.class_index_reverse.json", "r")) print(vocab) import argparse parser = argparse.ArgumentParser(...
import io import shutil import tkinter import flask import PIL.Image import base64 from API_Helper import flarg, flreq, package from scripts import Warnings, Log, Constants, Parameters from scripts.backend.connection import API_Helper from scripts.backend.database import Database, DatabaseDatasets, DatabaseAccounts, ...
import numpy as np from PIL import Image class AffineTransform(object): def __init__(self): self.afmat = np.eye(3) def _apply(self, t): self.afmat = np.dot(t, self.afmat) def scale(self, w, h): t = np.eye(3) t[0,0] *= w t[1,1] *= h self._apply(t) def ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This code is PEP8-compliant. See http://www.python.org/dev/peps/pep-0008. """This module collects classes representing the uncertainty about the actual value of a base type instance. """ from __future__ import unicode_literals from collections import namedtuple from al...
import sys import numpy as np import gdspy as gp from pp.geo_utils import area def _print(*args, **kwargs): print(*args, **kwargs) sys.stdout.flush() def compute_area(c, target_layer): """ Compute area of the component on a given layer """ _print("Computing area ", c.name) c.flatten() ...
import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import LogFormatter, LogLocator import cartopy import cartopy.crs as ccrs import cartopy.feature as cfeature from cartopy.io.shapereader import Reader as ShapeReader from glmtools.plot.values import display_params from matplotlib.cm import ge...
# # Hex-Rays Decompiler project # Copyright (c) 2007-2019 by Hex-Rays, <EMAIL> # ALL RIGHTS RESERVED. # # Sample plugin for Hex-Rays Decompiler. # It shows list of direct references to a register from the current # instruction. # # This is a rewrite in Python of the vds12 example that...
__author__ = "<NAME>" __copyright__ = "Copyright 2020" __version__ = "1.0.0" __email__ = "<EMAIL>" import random from enum import Enum from typing import List, Dict class Equipment(Enum): dumbbells = 0 kettle_bell = 1 trx = 2 jump_rope = 3 class Exercise(object): """Different exercises used fo...
# Copyright 2021 The Distla 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 ...
from collections import Mapping from ctypes import c_int, c_int32, c_double, c_char_p, POINTER from weakref import WeakValueDictionary from numpy.ctypeslib import as_array from . import _dll, NuclideView from .core import _View from .error import _error_handler from .filter import _get_filter __all__ = ['TallyView'...
# set of components (reference to artworks) # each component has 3 different types # (can be more types later!) # each type has a fitness value out of 100 # from this, we can generate genetic drift. # Each one of the letters is a .jpg which is # overlayed/compose with others components. # This allows for use to mix a...
from __future__ import division from __future__ import print_function import time import random import argparse import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from utils import * from new_model import * import os # Training settings parser = argparse.ArgumentParser() parser...
from www.admin import admin_welcome, admin_room, admin_memberlist, admin_server_manager, admin_match, admin_invitecode import requests import socks # 需要安装:pip install pysocks import json import platform from . import GlobalVar, api_process, steamauth from urllib import request, parse, error from urllib.parse import ur...
import abc import dataclasses import threading from typing import Dict, List, Optional from localstack.services.awslambda.invocation.lambda_util import qualified_lambda_arn @dataclasses.dataclass class Invocation: payload: bytes client_context: Optional[str] invocation_type: str @dataclasses.dataclass ...
#!/usr/bin/python # -*- coding: utf8 -*- from enum import Enum __author__ = 'enginebai' class User: def __init__(self, user_id): self.user_id = user_id @property def username(self): return self._username @username.setter def username(self, username): self._username = use...
import os import copy import torch from abc import ABC from ray import tune from ignite import utils from ignite import engine from ignite import distributed from torch.utils import data from torch.utils import tensorboard from quince.library import datasets class BaseModel(ABC): def __init__(self, job_dir, ...
from django.shortcuts import render, redirect from django.contrib import messages from .models import PartsMaster, SubCategory, Issues from .forms import PartsMasterCreateForm, PartsMasterSearchForm from .forms import PartsMasterUpdateForm, IssueForm, ReceiveForm, \ IssueCreateForm, PMCreateForm from django.contri...
import json import re import requests from bs4 import BeautifulSoup from django.db.models.signals import post_save from django.dispatch import receiver from django.conf import settings from django.urls import reverse_lazy from django.core.mail import EmailMultiAlternatives from django.template.loader import render_t...
from torch import nn import os from im2mesh.encoder import encoder_dict from im2mesh.dvr import models, training, generation, rendering from im2mesh import data def get_model(cfg, device=None, len_dataset=0, **kwargs): ''' Returns the DVR model. Args: cfg (dict): imported yaml config device (...
import sys import os from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * class TreeModelTester(QMainWindow): """Test correctness of tree models/views""" def __init__(self): """Initialize the application.""" QMainWindow.__init__(self) self.counter = 0 ...
# !/usr/bin/env python3 import logging import typing from datetime import datetime import discord from discord.ext import commands, tasks from discord.ext.menus import ListPageSource, MenuPages from .utils.common import CommonUtil from .utils.polling_manager import PollingManager, PollingParameter from .utils.setti...
""" Detections script:: python detection.py \ --path_weights ./model_data/yolo3-tiny.h5 \ --path_anchors ./model_data/tiny-yolo_anchors.csv \ --path_classes ./model_data/coco_classes.txt \ --path_output ./results \ --path_image ./model_data/bike-car-dog.jpg \ --path_...
from molsysmt._private.exceptions import * from molsysmt.form.file_mol2.is_file_mol2 import is_file_mol2 as is_form from molsysmt.form.file_mol2.extract import extract from molsysmt.form.file_mol2.add import add from molsysmt.form.file_mol2.append_structures import append_structures from molsysmt.form.file_mol2.get im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from typing import Union import random import asyncio import aiohttp import discord from discord.ext import commands, menus import LakshmiErrors from contents.character.Investigator import Investigator from contents.character.generator.CharacterGenerator im...
""" rqt GUI plugin to visualize dot graphs. This software was developed by employees of the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 of the United States Code, this software is not subject to copyright protection and is in the public domain. The Government assumes no ...
# Copyright 2020 by <NAME>, <NAME>, <NAME>, <NAME>, and <NAME> # This software is distributed under the 3-clause BSD License. #Tree ideas; dlw Fall 2019 # Stage numbers and scenario numbers are one-based, but lists are all zero-based # Tree node numbers used in node names are zero-based. # NOTE: we *do* have leaf nodes...
# Copyright 2013 Embrane, 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...
# _*_ coding=utf-8 _*_ from robotClass import * from scipy.optimize import fsolve import os import math from D3_TE import from_3D_to_2D from config import * from GridentDescentPy import PositionSolver import tensorflow as tf from dv_distance_file import dv_distance robot_Num = 0 beacon_Num = 0 def cmp_by_value(lhs): ...
""" Command-line program and library for counting k-mers in a genome. Produces a Python pickle file with a dictionary of k-mer counts in the genome:: kmers = { 'md5': { 'gi|568336015|gb|CM000671.2| Homo sapiens chromosome 9, GRCh38 reference primary assembly': '6c198acf68b5af7b9d676dfdd531b5de', 'gi|...
""" Copyright 2017-present, Airbnb Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, sof...
from ... import errors from ._base_element import BaseScopedElement from .singular import BaseSingular class Grammar(BaseScopedElement): """ Named element which contains other grammar elements. """ can_have_delimiter = False delimiter_grammar = None def setup(self): if self.token_str: ...
from flask import Flask, render_template, request import pandas as pd import json import plotly import plotly.express as px import csv, re, operator # from textblob import TextBlob app = Flask(__name__) person = { 'first_name': 'Nohossat', 'last_name' : 'TRAORE', 'address' : '9 rue Léon Giraud · PARIS ·...
"""Functions which are writing data """ import os import csv import json import yaml import numpy as np # pylint: disable=I0011,C0321,C0301,C0103, C0325 def read_txt_shape_peak_dh(file_path): """Read to txt. Array with shape: (24,) """ read_dict = json.load(open(file_path)) read_dict_list = list(read_d...
import numpy as np from ..field import CartesianGrid, UnstructuredCoords, make_hexagonal_grid, Field from .generic import * def make_vlt_aperture(): pass def make_subaru_aperture(): pass def make_lbt_aperture(): pass def make_magellan_aperture(normalized=False, with_spiders=True): '''Make the Magellan aperture....
# -*- mode: python; encoding: utf-8 -*- # # Copyright 2014 the Critic contributors, Opera Software ASA # # 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/LI...
"""CDX query URL constructor.""" import datetime from typing import Any, Dict, List, Optional import requests CDX_DOCS = ( 'https://github.com/internetarchive/wayback/tree/master/wayback-cdx-server' ) CDX_MATCH_TYPE = 'matchType' CDX_LIMIT = 'limit' CDX_RESUME_KEY = 'resumeKey' CDX_SHOW_RESUME_KEY = 'showResumeK...
from __future__ import absolute_import, unicode_literals import os import logging import shlex import shutil import subprocess import time from django.conf import settings from django.core.mail import send_mail from celery import group, chain from celery.decorators import task from PIL import Image import boto3 import...
# Copyright 2021 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import pytest from copy import deepcopy from deepdiff import DeepDiff, grep from unittest.mock import MagicMock from cidc_schemas.json_validation import load_and_validate_schema from cidc_schemas.prism import ( prismify, merge_clinical_trial_metadata, merge_artifact, merge_artifacts, merge_artifact...
# Python <= 3.9 from __future__ import annotations from cgitb import reset import dataclasses import re import typing from dataclasses import dataclass, field from datetime import datetime, timedelta from enum import Enum from typing import Any, Callable, Optional, Type, TypeVar, Union, cast from uuid import UUID T =...
import torch import torch.nn as nn import torch.nn.functional as F import sys sys.path.append("../") import gcn3d from model.transformer0 import Transformer import numpy as np class GCN3D(nn.Module): def __init__(self, class_num, support_num, neighbor_num): super().__init__() self.neighbor_num = n...
# find carla module import glob import os import sys try: sys.path.append(glob.glob('./framework/carla_simulator/carla-*%d.%d-%s.egg' % ( sys.version_info.major, sys.version_info.minor, 'win-amd64' if os.name == 'nt' else 'linux-x86_64'))[0]) except IndexError: pass import logging impo...
#!/usr/bin/python # -*- coding:utf-8 -*- from OTXv2 import OTXv2 from OTXv2 import IndicatorTypes import ConfigParser from utils import Query import sys reload(sys) sys.setdefaultencoding('utf-8') import cPickle import re import numpy from storageEngine.elasticEngine import elasticManage from utils imp...
# # veering_census_data.py # ### Used to create or update the file "veering_census_with_data" import regina import snappy from file_io import parse_data_file, write_data_file from taut import isosig_to_tri_angle, apply_isom_to_angle_struct_list from veering import is_veering from transverse_taut import is_transvers...
from collections import OrderedDict import numpy as np def check_arrays(*arrays): """ Left for consistency, version of `sklearn.validation.check_arrays` :param list[iterable] arrays: arrays with same length of first dimension. """ assert len(arrays) > 0, 'The number of array must be greater than ...
#!python # coding=utf-8 import time import logging import threading from typing import List, Callable from datetime import datetime, timedelta from confluent_kafka import Consumer, KafkaError from confluent_kafka.avro import AvroConsumer from confluent_kafka.avro.serializer import SerializerError L = logging.getLogge...
#!/usr/bin/python # SPDX-License-Identifier: LGPL-2.1-or-later from __future__ import print_function import argparse import dbus import dbus.exceptions import dbus.mainloop.glib import dbus.service import time import threading try: from gi.repository import GLib # python3 from gi.repository import GObject #...
import math import sys import os import json import random from time import time, sleep from enum import Enum from queue import Queue import logging logging.basicConfig( level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s", ) logging.getLogger("googleapiclient.discovery").setLevel(logging.ERROR) ...
from . import models from .membership import permissions from .membership.models import AuthGroup from django.conf import settings import rest_framework_filters as filters from rest_framework import filters as drf_filters from rest_framework import pagination from . import utils BACKEND = filters.backends.RestFramewo...
#!/usr/bin/env python3 """ task1.py - Task 1: Pun Detection using word2vec and RNN with LSTM cells Author: <NAME> (<EMAIL>) Date: 11/13/2017 """ import xml.etree.ElementTree as ET import numpy as np import tensorflow as tf from data_processing import get_train_and_test_data train_x, train_y, test_x, test_...
# coding: utf-8 import numpy as np import cv2 import chainer import chainer.functions as F import chainer.links as L from chainer import Variable, iterators, Chain, optimizers, training from chainer.training import updaters, Trainer, extensions from chainer.backends import cuda import matplotlib matplotlib.use("Agg"...
import click from typing import Optional, Union from replay_structure.ripple_preprocessing import Ripple_Preprocessing from replay_structure.run_snippet_preprocessing import Run_Snippet_Preprocessing from replay_structure.highsynchronyevents import HighSynchronyEvents_Preprocessing from replay_structure.simulated_neur...
""" Author : <NAME> Dated : March 13th, 2021 Affiliation : Departemen Ilmu Komputer, Fakultas Ilmu Komputer - Teknologi Informasi, Universitas Sumatera Utara, Indonesia References : <NAME>. Python Data Structures and Algorithms. 2017. Packt Publishing. ...