text
stringlengths
6.04k
39.5k
# binstruct - binary structure serialization # ------------------------------------------ # https://github.com/albertz/binstruct/, # Copyright (c) 2012, <NAME>, www.az2000.de # All rights reserved. # file created 2012-06-10 # Redistribution and use in source and binary forms, with or without # modification, are per...
import nested_admin from django.contrib import admin from weunion.settings import GOOGLE_API_KEY from django.template.loader import render_to_string from django.core.exceptions import ValidationError from django.forms.models import BaseInlineFormSet from django.contrib.auth.models import Group from django.contrib.sites...
# Copyright 2020 Pulser Development Team # # 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 i...
import os,sys import datetime,json,time,random from math import radians, cos, sin, asin, sqrt,degrees from collections import OrderedDict import pandas as pd import numpy as np import matplotlib.pyplot as plt from impala.dbapi import connect from sqlalchemy import create_engine from scipy.spatial import ConvexHull # f...
# -*- coding: utf-8 -*- """ Created on Thu Nov 11 18:04:48 2021 @author: jnguy """ #!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function from bson.objectid import ObjectId import math import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import axes3d, Axes3D f...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np from tqdm import tqdm from . import thops from . import modules from . import utils from torchvision.models import resnet18 def f(in_channels, out_channels, hidden_channels): return nn.Sequential( modules.Conv2d(in_chann...
import copy import logging import pickle import re import time import tkinter import cv2 import gym import numpy as np import tensorflow as tf import torch import torch.nn as nn import torch.optim as optim from baselines.common.cmd_util import make_vec_env from baselines.common.vec_env.vec_frame_stack import VecFrameS...
from datetime import time import numpy as np import csv import os import glob import natsort import pandas as pd import re import warnings import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D, art3d class Subdivision_Surface(): ''' This class create a surface from the control mesh, based on...
# -*- coding: utf-8 -*- # reporting.py # Copyright (c) 2014-?, <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 # not...
#! /usr/bin/env python3 ''' # ----------------------------------------------------------------------------- # template-python.py Example python skeleton. # Can be used as a boiler-plate to build new python scripts. # This skeleton implements the following features: # 1) "command subcommand" command line. # 2) A st...
#!/usr/bin/env python # -*- coding: utf-8 -*- import copy import abc import logging from .elastic_materials import ElasticMaterial from .composites import Laminate, FiberReinforcedPlastic, Layer # ==================== # Set up module logger # ==================== logger = logging.getLogger(__name__) class LayerFact...
from __future__ import print_function import numpy as np import tensorflow as tf import os import pickle import copy import sys import html # from utils import TextLoader from model import Model from utils import eprint # print to stderr from utils import get_args # a global variable and the function what fills it...
print(f'Loading {__file__}...') # -*- coding: utf-8 -*- """ Created on Tue Jun 14 14:43:13 2016 @author: xf05id1 """ #for tomography from bluesky.plans import scan, count, list_scan from bluesky.preprocessors import subs_wrapper import time def tomo_fullfield(thetastart = -90, thetastop = 90, numproj = 361, ffwai...
import os import math as m import numpy as np # np.random.seed(123) import scipy.io from sklearn.decomposition import PCA from sklearn.preprocessing import scale import random import keras.backend as K import warnings import keras from keras.preprocessing.sequence import pad_sequences # import all image transformati...
# 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, Version 2.0 (the # "License"); you may not u...
from os import urandom, path import random import pytest from bitcoinx import ( Bitcoin, BitcoinTestnet, pack_le_uint32, double_sha256, IncorrectBits, InsufficientPoW, ) from bitcoinx.chain import _HeaderStorage, Chain, Headers, CheckPoint, MissingHeader some_good_bits = [486604799, 472518933, 453281356, 436956...
""" Name: diffusion_functions Purpose: Contains functions to calculate diffusion of distributed wind model (1) Determine maximum market size as a function of payback time; (2) Parameterize Bass diffusion curve with diffusion rates (p, q) set by payback time; (3) Determine current stage (equivaluen...
import mimetypes import random import re import string import urllib.parse from datetime import datetime, timedelta, timezone from io import BytesIO from os.path import isfile import discord import pytz import requests import requests.models from discord.ext import commands from discord.ext.commands import BadArgument...
#!/usr/bin/env python3 # This variable defines all the external programs that this module # relies on. lxbuildenv reads this variable in order to ensure # the build will finish without exiting due to missing third-party # programs. LX_DEPENDENCIES = ["riscv", "icestorm", "yosys", "nextpnr-ice40"] # Import lxbuildenv ...
""" _generic.py I feel like I'm rewriting a lot of the same code- so let's define a master class holding all the stuff we want to reuse between feature extractors. """ import os import yaml import numpy as np import tensorflow as tf from tqdm import tqdm from sklearn.svm import LinearSVC from sklearn.pr...
#!/usr/bin/env python3 import sys import copy import rospy import moveit_commander import moveit_msgs.msg import geometry_msgs.msg from math import pi from std_msgs.msg import String from moveit_commander.conversions import pose_to_list import tf import numpy as np def all_close(goal, actual, tolerance): """ ...
from __future__ import annotations import enum import struct from .header import ( TruncatedPrimaryHeader, PrimaryHeader, SourceOrDestField, determine_header_type, HeaderType, ) from .definitions import ( UslpInvalidRawPacketOrFrameLen, UslpTruncatedFrameNotAllowed, UslpInvalidConstruct...
import os, sys, time from socket import socket from select import select from struct import pack, unpack from binascii import hexlify, unhexlify from hashlib import sha512 CS_CMD_MID = 0x189F CS_ONESHOT_CC = 2 CS_HK_TLM_MID = 0x08A4 UART_CI_TO_MID = 0x19D7 ENABLE_TLM_CC = 0x07 MM_MID = 0x188...
import copy import os from enum import Enum from allennlp.data.iterators import BasicIterator from allennlp.nn.util import move_to_device from pytorch_pretrained_bert.modeling import BertLayerNorm from bert_model_variances.bert_maxout_clf import BertPairMaxOutMatcher, BertSupervisedVecClassifier from hotpot_content_s...
""" this file modified from the word_language_model example """ import os import torch from codecs import open from collections import Counter, defaultdict import re import random random.seed(1111) # punctuation = set(['.', '!', ',', ';', ':', '?', '--', '-rrb-', '-lrb-']) punctuation = set() # i don't know why i w...
# -*- coding: utf-8 -*- from openerp import models,fields,api,registry from openerp.tools.translate import _ from openerp.exceptions import Warning import datetime import time import pytz import base64 import tempfile import os from pyPdf import PdfFileWriter, PdfFileReader from contextlib import closing import thread...
#!/usr/bin/env python3 import logging logging.basicConfig(level=logging.WARN) import csv import glob import math import multiprocessing import os import sys import time import traceback import yaml import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from email.mime.base...
import cv2 import tkinter from tkinter import * import os, time from PIL import Image, ImageTk import threading import time from coral_cv_with_data import detectPlatform, UI_Keyboard, UI_Raspberry, UI_EdgeTpuDevBoard, TeachableMachineKNN_ByChun import argparse class Image_Process(): def crop(self, ima...
# Copyright 2017 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 applicab...
import os from pathlib import Path import ntpath from datetime import datetime import json import requests from requests_oauthlib import OAuth2Session from oauthlib.oauth2 import LegacyApplicationClient as Client from requests_oauthlib import OAuth2 import mimetypes import hashlib from . import sessionwithurlbase # Br...
from __future__ import print_function import os, os.path, glob, datetime, shutil, sys, time import subprocess as sp import Tkinter as tk import tkMessageBox as tkMB import utils as U #---------------------------------------------------------------------- # # UTILITIES # def read_status_file(jd): # Ho hum. Windo...
"""Main script for training encoder. This script should be run only after the stylegan's generator is well-trained""" import os import time import sys import tensorflow as tf import numpy as np import dnnlib from dnnlib import EasyDict import dnnlib.tflib as tflib from training import misc from perceptual_model import...
# import libraries from locale import normalize import sys sys.path.append('..') import torch import torch.nn as nn import torch.optim as optim from torch.optim import lr_scheduler import numpy as np import torchvision from torchvision import transforms import matplotlib.pyplot as plt import time import os import argpa...
#!/usr/bin/env python ## Copyright (c) 2012 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import os import uuid import xml.sax.saxutils as saxutils import converter.xar_types as xar_types ENTITIES = { '\x00': "&#...
from dateutil import parser as date_parser import json from django.db import transaction from django.core.management.base import BaseCommand, CommandError from django.conf import settings from api.molnix_utils import MolnixApi from api.logger import logger from deployments.models import MolnixTag, PersonnelDeployment, ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ################################################## # 適応法を用いた音の最小知覚移動角度の心理測定実験 # # <NAME> (<EMAIL>) # 2020 # ################################################## import sys import glob import re import json from typing import List, Dict from subprocess import Popen impor...
import logging from abc import abstractmethod from collections import deque, namedtuple from contextlib import suppress from typing import Deque, Dict, List, Optional, Set, Tuple, Union, cast from dipdup.config import ( BigMapHandlerConfig, BigMapIndexConfig, ContractConfig, IndexConfigTemplateT, O...
# Copyright (C) 2011-2016, Quentin "mefyl" Hocquet # # This software is provided "as is" without warranty of any kind, # either expressed or implied, including but not limited to the # implied warranties of fitness for a particular purpose. # # See the LICENSE file for more information. import collections import green...
import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import datetime import pandas import seaborn from itertools import cycle from numpy import linspace, cumsum from pathlib import PurePath import os animal, haplotype, sample, assembler = '', '', '100', '' def get_basename(): return f'{haplotyp...
""" This module allows you to analyse OCaml source code, autocomplete, and infer types while writing. """ import functools import sublime import sublime_plugin import re import os import sys if sys.version_info < (3, 0): from merlin.process import MerlinProcess, MerlinView from merlin.helpers import merlin_po...
"""Stores approximation data generated during the solution process""" import copy import logging import numpy as np from decogo.model.constraints import LinearConstraint from decogo.util.block_vector import BlockVector logger = logging.getLogger('decogo') class ApproxData: """Wrapper class for storing approxi...
""" Copyright 2016 Author: <NAME> <<EMAIL>> This module contains code related to the work on CrowdFlower. CrowdFlower was used for crouwdsourcing. The crouwdsourcing results were used to establish the benchmark for evalution. Basically the module contains a function crowdflower_csv to build the .csv file for CrowdFlo...
# Python imports import datetime import random # 3rd party imports from django.conf import settings from django.core.exceptions import ValidationError from django.utils.timezone import now from pytz import timezone # Project imports from civil_registry.models import Citizen from civil_registry.tests.factories import ...
from __future__ import absolute_import import sys, os from subprocess import Popen, PIPE, check_output import joblib from ..seqToolManager import seqToolManager, FeatureComputerException from .consDbManager import ConsDbManager from .windowPSSM import WindowPSSM from utils import myMakeDir, tryToRemove #utils is at th...
#!/usr/bin/env python2 # # Copyright (C) 2019 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 applicabl...
# Copyright Contributors to the Rez 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 required by applicable law or agreed ...
# -*- coding: utf-8 -*- """ Created on Fri Dec 11 14:41:13 2015 @author: napo """ from __future__ import unicode_literals from builtins import str as futureenc import ckanapi import datetime import pytz from lxml import etree import requests from geopy.geocoders import Nominatim from geopy.distance import vincenty imp...
# Copyright Contributors to the Pyro project. # SPDX-License-Identifier: Apache-2.0 from collections import namedtuple from copy import deepcopy from functools import partial from jax import random import jax.numpy as jnp from jax.tree_util import register_pytree_node, tree_flatten, tree_unflatten import numpyro imp...
import fenics as fe from fenics import grad, inner, div, dot, tr, det from math import pi import numpy as np import matplotlib.pyplot as plt import time from load_meshes import load_2d_muscle_geo, load_2d_muscle_bc from plotting_tools import * mesh, dx, ds, boundaries = load_2d_muscle_geo() cell = mesh.ufl_cell() ...
from __future__ import unicode_literals from django import forms from django.conf import settings from django.core.exceptions import ValidationError from django.db import models from django.db.models import Max from django.template.defaultfilters import slugify from django.urls import reverse from django.utils import ...
#!/usr/bin/env python3 # Generates images for the gallery import os import argparse import numpy as np import os.path as path import matplotlib.pyplot as plt from yellowbrick.datasets import load_occupancy, load_credit, load_concrete from yellowbrick.datasets import load_spam, load_game, load_energy, load_hobbies fr...
# -*- Mode: Python; py-indent-offset: 4 -*- # vim: tabstop=4 shiftwidth=4 expandtab # # Copyright (C) 2010 <NAME> <<EMAIL>> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # vers...
"""This file contains the code for loading and preprocessing the data. Note that for the functions to run properly, the appropriate datasets should already be downloaded to the correct directory: CIFAR-10: Should be saved to ./datasets/cifar10py/ FMNIST: Should be saved to ./datasets/FMNIST/initial_ds/ synthetic ...
""" Phase-field Approach to Optimal Design with Obstacle Constraints default parameters for the problem without obstacle """ from fenics import * #from dolfin import * #from dolfin_adjoint import * def default_parameters(): para = Parameters("para"); # ex: 1. no_obstacle , 2. one_obst...
import pandas as pd import numpy as np from datetime import timedelta import geopandas as gpd import matplotlib.pyplot as plt import matplotlib.gridspec as grid_spec from scipy import stats from .geolocations import * COLORS = {"light_orange":"#E69F00", "light_blue":"#56B4E9", "teal":"#00...
# The command file for every external command not specifically for running # the bot. Even more relevant commands like broadcast options and whitelists # are treated as such. # # Every command in here should follow the basic structure of: # elif cmd == 'commandHere': # doYourThings(lots, of, variables) # return...
import os import numpy as np from PIL import Image from itertools import product from collections import defaultdict import matplotlib.pyplot as plt from matplotlib import cm from matplotlib import colors import pandas as pd import torch import cv2 from mpl_toolkits.axes_grid1 import make_axes_locatable from sklearn.cl...
import gym import numpy as np import torch import wandb import argparse import pickle import random import sys from decision_transformer.evaluation.evaluate_episodes import evaluate_episode, evaluate_episode_rtg from decision_transformer.models.decision_transformer import DecisionTransformer from decision_transformer...
#!/usr/bin/env python # -*- coding: utf-8 -*- ###################################################################### # Copyright (c) 2019 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. # ...
import wx import wx.gizmos import wx.lib from wx.lib.scrolledpanel import * import sys import wxogre from FlatNotebook import * import ogre.renderer.OGRE as ogre #from imagebrowser import * import Image import time #import FreeImagePy as FIPY from ogreyEntity import * from ogreyLevel import * from ogreyEntityTree imp...
import sdi_utils.gensolution as gs import sdi_utils.set_logging as slog import sdi_utils.textfield_parser as tfp import pandas as pd import numpy as np EXAMPLE_ROWS =5 try: api except NameError: class api: class Message: def __init__(self,body = None,attributes = ""): sel...
import numpy as np import tensorflow as tf import os print("--> Loading parameters...") global par, analysis_par """ Independent parameters """ rnd_save_suffix = np.random.randint(10000) par = { # Setup parameters 'save_dir' : 'C:/Users/Krithika/Documents/Freedmanlab_reading list_papers/RNNs/S...
import numpy as np import scipy.stats as ss import matplotlib.pyplot as plt import numba @numba.njit def distance_transform(event_series): '''Compute the distance to the most recent event at every time step. We consider all values != 0 as event occurrences.''' T = len(event_series) distance_to_event =...
#!/usr/bin/env python # -*- coding: utf-8 -*- # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: © 2021 Massachusetts Institute of Technology. # SPDX-FileCopyrightText: © 2021 <NAME> <<EMAIL>> # NOTICE: authors should document their contributions in concisely in NOTICE # with details inline in source files...
from qnet import ( ascii, unicode, latex, srepr, configure_printing, InfiniteSumError, LocalSpace, TrivialSpace, ScalarIndexedSum, OperatorIndexedSum, Create, KetPlus, ScalarTimesKet, KetIndexedSum, BasisKet, CoherentStateKet, KetSymbol, Bra, TensorKet, BraKet, KetBra, IdxSym, StrLabel, FockIndex, I...
import json import logging import time from abc import ABCMeta, abstractmethod from collections import Counter import pytest from gtd.persist import LazyMapping, EagerMapping, TableMapping, ORM, ORMColumn, FileSequence, FileSerializer, SimpleORM, \ ShardedSequence, CustomSerializer, LazyIterator, BatchIterator, Si...
from threading import Thread import pandas import matplotlib.pyplot as plt import shutil import os import subprocess import time from django.template import loader import signal from django.http import HttpResponse from django.shortcuts import render, redirect import re threads=[] stop=False proc1 = None live_flag=0 ...
""" 20.07.21 @tcnicholas Module for defining the building unit class. """ from .utils import * import networkx as nx from networkx.algorithms.shortest_paths import all_shortest_paths from pymatgen.core.composition import Composition from ase import Atoms import numpy as np import itertools class buildingUnit: ...
import keyboard import pymem from threading import Thread, Condition, Lock from math import sqrt, pi, isnan, atan import time from offsets import * pm = pymem.Pymem("csgo.exe") client = pymem.process.module_from_name(pm.process_handle, "client.dll").lpBaseOfDll engine = pymem.process.module_from_name(pm.process_handle...
# Licensed under a 3-clause BSD style license - see LICENSE.rst """Spectrum energy bin grouping. There are three classes: * SpectrumEnergyGroup - one group * SpectrumEnergyGroups - one grouping, i.e. collection of groups * SpectrumEnergyGroupMaker - algorithms to compute groupings. Algorithms to compute groupings ar...
"""Handles rendering of the list of actions in the footer of the page create/edit views.""" import inspect from warnings import warn from django.conf import settings from django.forms import Media from django.template.loader import get_template, render_to_string from django.urls import reverse from django.utils.funct...
# Copyright reserved. # FUNCTIONS and CLASSES specific for DEPTH FROM VIDEOS IN THE WILD from __future__ import absolute_import, division, print_function import os import sys import time import json import shutil import hashlib import zipfile from six.moves import urllib import random import math import numpy as np im...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Program to run Cloudfoundry process inside cloudfoundry/cflinuxfs3 Docker container """ __program__ = "runner" __version__ = "0.1.0" __author__ = "<NAME>" __year__ = "2021" __email__ = "<<EMAIL>>" __license__ = "MIT" __purpose__ = """ Runner for CF applications created...
# Chapter 2: More Image Transformation and Manipulation # Author: <NAME> ########################################### # ## Problems # ### 1.0 Basics of Linear Geometric Transformations in 2D # ### 1.1 Rotating an image with scipy.ndimage from scipy.ndimage import rotate from skimage.io import imread import matplot...
import numpy as np import tensorflow as tf import tensorflow.keras.layers as layers from tensorflow_graphics.rendering.camera import perspective from scipy.spatial import Delaunay from utils.matrix_util import * from model.nerf import RadianceField, RadianceFieldBase, PositionalEncoding class MLPDecomposition(tf.M...
# -*- coding: utf-8 -*- import os import sys import smbus import time import datetime import RPi.GPIO as GPIO import Yi2k_ctrl import subprocess import gpsd import threading import runpy import argparse import Adafruit_Nokia_LCD as LCD import Adafruit_GPIO.SPI as SPI import lcd_menu as menu from queue import Queue fr...
import numpy as np import sys import math from matplotlib import pyplot as plt import time np.random.seed(3141592) # d_f(z) = dz/dx in terms of z = f(x) def relu(z): return np.maximum(z, 0.0) def d_relu(z): return np.where(z > 0, 1.0, 0.0) def sigmoid(z): return 1 / (1 + np.exp(-z)) def d_sigmoid(z): ...
import os import numpy as np import random import math from scipy.spatial.distance import euclidean, pdist, squareform from scipy.spatial import KDTree import scipy.stats as sts import multiprocessing as mp import time ATOMIC_WEIGHTS = {'H':1.008, 'HE':4.002602, 'LI':6.94, 'BE':9.012182, 'B':10.81, 'C':12.011, ...
from __future__ import print_function from cloudmesh_client.db.models import database, VM, FLAVOR, IMAGE, DEFAULT from sqlalchemy.orm import sessionmaker from cloudmesh_base.util import banner from sqlalchemy import inspect from cloudmesh_client.iaas.openstack_libcloud import OpenStack_libcloud from pprint import ppr...
import os import sys import numpy as np import matplotlib.pyplot as plt sys.path.insert(0, os.getcwd() + '/../../tools/') import wb import trf # revise this function to config the dataset used to train different model def data(): # ptb + wsj93 experiments return data_ptb() + data_wsj92nbest() def data_verfy...
# Copyright (C) 2019-2022 Intel Corporation # SPDX-License-Identifier: Apache-2.0 import operator import struct from functools import reduce from typing import List, Type, Tuple, Dict, Iterable import numpy as np # pylint: disable=import-error from openvino.runtime import Node from model_analyzer.shape_utils import...
import networkx as nx import logging import re import spacy import tester.BREAK_evaluation.normal_form.normalization_rules as norm_rules import tester.BREAK_evaluation.normal_form.operations_normalization_rules as op_norm_rules from queue import Queue from collections import deque # from overrides import overrides fro...
""" layers.py ------ BEGIN CODE FROM https://arxiv.org/abs/2101.08176 Introduction to Normalizing Flows for Lattice Field Theory <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME>, <NAME> License: CC BY 4.0 With slight modifications by Xiao-Yong Jin to reduce global variables """ from __future__ import absolute_i...
# Copyright (C) 2019 <NAME>.L. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # 2...
# MIT License # Copyright (c) 2020-present WizzyGeek # 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, mer...
import numpy as np import torch from nltk.translate.bleu_score import sentence_bleu import os from metric import get_bleu import torch.nn.functional as F import torch.nn as nn import datetime """ use learned prior as the initial states """ class _EVAL(object): def __init__(self, vocab_obj, args, device): ...
""" Support for cython_library cython_library will produced one or more cxx_python_extension targets If there are no cython sources, then it will produce a cxx_library targets We do this so we never produce empty.so files which cxx_python_extension will do. """ load("@bazel_skylib//lib:paths.bzl", "paths") load("@fb...
#! /usr/bin/env python from __future__ import unicode_literals import json import os import subprocess import base64 import re import shutil import filecreator filename = 'resource.json' outputfilename = 'terraform_output.json' with open(filename, 'r') as data_file: data = json.load(data_file) rolename = data['ro...
import math import matplotlib.pyplot as plt import numpy as np import cv2 import argparse def IMAGE_TO_LIST(gimage): '''input: gimage = grayscale Image output: image_to_list = COLUMN VECTYOR numpy array of image converted to list ''' image_to_list = gimage.copy().reshape( ...
"""This is the main module in the expansion package. Contains the main classes and functions to be used when importing the expansion package. Members can be imported as expansion.name rather than expansion.expansion.name. """ __version__ = '1.0' __author__ = '<NAME>' __all__ = ['ColoredPoint', 'ColoredPoint...
import snipar.preprocess as preprocess import numpy as np from snipar.gtarray import gtarray from bgen_reader import open_bgen from snipar.utilities import * def match_observed_and_imputed_snps(gts_f, par_gts_f, snp_ids=None, start=0, end=None): """ Used in get_gts_matrix_given_ped to match observed and impute...
"""Utilities to make proper evaluation""" import sys import json import logging from pathlib import Path from typing import Tuple, Any, Union, Optional import numpy as np import pandas as pd from scipy.spatial.distance import cdist from pathlib import Path import io import pickle as pkl formatter = logging.Formatte...
import os import sys import json import pandas import numpy import cobra from multiprocessing import Pool from matplotlib.pyplot import figure from optlang.symbolics import Zero from cobra.exceptions import Infeasible from progress.bar import Bar def main(): k1_model = cobra.io.read_sbml_model('iCHOv1_K1_final.xm...
import yaml import numpy import scipy.interpolate class Material: """ Material class""" def __init__(self, filename, interpolation_points=100, empty=False): """ :param filename: The name of the material file :interpolation_points=100: The number of interpolation_points ...
import json import uuid from os import getenv from docstring import DOC_STRING from utils import json_inserir_prod_valido from components.AWS_utils import S3 from main import Crawler def help_handler(event, context): """ GET - Lambda que mostra o as informações do projeto :param event: informações do Even...
# -*- coding: utf-8 -*- """ Created on Tue Mar 15 12:44:52 2022 @author: nurbuketeker """ import tensorflow as tf import torch import numpy as np from transformers import BertTokenizer from torch.utils.data import TensorDataset from torch.utils.data import DataLoader, SequentialSampler from sklearn.prepr...
# import netCDF4 import fnmatch import os import pandas as pd import datetime import numpy as np # import util def get_pvcz_data(): """ Load pvcz climate data Examples -------- df = pvcz.get_pvcz_data() Returns ------- df : dataframe List of lat/lon values and associated...
# -*- coding: utf-8 -*- """ This script will fit a CNN to our webscrapped data saved in "RYANDATA_filt.csv' The titles from the csv need to be converted into sparse matrices that reprsent the number of occurances of each word from the global bag of words present in each of the titles. The topics from the ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import re import datetime from pathlib import Path from pbr import git from packaging import version as pkg_version from enum import Enum from . import settings from . import utils from . import exceptions from . import pygittools from . import wizard from . im...
import logging import random import time from six import string_types, text_type, binary_type from requests.exceptions import ConnectionError import facebook_business.api from facebook_business.exceptions import FacebookUnavailablePropertyException, FacebookApiTimeout, FacebookRequestError from facebook_business.util...