text
stringlengths
8.04k
46.5k
import json from django.http import HttpResponse from .models import ( Invoice, Seller, Receiver, ) from .serializers import ( InvoiceSerializer, SellerSerializer, ReceiverSerializer, ) import re from django.views import View from django.http import Http40...
# -*- coding: utf-8 -*- """ Created on Wed Nov 7 15:47:38 2018 @author: jdietric """ #pyqt import #from PyQt5 import QtCore, QtGui, QtWidgets # other imports import os import sys import numpy as np import pandas as pd import sympy.geometry as spg import matplotlib.path as mplPath from datetime import datetime from ...
#!/usr/bin/env python # ========================== begin_copyright_notice ============================ # # Copyright (C) 2019-2021 Intel Corporation # # SPDX-License-Identifier: MIT # # =========================== end_copyright_notice ============================= import os import sys import re import importlib impor...
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) """The variant module contains data structures that are needed to manage variants both in packages and in specs. """ impo...
# Copyright (C) 2011-2014 OpenStack Foundation # Copyright (C) 2017 Red Hat # # 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 requir...
import ast import collections import datetime import math import numpy as np import pandas as pd from pyspark import Row, SparkContext, SparkConf from pyspark.sql import SQLContext from pyspark.sql.functions import col class Calculator: def __init__(self): self.localClusterURL = "local[2]" self.c...
import json import logging import re import traceback import warnings from collections import namedtuple import arrow from django.core.exceptions import PermissionDenied, ValidationError from django.db import transaction from django.http.request import HttpRequest from django.utils.translation import gettext as _ from...
""" This module supports embedded TeX expressions in matplotlib via dvipng and dvips for the raster and postscript backends. The tex and dvipng/dvips information is cached in ~/.matplotlib/tex.cache for reuse between sessions Requirements: * latex * \*Agg backends: dvipng * PS backend: latex w/ psfrag, dvips, and Gh...
""" Nonlinear MPC simulation with CGMRES author <NAME> (@Atsushi_twi) Ref: - Shunichi09/nonlinear_control: Implementing the nonlinear model predictive control, sliding mode control https://github.com/Shunichi09/nonlinear_control """ import numpy as np import matplotlib.pyplot as plt import math U_A_MAX = 1.0 U_O...
# Copyright (c) 2019-2020, NVIDIA 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 applicable law or agre...
"""Image Prediction task""" import copy import logging import os import pickle import warnings import pandas as pd from gluoncv.auto.tasks import ImageClassification as _ImageClassification from gluoncv.model_zoo import get_model_list from autogluon.core.utils import set_logger_verbosity from autogluon.core.utils imp...
"""Most of these tests come from the examples in Bronstein's book.""" from sympy.integrals.risch import DifferentialExtension, derivation from sympy.integrals.prde import (prde_normal_denom, prde_special_denom, prde_linear_constraints, constant_system, prde_spde, prde_no_cancel_b_large, prde_no_cancel_b_small, ...
#Copyright (C) 2013 by <NAME> # #Released under the MIT license, see LICENSE.txt ''' Object represents a TCR repertoire sample ''' import os import random import copy import time import gzip import cPickle as pickle from jobTree.scriptTree.target import Target from sonLib.bioio import system from sonLib.bioio import...
#!/usr/bin/env python # coding: utf-8 from typing import List, Dict, Optional, Any, Tuple import random import numpy as np import torch import torch.nn as nn from torch.nn import functional as F from torch.utils.data import Dataset, DataLoader from torch.nn.utils.rnn import pad_sequence from tokenizers import Tokeniz...
import json import time import psutil import platform import pip import os import base58 import subprocess import locale import codecs from dateutil import parser import datetime from ledger.genesis_txn.genesis_txn_file_util import genesis_txn_path from stp_core.common.constants import ZMQ_NETWORK_PROTOCOL from stp_co...
#!/usr/bin/env python # -*- coding: utf-8 -*- # This file is part of OTC Tool released under MIT license. # otcclient.otcclient -- Client Tool for Open Telecom Cloud # Copyright (C) 2016 T-systems <NAME>, <NAME> ''' otcclient.otcclient -- Client Tool for Open Telecom Cloud @copyright: 2016 T-systems(c). All rights r...
#!/usr/bin/env python import json import os import os.path import sys from argparse import ArgumentParser from pathlib import Path import requests import urllib3 from api.Account import Account from api.RestApi import RestApi from api.System import System from api.Validation import Validation from github.github impor...
""" Flattened ResNet50 for CIFAR10/100 """ import torch.nn as nn import math __all__ = ['resnet50_bt_flat'] class ResNet50(nn.Module): # This should be redefined by the channel count def __init__(self, num_classes=10): super(ResNet50, self).__init__() self.conv1 = nn.Conv2d(3, 16, kernel_si...
"""Machine limits for Float32 and Float64 and (long double) if available... """ __all__ = ['finfo', 'iinfo'] import warnings from ._machar import MachAr from .overrides import set_module from . import numeric from . import numerictypes as ntypes from .numeric import array, inf, NaN from .umath import log10, exp2, ne...
# @Author: yican, yelanlan # @Date: 2020-05-27 22:58:45 # @Last Modified by: yican # @Last Modified time: 2020-05-27 22:58:45 # Standard libraries import os from time import time import sys sys.path.append('./') import pytorch_lightning as pl # Third party libraries import cv2 import numpy as np import pandas as pd...
# encoding: utf8 """Collection of small functions and scraps of data that don't belong in the pokedex core -- either because they're inherently Web-related, or because they're very flavorful and don't belong or fit well in a database. """ from __future__ import absolute_import, division import math import re from ite...
__all__ = ['shortest_simple_paths', 'bfs_search', 'find_sources', 'get_path_iter', 'bfs_search_multiple_nodes', '_bidirectional_shortest_path', '_bidirectional_pred_succ', 'open_dijkstra_search'] import sys import logging from collections import deque, OrderedDict from copy import deepc...
import unittest import platform import os from binaryninja.binaryview import BinaryView, BinaryViewType from binaryninja.settings import Settings, SettingsScope from binaryninja.metadata import Metadata from binaryninja.demangle import demangle_gnu3, get_qualified_name from binaryninja.architecture import Architecture...
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # ----------------------------------------------------------------------------- ...
""" test_scope component that checks for errors related to yields in async code. This does the following three checks: - yielding the same thing more than once in the same yield - yielding an async task in a non-async function - yielding before using the result of the previous yield """ import ast from ast_decompil...
from __future__ import division import numpy as np import scipy as sp from scipy.sparse import diags import multiprocessing as mp import itertools import time import sys from suftware.src import deft_core from suftware.src import maxent from suftware.src import utils from suftware.src.utils import ControlledError x_M...
# coding=utf-8 # Copyright 2019 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
from tkinter import * import random import time import math a=Tk() b=Canvas(a,height=715,width=1080,background="#227700") wall1=b.create_rectangle(500,715,600,500,fill="grey") horizonline=b.create_line(0,215,1080,215,fill="white",width=3) sky=b.create_rectangle(0,0,1240,370,fill="cyan") mountain=b.create_arc(0,545,215,...
""" This file contains specific functions for computing losses of FCOS file """ import os import torch from torch import nn from fcos_core.layers import IOULoss from fcos_core.layers import SigmoidFocalLoss from fcos_core.layers import LovaszHinge from fcos_core.structures.boxlist_ops import boxlist_iou from fcos_core...
from tkinter import * from tkinter import ttk from tkinter.messagebox import * import math def draw(event): global f_lst, r_lst, scale, dx, dy, redraw_scale, redraw_d a = [] b = [] aa = f_lst.get(0, END) for x in aa: a.append(list(x)) bb = r_lst.get(0, END) for x in...
import re import csv import collections import warnings from datetime import datetime from itertools import chain, repeat, islice import sample_sheet import pandas as pd from metapool.metapool import (bcl_scrub_name, sequencer_i5_index, REVCOMP_SEQUENCERS) from metapool.plate import Er...
import sys import os import time import queue import random import logging import concurrent.futures as cf from multiprocessing import Process from multiprocessing import Queue # PROGRAM CONFIG STOPONFE = True; DEBUG = False; LOG = True; # logger_format = "[%(asctime)s %(msecs)03dms] [PID %(process)d] %(me...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function # ---------------- # Test Functions # ---------------- from six.moves import zip, range # from wbia.plottool import draw_func2 as df2 # from wbia.plottool.viz_keypoints import show_keypoints import utool as ...
from collections import defaultdict import contextlib import functools import itertools from typing import ( Callable, Tuple, TypeVar, cast, ) from rlp.codec import encode_raw from eth_hash.auto import ( keccak, ) from eth_utils import ( to_list, to_tuple, ) from trie.constants import ( ...
# Copyright 2021 The PyMC Developers # # 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 ag...
""" This file contains all helper utility functions. """ import os import sys import math import importlib from scipy.optimize import linear_sum_assignment import torch import numpy as np import trimesh, configparser from pyquaternion import Quaternion import h5py def worker_init_fn(worker_id): ...
from random import randint from dataclasses import dataclass from telnetlib import Telnet from time import sleep from datetime import datetime, timedelta from dataclasses import dataclass, field import argparse import yaml import sys import pyaudio import numpy as np import matplotlib.pyplot as plt from scipy import ...
from argparse import ArgumentParser from pathlib import Path import os import torch import logging import json import random import numpy as np from collections import namedtuple from tempfile import TemporaryDirectory from torch.utils.data import DataLoader, Dataset, RandomSampler, Sampler, SequentialSampler from to...
from datetime import datetime import json import logging from typing import Any, cast, Dict, List, Optional, Tuple import uuid import boto3 from concurrent.futures import ThreadPoolExecutor from locust import render # type: ignore from sqlalchemy.orm import Session from . import calls from .data import ( LocustS...
"""CSP (Constraint Satisfaction Problems) problems and solvers. (Chapter 6).""" import string from operator import eq, neg import sys, os from sortedcontainers import SortedSet file_dir = os.path.dirname(__file__) sys.path.append(file_dir) from utils import argmin_random_tie, count, first, extend import search from ...
# Copyright 2017 Predict & Truly Systems 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 applic...
import enum #from src.symgen import SymGen # Classes representing Python abstract syntax tree. # Complex nested expressions are not allowed and something similar to # 'Three-adress-code' is used instead - instances of PyValue class are operands. # AST is not meant to be created directly (it's very tedious) and fluen...
import time, os, requests, json import matplotlib.pyplot as plt import numpy as np import tweepy import pandas as pd import matplotlib.patches as mpatches from urllib.request import urlopen from bs4 import BeautifulSoup as bs from datetime import datetime, timezone from itertools import accumulate auth = tweepy.OAuth...
import contextlib import cv2 import numpy as np import os import pandas as pd import random import yaml __version__ = "1.0" class Namespace(object): def __init__(self, *args, **kwargs): self.add(*args, **kwargs) def __iter__(self): return self.__dict__.__iter__() def __str__(self, quo...
# coding=utf-8 import re import sys from brat_widget.messager import Messager from brat_widget.common import JsonDumpable ENTITY_CATEGORY, EVENT_CATEGORY, RELATION_CATEGORY, UNKNOWN_CATEGORY = range(4) # special relation types for marking which spans can overlap # ENTITY_NESTING_TYPE used up to version 1.3, now dep...
# coding: utf-8 from __future__ import unicode_literals import itertools import random import re from .common import InfoExtractor from ..utils import ( determine_ext, dict_get, ExtractorError, int_or_none, js_to_json, orderedSet, str_or_none, try_get, ) class TVPIE(InfoExtractor): ...
# BEGIN GENERATED CONTENT (do not edit below this line) # This content is generated by gengl.py. # Wrapper for /home/mcfletch/pylive/OpenGL-ctypes/src/wgl.h from OpenGL import platform, constant from ctypes import * c_void = None CONST = constant.Constant( 'CONST', 0 ) GLenum = c_uint # /home/mcfletch/pylive/OpenGL...
# -*- coding: utf-8 -*- # ============================================================================= # Copyright (c) 2012, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # Written by <NAME> <<EMAIL>> and others. # LLNL-CODE-529294. # All rights reserved. # # This...
# branchmap.py - logic to computes, maintain and stores branchmap for local repo # # Copyright 2005-2007 <NAME> <<EMAIL>> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import struct from ...
# Copyright 2022 The Cirq Developers # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
"""BootlegAnnotator.""" import logging import os import tarfile import urllib from pathlib import Path import numpy as np import torch import ujson from tqdm import tqdm from transformers import BertTokenizer import emmental from bootleg.data import get_dataloader_embeddings from bootleg.end2end.annotator_utils impor...
import imp import numpy import torch from torch._C import set_flush_denormal import torch.nn as nn import torch.nn.functional as F from torch import Tensor import copy from typing import Optional from einops import rearrange import math """ TranST: spatial_encoder, temporal_encoder, Args: """ class TranST(nn.Modul...
from collections import Counter from itertools import repeat from pathlib import Path from typing import Tuple from ortools.linear_solver import pywraplp from concurrent.futures import ThreadPoolExecutor import multiprocessing import pandas as pd import numpy as np from ..document import Document from ..alignment impor...
#!/usr/bin/env python # Copyright 2017 The PDFium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Compares the performance of two versions of the pdfium code.""" from __future__ import print_function import argparse import functool...
# Copyright 2004-2021 <NAME> <<EMAIL>> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy, modify, merge, # publish,...
import json import time from typing import Callable, Optional, List, Any, Dict, Tuple import aiohttp from blspy import AugSchemeMPL, G2Element, PrivateKey import stor.server.ws_connection as ws from stor.consensus.network_type import NetworkType from stor.consensus.pot_iterations import calculate_iterations_quality, ...
# Copyright 2018 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 applica...
import logging log = logging.getLogger(__name__) from fractions import math from math import gcd import numpy as np import pandas as pd from scipy import signal def as_numeric(x): if not isinstance(x, (np.ndarray, pd.DataFrame, pd.Series)): x = np.asanyarray(x) return x def db(target, reference=1)...
#!/usr/bin/env python3 import os import cv2 import torch import os.path import numpy as np import torchvision.transforms as transforms from PIL import Image from common import Config import pickle as pkl from utils.basic_utils import Basic_Utils import scipy.io as scio import scipy.misc try: from neupeak.utils.webc...
# ============================================================================= # # Main file for CellProfiler-Analyst # # Run python setup.py py2app to build a dmg # # ============================================================================= #!/usr/bin/env python2 # -*- coding: utf-8 -*- from __future__ impo...
#!/usr/bin/env python # Copyright 2016 The LUCI Authors. All rights reserved. # Use of this source code is governed under the Apache License, Version 2.0 # that can be found in the LICENSE file. """A low-level blob storage/retrieval interface to the Isolate server""" import base64 import collections import hashlib im...
# -*- coding: utf-8 -*- ''' Jinja loading utils to enable a more powerful backend for jinja templates ''' # Import python libs from __future__ import absolute_import, unicode_literals import atexit import logging import os.path import pipes import pprint import re import uuid from functools import wraps from xml.dom i...
#!/usr/bin/env python3 """Capital Gain Calculator main module.""" from __future__ import annotations from collections import defaultdict import datetime import decimal from decimal import Decimal import importlib.metadata import logging from pathlib import Path import sys from . import render_latex from .args_parser ...
import numpy as np from keras import backend as K from keras.engine.topology import Layer from keras.layers.pooling import _GlobalPooling1D from keras.layers import Conv1D, Input, LocallyConnected1D from keras.layers.core import Dropout from concise.utils.plot import seqlogo, seqlogo_fig import matplotlib.pyplot as plt...
# (c) 2005 <NAME> and contributors; written for Paste (http://pythonpaste.org) # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php # Mostly taken from PasteDeploy and stripped down for Galaxy import inspect import os import re import sys import pkg_resources from six import iteritem...
import tensorflow as tf import tensorflow.keras as tk import tensorflow.keras.layers as tl from numpy import inf import math, os import sys sys.path.append("../lib") import group class Conf: def __init__(self, nbatch = 16, nepoch = 4, ...
# Copyright (c) 2015, Google Inc. # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WA...
from tkinter import* from datetime import date import random import time root = Tk() root.geometry("1500x700+20+50") root.title("Hotel Management System") root.config(background='#23374d') Tops = Frame(root, bg="white", width=1500, height=50, relief=SUNKEN) Tops.pack(side=TOP) Tops.config(background='#233...
import os import wandb import sys import torch import torchvision from torch import nn, optim import torchvision.transforms as transforms from torchvision import datasets from torchvision.models import resnet50 import torchvision.utils as vutils from torchvision.utils import save_image import torch.nn.functional as F i...
#!/usr/bin/env python # Copyright (c) 2013, 2014 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import json import optparse import os import re import shutil import subprocess import sys import tempf...
# Copyright 2021 <NAME> <<EMAIL>> # # 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 writin...
# -*- coding: utf-8 -*- ''' IPC transport classes ''' # Import Python libs from __future__ import absolute_import, print_function, unicode_literals import errno import logging import socket import weakref import time import threading # Import 3rd-party libs import msgpack # Import Tornado libs import tornado import ...
# This file is part of GridCal. # # GridCal 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 3 of the License, or # (at your option) any later version. # # GridCal is distributed in the hope that...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # vim:fenc=utf-8 # # Copyright © 2021 <NAME> <<EMAIL>> # # Distributed under terms of the BSD 3-Clause license. """Data model for grid-related data. """ from __future__ import annotations as _annotations # allows us not using quotation marks for hints from typing import...
import importlib.resources from typing import Any, Optional import numpy as np import pandas as pd from scipy.stats import pearsonr from scipy.stats.mstats import rankdata def from_file(data_file: str, data_file2: str, learn_options: dict[str, Any]) -> tuple: if learn_options["V"] == 1: # from Nature Biotech pa...
# Author: <NAME> <<EMAIL>> # # License: Apache Software License 2.0 """NannyML module providing classes and utilities for dealing with model metadata.""" import abc import logging from enum import Enum from typing import Any, Dict, List, Optional, Tuple import numpy as np import pandas as pd from nannyml.except...
# Released under the MIT License. See LICENSE for details. # """Elimination mini-game.""" # Maded by Froshlee14 # Update by SEBASTIAN2059 # ba_meta require api 6 # (see https://ballistica.net/wiki/meta-tag-system) from __future__ import annotations from typing import TYPE_CHECKING import ba, _ba imp...
""" This is a helper script to create plots from sacred results. Parameter values are hardcoded in the script for now. """ import argparse import datetime import os import pickle import subprocess import time from collections import defaultdict from functools import partial from textwrap import wrap import gym import...
import warnings import torch from torch.autograd import gradcheck, gradgradcheck from xitorch.interpolate.interp1 import Interp1D from xitorch._tests.utils import device_dtype_float_test @device_dtype_float_test(only64=True, additional_kwargs={ "bc_type": ["clamped", "natural", "not-a-knot", "periodic", Non...
import csv import json import re from io import StringIO import django_filters import yaml from django import forms from django.conf import settings from django.contrib.postgres.forms import SimpleArrayField from django.contrib.postgres.forms.jsonb import JSONField as _JSONField, InvalidJSONInput from django.core.exce...
"""Utilities for converting TFHub BigGAN generator weights to PyTorch. Recommended usage: To convert all BigGAN variants and generate test samples, use: ```bash CUDA_VISIBLE_DEVICES=0 python converter.py --generate_samples ``` See `parse_args` for additional options. """ import argparse import os import sys impor...
import sys import matplotlib matplotlib.use('Agg') #matplotlib.use('TkAgg') # revert above import matplotlib.pyplot as plt import os import numpy as np #from PIL import Image #import img2vid as i2v import glob from pathlib import Path import matplotlib.pyplot as plt import pickle import pandas as pd sys.path.append("/...
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
# =============================================================================================== # # meanFieldIsing.py # Author : <NAME> # # MIT License # # Copyright (c) 2019 <NAME>, <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentat...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np import argparse import os import json import glob import random import collections import math import time from ops import * from model import create_...
# An attempt at a WaveToy using the NRPy+ infrastructure # TODO: Parity on grid functions import os, re from datetime import date from sympy import symbols, Function, diff import grid import NRPy_param_funcs as par import finite_difference as fin from outputC import indent_Ccode, add_to_Cfunction_dict, outCfunction, c...
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # # Turku University (2020) Department of Future Technologies # Course Virtualization / Website # Flask Application setup # # setup.py - <NAME> <<EMAIL>> # # 2020-01-01 Initial version. # 2020-01-02 Import do_or_die() from old scripts. # 2020-01-02 Add database c...
import abc from collections import defaultdict import collections.abc import fnmatch import os from pathlib import Path, PosixPath, PurePosixPath, WindowsPath from typing import Any, IO, Iterable, Optional, TYPE_CHECKING, Union from urllib.parse import urlparse from warnings import warn from . import anypath from .ex...
#!/usr/bin/env python3 import csv import math import numpy as np import os import scikitplot as skplt from matplotlib import pyplot as plt, rc from random import randint from sklearn.metrics import accuracy_score, f1_score, recall_score, precision_score, roc_auc_score, roc_curve from typing import List CSV_FILE = "d...
import os import pickle import numpy as np import matplotlib.pyplot as plt from training_flags import FLAGS import tensorflow as tf from data_readers.bair_predictions_data_reader import BairPredictionsDataReader from action_inference.action_inference_model import action_inference_model from training_flags import FLAGS...
# coding=utf-8 # Author: Hongzhong # 2017-12-28 11:43$id from __future__ import print_function from lru import LRU from intervaltree import IntervalTree from .minute_bars import BcolzMinuteBarWriter, BcolzMinuteBarMetadata, BcolzMinuteWriterColumnMismatch, BcolzMinuteBarReader from .minute_bars import OHLC_RAT...
import fountain2pdf_style_radioplay as style # define your style here import fountain2pdf_generate_soundlist from fountain2pdf_2html import Fountain2HTML from reportlab.pdfgen import canvas from reportlab.platypus import SimpleDocTemplate, Paragraph, PageBreak, Spacer from fountain import fountain import sys impor...
""" #code >>> import ecc, helper #endcode #code >>> # Verify curve Example >>> prime = 137 >>> x, y = 73, 128 >>> print(y**2 % prime == (x**3 + 7) % prime) True #endcode #exercise Find out which points are valid on the curve \\( y^2 = x^3 + 7: F_{223} \\) ``` (192,105), (17,56), (200,119), (1,193), (42,99) ``` --- >>...
"""Functions for finding and manipulating cliques. Finding the largest clique in a graph is NP-complete problem, so most of these algorithms have an exponential running time; for more information, see the Wikipedia article on the clique problem [1]_. .. [1] clique problem:: https://en.wikipedia.org/wiki/Clique_proble...
# -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2012-2020 iSolver Software Solutions (C) 2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). # Initial file based on pyglet.libs.win32 # Tablet related class definitions import pyglet from pyglet.even...
#!/usr/bin/env python # -*- coding: utf-8 -*- # vim: et sw=4 ts=4 ''' Copyright (c) 2010, Yahoo! Inc. All rights reserved. Code licensed under the BSD License: http://developer.yahoo.net/yui/license.html version: 1.0.0b1 ''' ''' Prints documentation with htmltmpl from the json data outputted by parser.py ''' import...
__author__ = 'eiscar' import numpy as np import json import math from scipy.integrate import simps, romb import matplotlib.pyplot as plt import logging logger = logging.getLogger(__name__) class Sensor: def __init__(self): self.name = None self.resolution_x = 1000. self.resolution_y = 1...
"""Defines the command line tool `test_op2`""" import os import sys import time from traceback import print_exc from typing import Tuple, List, Dict, Optional, Any import numpy as np import pyNastran from pyNastran.op2.op2 import ( OP2, FatalError, SixtyFourBitError, OverwriteTableError) #SortCodeError, DeviceCod...
#!/usr/bin/python # # Copyright (c) SAS Institute 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...