text
stringlengths
6.04k
39.5k
import datetime as dtm import itertools import pandas as pd import numpy as np from sklearn.metrics import r2_score from sklearn.base import clone import sugartime.core as core class Patient: """ Object containing data for an individual patient. """ def __init__(self): self.carbs_per_in...
# -*- coding: utf-8 -*- # Copyright 2014 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
# Copyright (c) 2013 Shotgun Software Inc. # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the Shotgun Pipeline Toolkit # Source Code License included in this distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to t...
from enum import Enum import logging # pylint: disable=C0302 from flask import Blueprint, request import sqlalchemy from src import api_helpers, exceptions from src.queries.search_config import trackTitleWeight, userNameWeight, playlistNameWeight from src.models import User, Track, RepostType, Save, SaveType, Follow ...
# coding: utf-8 # pylint: disable=invalid-name, no-member, too-many-locals, no-name-in-module """ interpolation on 2D/3D irregular/regular grids """ # Copyright (c) <NAME>. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division, absolute_import, pr...
COPYRIGHT=u""" /* Copyright © 2015-2021 Intel Corporation * Copyright © 2021 Collabora, Ltd. * * 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 limi...
import json import logging import os import random from datetime import datetime from typing import Dict, List, Optional, Tuple import matplotlib.pyplot as plt import numpy as np import pandas as pd import tensorflow as tf from tensorflow import keras from tensorflow.keras.layers import Dense from tqdm import tqdm fr...
""" Classes to implemeent various spectrometers """ from poptics.lens import OpticalGroup from poptics.wavelength import MaterialIndex,AirIndex,getDefaultWavelength from poptics.ray import IntensityRay,RayPencil from poptics.surface import FlatSurface from poptics.vector import Unit3d,Angle,Vector2d,Vector3d ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon May 21 14:54:06 2018 @author: mead """ from selenium import webdriver from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.supp...
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions of source code must retain the above copyright # notice, this list of conditio...
import numpy as np import pylab as plt import pyccl as ccl import copy from astropy.io import fits import warnings import shear_subaru import os import pickle from scipy.stats import binned_statistic path = os.path.dirname(shear_subaru.__file__) class comp_shear_cl(object): def __init__(self, Omega_ch2=0.1, Omega...
import logging import os import pandas as pd import argparse import random from math import exp from scipy.special import softmax from collections import Counter from data_processors import RedditInDomainDataProcessor, RedditOutOfDomainDataProcessor from sklearn.svm import SVC from sklearn.pipeline import Pipeline f...
# Copyright 2019 <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 writing, ...
import math import logging from functools import partial from collections import OrderedDict import torch import torch.nn as nn import torch.nn.functional as F from timm.models.helpers import named_apply from timm.models.layers import PatchEmbed, Mlp, DropPath, trunc_normal_, lecun_normal_, to_2tuple from timm.models...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
# flake8: noqa from cereal import car from selfdrive.car import dbc_dict Ecu = car.CarParams.Ecu # Steer torque limits class SteerLimitParams: STEER_MAX = 400 # 409 is the max, 255 is stock STEER_DELTA_UP = 3 STEER_DELTA_DOWN = 7 STEER_DRIVER_ALLOWANCE = 50 STEER_DRIVER_MULTIPLIER = 2 STEER_DRIVER_FACTO...
#!/usr/bin/env python3 import threading import netifaces as ni import numpy as np import math import time import socket import signal import logging import pynmea2 import io import sys # For network tests import requests import urllib.parse localPP = 1 rpiIP = "192.168.142.203" fname = "rtkwaypoints.txt"#"5gwaypoin...
#!/usr/bin/python # Copyright (c) 2020, 2021 Oracle and/or its affiliates. # This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Apache License v2.0 # See LICENSE.TXT for d...
import json import logging import os import socket import sys import uuid import warnings from future.standard_library import install_aliases from pyngrok import process, conf from pyngrok.exception import PyngrokNgrokHTTPError, PyngrokNgrokURLError, PyngrokSecurityError, PyngrokError from pyngrok.installer import in...
# Copyright (c) 2020, NVIDIA CORPORATION. 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...
#!/usr/bin/env python3 import sys, fileinput, json, re from itertools import chain from conllulex.supersenses import makesslabel def render(ww, sgroups, wgroups, labels={}): """ Converts the given lexical annotation to a UTF-8 string with _ and ~ as weak and strong joiners, respectively. Assumes this...
#!/usr/bin/env python # -*- coding: utf-8 -*- " Transform replay data: " import shutil import csv import os import sys import traceback import random import pickle import enum import copy from absl import flags from absl import app from tqdm import tqdm import matplotlib.pyplot as plt from pysc2.lib import point f...
# Copyright 2019 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, ...
#### # # The MIT License (MIT) # # Copyright 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, cop...
# Copyright (C) 2021, RTE (http://www.rte-france.com) # SPDX-License-Identifier: Apache-2.0 import os import logging import uuid import re import datetime from errno import ENOENT import xml.etree.ElementTree as ET from vm_manager.helpers.rbd_manager import RbdManager from vm_manager.helpers.pacemaker import Pacemake...
import ast from .clike import CLikeTranspiler from .inference import get_inferred_nim_type from .plugins import ( ATTR_DISPATCH_TABLE, CLASS_DISPATCH_TABLE, FUNC_DISPATCH_TABLE, FUNC_USINGS_MAP, MODULE_DISPATCH_TABLE, DISPATCH_MAP, SMALL_DISPATCH_MAP, SMALL_USINGS_MAP, ) from py2many.a...
"""Redis based sampler base class and dynamic scheduling samplers.""" import numpy as np import pickle from time import sleep from datetime import datetime import cloudpickle import copy import logging from redis import StrictRedis from typing import Callable, List, Tuple from jabbar import jabbar from ...util import...
import argparse import calendar import copy import datetime import pickle import re from datetime import timedelta from pathlib import Path import arviz as az import matplotlib.dates as mdates import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns sns.set(style="ticks", font='Dej...
# # Copyright 2018-2021 Elyra 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 law or agreed to in writ...
#!/bin/env python # -*coding: UTF-8 -*- """ Argo data fetcher for a local copy of GDAC ftp. This is not intended to be used directly, only by the facade at fetchers.py Since the GDAC ftp is organised by DAC/WMO folders, we start by implementing the 'float' and 'profile' entry points. About the index local ftp fetc...
from aesara.compile import optdb from aesara.configdefaults import config from aesara.graph.op import compute_test_value from aesara.graph.opt import in2out, local_optimizer from aesara.tensor.basic import constant, get_vector_length from aesara.tensor.elemwise import DimShuffle from aesara.tensor.extra_ops import broa...
import sys import click import numpy as np import tensorflow as tf import tensorflow_probability as tfp import statsmodels.api as sm import matplotlib.pyplot as plt import seaborn as sns from pathlib import Path from gpdre.datasets import make_regression_dataset from gpdre.plotting import fill_between_stddev fro...
import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F import torch.backends.cudnn as cudnn import torchvision.transforms as transforms from torchvision import datasets, transforms import os import argparse import pdb import copy import numpy as np from torch.optim import lr_sc...
import re import ctypes intent_names = ['input', 'inplace', 'inout', 'output', 'hide'] supported_intent_lst = [ ('input',), # argument contains input data that is not modified, # non-contiguous data is copied ('inout',), # argument contains input data that can be modified ...
import datetime import glob import json import multiprocessing import os import pickle import sys, re import warnings from collections import Counter, defaultdict from string import digits import matplotlib.pyplot as plt import numpy as np import pandas as pd from dateutil import parser from gensim.models import Keyed...
#source : https://github.com/hadim/read-roi/blob/master/read_roi/_read_roi.py import os import struct import zipfile import logging __all__ = ['read_roi_file', 'read_roi_zip'] class UnrecognizedRoiType(Exception): pass OFFSET = dict(VERSION_OFFSET=4, TYPE=6, TOP=8, LE...
#! /usr/bin/env python from time import asctime, localtime, time from os import environ from sys import stderr, exit, argv from string import Template import re ''' This file is used for generating an x3d file using a crystal. Usage: ./draw.py input [output] If output is not specified, the output will be saved as imp...
""" Module defining constants and enumerate types used in the package """ import functools import itertools as it import mimetypes import re import warnings from enum import Enum, EnumMeta import utm import pyproj from aenum import extend_enum from .exceptions import SHDeprecationWarning, SHUserWarning from ._version...
# Copyright (c) Facebook, Inc. and its affiliates. from collections import defaultdict from herbarium.policy.defaults import build_policy from herbarium.utils.comm import all_gather import logging import math import numpy as np from typing import Dict, List, Tuple import torch from fvcore.nn import sigmoid_focal_loss_j...
############################################################################# # # # Proyecto 4: Simulación de modulación 16-QAM para envío de imagenes por un # # canal ruidoso # # ...
# Copyright (C) 2018 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """Module containing Cycle tasks. """ from logging import getLogger from sqlalchemy import orm import sqlalchemy as sa from sqlalchemy.ext import hybrid from werkzeug.exceptions import BadRequest from ggrc...
# Provides a friendly interface for the GSD model parameters estimation, at the same time giving information about the # goodness-of-fit of the model to your data. Lastly, it shows how to create p-value P--P plot. # # Author: <NAME> <<EMAIL>> import logging from _logger import setup_console_and_file_logger from sys im...
import sys import threading import cmd import chess from chess import polyglot import tables import os import glob import platform # DGT from pydgt import DGTBoard from pydgt import FEN from pydgt import CLOCK_BUTTON_PRESSED from pydgt import CLOCK_LEVER from pydgt import CLOCK_ACK from pydgt import scan as dgt_port_...
#!/usr/bin/env python """ Utilities for downloading data from Standforw LMRD, tokenizing, creating vocabulary, encoding and decoding sentences. modified copy of https://github.com/tensorflow/models/blob/master/tutorials/rnn/translate/data_utils.py __author__ = "<NAME>, DTU, Denmark" __copyright__ = "Copyright 2017, <...
""" Utility routines """ from __future__ import (print_function, absolute_import, division, unicode_literals) import numpy as np import os import glob import pdb from matplotlib import pyplot as plt from astropy.table import Table from astropy.io import fits from xastropy.xutils import xdebug as xdb from cosredux ...
import random import pdb from django.db.models import Q from django.shortcuts import render, _get_queryset from django.urls import reverse from django.views.generic import DetailView, ListView from django.views.generic.edit import FormMixin from .models import Product, Variation, Category from .forms import VariationIn...
import ast import base64 import hashlib import http.client import random import sys import time import urllib import wave import pyaudio import requests import speech_recognition as sr from PyQt5.QtCore import QObject, pyqtSignal from txpythonsdk import TxTest2Voice class BdAsr: def __init__(self, faster=False)...
import sys import copy import operator import math # board dimensions dims = [8,8] # globals freedom_flag = False # function to map strings to logical operators def param_op(x, op, y): op_map = {'<' : operator.lt, '>=' : operator.ge } return op_map[op](x, y) # class FBState is used represent a freedom board stat...
# -*- coding: utf-8 -*- import numpy as np import torch import torch.nn as nn import torch.optim as optim from IPython.display import clear_output from sklearn.metrics import balanced_accuracy_score import seaborn as sns import matplotlib.pyplot as plt import pickle import random random.seed(123) torch.manual_seed(123...
"""A word-level Sequence to sequence model in Keras. Adapted from: - https://github.com/keras-team/keras/blob/master/examples/lstm_seq2seq.py - https://wanasit.github.io/english-to-katakana-using-sequence-to-sequence-in-keras.html - https://github.com/devm2024/nmt_keras/blob/master/base.ipynb Summary ------- - An enc...
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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 DOCUMENTATION = ''' module: docker_network short_description: Manage Docker network...
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) warnings.simplefilter(action='ignore', category=RuntimeWarning) import pandas as pd import math import numpy as np import scipy.stats as sci from statsmodels.stats.proportion import proportions_ztest from qiskit import execute from qisk...
# -*- coding: utf-8 -*- """Basis smoother. This module contains the class for the basis smoothing. """ from enum import Enum from typing import Union, Iterable import scipy.linalg import numpy as np from ... import FDataBasis from ... import FDataGrid from ..._utils import _cartesian_product from ._linear import _...
#!/usr/bin/python3 # # Copyright (c) 2012 <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, modif...
from typing import TYPE_CHECKING, Union if TYPE_CHECKING: from ..tools import * from ..Topologies import * import time import warnings import cProfile import traceback import pstats import os from abc import ABCMeta, abstractmethod import numpy as np from ..tools import PrintCols, iterable, secToHMS, statPri...
import json import hashlib import os import re import base64 from socket import gaierror, gethostbyname, gethostname, getfqdn from subprocess import CalledProcessError, check_call, check_output import netifaces import containerd_engine import docker_engine from charmhelpers.contrib.network.ip import ( get_address...
from __future__ import print_function from itertools import combinations import googlemaps import pandas as pd import numpy as np import os.path import random import webbrowser GOOGLE_MAPS_API_KEY = "<KEY>" waypoints_file = "my-waypoints-dist-dur.tsv" # This is the general filename - as shorter routes are discovered ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Functions to plot the NN predictions """ from vrmslearn.Trainer import Trainer from vrmslearn.SeismicGenerator import SeismicGenerator from vrmslearn.RCNN import RCNN from vrmslearn.ModelParameters import ModelParameters from vrmslearn.SeismicGenerator import SeismicGe...
from __future__ import annotations import json import logging import os import pathlib from contextlib import contextmanager from copy import copy, deepcopy from typing import Callable, Dict, List, Optional, Sequence, Union import cytoolz as tz import datasets import pandas as pd from datasets import Features from js...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
import os import numpy as np from examples.simple.classification.classification_with_tuning import get_classification_dataset from examples.simple.regression.regression_with_tuning import get_regression_dataset from examples.simple.time_series_forecasting.gapfilling import generate_synthetic_data from fedot.core.data....
""" test_studio_4.py : Test live streaming with Qt. Jump video from one x-screen (and gpu) to another Copyright 2017, 2018 <NAME> Authors: <NAME> This file is part of the Valkka Python3 examples library Valkka Python3 examples library is free software: you can redistribute it and/or modify it under the terms of th...
import base64 import binascii import click import lxml.etree as ET from fido2.client import ClientData, ClientError, Fido2Client from fido2.hid import CtapHidDevice try: from fido2.pcsc import CtapPcscDevice except ImportError: CtapPcscDevice = None import logging import json import re from threading import ...
# -*- coding: utf-8 -*- """ Created on Mon Mar 29 13:15:30 2021 @author: haoli """ import sys sys.path.append("../") import const_common as constA # import downloadUpdateData as mydownPy import Const_LME_A as constLME_a # import requests from os import makedirs import os.path as myPath # import os import pandas ...
# !/usr/bin/env python # -*- coding: utf-8 -*- """ 该脚本有两次运用 1.每天凌晨定时执行一次  默认的 #python send_spam_rpt.py 2.每分钟执行一次 检测是否有自定义发送时间的 #python send_spam_rpt.py customer_sendtime """ from gevent import monkey monkey.patch_time() monkey.patch_socket() import re import os import sys import time import smtplib import logging im...
import collections import logging import os import random import numpy as np import torch from pytorch_pretrained_bert.tokenization import BertTokenizer from torch.utils.data import (DataLoader, SequentialSampler, TensorDataset) from CailExample import read_squad_examples, convert_exampl...
import ast import sys UNREAL_MODULE_TEMPLATE = ''' #pragma once #include "ModuleManager.h" #include "Runtime/UMG/Public/UMG.h" #include "Runtime/UMG/Public/UMGStyle.h" #include "Runtime/UMG/Public/Slate/SObjectWidget.h" #include "Runtime/UMG/Public/IUMGModule.h" #include "Runtime/UMG/Public/Blueprint/UserWidget.h" #in...
# -*- coding: utf-8 -*- r""" Shuffle product of iterables The shuffle product of two sequences of lengths `m` and `n` is a sum over the `\binom{m+n}{n}` ways of interleaving the two sequences. That could be defined inductively by: .. MATH:: (a_n)_{n \geqslant 0} \Cup (b_m)_{m \geqslant 0} = a_0 \cdot \left(...
# Copyright 2021 Modelyst 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...
"""CLI application for discovering and controlling Apple TVs.""" import sys import inspect import logging import binascii import asyncio import argparse from pyatv import (const, convert, exceptions, interface, scan, connect, pair) from pyatv.conf import ( AppleTV, DmapService, MrpService, AirPlayService) from p...
import math import torch,time,random import torch.nn as nn import torch.nn.functional as F from torch.distributions.categorical import Categorical from torch.distributions.multivariate_normal import MultivariateNormal from torch.nn.modules.linear import Linear from ..commom.attention import MultiHeadAttention from ..co...
# smop -- Simple Matlab to Python compiler # Copyright 2011-2014 <NAME> """ Calling conventions: call site: nargout=N is passed if and only if N > 1 func decl: nargout=1 must be declared if function may return more than one return value. Otherwise optional. return value: return (x,y,z)[:nargout] or re...
from django.shortcuts import render, redirect from django.http import HttpResponse from django.contrib.auth.forms import AuthenticationForm from .forms import * from django.contrib.auth import login, logout, authenticate from django.contrib import messages from django.apps import apps from django.conf import settings f...
# coding: utf-8 import os import re import zipfile import tempfile import subprocess from os import path from io import BytesIO from shutil import get_terminal_size import rarfile from guessit import guessit from getsub.constants import SUB_FORMATS, ARCHIVE_TYPES, VIDEO_FORMATS class ProgressBar: def __init__(...
#!/usr/bin/python3.7 # coding=utf-8 import argparse import platform import socket import shutil import random import csv import pathlib import numpy as np import pandas as pd import seaborn as sn import matplotlib.pyplot as plt import torch import torch.nn.functional as F import torch.nn as nn from tqdm import tqdm fr...
#!/usr/bin/env python from PyQt4 import QtCore, QtGui from PyQt4.QtCore import * from PyQt4.QtGui import * from components.PyMimeData import PyMimeData from copy import deepcopy class DrawerSetsTreeView (QtGui.QTreeView): def __init__(self, parent=None): super(DrawerSetsTreeView, self).__init__(parent...
# -*- coding: utf-8 -*- import logging import importlib from geoalchemy2.shape import to_shape, from_shape from shapely.geometry import Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, \ GeometryCollection from sqlalchemy import text, or_ from pyramid_oereb import Config from pyramid_oereb.c...
from __future__ import division from Constant import Constant from Moment import Moment, MomentException, PNRException from Team import TeamNotFoundException plt = None import numpy as np import pandas as pd import seaborn as sns from pnr.vis.utils import draw_full_court, draw_half_court from pnr.data.utils import ge...
# %% """ Functions that are used to run different types of analysis on the restoration of interdependent networks """ import sys import os import pandas as pd import matplotlib.pyplot as plt import pickle import indp import dindputils import plots # import gametree import itertools # import Metaheuristics.metaheuristi...
# <NAME>, 2017: from structuredPredictionNLG.Action import Action from nltk.translate.bleu_score import sentence_bleu, SmoothingFunction from nltk import ngrams from structuredPredictionNLG.FullDelexicalizator import covers_attr_E2E ''' This represents a single instance in the dataset. ''' class DatasetInstance: ...
############################################################################# # # Authors: <NAME>, <NAME> # # Copyright: <NAME>, <NAME> TSRI 2003 # ############################################################################# # # $Header: /opt/cvs/python/packages/share1.5/MolKit/bondSelector.py,v 1.26.2.1 2016/02/12 0...
import glob import random import os os.environ['CUDA_VISIBLE_DEVICES'] = '2' import torch import torch.nn as nn import numpy as np from torch.utils.data.dataset import random_split from torch.utils.data import DataLoader import torch.optim as optim import torch.optim.lr_scheduler as lr_scheduler import torch.nn as nn i...
# -*- coding: utf-8 -*- from __future__ import print_function from __future__ import unicode_literals from __future__ import division from django.core.management import settings import pandas as pd from sqlalchemy.engine.url import URL from odm2api.ODMconnection import dbconnection from odm2api.ODM2.services.readSe...
# Copyright 2018 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
from django.shortcuts import redirect from django.views.generic.detail import DetailView from django.views.generic.edit import CreateView, UpdateView from django.views.generic import ListView from django.views.generic.list import BaseListView from django.views.generic.base import View from django.shortcuts import get_o...
import math import requests import os import pandas as pd import matplotlib.pyplot as plt import os import numpy as np import sys import math from datetime import datetime from glob import glob from datetime import timedelta plt.style.use('ggplot') from mpl_toolkits.basemap import Basemap from igrf12py.igrf12fun impor...
# ================================================================= # # Authors: <NAME> <<EMAIL>>, # <NAME> <<EMAIL>> # # Copyright (c) 2014 <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 So...
# Copyright The IETF Trust 2011-2019, All Rights Reserved # -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import datetime from django.conf import settings from django.contrib.auth.models import User from django.utils.encoding import smart_text import debug ...
import warnings from functools import partial from typing import Optional import numpy as np import pandas as pd from sklearn.model_selection import RandomizedSearchCV from sklearn.pipeline import Pipeline from greykite.common.constants import ACTUAL_COL from greykite.common.constants import PREDICTED_COL from greyki...
# -*- coding: utf-8 -*- # Copyright (c) 2020 <NAME> and contributors # See LICENSE.rst for details. from pathlib import Path from math import ceil from copy import deepcopy from PIL import Image, ImageFont, UnidentifiedImageError import cbor2 from luma.core.util import from_16_to_8, from_8_to_16 class bitmap_font():...
# Imports: standard library import base64 import multiprocessing import os import re import shutil import struct from collections import defaultdict from datetime import datetime from typing import Dict, List, Tuple, Union # Imports: third party import bs4 import h5py import numpy as np from tqdm import tqdm # Import...
import argparse import glob import itertools import os from collections import defaultdict import celescope.tools.preflight as pre import celescope import celescope.tools.utils as utils from celescope.celescope import ArgFormatter from celescope.__init__ import HELP_DICT TOOLS_DIR = os.path.dirname(celescope.tools.__f...
# emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*- # ex: set sts=4 ts=4 sw=4 noet: # ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See COPYING file distributed along with the datalad package for the # copyright and license terms. # # ## ### ##...
#!/usr/bin/python # Dependencies from the python standard library: from pathlib import Path import subprocess # For calling ffmpeg to make animations import urllib.request # For downloading raw data import zipfile # For unzipping downloads # You can use 'pip' to install these dependencies: import numpy as np i...
# coding: utf-8 # # 1d3v electron hybrid code for R/L-waves with stationary ions and dipole background field # # ## 1. The model # The electron hybrid model for cold electrons with linearized fluid equations and hot kinetic electrons (Vlasov equation) reads # # \begin{align} # &\frac{\partial\tilde{\mathbf{j}}_\mat...
""" Create IP model and solves is using the Cbc solver This code is licensed under the Apache License, Version 2.0. You may obtain a copy of this license in the LICENSE file in the root directory of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. Any modifications or derivative works of this code ...
import sys import os import os.path import re import subprocess from setuptools import setup,Extension from distutils import sysconfig # at the time of this writing, there is no setuptools.command.build module from distutils.command.build import build from setuptools.command.build_ext import build_ext from distutils...
# coding: utf-8 import argparse import time import math import os, sys import itertools import numpy as np import random import torch import torch.nn as nn import torch.optim as optim sys.path.append('../') from data_utils import get_lm_corpus from models.deq_transformer import DEQTransformerLM from lib.solvers impo...
"""Reporting statistics and data module""" from collections import defaultdict from datetime import datetime from smtplib import SMTPRecipientsRefused from flask import current_app from flask_babel import force_locale from werkzeug.exceptions import Unauthorized from ..audit import auditable_event from ..cache import...
import copy import warnings import catboost as cgb import hyperopt import lightgbm as lgb import pandas as pd import xgboost as xgb from wax_toolbox import Timer from churnchall.constants import MODEL_DIR, RESULT_DIR from churnchall.datahandler import DataHandleCookie, to_gradboost_dataset from churnchall.tuning impo...