text stringlengths 6.04k 39.5k |
|---|
import numba
import numpy as np
from scipy.optimize import curve_fit
@numba.njit("i4(i8[:])")
def fast_random_integer(random_state):
"""
XORShift Pseudorandom Number Generator (inspired by use in UMAP)
0xffffffff ensures 32bit truncation for faster operations
"""
random_state[0] &= 6489292939
... |
from tools.codegen.api import cpp
from tools.codegen.api.types import (
DispatcherSignature, Binding, FunctionalizationLambda, ViewInverseSignature
)
from tools.codegen.api.translate import translate
from tools.codegen.context import with_native_function
from tools.codegen.model import (
Argument, NativeFunctio... |
from baconian.core.core import Basic, Env, EnvSpec
from baconian.envs.env_wrapper import Wrapper, ObservationWrapper, StepObservationWrapper
from baconian.common.sampler.sampler import Sampler
from baconian.common.error import *
from baconian.algo.algo import Algo
from typeguard import typechecked
from baconian.algo.mi... |
#!/usr/bin/env python
"""
Command-line interface to larnd-sim module.
"""
from math import ceil
from time import time
import numpy as np
import numpy.lib.recfunctions as rfn
import cupy as cp
from cupy.cuda.nvtx import RangePush, RangePop
import fire
import h5py
from numba.cuda import device_array
from numba.cuda.r... |
import numpy as np
import pandas as pd
from scipy.fftpack import fft, ifft, fftfreq
import itertools
import copy
from pathlib import Path
from ..core import split_using_sliding_window, split_using_target
from typing import Union, List, Dict, Tuple
from .base import BaseDataset
__all__ = ['HHAR', 'load']
# Meta In... |
import os
import time
import tkinter
import tkinter.ttk as ttk
from PIL import Image, ImageTk
import confuse
import mido
import obswebsocket
import obswebsocket.requests
import yaml
import pygame.mixer as mixer
import math
import importlib
import obsmidicontroller.macro
class OBSMidi:
client = None
window = ... |
# This script will plot draw objects from a fanuc controller
# Must input the robot's ip, and the name of the draw object
# The program must have been previously run and populated.
# ..todo:: implement with karel sockets for handshake with fanuc
# controller.
#ftplib ref: http://zetcode.com/python/ftp/
import os
impo... |
import numpy as np
import ubelt as ub
from netharn.metrics.detections import _ave_precision
from netharn.metrics.detections import detection_confusions
def _multiclass_ap(y):
""" computes pr like lightnet from netharn confusions """
y = y.sort_values('score', ascending=False)
num_annotations = y[y.true >... |
# Copyright (c) 2019 <NAME>.
# Uranium is released under the terms of the LGPLv3 or higher.
import json
import collections
import copy
from PyQt5.QtCore import QObject, pyqtProperty
from PyQt5.QtQml import QQmlEngine
from UM.i18n import i18nCatalog #For typing.
from UM.Logger import Logger
from UM.MimeTypeDatabase i... |
# @license
# Copyright 2016 Google 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... |
# coding=utf-8
from __future__ import absolute_import, division, print_function
import logging
import argparse
import os
import random
import numpy as np
from datetime import timedelta
import torch
import torch.distributed as dist
from tqdm import tqdm
from torch.utils.tensorboard import SummaryWriter
import torch.... |
import json
from datetime import datetime, timezone, timedelta
from decimal import Decimal
from io import BytesIO
from pyramid.httpexceptions import HTTPFound, HTTPNotFound
from pyramid.view import view_config
from pyramid.security import remember, forget
from pyramid.response import Response
from pyramid.i18n import ... |
#!/usr/bin/env python
"""
Implementation of ProGENI_simplified. In this version, Pearson correlation is used
with network-transformed gene expression to rank genes.
"""
import os
import sys
import argparse
#import time
import warnings
import numpy as np
from numpy import mean
import pandas as pd
import ... |
# run_experiment
# Basics
import pandas as pd
import numpy as np
import datetime
import pickle
import typer
import os
# Import paths
from globals import DATA_MODELLING_FOLDER, EVALUATION_RESULTS, full_feat_models, overlapping_feat_models, full_feat_models_rfe
# Import sklearn processing/pipeline
from sklearn.pipelin... |
#!/bin/python3
# Author: <NAME>
# Licensed under BSD 3-Clause License, see included LICENSE file
""" Mapster32 Asset Count Parser
Parses and aggregates the statistics as output by the `dump_used_assets.m32` script in verbose mode.
Said script is part of the eduke32 package, and can be found in the main eduke32 reposit... |
import pathlib
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
import matplotlib.dates as mdates
import matplotlib.text as mtext
import matplotlib.ticker as mticker
import seaborn as sns
import math
sns.set()
# https://gist.github.com/Raudcu/44b43c7f3f893fe2... |
# coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2016-2018 yutiansut/QUANTAXIS
#
# 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 th... |
#!/usr/bin/python3
# TrustBreaker
"""
Copyright (c) The George Washington University
Written by <NAME> (<EMAIL>)
Directed by Prof. <NAME> (<EMAIL>)
https://www.seas.gwu.edu/~howie/
This file is subject to the terms and conditions defined in
file 'LICENSE.txt', which is part of this source code package.
"""
import argp... |
"""
Optimizer that implements distributed gradient reduction for NPU.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import tensorflow as tf
from tensorflow.python.eager import context
from tensorflow.python.ops import control_flow_ops
from t... |
import os
import time
import numpy as np
from mask_rcnn.parallel_model import ParallelModel
from mask_rcnn.demo import iou_filter
from mask_rcnn import visualize_cv2 as visualize
from pycocotools.coco import COCO
from pycocotools.cocoeval import COCOeval
from pycocotools import mask as maskUtils
import json
import ... |
import numpy as np
from matplotlib import pyplot as plt, cm
from matplotlib.colors import colorConverter
import matplotlib as mpl
from pymicro.view.vtk_utils import *
def hist(data, nb_bins=256, data_range=(0, 255), show=True, save=False, prefix='data', density=False):
"""Histogram of a data array.
Compute a... |
## AST and Parser
# Local Imports
import Token
from Lexer import *
## AST
#
# Abstract Syntax Tree that represents the parse tree of the
# parsed Tokens
class AST(object):
pass
## All
#
# Special ALL keyword. Means all objects in current state with
# type arg
class All(AST):
## Constructor
def __init__(self,... |
import tempfile
import logging
import os
import random
import types
import warnings
from pathlib import Path
from typing import Any, Dict, Optional
import ray
from ray import train
from ray.train._internal.accelerator import Accelerator
from ray.train.constants import PYTORCH_PROFILER_KEY
from torch.optim import Opti... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Module to retrieve Sentinel-2 data from Google Earth Engine (GEE).
TODO: Add option for specifying the request spatial resolution.
@author: <NAME> (<EMAIL>),
Finnish Meteorological Institute)
Created on Thu Feb 6 15:24:12 2020
"""
import ee
import datetime
import ... |
# Sample Test passing with nose and pytest
import sys
import cv2 as cv
sys.path.append("..")
import numpy as np
import imagewizard
from PIL import Image
def crop_color_border(in_img: np.ndarray = None) -> np.ndarray:
in_img = cv.imread('data/original_images/quiet_flow10.png')
"""Determine if image has unifo... |
'''
gbkGen.py
Generate Genbank file from other information
Created by <NAME> on Wed Jan 21 14:19:17 EST 2015
Last modified 01/21/2015
Copyright (c) 2015 <NAME> (ORNL). All rights reserved.
'''
# Import Python modules
import argparse
import sys, os, re
from datetime import datetime
import time
## Version
version_str... |
# Python Class 2169
# Lesson 12 Problem 1
# Author: TheBeast5520 (393519)
from tkinter import *
import random
from tkinter import messagebox
def avg(a,b):
'''Quick average function'''
return (a+b)/2
class CheckerCell(Canvas):
def __init__(self,master,coord,color='tan'):
'''Initializ... |
import os
os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"]="1"
import os
import h5py
import pprint
import pandas as pd
import numpy as np
import tensorflow as tf
from tensorflow.keras import backend as K
import os
import re
from tqdm import tqdm_notebook,tqdm
from sklearn... |
#! /usr/bin/env python
"""
Library of functions required for raster warping in memory or on disk
The guts of warptool.py
"""
"""
todo:
Much better type checking
Implement multiprocessing!
Proper vdatum tags in geotiff header
filename preservation
Instead of doing the 'first' stuff, check actual values before writing... |
import os
from collections import defaultdict, namedtuple
from glob import glob
from random import shuffle
from shutil import rmtree
from tempfile import TemporaryDirectory
import torch
from ggdtrack.dataset import ground_truth_tracks, false_positive_tracks
from ggdtrack.klt_det_connect import graph_names
from ggdtra... |
"""
tasks - define background tasks
=================================
"""
# standard
import os.path
from os.path import splitext
import os
import traceback
from flask.globals import current_app
from time import time
# pypi
from loutilities.timeu import timesecs, epoch2dt, asctime, age as ageasof
from loutilities.flask... |
# -*- coding: utf-8 -*-
"""One line description.
Authors:
<NAME> - <EMAIL>
Todo:
* Docstring
* Put all hyper to arguments
"""
import logging
import os
import time
from pathlib import Path
import click
import numpy as np
import pandas as pd
import wandb
from sklearn.model_selection import train_test_split
... |
import pygame, random, os
class ship(pygame.sprite.Sprite):
def __init__(self, pos):
pygame.sprite.Sprite.__init__(self)
self.imageset1 = [pygame.image.load("./images/s1/ship-l.png"),
pygame.image.load("./images/s1/ship-lo.png"),
pygame.image.load("./im... |
# built in libraries
import traceback
import time
import sys
from concurrent.futures import ThreadPoolExecutor
# tamcolors libraries
from tamcolors.tam_io.tam_surface import TAMSurface
from tamcolors.tests import all_tests
from tamcolors.tam_io import tam_identifier
from tamcolors.tam.tam_loop_io_handler import TAMLo... |
# pylint: disable=unused-argument,redefined-outer-name
import functools
import os
import sys
import logbook
import brotli
import gzip
import gossip
import pytest
import slash
from .utils import run_tests_assert_success, run_tests_in_session, TestCase, make_runnable_tests
from .utils.suite_writer import Suite
def tes... |
import sys
import numpy as np
import scipy.sparse as sp
import torch
from pymde import constraints
from pymde import problem
from pymde.functions import penalties, losses
from pymde.preprocess import _graph
__this_module = sys.modules[__name__]
LOGGER = problem.LOGGER
def _to_edges(graph):
if not sp.isspar... |
import pandas as pd
import numpy as np
from pandas.api.types import is_numeric_dtype, is_string_dtype
from pandas.tseries.offsets import Tick, BusinessDay, Week, MonthEnd
from pandas.tseries.frequencies import to_offset
from timeseries_preparation.h2g2 import H2G2
from safe_logger import SafeLogger
logger = SafeLogger... |
"""
Tests of functions under algorithms.coherence
"""
import os
import warnings
import numpy as np
import numpy.testing as npt
from scipy.signal import signaltools
import pytest
import matplotlib
import matplotlib.mlab as mlab
has_mpl = True
# Matplotlib older than 0.99 will have some issues with the normalization
... |
from math import sqrt, exp, pi, asin, atan, acos
import warnings
from tqdm import tqdm
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
from scipy.stats import chi2
from scipy.special import logit, xlogy, expit
from scipy.integrate import quad as integrate
from scipy.optimize im... |
r"""
Module ``generators`` contains the definition of the generators of the
monster, so that they may be used in C files. It also contains support
for the subgroups :math:`N_{0}` of structure
:math:`2^{2+11+2\cdot11}.(\mbox{Sym}_3 \times \mbox{M}_{24})` and
:math:`G_{x0}` of structure :math:`2^{1+24}.\mbox{Co}_1` ... |
from bbcode import *
import re
# Pygments if available
try:
from pygments import highlight
from pygments.lexers import guess_lexer, get_lexer_by_name, TextLexer
from pygments.formatters import HtmlFormatter
from pygments.util import ClassNotFound
from bbcode import mypygments
except ImportError:
... |
#!/usr/bin/env python3
import argparse
import os
import re
import sqlite3
import sys
from collections import defaultdict
from biocode import utils, annotation, gff, things
## constants
DEFAULT_PRODUCT_NAME = "hypothetical protein"
next_ids = defaultdict(int)
def main():
parser = argparse.ArgumentParser( descri... |
import arcade
import math
import random
SPRITE_SCALING_PLAYER = 0.5
SPRITE_SCALING_COIN = 0.2
SPRITE_SCALING_LASER = 0.8
SPRITE_SCALING_BOX = 0.5
COIN_COUNT = 25
SCREEN_WIDTH = 1000
SCREEN_HEIGHT = 800
BULLET_SPEED_X =4
BULLET_SPEED_Y = 4
CHANGE_TIME = 0.024
MOVEMENT_SPEED = 5 # la velocidad de movimiento de mi pe... |
import numpy as np
import os, sys
# from collections import deque
import scipy.io as sio
from scipy import signal
import pathlib
import gc
from threading import Timer,Thread,Event
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.font as tkFont
from tkinter import Menu
from tkinter.filedialog import askop... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 27 11:24:38 2021
@author: dennis
"""
#@title Input protein sequence, then hit `Runtime` -> `Run all`
import os
import shutil
import os.path
import re
import hashlib
import time
def add_hash(x,y):
return x
input_dir = 'ready' #@param {type:"strin... |
#
# what is it ? an interactive opencv c++ (and java !) compiler.
#
# this script heavily depends on github.com.berak.sugarcoatedchili/bin/compile
# base assumptions:
# local (static) openv installs for 3.0(ocv3) were extracted
# ant (for java) was downloaded and extracted
#
import sys, socket, threading... |
#!/usr/bin/env python3
# Copyright (c) 2020 Graphcore Ltd. All rights reserved.
import enum
import argparse
import logging
import os
import re
import sys
import clang.cindex
from popgen import onnx
from utils import _utils
logger = logging.getLogger("PopParse")
_utils.set_logger(logger)
parser = argparse.ArgumentPa... |
import sys
import pprint
from math import *
import pyglet
from pyglet.gl import *
class vertex_node:
def __init__(self, _group_id, _b_display, _pos):
self.group_id = _group_id
self.b_display = _b_display
self.pos = _pos
self.b_selected = False;
self.normal ... |
import asyncio
import math
import os.path
import sys
import time
import threading
import webbrowser
import obspython as obs
script_path_ = os.path.dirname(__file__) # script_path is part of the OBS script interface.
sys.path.append(os.path.join(script_path_, 'lib', 'site-packages'))
import discord
SLOTS = 10 # Seems... |
# -*- coding: utf-8 -*-
"""
Created on Sun Nov 18 14:23:25 2018
@author: nsde
"""
# %%
import numpy as np
from .utility import make_hashable, check_if_file_exist, null, save_obj, load_obj
# %%
class Tesselation(object):
""" Base tesselation class. This function is not meant to be called,
but descripes t... |
import re
import cv2
import numpy as np
from .model import Model
class DetectionWithLandmarks:
def __init__(self, xmin, ymin, xmax, ymax, score, id, landmarks):
self.xmin = xmin
self.xmax = xmax
self.ymin = ymin
self.ymax = ymax
self.score = score
self.id = id
... |
from __future__ import print_function
import itertools
import math
import sys
from numba.compiler import compile_isolated, Flags
from numba import jit, types
import numba.unittest_support as unittest
from numba import testing
from .support import TestCase, MemoryLeakMixin
enable_pyobj_flags = Flags()
enable_pyobj_f... |
# import ctypes
# from inspect import isclass
# import PIL.ImageGrab
# from io import BytesIO
# from smtplib import SMTP
# from email.mime.text import MIMEText
# from email.mime.image import MIMEImage
# from email.mime.multipart import MIMEMultipart
from sys import argv,exit
import os
from json import loads... |
from scipy.integrate import odeint
from scipy.signal import StateSpace, lsim
from scipy import interpolate
from scipy.optimize import minimize
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import datetime
import mpld3
import urllib.request
import os, time
from openpyxl import Workbook
from ... |
import os.path
import random
import torchvision.transforms as transforms
import torch
import numpy as np
from data.base_dataset import BaseDataset
from data.audio import Audio
#from data.image_folder import make_dataset
from PIL import Image
from util import util
#def make_dataset(dir):
# images = []
# assert os... |
import sys, os
from pathlib import Path
import numpy as np
import torch
import copy
import torch.nn as nn
import tensorflow as tf
from omnibelt import primitives, InitWall, Simple_Child, unspecified_argument
import omnifig as fig
from .. import util
from ..util import Configurable, Seed, Checkpointable, Switchable, ... |
#!/usr/bin/env python3
# SPDX-License-Identifier: MIT
# Copyright (c) 2016-2020 <NAME>, <NAME>, <NAME>, <NAME>
from __future__ import print_function
import os
import stat
import sys
import shutil
import json
import re
import subprocess
import errno
import gzip
import tarfile
import zipfile
import six
from six.moves... |
"""slakh Dataset Loader
.. admonition:: Dataset Info
:class: dropdown
The Synthesized Lakh (Slakh) Dataset is a dataset of multi-track audio and aligned
MIDI for music source separation and multi-instrument automatic transcription.
Individual MIDI tracks are synthesized from the Lakh MIDI Dataset v0... |
from functools import partial
import sqlite3
from kivy.core.window import Window
import kivy
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.popup import Popup
from kivy.uix.gridlayout import GridLayout
from kivy.uix.scrollview import ScrollView
from kivy.uix.... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import subprocess
import argparse
from shutil import copyfile
import rospkg
import numpy as np
from colorama import init, Fore
import matplotlib.pyplot as plt
from matplotlib import rc
from mpl_toolkits.mplot3d import Axes3D
import exp_utils as eu
i... |
import torch
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
from torch.autograd import Variable
import torchvision.models as models
import torch.nn as nn
import torch.nn.functional as nnfun
import cv2
import numpy as np
import deep
from deep import netmodels as nnmodels
fr... |
# Copyright: (c) 2016-2018, <NAME> <<EMAIL>>
# Copyright: (c) 2018, <NAME> <<EMAIL>>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import random
import time
from datetime import date... |
from functools import partial
from typing import Any
from typing import Tuple
import flax.linen as nn
import jax
import jax.numpy as jnp
from flax import optim
from flax.core.frozen_dict import FrozenDict
from haiku import PRNGSequence
from jax import random
from jax.experimental.optimizers import clip_grads
from jax.... |
#general imports
import logging
#specific imports from std
from time import sleep, time
from uuid import uuid4
from functools import partial
from ipaddress import ip_address
#imports from 3rd party
from secp256k1_zkp import PrivateKey
#general leer imports
from leer.syncer import Syncer
from leer.core.utils import DOSE... |
r"""
FileSys
=======
A module to help with files system operations.
Notes
-----
* Path removals generally require an ancestor to be specified, so to avoid accidental deletes.
* Many calls remove the target by default; these might not work outside the fsRoot; use removePath with requiredAncestor to achieve the sam... |
from enum import Enum
import redis
import time
import json
import os
class SaiObjType(Enum):
PORT = 1
LAG = 2
VIRTUAL_ROUTER = 3
NEXT_HOP = 4
NEXT_HOP_GROUP = 5
ROUTER_INTERFACE = 6
ACL_TABLE ... |
"""A Python library for interfacing with AlarmClock over a serial port."""
from enum import Enum
import serial # type: ignore
import logging
import re
import yaml
import datetime
from typing import List
from dataclasses import dataclass
from .days_of_week import DaysOfWeek
_LOGGER = logging.getLogger(__name__)
c... |
import sys
import matplotlib
from tensorflow.contrib.distributions.python.ops.bijectors import inline
#sys.path.insert(0,'drive/Colab Notebooks/20180424_SK_Lab2/20180423_24_25_SK_Lab')
# Copyright (c) 2015-2017 <NAME>. Released under GPLv3.
import os
from sys import stderr
import tensorflow as tf
impo... |
import os
import sys
import torch
import pickle
import numpy as np
import nvidia.dali.ops as ops
import nvidia.dali.types as types
from sklearn.utils import shuffle
from nvidia.dali.pipeline import Pipeline
from nvidia.dali.plugin.pytorch import DALIClassificationIterator, DALIGenericIterator
IMAGENET_IMAGES_NUM_TRAIN... |
# -*- coding: utf-8 -*-
#
# Tencent is pleased to support the open source community by making QTA available.
# Copyright (C) 2016THL A29 Limited, a Tencent company. All rights reserved.
# Licensed under the BSD 3-Clause License (the "License"); you may not use this
# file except in compliance with the License. You may... |
# MIT License
#
# Copyright (c) 2020-2021, <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, merg... |
# Copyright 2020 NVIDIA CORPORATION, <NAME>, <NAME>, <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 applicabl... |
"""
Generate dual mosfet devices.
"""
from os import makedirs, path
from uuid import uuid4
from typing import Any, Dict, Iterable, List, Optional
from common import init_cache, now, save_cache
generator = 'librepcb-parts-generator (generate_mosfet_dual.py)'
# Initialize UUID cache
uuid_cache_file = 'uuid_cache_mosf... |
#!/usr/bin/env python3
import sys
import os
import argparse
import datetime
import math
import numpy as np
########################
# Import local library #
########################
sys.path.insert(1, os.path.dirname(__file__))
from util import *
from scio import *
from keras_vae import *
from np_util import gammaln... |
import re
import os
import sys
import h5py
import datetime
import threading
import argparse
import multiprocessing as mp
import utils
from config import *
from model import *
from MCTS import *
from selfplay import selfplay
"""
This file coordinates training procedure, including:
1. invoke self play
2. store result ... |
"""Import as:
import helpers.git as git
"""
import collections
import logging
import os
import re
from typing import Dict, List, Optional, Tuple
import p1_data_client_python.helpers.datetime_ as hdt
import p1_data_client_python.helpers.dbg as dbg
import p1_data_client_python.helpers.system_interaction as si
_LOG = ... |
#!/usr/bin/env python3
"""Train autoencoder for latent variables. """
from typing import IO, List, Tuple, Union
import argparse
from dataclasses import dataclass
import logging
import random
import editdistance
from fairseq.models.lightconv import LightConvEncoderLayer
import joblib
import sacrebleu
from tensorboar... |
"""Defines padding operations over a GraphTensor."""
import functools
from typing import Any, Callable, List, Optional, Tuple, Union, cast
import numpy as np
import tensorflow as tf
from tensorflow_gnn.graph import adjacency as adj
from tensorflow_gnn.graph import graph_constants as const
from tensorflow_gnn.graph im... |
# Módulo de creación y consultas al dataframe a partir de un Reporte de Moodle
# Autor: <NAME>, Universidad de Cienfuegos
###
import pandas as pd
#from . import my_globals
from django.conf import settings
import os
#from glob import iglob
import IP2Location
from . import moodle_backup, cluster
# VARIABLES GLOBALES ··... |
# -*- coding: utf-8 -*-
"""
Created on Fri Nov 22 14:41:58 2019
@author: gourgue
"""
"""
Création de fonction pour automatisé la génération et l'entrainement de modèle
sur la malaria. il reste cependant des fonctions a généralisé car elles ont été créer
à partir du code du classifieur en cascade et donc en sont pas t... |
#!/usr/bin/env python3
############################################################
## <NAME> ##
## Copyright (C) 2019-2020 <NAME> Lab, IGTP, Spain ##
############################################################
## useful imports
import time
import io
import os
import re
import... |
# Copyright 2022, 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... |
"""
Responsible for interaction with worldbank data API and interaction with the user
"""
import re
import io
import traceback
from collections import defaultdict
from typing import Iterable
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.v... |
"""
In ELK Layered we distinguish three types of edge crossings that can occur:
Between-layer crossings (the ones everybody knows),
In-layer crossings (caused by out very own in-layer edges), and
North-south crossings (caused by implicit edges between {@link NodeType#NORTH_SOUTH_PORT} dummies and their
originating {@l... |
"""
A set of Classes to handle trees and compute kernel functions on them
"""
import random
import bisect
class TreeNode:
# A simple class for handling tree nodes
def __init__(self, val=None, chs=[]):
self.val = str(val) # node label
self.chs = chs # list of children of the node
@class... |
'''
Application to integrate all functionalities
@dlegor
'''
from typing import List
from pathlib import Path
import hashlib
from PIL import Image
from bokeh.models.annotations import Label
from bokeh.models.layouts import Column
from bokeh.models.widgets import tables
from networkx.classes import graph
from networkx... |
import re
import time
import random
import configparser
import pyautogui
from .platform import windowMP
from .mouse_utils import mouse_random_movement, move_mouse_and_click, move_mouse
from .debug import debug
from .image_utils import partscreen, find_ellement
from .constants import UIElement, Checker, Button, Actio... |
from datetime import datetime, timedelta
import time
from pylons import app_globals as g
from pylons import tmpl_context as c
from pylons import response, request
from pylons.i18n import _
from r2.config import feature
from r2.controllers import add_controller
from r2.controllers.reddit_base import (
RedditCo... |
# -*- coding: utf-8 -*-
"""
Created on Fri Apr 23 14:39:11 2021
@author: mar_altermark
"""
import xlrd
import sys
SFMANQUANT = []
SACHERIEMANQUANTE = []
INTRANTMANQUANT = []
NOM_TABLEAU_MP = "tableauMP.xlsx"
NOM_TABLEAU_SACHERIE = "tableauSacherie.xlsx"
NOM_TABLEAU_COMPOS = "tableauCompos.xlsx"
NOM_TAB... |
import discord
from discord.ext import commands
# Big bunch of help commands
class Help(commands.Cog):
def __init__(self, bot):
self.bot = bot
@commands.group(invoke_without_command=True, case_insensitive=True)
async def help(self, ctx):
embed = discord.Embed(title = "Help", descri... |
"""
@name: Modules/House/Family/insteon/insteon_utils.py
@author: <NAME>
@contact: <EMAIL>
@copyright: (c) 2013-2020 by <NAME>
@license: MIT License
@note: Created on Apr 27, 2013
@summary: This module is for Insteon conversion routines.
This is a bunch of routines to deal with Insteon devices.
Some... |
#!/usr/bin/python3
import re
import operator
import datetime
import string
from datetime import date
from xdfile.utils import info, debug, error
from xdfile import utils
from xdfile import metadatabase as metadb
from xdfile import html
from xdfile.utils import space_with_nbsp
import xdfile
from collections import def... |
import json
import os.path
import logging
import sys
import threading
import datetime as dt
import requests as rq
import bs4
import numpy as np
import sqlalchemy
import pandas as pd
import luigi
logger = logging.getLogger(__name__)
stdout_handler = logging.StreamHandler(sys.stdout)
logger.addHandler(stdout_handler)
lo... |
from __future__ import division
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import math
import cv2
import time
from utils.nms_wrapper import nms
def get_rects(detection, input_wh, ori_wh, use_pad=False):
if len(detection) > 0:
... |
"""Run the PUDL ETL Pipeline.
The PUDL project integrates several different public datasets into a well
normalized relational database allowing easier access and interaction between all
datasets. This module coordinates the extract/transfrom/load process for
data from:
- US Energy Information Agency (EIA):
- Form... |
from typing import Optional
import gin
import torch
import torch.nn as nn
import torch.nn.functional as F
from deeplab_features import deeplabv3_resnet50_features, deeplabv2_resnet101_features
from settings import log
from resnet_features import resnet18_features, resnet34_features, resnet50_features, resnet101_featu... |
## Sid Meier's Civilization 4
## Copyright Firaxis Games 2005
from CvPythonExtensions import *
import CvUtil
"""
MAP SCRIPT INTERFACE
This file contains stubs for all the functions that a map script can override. To create a map script,
copy the imports at the top of this file into a new file.
Then you c... |
# coding=utf-8
# Copyleft 2019 project LXRT.
import os
import collections
import copy
import torch
import torch.nn as nn
from torch.utils.data.dataloader import DataLoader
from tqdm import tqdm
from param import args
from pretrain.qa_answer_table import load_lxmert_qa
from tasks.vqa_model import VQAModel
from tasks.... |
import copy
import tensorflow as tf
from tensorflow.contrib import rnn
import numpy as np
np.set_printoptions(suppress=True)
from sklearn.metrics import mean_squared_error, mean_absolute_error
import argparse
import math
from tensorflow.python.layers.normalization import batch_norm
#from tensorflow.contrib... |
import graphene
import jwt
from enum import Enum
from flask import redirect, request, after_this_request, send_file, g
from uuid import uuid4
from datetime import datetime, timedelta
from urllib.parse import quote, urlencode, unquote
from io import BytesIO
from webargs import fields
from flask_apispec import use_kwarg... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.