text
stringlengths
6.04k
39.5k
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
import os, sys, time, pickle from pdkb.actions import * from pdkb.problems import * from pdkb.rml import parse_rml, Literal from pdkb.kd45 import PDKB, project from pdkb.pddl.grounder import GroundProblem from pdkb.test.utils import read_file, write_file, run_command, parse_output_ipc from sympy.logic.boolalg import ...
# coding: utf-8 # In[71]: import random as random import numpy as np import matplotlib.pyplot as plt import pandas as pd from math import pi from sklearn.ensemble import AdaBoostClassifier from sklearn.tree import DecisionTreeClassifier #데이터 생성 단계입니다. (x*sin(x), x*cos(x)) 형태의 점들을 그러줍니다. #그 점들에 약...
# -*- coding: utf-8 -*- import os import sys # ensure `tests` directory path is on top of Python's module search filedir = os.path.dirname(__file__) sys.path.insert(0, filedir) while filedir in sys.path[1:]: sys.path.pop(sys.path.index(filedir)) # avoid duplication import pytest import numpy as np from unittest ...
# -*- coding: utf-8 -*- import os import argparse from lxml import etree, html from lxml.html.clean import Cleaner import fnmatch # To match files by pattern import regex as re # Maybe not necessary import time import dateparser import json def timeit(method): """Time methods.""" def timed(*args, **kw): ...
#!/usr/bin/env python # Master AG4395 measurement script # <NAME> - 2015 # Standard library imports import AG4395A as inst import matplotlib.pyplot as plt import os import sys import time import argparse # Neccesary external libraries import yaml import numpy as np def readParams(paramFile): # Function to read ...
#!/usr/bin/env python # -*- coding: UTF-8 -*- import os,sys,re,time,urllib.parse,ntpath,zipfile,gzip,subprocess from urllib.request import Request, urlopen, urlretrieve help = ''' Entre com um emulador suportado: Windows : Snes9K Snes9x zsnesw Kega_F...
# coding=UTF-8 import pprint import os.path as PATH import argparse import dicttoxml import xml.etree.ElementTree as ET import xml.dom.minidom as DOM from multiprocessing import Process,Queue from time import time def is_integer(s): try: int(s) return True except ValueError: return Fals...
import torch, sys, os, argparse sys.path.append('./modeling') import embedding_models as em import data_utils, model_utils, datasets import model_layers as ml import torch.optim as optim import torch.nn as nn import json import pandas as pd from itertools import chain SEED = 0 NUM_GPUS = 1 use_cuda = False ENC_TYPE=...
from tensorflow import keras import tensorflow as tf import os import argparse import numpy as np import matplotlib.pyplot as plt from plotting import plot_pred_dots import scipy.sparse # current working directory if(os.getcwd()[-1] == '/'): cwd = os.getcwd() else: cwd = os.getcwd() + '/' MODEL_PATH = cwd + '...
# Copyright 2021 <NAME> # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistr...
from enum import Enum from torch.functional import Tensor import wandb import torch.nn.functional as F import torchvision from torch import nn import torch import numpy as np import pytorch_lightning as pl from torchmetrics.functional import accuracy, hamming_distance, f1 from pytorch_lightning.utilities.distributed ...
# coding=utf-8 import csv import os import modeling import optimization import tokenization import tensorflow as tf flags = tf.flags FLAGS = flags.FLAGS ## Required parameters flags.DEFINE_string( "data_dir", "./data/lcqmc", "The input data dir. Should contain the .tsv files (or other data files) " "for...
#imports import pandas as pd import numpy as np import matplotlib.pyplot as plt import requests from scipy.integrate import solve_ivp import datetime from copy import deepcopy from scipy.stats import norm from scipy.optimize import differential_evolution import pdb from IPython.core.display import HTML from math import...
""" This Python module allows you to synchronize a whole session worth of physiological data to the session images, so the physiological files will be matched to the corresponding image files and named accordingly. The module is file type agnostic, so it can be used for AcqKnowledge files, Eye-link files (.edf), etc. ...
#!/bin/python3 from math import sqrt class vec3: x = y = z = 0. def __init__(self, x = [0.,0.,0.]): self.x = float(x[0]); self.y = float(x[1]); self.z = float(x[2]) def Distance(self, v): x = self.x - v.x; y = self.y - v.y; z = self.z - v.z return sqrt(x*x+y*y+z*z) def __add__(self,other): ret...
# -*- coding: utf-8 -*- """ Created on Wed May 24 11:30:31 2017 @author: pudutta """ from __future__ import absolute_import, division, print_function import nltk from nltk.corpus import brown from nltk.corpus import stopwords import codecs import glob import multiprocessing #import gensim from gensim.mod...
from os import abort from flask import Blueprint, render_template, request, flash, jsonify, redirect, url_for, send_file from flask_login import login_required, current_user from flask.globals import session import json #from app import app from classes.User import User # from . import getSuggestedMeal, normal_user_vie...
# #!/usr/bin/env python3 import wx # import images import time import threading from threading import Thread from multiprocessing.pool import ThreadPool from wx.lib.pubsub import pub import RPi.GPIO as GPIO # GPIO PINS # inputs BUTTON = 40 PHOTO_TRANSISTOR = 37 # outputs RELAY = 38 LED = 12 GPIO.cleanup() GPIO.setmo...
################################################################################ # Module: setup_sp.py # Description: this module contains functions to set up sample points stats within study regions ################################################################################ import os import geopandas as gpd im...
import logging import random from overrides import overrides from checkCollision import * from helpers import * from planners.particleFilterSampler import (ENERGY_START, RANDOM_RESTART_PARTICLES_ENERGY_UNDER, Particle, ParticleFil...
import time,json,datetime from django.db import transaction from fad.interface import get_newest_fil_index from master_overview.interface import OverViewBase from master_overview.models import MinerApplyTag from master_overview.serializer import MinerApplyTagSerializer, MinerTagQuerySerializer, \ MinerApplyTagSetSe...
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function import argparse import numpy as np import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from scipy import integrate from scipy import special from nose.tools import assert_raises import free...
import numpy as np import time import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from torch.autograd import Variable class ConvInputModel(nn.Module): def __init__(self): super(ConvInputModel, self).__init__() self.conv1 = nn.Conv2d(3, 24, 3, s...
import os import time import argparse import math import random import wandb import torch from distributed import apply_gradient_allreduce import torch.distributed as dist from torch.utils.data.distributed import DistributedSampler from torch.utils.data import DataLoader from model import load_model from data_utils i...
import warnings from .general import * import os import sys from sklearn.model_selection import cross_val_score from sklearn.model_selection import train_test_split from sklearn.neural_network import MLPClassifier from sklearn.neighbors import KNeighborsClassifier from sklearn.svm import SVC from sklearn.naive_bayes i...
# Copyright 2018 The TensorFlow Probability 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 o...
"""Graph utility functions.""" import itertools from collections import Counter import geopandas as gpd import networkx as nx import numpy as np import pandas as pd from shapely.geometry import LineString from shapely.geometry import Point from . import distance from . import utils def graph_to_gdfs(G, nodes=True,...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import ressources.utils as ut def inv(a:int, m:int, Verbose:bool=False): """ Returns inverse of a mod m. If a and m are prime to each other, then there is an a^(-1) such that a^(-1) * a is congruent to 1 mod m. """ if ut.euclid(a, m) != 1 : ...
# coding=utf-8 # Copyright 2019-present, Facebook, Inc and the HuggingFace Inc. team. # # 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...
#!/usr/bin/env python import atexit import copy import logging import os import shutil import subprocess import sys import tempfile import warnings from argparse import ArgumentParser import django from django.apps import apps from django.conf import settings from django.db import connection, connections from django.t...
import asyncio import functools import itertools import math import random import discord import youtube_dl from async_timeout import timeout from discord.ext import commands # Silence useless bug reports messages youtube_dl.utils.bug_reports_message = lambda: "" class VoiceError(Exception): pass class YTDLEr...
""" Support for Xiaomi Mi Home Air Conditioner Companion (AC Partner) For more details about this platform, please refer to the documentation https://home-assistant.io/components/climate.xiaomi_miio """ import enum import logging import asyncio from functools import partial from datetime import timedelta import volupt...
"""Logic for representing operators in state in various bases. TODO: * Get represent working with continuous hilbert spaces. * Document default basis functionality. """ from sympy import Add, Expr, I, integrate, Mul, Pow from sympy.physics.quantum.dagger import Dagger from sympy.physics.quantum.commutator import Com...
import numpy as np import utils.match as mtc from rot2.new_serial_modules import smooth merger_props = [("nstep", '<i8'), ("nout", '<i8'), ("id_p", '<i8'), ("idx_p", '<i8'), ("id_s", '<i8'), ("idx_s", '<i8'), ("m_s", '<f8')...
"User display, register, login/logout, etc endpoints." import http.client import json import re import flask import flask_mail from werkzeug.security import check_password_hash, generate_password_hash from datagraphics import constants from datagraphics import utils from datagraphics.datasets import (count_datasets_...
import math import random import warnings from typing import Dict, List, Optional, Sequence, Union import torch from torch.utils.data.dataloader import DataLoader from lhotse.cut import AnyCut, CutSet from lhotse.utils import Seconds, compute_num_frames EPS = 1e-8 class SpeechRecognitionDataset(torch.utils.data.Da...
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import pathlib import pickle from typing import Iterable, List, Optional, Tuple, Union import numpy as np import torch im...
"""OpenStreetMap data model.""" from collections import Counter, defaultdict # Number of significant decimal digits. 0 to cancel rounding. With a value # greater than 7, JOSM give duplicated points errors COOR_DIGITS = 0 class Osm(object): """Class to implement a OSM data set.""" def __init__(self, upload="...
import logging import re import time from typing import Any, Sequence, Union import numpy as np from pyvisa import VisaIOError, errors from qcodes import ArrayParameter, ChannelList, InstrumentChannel, VisaInstrument from qcodes.utils.validators import Bool, Enum, Ints, Numbers logger = logging.getLogger() class PN...
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Name: Cody Ngrok Client Service # Author: Icy(<EMAIL>) # OS: Linux import time, socket, threading, os, sys, json def init(): # initializer global LOGGER, KEY, STOP, NGROK_SERVICE paths = ("./bin/","./cache/","./configs/","./logs/") for i in paths: path_fixer(i) tr...
import asyncio import copy import getpass import logging import os import time import uuid import warnings import yaml import dask import dask.distributed import distributed.security from distributed.deploy import SpecCluster, ProcessInterface from distributed.utils import Log, Logs import kubernetes_asyncio as kubern...
# Copyright 2016 by <NAME> Technologies Corp. All Rights Reserved. ''' Utilities for creating a basic channel configuration for testing. ''' from QGL.ChannelLibraries import EdgeFactory, MeasFactory, QubitFactory from QGL import ChannelLibraries from QGL.Channels import Edge, Measurement from QGL.PulseSequencer impor...
# coding=utf-8 import pandas as pd import random from DataProcess.util_time import inteval from model.util import * ''' 功能:划分train/valid/test data train data: target item 1个 dpp_target_items 总item的20%个 item hist:200个, 不够除去target item补0够取前200 test/valid data : target item 1个 dpp_target_items 总item的20%个 item...
import textwrap import argparse import pkg_resources import hashlib import logging.config import platform import subprocess import urllib.request import urllib.error import uuid import hashlib from .API import get_api from .database import * from guessit import guessit from terminaltables import AsciiTable from tqdm im...
from __future__ import print_function openatv_like = True try: # This works in OpenATV (and similar code bases) but fails on OpenPLi. # The particular import might not be relevant for the actual plugin. from Screens.EpgSelection import SingleEPG except: openatv_like = False # Quick fix for Vix try: import b...
# plugin/plugin_base.py # Copyright (C) 2005-2018 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Testing extensions. this module is designed to work as a testing-framework...
import numpy as np from numba import njit as jit from numpy import cross, pi from numpy.linalg import norm from poliastro.core.hyper import hyp2f1b from poliastro.core.stumpff import c2, c3 @jit def vallado(k, r0, r, tof, short, numiter, rtol): r"""Solves the Lambert's problem. The algorithm returns the ini...
#!/usr/bin/env python3 # Copyright (c) Meta Platforms, Inc. and affiliates. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. import copy from collections import OrderedDict from dataclasses import dataclass from ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ @author: <NAME> This file contains functions to fetch data from the Domestic Load Research SQL Server database. It must be run from a server with a DLR database installation. The following functions are defined: getObs getProfileID getMetaPro...
# This file is part of the standard library of Pycopy project, minimalist # and resource-efficient Python implementation. # # https://github.com/pfalcon/pycopy # https://github.com/pfalcon/pycopy-lib # # The MIT License (MIT) # # Copyright (c) 2019-2020 <NAME> # Copyright (c) 2016-2019 <NAME> # # Permission is hereby g...
import os import json from tqdm import tqdm import pickle import numpy as np import json from tqdm import tqdm import os from sklearn import metrics import matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.datasets.samples_generator import make_blobs import torch from numpy import li...
#***************************************************************************** # Distributed under the terms of the GNU General Public License (GPL) # # This code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FO...
import io import os import os.path import sys import runpy import subprocess import re import sysconfig import skbuild from skbuild import cmaker def main(): os.chdir(os.path.dirname(os.path.abspath(__file__))) CI_BUILD = os.environ.get("CI_BUILD", "False") is_CI_build = True if CI_BUILD ...
"""Ansible runtime environment maanger.""" import importlib import json import logging import os import pathlib import re import shutil import subprocess import tempfile from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Union import packaging import subprocess_tee from ansible_compat.config impor...
import datetime, time, re from datetime import timezone from pathlib import PurePath, Path class HTMLReport: TEMPLATE_DIR = "htmlreport-templates" TEXT_EN = { 'unknown_value': 'N/A' } DEFAULT_TEXT = TEXT_EN def __init__(self, output_directory): # create project directory ...
#!/usr/bin/env python # # VM Backup extension # # Copyright 2014 Microsoft 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 # # U...
""" This implementation is based on https://github.com/pytorch/vision/blob/master/torchvision/models/inception.py Final fully-connected layer and auxiliary classifier are removed """ # Built-in from collections import OrderedDict import warnings # Libs import torch import torch.nn as nn import torch.nn.functional as ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Author: <NAME> <<EMAIL>> import os from lxml import etree import pytest from discoursegraphs import get_span, get_text from discoursegraphs.corpora import pcc from discoursegraphs.readwrite.tiger import TigerSentenceGraph import discoursegraphs as dg """ This module ...
# -*- coding: utf-8 -*- """ Contains utility functions and classes for Runners. """ from __future__ import absolute_import from bisect import bisect import glob import os.path import re import sys from six import string_types from behave import parser from behave.exception import \ FileNotFoundError, InvalidFileLo...
import collections import os import random import time from tqdm import tqdm import numpy as np import torch import torch.nn as nn from torch.utils.data import DataLoader from param import args if args.tsv: from features.vilio.fts_tsv.hm_pretrain_data_tsv import InputExample, LXMERTDataset, LXMERTTorchDataset el...
""" //////////////////////////////////////////////////////////////////////////// ///// Between The Math & Science - The Game ///// ///// Version: 1.1 ///// ///// <NAME> ///// ...
import re from collections import Counter import pandas as pd import plotly.express as px import plotly.graph_objs as go from plotly.offline import plot show_mode = False covid = pd.read_csv('processdata/data/covid19_tweets.csv') covid['country_name'] = covid['user_location'].str.split(',').str[-1] covid['only_date'...
# Copyright 2018, The TensorFlow Federated 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 o...
import time from datetime import datetime, timedelta from unittest import mock from unittest.mock import Mock, mock_open, patch import pytest from django.conf import settings from django.contrib import admin from django.contrib.admin.models import ADDITION, CHANGE, LogEntry from django.contrib.auth.models import User ...
# Copyright (C) 2020 Georgia Tech Center for Experimental Research in Computer # Systems import argparse import datetime import os import re import subprocess import threading import time import socket import jinja2 import yaml import paramiko from ssh_client import SSHClient ### Global variables DOCKER_HUB_USERN...
#!/usr/bin/python3 '''home-control: smart device and scene controller ---------- usage Command-line usage: hc [--flags] target [command] Library usage: hc.control(target: str, command: str='on', settings: dict={}) -> List[str] "target" is the name of a device or scene to send a command to. The default command i...
import subprocess import datetime import os import sys import time import random import speech_recognition as sr import face_recognition import cv2 import numpy as np import pandas from func_timeout import func_timeout, FunctionTimedOut import pyttsx3 from gtts import gTTS import pyglet from pytube import YouTube...
# -*- coding: utf-8 -*- """ Defines a variety of Pygments lexers for highlighting IPython code. This includes: IPythonLexer IPython3Lexer Lexers for pure IPython (python + magic/shell commands) IPythonPartialTracebackLexer IPythonTracebackLexer Supports 2.x and 3.x via keyword `python...
from __future__ import division import tensorflow as tf import tensorflow.contrib.slim as slim from tensorflow.contrib.layers.python.layers import utils import numpy as np from config import cfg from euler_to_rotation import yaw_to_rotation # Range of disparity/inverse depth values DISP_SCALING = 10 MIN_DISP = 0.01 d...
"""General utilities to train AutoML models.""" # 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 requi...
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # 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 a...
# pylint: disable=too-few-public-methods,too-many-arguments,too-many-instance-attributes import random from collections import defaultdict from dataclasses import dataclass, field from enum import Enum from random import Random import networkx from eth_utils import to_hex from raiden.constants import ( EMPTY_SECR...
""" Definitions for geographic coordinate systems """ #----------------------------------------------------------------------------- # Copyright (c) 2013, yt Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this softwar...
#!/usr/bin/env python import argparse from collections import defaultdict import logging, shutil import os from subprocess import Popen import re from datetime import datetime import sys import pandas as pd import numpy as np from sistr.misc.reduce_to_centroid_alleles import run_allele_reduction from sistr.sistr_cmd ...
''' Created on Oct 29, 2021 @author: willg ''' PLAYER_TABLE_NAMES = ["fc", "pid", "player_url"] RACE_TABLE_NAMES = ["race_id", "rxx", "time_added", "match_time", "race_number", "room_name", "track_name", "room_type", "cc", "region", "is_wiimmfi_race", "num_players", "first_place_time", "last_place_time", "avg_time"] T...
"""Module to provide generic utilities for other accelerometer modules.""" from collections import OrderedDict import datetime import glob import json import math import os import pandas as pd import re DAYS = ['mon', 'tue', 'wed', 'thur', 'fri', 'sat', 'sun'] TIME_SERIES_COL = 'time' def formatNum(num, decimalPlac...
from __future__ import annotations from abc import ( ABC, abstractmethod, ) import sys from typing import ( IO, TYPE_CHECKING, Iterable, Iterator, Mapping, Sequence, ) from pandas._config import get_option from pandas._typing import ( Dtype, FrameOrSeriesUnion, ) from pandas....
#!/usr/bin/env python """ crossValidate.py ================ This is used to cross validate Multi-Atlas Label Fusion using ANTs JointFusion tool Usage: - crossValidate.py -h | --help - crossValidate.py -t | --test - crossValidate.py --testSamplesize SIZE [--header] --sampleFile listFILE --workphase WORKPHASE [--w...
"""Functions for manipulating metadata constants.""" from collections import defaultdict from typing import Any, Callable, Dict, Iterable, List, Optional, Tuple, Union import numpy as np import pandas as pd from pudl.metadata.constants import PERIODS def format_errors(*errors: str, title: str = None, pydantic: bool...
#!/usr/bin/env python3 ### vcfMerger2 ### ### MIT License ### ### Copyright (c) 2018 Translational Genomics Research Institute ### ### 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 witho...
# -*- coding: utf-8 -*- # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. """ This module implements the 'scan-build' command API. To run the static analyzer against a build is done in multiple steps:...
import time import functools '''Constraint Satisfaction Routines A) class Variable This class allows one to define CSP variables. On initialization the variable object can be given a name, and an original domain of values. This list of domain values can be added but NOT deleted from. ...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import argparse import numpy as np import torch import math import pyro import pyro.distributions as dist from pyro import poutine from pyro.infer.autoguide import AutoDelta from pyro.infer import Trace_ELBO from pyro.infer.autog...
""" SoftLayer.hardware ~~~~~~~~~~~~~~~~~~ Hardware Manager/helpers :license: MIT, see LICENSE for more details. """ import socket import SoftLayer from SoftLayer.managers import ordering from SoftLayer import utils # Invalid names are ignored due to long method names and short argument names # pylint:...
from manimlib.imports import * # To watch one of these scenes, run the following: # python -m manim example_scenes.py SquareToCircle # Use -s to skip to the end and just save the final frame # Use -w to write the animation to a file # Use -o to write it to a file and open it once done # Use -n <number> to skip ahead t...
#!/usr/bin/env python3 from utils import arguments from utils import ewrapper from utils import metasploiter from utils import masscanner from utils import mkdir from utils import nmapper from utils import richard as r from utils import sqlite as db from utils import xmlparser from configparser import Confi...
"""Implementation of :class:`PolynomialRing` class. """ from __future__ import print_function, division from sympy.core.compatibility import iterable from sympy.polys.agca.modules import FreeModulePolyRing from sympy.polys.domains.characteristiczero import CharacteristicZero from sympy.polys.domains.compositedomain i...
# Copyright 2020 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...
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
# Copyright (c) 2020-2022, Universal Robots A/S, # 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 con...
import math from collections import OrderedDict import torch from torch.distributions.bernoulli import Bernoulli import torch.nn as nn import torch.nn.functional as f from torch.nn.parameter import Parameter from torch.nn import init # Inspired by: # https://github.com/jacobkimmel/pytorch_convgru # https://gist.githu...
import sys import time import multiprocessing as mp import numpy as np #sys.path.append('~/Quandarium/quandarium/') from quandarium.aux import to_nparray from quandarium.aux import to_list from quandarium.mols import ecndav from quandarium.mols import ecndav_rsopt from quandarium.mols import ecndav_ropt from quandariu...
#coding:utf8 _author__ = 'eric' from flask.ext.login import current_user from flask.ext.wtf import Form from wtforms import StringField, PasswordField, SubmitField, TextAreaField, BooleanField, SelectField, IntegerField, DateTimeField, FileField, SelectMultipleField from wtforms.validators import Email, Le...
#!/usr/bin/python """ (C) Copyright 2021-2022 Intel Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent """ from logging import getLogger import os import re from ClusterShell.NodeSet import NodeSet from command_utils_base import FormattedParameter, CommandWithParameters from command_utils import YamlCommand, ...
from __future__ import print_function, division import os import re import datetime import sys from os.path import join, isdir, isfile, dirname, abspath import pandas as pd import yaml import psycopg2 as db from nilmtk.measurement import measurement_columns from nilmtk.measurement import LEVEL_NAMES from nilmtk.datasto...
import enum import struct import ctypes import ctypes.wintypes import pymem.ressources.psapi import pymem.ressources.ntdll class LUID(ctypes.Structure): _fields_ = [ ("LowPart", ctypes.c_ulong), ("HighPart", ctypes.c_long) ] class LUID_AND_ATTRIBUTES(ctypes.Structure): _fields_ = [ ...
##################################################################################################### # PARETO was produced under the DOE Produced Water Application for Beneficial Reuse Environmental # Impact and Treatment Optimization (PARETO), and is copyright (c) 2021 by the software owners: The # Regents of the Uni...
# Copyright 2018 <NAME>. All Rights Reserved. # Licensed under MIT license. """Implements a lightweight as fast process pool.""" __author__ = '<NAME> (<EMAIL>)' import sys import atexit import time import inspect import threading import itertools from collections import deque from multiprocessing import Process, Pip...
"""Routes configuration The more specific and detailed routes should be defined first so they may take precedent over the more generic routes. For more information refer to the routes manual at http://routes.groovie.org/docs/ """ import re from pylons import config from routes.mapper import SubMapper, Mapper as _Map...