text
stringlengths
6.04k
39.5k
from numpy.core.fromnumeric import size import torch import torch.nn.functional as F import numpy as np import gym import os, time, datetime from rlib.utils.utils import fastsample, fold_batch, one_hot, RunningMeanStd, stack_many, totorch, totorch_many, tonumpy, GAE from rlib.utils.schedulers import polynomial_shedule...
import numpy as np import theano from theano import config import theano.tensor as T from theano.tensor.shared_randomstreams import RandomStreams import tree_util class LSTM(object): def square_weight(self, ndim): return self.rng.uniform( low=-np.sqrt(6. / (4 * ndim)), ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: <NAME> import json from ares.Lib.html import AresHtml class Editor(AresHtml.Html): name, category, callFnc, docCategory = 'Code Editor', 'Text', 'editor', 'Preformatted' __pyStyle = ['CssDivEditor'] __reqCss, __reqJs = ['codemirror'], ['codem...
#!/usr/bin/env python3 # external packages import prometheus_client import requests # internal packages import time import os import re import logging from collections import namedtuple # remember, levels: debug, info, warning, error, critical. there is no trace. logging.basicConfig(format="%(filename)s:%(funcName)s...
# ex: set sts=4 ts=4 sw=4 noet: # -*- coding: utf-8 -*- # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##...
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author : 河北雪域网络科技有限公司 A.Star # @contact: <EMAIL> # @site: www.snowland.ltd # @file: digital_screening.py # @time: 2018/10/9 1:50 # @Software: PyCharm import numpy as np from functools import reduce from skimage.transform import resize from skimage._shared.utils import ...
import math import numpy as np class NcsSections: """ Contains information regarding the contiguous sections of records in an Ncs file. Methods of NcsSectionsFactory perform parsing of this information from an Ncs file and produce these where the sections are discontiguous in time and in temporal orde...
from typing import Optional import datetime from sqlalchemy import ( Column, Integer, String, Sequence, DateTime, Date, Enum, ForeignKey, TypeDecorator ) from sqlalchemy.sql import operators from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.ext.hybrid import hybrid_property from passlib.a...
""" Helper functions for altimetry algorithms for captoolkit """ import xarray as xr import h5py import numpy as np import pyproj import xarray as xr import pandas as pd from scipy.spatial import cKDTree from scipy.spatial.distance import cdist from scipy import stats from scipy.ndimage import map_coordinates from s...
#!/usr/bin/env python3 import sys import os from typing import List, Dict from collections import defaultdict import json from cursor import Cursor from doc import Document from view import View from screen import Screen from wm import WindowManager from utils import * from plugin import * from plugins.output.output_p...
from typing_extensions import Final import logging import numpy as np import torch from collections import defaultdict from torch import nn from typing import ( Any, Callable, Dict, Iterable, Iterator, List, Optional, Set, Tuple, TypeVar, Union, ) from ptgnn.baseneuralmodel...
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append("../") import pandas as pd import numpy as np import pathlib import pickle import os import itertools import argparse import logging from sklearn.preprocessing import MultiLabelBinarizer import helpers.feature_helpers as fh OUTPUT_DF_TR = 'df_steps_tr.c...
import logging from kivy.app import App from kivy.lang import Builder from kivy.uix.screenmanager import Screen from kivy.uix.button import Button from kivy.uix.image import Image from kivy.uix.floatlayout import FloatLayout from kivy.uix.gridlayout import GridLayout from kivy_garden.drag_n_drop import * from kivy.grap...
import mxnet as mx from mxnet import gluon from mxnet import nd from gluoncv import data as gdata from gluoncv.data.batchify import Tuple, Stack, Pad from gluoncv.data.transforms.presets.yolo import YOLO3DefaultValTransform from gluoncv.utils.metrics.voc_detection import VOC07MApMetric from gluoncv.utils.metrics.coco_d...
import requests import logging import xml.etree.ElementTree as ET __version__ = "0.7b3" # Constants URL = "http://{ip}{get}" STATUS = "/goform/formMainZone_MainZoneXml.xml?ZoneName={zone}" NETSTATUS = "/goform/formNetAudio_StatusXml.xml?ZoneName={zone}" NETCMD = "/NetAudio/index.put.asp" CH_STATUS = "/goform/formMainZo...
import logging import re import datetime from django import forms from django.conf import settings from django.core.cache import cache from django.db.models.signals import pre_save, pre_delete from django.http import HttpResponseRedirect, HttpResponse, JsonResponse, Http404 # Create your views here. from django.url...
# 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, software # d...
#! /usr/bin/env python from random import shuffle from math import sqrt from functools import total_ordering from heapq import heappop, heappush def dist(puzzle, idx1, idx2): """Get the distance between two cells (as the number of moves).""" size = int(sqrt(len(puzzle))) # difference of row and column number...
#!/usr/bin/env python3 import unittest import logging from dipper.sources.GWASCatalog import GWASCatalog from dipper.graph.RDFGraph import RDFGraph from dipper.utils.TestUtils import TestUtils logging.basicConfig() logging.getLogger().setLevel(logging.WARN) LOG = logging.getLogger(__name__) class TestGwasSNPModel(u...
import random import pretty_midi import numpy as np import glob from utility import * def find_approximate_patterns(seq_notes): """ Based on SIA(TEC) algorithm seq_notes: list of (onset,pitch) elements Returns a dictionary of translation vectors: (onset,pitch). """ vector_matrix = np.empty...
import re from html.parser import HTMLParser from urllib.parse import urlparse from collections import namedtuple import cssselect from ._selectors import tag_matches, Specificity from .rendering import full_justify from .rendering import Box, BoxSide from .rendering import Renderer, InlineRenderer, BlockRenderer fr...
#!/usr/bin/env python # coding=utf-8 # Copyright 2022 The HuggingFace Team 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-...
import numpy as np import pickle as pkl from sklearn.metrics import accuracy_score import matplotlib.pyplot as plt import logging import sys, os sys.path.append(os.getcwd()) try: from weak_learner import * from label_encoder import LabelEncoder, OneHotEncoder, AllPairsEncoder from datasets import MNISTDat...
# Copyright (C) 2010 <NAME> # # 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 # notice, this list of conditions and the following disclaimer. # - R...
#!/usr/bin/python3 # -*- coding: utf-8 -*- ''' Original copyright: Copyright by B.Kerler 2017, PBKDF1_SHA1 and SHA256 PyOpenCl implementation, max 32 chars for password + salt MIT License Implementation was confirmed to work with Intel OpenCL on Intel(R) HD Graphics 520 and Intel(R) Core(TM) i5-6200U CP...
# -*- mode: python; coding: utf-8 -*- # Copyright 2014 <NAME> <<EMAIL>> and collaborators. # Licensed under the MIT License. """pwkit.immodel - Analytical modeling of astronomical images. This is derived from copl/pylib/bgfit.py and copl/bin/imsrcdebug. I keep on wanting this code so I should put it somewhere more ge...
import sys, os, glob, argparse, matplotlib matplotlib.use('Agg') # for cron sys.path.append('../') import numpy as np import netCDF4 as nc import datetime as DT import plotting.operationalPlots as oP import matplotlib.pyplot as plt from scipy.interpolate import RectBivariateSpline from getdatatestbed import getDataFRF...
import itertools from config import Config import numpy as np import os from tqdm import tqdm import util from logger import Logger import logging logging.getLogger('transformers').setLevel(level=logging.ERROR) import json import torch from torch.utils.data import Dataset,RandomSampler,SequentialSampler,DataLoader from...
''' from mbls_brain_arch_0001 import * (scope: all below treated as globals) predefined default matrices to speed up code below: MATRIX_784x22x0, MATRIX_2000x22x0, MATRIX_2000x22x1, MATRIX_1000x22x0, MATRIX_1000x22x1 predefined HLN class plus predefined brain layers made up HLN objects: class HLN() pr...
import os import h5py import numpy as np import pandas as pd from sklearn.preprocessing import StandardScaler def put_static_first(data, col, static_col): """Simple function putting the static columns first in the data. Args: data: Dict with a data array for each split. col: Ordered list of ...
""" Use-Case. Marketing analyst wants to understand path to purchase of a new product by a few early adopters ( say 5) through interactive queries. This product is high involvement and expensive, and therefore they want to understand the research undertaken by the customer. * Which device was used to initiate the fir...
# # Copyright 2012 by Idiap Research Institute, http://www.idiap.ch # # See the file COPYING for the licence associated with this software. # # Author(s): # <NAME>, December 2012 # import numpy as np import scipy.signal as sp import numpy.linalg as linalg from . import core class Autoregression: """ Class co...
#!/usr/bin/env python # -*- coding: utf-8 -*- # ######################################################################### # Copyright (c) 2020, UChicago Argonne, LLC. All rights reserved. # # # # Copyright 2020. UChicago Argonne, LLC. This ...
#! /usr/bin/python # (C) Copyright 2009, <NAME> (<EMAIL>) # This file is part of TURBOTOPICS. # TURBOTOPICS is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your # opt...
""" Functions that used in data preprocessing. """ import torch import numpy as np from tqdm import tqdm from collections import Counter from .dict_utils import counter2ordered_dict from common.constants import NLP, SPM from allennlp.modules.elmo import batch_to_ids def text2tokens(sentence): """ Transform te...
# A map editor for TaikoGB import os, pygame, pygame_menu, pygame.freetype, time from mutagen.mp3 import MP3 song_files = [] num_songs = 0 selected_song = 0 song_pos = 0 song_length = 0 edit_mode = False selected_obj = 0 scroll_speed = 100 text_timer = 0 display_text = False circ1_img = pygame.image.load('assets/c...
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making GameAISDK available. This source code file is licensed under the GNU General Public License Version 3. For full details, please refer to the file "LICENSE.txt" which is provided as part of this source code package. Copyright...
#!/bin/python3 from typing import Union from os import get_terminal_size as _get_terminal_size __all__ = ["PBar"] __author__ = "<NAME> (DarviL)" __version__ = "1.0" _DEFAULT_CHARSETS: "dict[str, dict[str, Union[str, dict]]]" = { "empty": { "empty": " ", "full": " ", "vert": " ", "horiz": " ", "cor...
#!/usr/bin/env python3 import os from parsl import python_app def get_logger(path, filename='identifier.log'): import logging import os logfile = os.path.join(path, filename) formatter = logging.Formatter("%(asctime)s [%(levelname)s] %(message)s") file_handler = logging.FileHandler(logfile) ...
import pandas as pd from pyitab.results.base import filter_dataframe from pyitab.results.dataframe import apply_function import seaborn as sns from matplotlib.colors import LinearSegmentedColormap def find_distance_boundaries(data): scene_center = .5*(d['Scena_offset_sec'] - d['Scena_onset_sec']) distance_off...
# globalstats.py # # retrieve values from result files and perform global statistics: # # + Numero tot. parole # + Numero tot. parole latine [per testi multilingua] # + Numero tot. lemmi # + Numero tot. latin types # + Min/max/average lenghts of Latin types # + Type token ratio # + Lista di parole e frequenza # + Lista...
import math import random from typing import Any, Dict, Tuple import attr from attr import attrs import numpy as np from nlisim.cell import CellData, CellFields, CellList from nlisim.coordinates import Point, Voxel from nlisim.grid import RectangularGrid from nlisim.modules.phagocyte import ( PhagocyteCellData, ...
import wfdb import pdb import time # import pickle import torch from torch.autograd import Variable # <<<<<<< HEAD # from torch.utils.data import Dataset # ======= from torch.utils.data import Dataset, DataLoader import torch.nn.functional as F import numpy as np import matplotlib.pyplot as plt # >>>>>>> 7e598493033a4c...
# CLEAR Dataset # >> Question Engine # # Author : <NAME> # Year : 2018-2019 # Affiliations: Universite de Sherbrooke - Electrical and Computer Engineering faculty # KTH Stockholm Royal Institute of Technology # IGLU - CHIST-ERA # # The question generator is based on the CLEVR que...
""" Generate preview and sale versions of albums for itchio et al """ # pylint:disable=too-many-arguments,import-outside-toplevel import argparse import base64 import collections import functools import json import logging import os import os.path import shutil import subprocess import typing import jinja2 from . im...
#!/usr/bin/env python from __future__ import division import argparse import copy import json import math import sys from PIL import Image, ImageDraw from PIL.ImageFilter import Kernel def saturation(r, g, b): maximum = max(r, g, b) minumum = min(r, g, b) if maximum == minumum: return 0 s =...
__author__ = 'Ardalan' CODE_FOLDER = "/home/ardalan/Documents/kaggle/bnp/" # CODE_FOLDER = "/home/arda/Documents/kaggle/bnp/" import os, sys, time, re, zipfile, pickle, operator, glob import pandas as pd import numpy as np from xgboost import XGBClassifier, XGBRegressor from sklearn.feature_extraction.text import T...
#!/usr/bin/env python3 # # Copyright (c) 2020 <NAME> (github.com/kanflo) # # 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 us...
#!/usr/bin/env python3 import collections import glob import hashlib import json import logging import mimetypes import os import random import socket import sqlite3 import string import subprocess import sys import time import yaml import tornado.ioloop import tornado.options import tornado.web import pygments impo...
import sys sys.path.append("./") import backtrader as bt from backtrader import plot import matplotlib.pyplot as plt import os, sqlite3, config import pandas as pd from jinja2 import Environment, FileSystemLoader from weasyprint import HTML from utils import timestamp2str, get_now, dir_exists conn = sqlite3.connect(c...
#!/usr/bin/env python3 # coding=utf-8 """ @Github: https://github.com/Certseeds/CS305_2019F_Remake @Organization: SUSTech @Author: nanoseeds @Date: 2020-07-03 13:08:19 LastEditors: nanoseeds LastEditTime: 2020-08-08 22:54:28 """ """ CS305_2019F_Remake Copyright (C) 2020 nanoseeds CS305_2019F_Remake is free s...
# -*- coding: utf-8 -*- import os import math import logging from collections import OrderedDict from pathlib import Path import torch import torch.nn as nn import torch.nn.functional as F from src.loss import L2Norm from src.weight_init import kaiming_weights_init, xavier def build_mobile_net_v2(width_mult=1., data...
import os import re import codecs import logging import argparse from time import time from collections import Counter from traceback import format_exc from typing import List, Dict, Set, Tuple import string import faiss import numpy as np import networkx as nx from networkx import Graph from gensim.models import Keye...
# Copyright (c) 2012 Stellenbosch University, 2012 # This source code is released under the Academic Free License 3.0 # See https://github.com/gvrooyen/SocialLearning/blob/master/LICENSE for the full text of the license. # Author: <NAME> <<EMAIL>> """ Workhorse module of the Social Learning simulator. The main class d...
import pygame from pygame.locals import * from math import log as ln from math import tan from math import cos from math import fabs import matplotlib.pyplot as plt # Constantes de altura e velocidade, obrigatórias para o funcionamento do simulador: STAGE_HEIGHTS = [21, 38, 107, 122, 230, 240, 3...
""" Provides the SpriteLoader class, that handles loading and caching of assets. """ import pathlib import hashlib from math import ceil import os from typing import Optional from typing import Tuple from PIL import Image from PIL import ImageDraw from PIL import ImageFont from sdl2.ext import SpriteFactory from sdl2....
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # 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...
try: from selenium import webdriver from selenium.common.exceptions import TimeoutException from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.webdriver.common.ke...
# -*- coding: utf-8 -*- from pyqtgraph.Qt import QtCore, QtGui, QtWidgets from pyqtgraph.graphicsItems.GraphicsObject import GraphicsObject from pyqtgraph import functions as fn from pyqtgraph.Point import Point import subprocess import inspect import weakref import tempfile class Terminal(QtCore.QObject): sigTe...
""" Classes to store features mapping for bucketing. """ import dataclasses from dataclasses import dataclass, field from typing import List, Union, Dict, Optional import pandas as pd import numpy as np @dataclass class BucketMapping: """Internal class to store all the bucketing info. This saves the inform...
#This script is the base class for the mol object from rdkit import Chem from rdkit.Chem import AllChem import os import numpy as np from copy import copy, deepcopy from . import calculator from .utils import hartree2kcal import itertools from .message import warning,log,display import pickle #######################...
#!/usr/bin/env python3 # This program determines the look-up table for the LR-I model # to generate lookup tables for a time step of dt=0.01 ms from command line, execute # $ python3 gener_table.py 0.01 from numpy import sqrt, exp, log import numpy as np def program_br(ndimtab=2500,dt=0.001,dv=0.1,xspeed=1.,backon=1.,...
from sklearn.model_selection import train_test_split import tensorflow.compat.v2 as tf tf.enable_v2_behavior() import tensorflow_probability as tfp tfd = tfp.distributions import numpy as np import pandas as pd def sample_local(probs, bins, num_samples=1000, use_thresh=False, thresh=0.1): probs_pred = tf.reduce_m...
""" Data Visualisation toolkit -------------------------- data vis library mainly wrapper around common plotting libraries, plotly, seaborn EXAMPLES -------- histogram with color -------------------- fig = px.histogram(df, 'value', color='variable', barmode='overlay', opacity=0.7) plotly geo scatter ------------...
import numpy as np import tensorflow as tf # deep learning library. Tensors are just multi-dimensional arrays import os import pylab import win32com.client as wincl import image import matplotlib.pyplot as plt import plotly.offline as py py.init_notebook_mode(connected=True) import plotly.graph_objs as go im...
import numpy as np import logging from collections import defaultdict from Bio import motifs as BioMotifs from itertools import product import re def motifs_from_file( opts ): """ Read through the file containing motifs to query. Should be in the form: ACGT-0 GATC-1 CATG-1 where the number indicates the 0-b...
# -*- coding: utf-8 -*- """ Created on Sat Apr 24 15:53:47 2021 @author: JensJ """ import os import fnmatch import pandas as pd #import pandas_ta as ta #import json import plotly.graph_objects as go from plotly.subplots import make_subplots from datetime import datetime from pathlib import Path #import mng_data rund...
# -*- coding: utf-8 -*- # Copyright (c) 2020, Blue Lynx and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import json from frappe.utils import getdate, get_time, flt, now_datetime from datetime import datetime, timedelta, date, time from frappe imp...
#!/usr/bin/env PYTHONIOENCODING=UTF-8 /usr/local/bin/python3 # encoding: utf-8 # By <NAME> <<EMAIL>>, modified from original script by <NAME> # # MIT Licence. See http://opensource.org/licenses/MIT from __future__ import unicode_literals import re import sys import urllib import plistlib import os.path import subpro...
import json import os import shutil import hashlib from shutil import copyfile from .steady_download_and_compute_hash import steady_download_and_compute_hash import random import time from .filelock import FileLock # import mtlogging from typing import Optional, List, Any, Dict, Tuple, Union # TODO: implement cleanup(...
from django.shortcuts import render, get_object_or_404 from django.contrib import messages from django.http import JsonResponse, HttpResponseRedirect, HttpResponse from django.urls import reverse from .models import ScanHistory, ScannedHost, ScanActivity, WayBackEndPoint from notification.models import NotificationHook...
""" Communicate with a SuperK Fianium laser from NKT Photonics. """ from ctypes import c_ubyte from enum import IntEnum from msl.equipment.resources.nkt import PortStatusTypes from msl.equipment.resources import NKT from . import ( logger, BaseEquipment, ) class ID60(IntEnum): """The register ID's for a...
import os import sys import json import glob import yaml import shutil import re from jinja2 import Environment, FileSystemLoader from pydash import _ """ BASE_DIR: base directory absolute path of api-doc when script runs by github action TARGET_DIR: target directory where artifact has copied through github ...
"""Loads the Cityscapes dataset for use with PyTorch.""" import glob import os from functools import lru_cache import numpy as np import psutil import torch from PIL import Image from torch.utils.data import Dataset class NoopTransform(object): """A transform that returns the original image unmodified.""" ...
"""A couple of classes that model and optimize production for Alpha Systems. """ import gurobipy as gp from gurobipy import GRB import pandas as pd import deep_ordered_dict as dod from workbook_utils import set_border, fit_column from openpyxl.styles import Alignment from datetime import datetime class Ba...
''' Tasks.py: Script with functions that give time series for common tasks. ''' import matplotlib.pyplot as plt import autograd.numpy as np import autograd.numpy.random as npr import time def RSG(dt = 0.001, ts_min=0.5, ts_max=2, ts_time=[], iti_time=[], showplots=0, algorithm=[]): ''' Generates time series f...
""" You'll need to set these environment variables: - AWS_ACCESS_KEY_ID - AWS_SECRET_ACCESS_KEY I'd recommend setting them in your ``app.sh`` file. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from collections import namedtuple from collections ...
''' GUI for converting an image to black-and-white by adjusting its threshold using Wand API for ImageMagick. ''' from os import path from PyQt5.QtCore import Qt, QDir from PyQt5.QtGui import QImage, QPixmap from PyQt5.QtWidgets import ( QAction, QFileDialog, QHBoxLayout, QLabel, QMainWindow, ...
# coding: utf-8 # Goal: Rename multiple mp3 files with their properties to get them ready for iTunes """ Idea space: - Ask user to delete the Cover_Images folder on end """ import eyed3 as d3 import os, os.path, datetime, requests, re, string, PIL.Image, youtube_dl, json from bs4 import BeautifulSoup # path = "C:\\U...
import itertools import os import os.path as osp import time import re from collections import OrderedDict from datetime import datetime from pathlib import Path from mani_skill_learn.env.builder import build_replay import numpy as np from mani_skill_learn.env import ReplayMemory from mani_skill_learn.env import save_...
# flake8: noqa import argparse import os import json import sys import time from typing import Tuple import boto3 import dask import dask.dataframe as dd import mlflow import pandas as pd import ray import torch import torch.nn as nn import torch.optim as optim from dask_ml.compose import ColumnTransformer from dask_m...
#!/usr/bin/python3 import argparse import logging import multiprocessing as mp import os import sys from dataclasses import dataclass import model import psutil import setproctitle from bcc import ( # pylint: disable=no-name-in-module BPF, USDT, PerfHWConfig, PerfType, utils, ) @dataclass class ...
# receives to bytearrays and returns a bytearray def xor(a,b): return bytearray([a[i]^b[i] for i in range(len(a))]) # receives the hex representation of 2 variables and returns a bytearray def xor_hex(a,b): raw_a = bytearray.fromhex(a) raw_b = bytearray.fromhex(b) return xor(raw_a,raw_b) # receives th...
import os from collections import OrderedDict import numpy as np from rdkit import Chem import networkx as nx import torch from torch_geometric import data as DATA # nomarlize def dic_normalize(dic): # print(dic) max_value = dic[max(dic, key=dic.get)] min_value = dic[min(dic, key=dic.get)] # print(max...
# -*- coding: utf-8 -*- ''' Author: Hannibal Data: Desc: local data config NOTE: Don't modify this file, it's build by xml-to-python!!! ''' petskill2_map = {}; petskill2_map[1] = {"lv":1,"reqlv":1,"gold":20,"goldpersec":1,}; petskill2_map[2] = {"lv":2,"reqlv":2,"gold":100,"goldpersec":4,}; petskill2_map[3] = {"lv":...
#!./venv/bin/python # Multi BIP32: will work with all coins where they already implemented # any kind of BIP32, so we will not focus only on secp256k1, but also # on ed25519, and on Cardano's modified ed25519. # # We will also try to limit ourselves to our target use-case: # generating private/public keypairs in a tre...
# coding=utf-8 # Copyright 2018 The Tensor2Tensor 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 applicable...
#! /usr/bin/env python # # This file contains the generic features library that is included with ddlib. # # The three functions that a user should want to use are load_dictionary, # get_generic_features_mention, and get_generic_features_relation. # All the rest should be considered more or less private, except perhaps ...
# This file is part of Indico. # Copyright (C) 2002 - 2020 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import unicode_literals import codecs import os import subprocess import tempfile from io...
""" Abstract classes for guizero. """ from .tkmixins import ( ScheduleMixin, DestroyMixin, EnableMixin, FocusMixin, DisplayMixin, TextMixin, ColorMixin, SizeMixin, LayoutMixin, EventsMixin) from . import utilities as utils from .event import EventManager from . import dialog fro...
# # This file is part of pysnmp software. # # Copyright (c) 2005-2019, <NAME> <<EMAIL>> # License: http://snmplabs.com/pysnmp/license.html # import marshal import os import struct import sys import time import traceback try: import importlib try: PY_MAGIC_NUMBER = importlib.util.MAGIC_NUMBER S...
# -*- coding: utf-8 -*- """Parser for NTFS metadata files.""" from __future__ import unicode_literals import uuid import pyfsntfs # pylint: disable=wrong-import-order from dfdatetime import filetime as dfdatetime_filetime from dfdatetime import semantic_time as dfdatetime_semantic_time from dfdatetime import uuid_...
# Copyright 2019 TerraPower, 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 writi...
""" The ``mlflow.statsmodels`` module provides an API for logging and loading statsmodels models. This module exports statsmodels models with the following flavors: statsmodels (native) format This is the main flavor that can be loaded back into statsmodels, which relies on pickle internally to serialize a mod...
import os import sys import click from click import echo, style from click.exceptions import Exit from typing import Union from riptide.config.command import in_service from riptide.config.document.command import KEY_IDENTIFIER_IN_SERVICE_COMMAND from riptide.engine.results import ResultQueue from riptide_cli.command...
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
""" Training/testing/inference script for COVID-Net CT models for COVID-19 detection in CT images. """ import os import sys import cv2 import json import shutil import numpy as np from math import ceil import tensorflow as tf import matplotlib.pyplot as plt from sklearn.metrics import confusion_matrix, ConfusionMatrix...
# -*- coding: utf-8 -*- import os import pip_shims.shims import pytest from hypothesis import given, settings, strategies as st from vistir.compat import Path from requirementslib.exceptions import RequirementError from requirementslib.models.requirements import Line, Requirement from requirementslib.models.setup_inf...
# -*- coding: utf-8 -*- """ @file @brief Code implémentant la première solution proposée à :ref:`Parcourir les rues de Paris <mlrueparisparcoursrst>`. """ import random import math from pyquickhelper.loghelper import noLOG def distance_paris(lat1, lng1, lat2, lng2): """ Distance euclidienne approchant la dist...
## evoware/py -- python modules for Evoware scripting ## Copyright 2014 - 2019 <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/L...