text
stringlengths
6.04k
39.5k
import logging from typing import TYPE_CHECKING, Optional from qtpy.QtCore import QEvent, QSize, QXmlStreamWriter, Qt, Signal from qtpy.QtGui import QIcon from qtpy.QtWidgets import (QAction, QBoxLayout, QFrame, QScrollArea, QSplitter, QToolBar, QWidget) from .enums import (DockWidgetFeatu...
#!/usr/bin/python3 import os import sys import time import subprocess as sub import re import shutil import argparse import datetime import collections import distutils.core ### Requires: ### 1. Java 1.7, Git >= 1.9, SVN >= 1.8, Perl >= 5.0.10 ### 2. Install Defects4J and add it to the PATH. The "defects4j" command s...
import argparse from datetime import datetime, timedelta import logging import numpy as np import pandas as pd from sklearn.ensemble import ExtraTreesRegressor, RandomForestRegressor from sklearn.linear_model import LinearRegression, Ridge from sklearn.model_selection import ParameterGrid, train_test_split from sklear...
# Copyright 2018 The Sonnet 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 applicable l...
import tensorflow as tf tf_version = int((tf.__version__).split('.')[0]) if tf_version >= 2: import tensorflow.compat.v1 as tf tf.disable_v2_behavior() import os import sys import random import numpy as np import cv2 import skimage.io import warnings; warnings.simplefilter('ignore') import time import h5py # ...
import collections import contextlib import dataclasses import difflib import enum import itertools import re from typing import Dict, FrozenSet, Iterable, Optional, Tuple import discord from .log import log from .roles import Role from . import places PlacesIter = Iterable[places.Place] Places = FrozenSet[places....
import torch import torch.nn as nn import torch.nn.functional as F import torch.distributions as D import torchvision.transforms as T import torch.nn.init as init from torch_geometric.nn import GCNConv, GATConv import ipdb from utils.utils import MultiInputSequential import math import os import math import argparse im...
#!/usr/bin/env python3 # I/O utilities to manage and translate models to one 'language'. This is utterly # important in order to work with multi-strain consortiums. # 0. Utility functions: # 0.1. find_models # 0.2. load_model # change_model_prefix # 1. Translation workflow extracellular names/ids fro...
""" Parser for NEB calculations using VASP compiled with VTST """ import os import traceback from pathlib import Path from aiida.common.exceptions import NotExistent from aiida_vasp.parsers.settings import ParserSettings, ParserDefinitions from aiida_vasp.parsers.node_composer import NodeComposer from aiida_vasp.parse...
# 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 calendar import datetime import time import itertools import yaml from sqlalchemy.sql import select from flask import current_app, session, g from sqlalchemy.sql import func from cryptokit.base58 import get_bcaddress_version from cryptokit import bits_to_difficulty from bitcoinrpc import CoinRPCException from ...
#Author: <NAME> (Mekire) #Purpose: Exploring A* pathfinding and the feasability of using it for my enemies' AI in 'Cabbages and Kings' #License: Free for everyone and anything (no warranty expressed or implied) import sys,os,random,math import pygame from pygame.locals import * os.environ['SDL_VIDEO_CENTERED'] = '1' ...
#! /usr/bin/env python3 import os import sys import math from itertools import product # REXI import rexi_benchmarks from mule_local.JobGeneration import * from mule.JobParallelization import * from mule.JobParallelizationDimOptions import * jg = JobGeneration() verbose = False #verbose = True ##################...
import os import datetime import numpy as np import tensorflow as tf # from tensorflow.python.framework import ops from src.visualization import visualize as plot # from tensorflow.examples.tutorials.mnist import input_data from utils.data_loader import read_data_sets from utils.rprop import RPropOptimizer def variab...
# coding: utf-8 from IPython.display import display from collections import defaultdict import glob import os import json def find_runs_on_filesystem(campaign_name, logs_filepath="../experiment-logs/", attach_rundirs=False): runs = [] for run_dir in glob.glob("/".join([logs_filepath, "[0-9]*"])): run...
from dataclasses import replace from operator import index import tensorflow as tf import os import tensorflow_datasets as tfds import numpy as np import pandas as pd import pickle from glob import glob from absl import logging import sys from absl import flags from absl import logging FLAGS = flags.FLAGS def getBui...
from oreader.base import DataObject, schema, IntegerColumn, StringColumn,\ RealColumn, DateColumn, backrelate, relate from sqlalchemy.engine import create_engine from sqlalchemy.sql.schema import MetaData, Table, Column from sqlalchemy.sql.sqltypes import Integer, String, Float, Date from oreader.writer_configs imp...
import os import numpy as np import importlib import warnings import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits.mplot3d import Axes3D from PIL import Image def fig2img(fig): """ @brief Convert a Matplotlib figure to a 4D numpy arr...
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group 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 ...
#!/usr/bin/env python """ Thor shared HTTP infrastructure This module contains utility functions and a base class for the parsing portions of the HTTP client and server. """ __author__ = "<NAME> <<EMAIL>>" __copyright__ = """\ Copyright (c) 2005-2013 <NAME> Permission is hereby granted, free of charge, to any perso...
import math from dataclasses import dataclass import torch from torch import nn from torch.autograd import Function from lightseq.training.ops.pytorch import transformer_cuda_module from lightseq.training.ops.pytorch.builder import TransformerBuilder from lightseq.training.ops.pytorch.util import ( copy_para, ...
import eli5 import joblib import streamlit as st import pandas as pd from sklearn.svm import LinearSVC from sqlalchemy import create_engine from sklearn import preprocessing as pre import sklearn.model_selection as select from sklearn import linear_model from sklearn.tree import DecisionTreeRegressor from sklearn.metr...
import sys,time from ustum_complaints_ui import * from picture_qrc import * from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * from serial.tools.list_ports import * import datetime import sqlite3 import uuid import xlwt import shutil class MyApp(QtWidgets.QMainWindow, Ui_MainWindow):...
# coding=utf-8 from keras.layers import Input, Dense, BatchNormalization, Conv2D, MaxPooling2D, AveragePooling2D, ZeroPadding2D from keras.layers import add, Flatten from ssd_layers import Normalize from ssd_layers import PriorBox import keras.backend as K from keras.layers import Activation from keras.layers import Co...
import struct from sourcehold.iotools import Buffer from sourcehold.iotools import unpack from PIL import Image, ImageDraw from sourcehold import palette def cut_strict(data, type, rows): data = Buffer(data) if type.__class__ == int: type = type + "B" size = struct.calcsize(type) header =...
from manimlib.imports import * import os INDENT = .25*RIGHT PHI_DOT_RADIUS = 0.05 THETA_DOT_RADIUS = 0.1 DATA_DOT_RADIUS = 0.05 datacolor = Color(hex="#92c1e9") THETA_ANNOT_OFFSET = np.array([-.5,.5,0]) PHI_ANNOT_OFFSET = np.array([-.3,.3,0]) STEP_SIZE = .5 MAML_INNER_STEP_SIZE = 0.6 MAML_OUTER_STEP_SIZE = 1 SHOW_A...
#!/bin/env python """ Module simtk.unit Contains classes Unit and ScaledUnit. This is part of the OpenMM molecular simulation toolkit originating from Simbios, the NIH National Center for Physics-Based Simulation of Biological Structures at Stanford, funded under the NIH Roadmap for Medical Research, grant U54 GM0729...
# -*- coding: utf-8 -*- # file: aen.py # author: songyouwei <<EMAIL>> # Copyright (C) 2018. All Rights Reserved. from layers.dynamic_rnn import DynamicLSTM from layers.squeeze_embedding import SqueezeEmbedding from layers.attention import Attention, NoQueryAttention from layers.point_wise_feed_forward import Positionw...
# coding: utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import copy import json import warnings import iso8601 from werkzeug import LocalProxy import leancloud from leancloud import utils from leancloud import client from leancloud imp...
#------------------------------------------------------------------------------- # Name: input_output.py # Purpose: Functions for controlling NIRAMS II input/output. # # Author: <NAME> # # Created: 17/01/2012 # Copyright: (c) <NAME> and JHI, 2012 # Licence: <your licence> #--------------------...
# -*- coding: utf-8 -*- # Copyright 2015 <NAME> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
""" MudPi Importer Loads built in extensions and custom extensions dynamically to the system. Data is cached to avoid multiple imports of the same extension. Extensions will be loaded at runtime based on configs with each root config key being the extension namespace. """ import os import sys im...
############################################################################# # # Author: <NAME> , <NAME> # # Copyright: <NAME> TSRI 2000 # ############################################################################# """ Module implementing classes to provide documentation on the application """ # # # $Id: helpComm...
""" 测试检测器的精度 """ import torch import json import time import os, cv2 import tqdm import numpy as np from torchvision.transforms import transforms as cvtransforms from torch.utils.data.dataloader import DataLoader from lib.models.model_factory import create_model, load_model from lib.datasets.jde import OriginDetDatase...
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) from future.builtins import * # NOQA import math import unittest import warnings import numpy as np from obspy.geodetics import (calc_vincenty_inverse, degrees2kilometers, ...
from .osCommands import * from .xo import * import platform, sys import subprocess ''' # pip install anything # xo.cmd("python3.7 -m pip install xo-gd") # import from many folder # import sys; # sys.path.append('/path/to/application/app/folder'); import filename # xo.cmd("python3.7 -m pip install xo-gd") ''' def ope...
#!/usr/bin/python """ imgdiff by <NAME> <<EMAIL>> Released under the MIT licence. """ import optparse import os import shutil import subprocess import sys import tempfile import time # There are two ways PIL used to be packaged try: from PIL import Image, ImageChops, ImageDraw, ImageFilter except ImportError: ...
#!/usr/bin/env python import bz2 import numpy as np import numba import zstandard as zstd # pip install zstandard from python import dtypes # ================================================================ Funcs def nbits_cost(diffs, signed=True): """ >>> [nbits_cost(i) for i in [0, 1, 2, 3, 4, 5, 7, 8,...
#!/usr/bin/env python # -*- coding: mbcs -*- """This module is used for saving questions (together with 3 answers) to a dummy db (namely a json file "questions.json") and then answering those questions. It's a prime example of how to hard-code stuff. Everything here is in romanian, and spelt wrong, so good luck! :) A...
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generates C++ source files from a mojom.Module.""" import datetime import mojom import mojom_pack import os import re import sys from string import ...
#----------------------------------------------------------------------------- # Copyright (c) 2005-2015, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
# Communicating with Benchtop DSA8300 (Tektronix Sampling Scope) from colorama import init, Fore, Back init(autoreset=True) #to convert termcolor to wins color from os.path import basename as bs mdlname = bs(__file__).split('.')[0] # module's name e.g. PSG import visa from pyqum.instrument.logger import address, set_...
''' Created on 20 Apr 2012 @author: <NAME>, STFC Application Engineering Group ''' from __future__ import print_function from xml.etree.ElementInclude import ElementTree from xml.etree.ElementTree import ParseError class LpdAsicCommandSequenceError(Exception): def __init__(self, msg): self.msg = ms...
'''Basic, limited Panasonic protocol, suitable for some Panasonic displays, will be expaned over time.''' # taken from page 18: # - https://bizpartner.panasonic.net/public/system/files/files/fields/field_file/psd/2014/11/20/lf6_lf60u_manual_en_1416462484.pdf # - https://panasonic.biz/cns/prodisplays/support/commandlis...
''' ''' import os from typing import SupportsBytes from numpy.lib.shape_base import column_stack import pandas as pd import numpy as np import datetime as dt from collections import defaultdict from lifelines import KaplanMeierFitter class KM_analysis: def __init__(self, survival_df): ''' ...
# The Leginon software is Copyright 2004 # The Scripps Research Institute, La Jolla, CA # For terms of the license agreement # see http://ami.scripps.edu/software/leginon-license # # $Source: /ami/sw/cvsroot/pyleginon/gui/wx/Logging.py,v $ # $Revision: 1.14 $ # $Name: not supported by cvs2svn $ # $Date: 2005-11-23 00:0...
import argparse import os from tqdm import tqdm import torch import numpy as np from numpy import linalg import matplotlib.pyplot as plt import cv2 from sklearn.metrics import auc from sklearn.metrics import precision_recall_curve from sklearn.metrics import average_precision_score from collections import defaultdict, ...
""" # Quality Control for RAW Volumes Originally, this tool extracted a slice, the n<sup>th</sup> index from a 16-bit unsigned integer `.raw` volume. By default, it will extract the midslice, the middle most slice from the volume from a side view. It has now evolved to also include projections from a top-view and side...
import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import json import seaborn as sns import datetime import numpy as np import pandas as pd from glob import glob import os import sys import pytz from IPython import embed; from opendrift.readers.reader_current_from_drifter import Reader as DrifterRe...
from PIL import Image, ImageDraw, ImageChops from scipy.spatial import Delaunay import numpy as np import os import math import subprocess import shlex M_PI = 3.14 reduce_width = 512 reduce_height = 512 def getPixel(image, coord): i = coord[0] j = coord[1] width, height = image.size pixel = image.getpixel((max(...
#!/usr/bin/env python import numpy as np from scipy.stats import expon from LLC_Membranes.analysis import Poly_fit import mpmath from scipy.optimize import curve_fit, minimize from scipy.special import gamma, erfc def continuum_passage_time_distribution(t, x, v, D): """ The distribution of passage times for a pa...
"""Provides classes for handling API requests.""" # -*- coding: utf-8 -*- import logging import os from collections import OrderedDict from django.contrib.auth.models import User from django.db import Error, transaction from django.http import JsonResponse from django.utils.translation import ugettext as _ from rest_...
from tkinter import * from Game import Game, Agent from geometry import Point2D, Vector2D import math import random import time import os TIME_STEP = 0.5 frameCounter = 0 def round(x): if x - int(x) < .5: x = int(x) else: x = int(int(x) + 1) return x # thank you stackoverflow # https://sta...
""" Created on Mar 17, 2014 @author: tjoneslo """ import logging import math from wikistats import WikiStats from collections import OrderedDict, defaultdict from AllyGen import AllyGen from Star import UWPCodes class Populations(object): def __init__(self): self.code = "" self.homeworlds = [] ...
from __future__ import absolute_import from __future__ import unicode_literals from __future__ import division from __future__ import print_function import argparse import os from os.path import join from collections import defaultdict as dd import numpy as np import sklearn from torch.utils.data import Dataset import...
# -*- coding: utf-8 -*- import click import logging from pathlib import Path # from dotenv import find_dotenv, load_dotenv import requests from bs4 import BeautifulSoup import numpy as np import pandas as pd import datetime import yfinance as yf from pandas_datareader import data as pdr from flask import current_app f...
from OpenGL.GL import * import numpy as np import math import glm from PIL import Image import sys, os ############################################## ############# FUNÇÕES DE ARQUIVO ############# ############################################## # Função para carregar modelo a partir de arquivo .obj def load_model_fro...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F # sys.path.append(os.path.join(os.getcwd(), '/torch_mesh_isect/build/lib.linux-x86_64-3.6')) device = torch.device("cuda" if torch.cuda.is_...
''' _ _ _ ____ _ _ | | __ _ _ __ ___ | |__ __| | __ _| __ ) ___ ___ | |_| |__ | | / _` | '_ ` _ \| '_ \ / _` |/ _` | _ \ / _ \ / _ \| __| '_ \ | |__| (_| | | | | | | |_) | (_| | (_| | |_) | (_) | (_) | |_| | | | |_____\__,_|_| |_| |_|_.__/ \__,_|\__,_|___...
"""Parse intermediary files for further processing.""" import csv from datetime import datetime import glob import json import logging import os import re from typing import \ Dict, \ Generator, \ IO, \ List, \ Mapping, \ Sequence, \ Set, \ Text, \ Tuple, \ Union __log__ = log...
# --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: percent # format_version: '1.3' # jupytext_version: 1.6.0 # kernelspec: # display_name: Python 3 # name: python3 # --- # %% [markdown] id="AnSIHhcU7GS2" # # 1: IMPORT & EXPLORE DATA...
import requests from conditional import conditional from alive_progress import alive_bar import time import json from os import path from timeit import default_timer as timer SCACHE = {} OCACHE = {} keepalivemins = 10 setdbpath = "db.json" SETDB = {} def loadSetDB(): global SETDB with open(setdbpath, 'r') ...
import sjoert from sjoert import sync import numpy as np from numpy import pi, cos, sin, sqrt import scipy.interpolate from tqdm import tqdm import logging fit_all = True # ----- i_obs = 60/180.*pi gamma_max = 1e4 gamma_min=2 p_electron = 3 eps_e = 11/6 # this is actually eps_e/eps_B # some defaults min_z = 100...
import plotly import plotly.graph_objs as go from plotly.subplots import make_subplots import json import pandas as pd import numpy as np def prepare_activity_stats(senders): e = senders[senders.sender.str.contains('rosatom-academy.ru')].copy() off_time = e[(e.dat.dt.hour<7) | (e.dat.dt.hour>19)].groupby(by=['...
""" Sync It V0.60 - 24th Sept 2020 Windows only. Freeware. Sync two folders from systray By <NAME>. ----------------------------------------------- Even though I have tested and used this program on my Windows 7 64bit every day for weeks without a hitch I have to remind you that if you use this program, it's...
"""integration test for loanpy.loanfinder.py (2.0 BETA) for pytest 7.1.1""" from inspect import ismethod from os import remove from pathlib import Path from gensim.models import word2vec from gensim.test.utils import common_texts, get_tmpfile from pandas import DataFrame, Series, read_csv from pandas.testing import a...
import random from hashlib import md5 import string import re import amigo_types def genHash(a): return 'a' + md5(a.encode('utf-8')).hexdigest()[:8] class Register: regs = { # '%rax': [None, 0], '%rbx': [None, 0], # '%rcx': [None, 0], # '%rdx': [None, 0], # '%r8' : [N...
import inspect import cv2 import numpy as np from numpy import random """ Implementation of policies learned in AutoAugmentation. See: <NAME>, Learning Data Augmentation Strategies for Object Detection. According to paper: The most commonly used operation in good policies is Rotate. Two other operations that...
""" Test on ethane_dehydrogenation system ODEs """ import os import time import sys # temporary add the project path project_path = os.path.abspath(os.path.join(os.getcwd(), '../../../..')) sys.path.insert(0, project_path) import matplotlib import matplotlib.pyplot as plt import numpy as np import pmutt.constants as c...
# -*- coding: utf-8 -*- """ University of Kuopio ==================== Defines the objects implementing support for the *University of Kuopio* datasets loading: - :class:`colour_datasets.loaders.DatasetLoader_KuopioUniversity` - :func:`colour_datasets.loaders.build_KuopioUniversity` Notes ---- - The various *Un...
# ============================================================================== # Docs # ============================================================================== """Poincare method for periodic orbits implemented.""" # ============================================================================== # Imports # =...
from typing import Iterable, Callable from django.core.paginator import Paginator, Page from django.utils.safestring import mark_safe from django_magnificent_messages.storage.base import BaseStorage, Message class MessageError(Exception): MESSAGE_TEMPLATE = "" def __init__(self, message_pk): self.m...
""" MesoNet Authors: <NAME> and <NAME>, <NAME> https://github.com/bf777/MesoNet Licensed under the Creative Commons Attribution 4.0 International License (see LICENSE for details) """ import yaml import glob import re import os from os.path import join from sys import platform import scipy.io as sio import cv2 import n...
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. from collections import defaultdict from copy import deepcopy import glob import os import os.path as osp from typing import Dict, List, Optional, Tuple import cv2 import matplotlib.pyplot as plt import motmetrics as mm impo...
import os import json import numpy as np from matplotlib import cm from matplotlib import pyplot as plt from scipy.stats.stats import linregress from gage_list import EXCLUDE_STATIONS SYSTEM_STATIONS = ['06109500', '06329500', '09180500', '09315000', '09379500', '12396500', '13269000', '13317000']...
from os.path import join, exists from pathlib import Path from typing import Callable, Dict, List, Optional, Tuple from tqdm import tqdm import torch import numpy as np import tifffile as tif import typer as tpr from PIL import Image from dataset.prepare import DatasetSplits from dataset.prepare.utils import makedirs,...
from abc import ABC, abstractmethod import networkx as nx import ndex2 import numpy as np import igraph as ig from scipy.sparse import diags, coo_matrix, csr_matrix import pandas as pd import mygene import matplotlib as mpl import matplotlib.pyplot as plt import pickle from py2cytoscape.data.cyrest_client import CyRest...
# -*- coding: utf-8 -*- """ study Jzazbz color space """ # import standard libraries import os # import third-party libraries import numpy as np from colour.utilities import tstack from numpy.lib.type_check import nan_to_num from scipy import linalg # import my libraries # information __author__ = '<NAME>' __copyri...
import os import sys import matplotlib.pyplot as plt import numpy as np import torch import time from torch import nn import pickle import tensorflow as tf from networkTF import TensorFlowModel def getH(epsPlastic): H = 500e6 * (0.05 + epsPlastic) ** 0.2 return H def get_dHdEps(epsPlastic): dHdEps = -50...
from flask import Flask, request, jsonify from chatterbox import * import girlsfrontline_core_python as gfl_core import re import logging import json import urllib import pymysql from logging_db import MySQLHandler from ranking_poll import EventRankPoll import static_resp as rp import kakao_vision as kv application =...
import argparse import glob import json import os import pickle import random import shutil import sys from collections import OrderedDict from itertools import combinations import numpy as np from scipy.special import comb from tqdm import tqdm def parse_args(): parser = argparse.ArgumentParser(description='Pre...
# -*- coding: utf-8 -*- # @Time : 2019/7/13 # @Author : Godder # @Github : https://github.com/WangGodder import numpy as np import torch from torch.autograd import Variable from torch.optim import SGD from tqdm import tqdm from torch.utils.data import DataLoader from torchcmh.models.SCAHN import resnet18, resnet34...
#!/usr/bin/env python3 # Copyright (c) 2019. <NAME> - https://keybase.io/blackburnhax, Apache License, Version 2.0. # 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...
"""Common classes shared between Study and Trial.""" import collections from collections import abc from typing import DefaultDict, Dict, overload from typing import Iterable, List, Optional, Tuple, TypeVar, Union, Type import attr from google.protobuf import any_pb2 from google.protobuf.message import Message M = T...
""" Views related to the Custom Courses feature. """ import csv import datetime import functools import json import logging from copy import deepcopy import pytz import six from ccx_keys.locator import CCXLocator from django.conf import settings from django.contrib import messages from django.contrib.auth.models imp...
import numpy as np from scipy.integrate import odeint from scipy.integrate import ode from scipy.special import erf from scipy.integrate import quad, dblquad from scipy.interpolate import interp1d,interp2d,RectBivariateSpline, griddata import time import HaloFeedback import argparse import os #Parse the arguments! ...
# -*- coding: utf-8 -*- # Copyright 2013 UNED # # 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...
import logging from rest_framework import generics from rest_framework.views import APIView from rest_framework.response import Response from rest_framework.renderers import JSONRenderer from .models import vsw_reading, vsw_strategy from skeleton.models import Farm, Site, Reading, SeasonStartEnd, SeasonalSoilStat, Doc...
from itertools import chain from itertools import groupby from typing import Dict from typing import List from typing import Tuple from typing import Union import oedialect # noqa: F401 import open_FRED.cli as ofr import pandas as pd import sqlalchemy as sqla from geoalchemy2.elements import WKTElement as WKTE from g...
#!/usr/bin/python # -*- coding: utf-8 -*- """Script to extract information about the supported data formats.""" from __future__ import print_function from __future__ import unicode_literals import argparse import collections import importlib import inspect import pkgutil import sys from urllib import parse as urllib...
''' Author: <NAME> Date: 2021-09-07 18:12:53 LastEditTime: 2021-09-08 10:22:25 LastEditors: Please set LastEditors Description: In User Settings Edit FilePath: /sensat-tools/helper_image.py ''' import cv2 import math import numpy as np import os from point_EDA_31 import SensatUrbanEDA as SU import matplotlib.pyplot as...
"""Accounts Views.""" # Utils from datetime import datetime # Django from django.contrib.auth import ( REDIRECT_FIELD_NAME, authenticate, login as auth_login, logout as auth_logout ) from django.conf import settings from django.core.cache import cache from django.urls import reverse_lazy, reverse from dja...
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.desk.reportview import build_match_conditions from collections import defaultdict from frappe.utils import getdat...
#!/usr/bin/env python3 """This script computes Krippendorff's alpha, a measure of inter-annotator agreement (a.k.a. IAA or inter-annotator reliability). The formulation of IAA here considers textual annotations at a character level, so the expected input are parallel corpora with textual annotations where labels are...
# # The MIT License (MIT) # # Copyright (c) 2015 <NAME> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, ...
"""Matchzoo toolkit for text pre-processing.""" import re import abc import typing import collections import nltk import numpy as np match_punc = re.compile(r'[^\w\s]') def list_available(): """List all available units.""" return ProcessorUnit.__subclasses__() class ProcessorUnit(metaclass=abc.ABCMeta): ...
import alembic.command import alembic.config from alembic.runtime.migration import MigrationContext from alembic.script import ScriptDirectory import binascii import enum import hashlib import hmac import json import logging import os import prometheus_client import shutil from sqlalchemy import Column, ForeignKey, Ind...
import enum import hashlib import typing import weakref from functools import total_ordering from checkmerge.ir.metadata import Location, Metadata, Range class DependencyType(enum.Enum): """ A type of dependency. """ #: Control dependency: the target conditionally guards the execution of the source. ...
"""Implementation of SYMPAIS with RMH kernel and HMC kernel.""" import functools from typing import Callable, Optional from absl import logging import jax from jax import lax from jax import random import jax.numpy as np from sympais import constraint from sympais import distributions from sympais import initializer...
""" MIT License Copyright (c) 2019-2021 naoTimesdev 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, publi...