text stringlengths 8.04k 46.5k |
|---|
"""
handles parsing text and running the command specified from it
then gets the string to pass back to slack
"""
import random
import re
import json
import logging
import commands_helper
import request_helper as request
import collections
import emojify_constants
def message_text(slack_event):
"""
Gets text ... |
from middleware.connection import sqlite
from pokedex.db.tables import *
from middleware.db.tables import PokemonMoveAvailability, MoveNameChangelog
from middleware.connection.conn import session
from middleware.db.tables import PokemonTypePast, CacheItem
from middleware.util.helper import languagehelper, generationhe... |
'''
This code is responsible for training graph model with input data as single house, with leave day out for testing approach.
This runs for all configuration[Raw, OB_Compressed, OB_decompressed].
And, it runs for all the 5 houses.
It creates the graph of the house if that does not exist from csv and nodes, and ed... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#------------------------------------------------------------------------------------------#
# This file is part of Pyccel which is released under MIT License. See the LICENSE file or #
# go to https://github.com/pyccel/pyccel/blob/master/LICENSE for full license details. #... |
"""
The following is a list of the IRODS celery tasks and a brief description of
what each does:
* iadmin - perform irods administrator operations (irods admins only).
* ibun - upload/download structured (tar) files.
* ichksum - checksum one or more data-objects or collections.
* ichmod - change access permis... |
# -*- coding: utf-8 -*-
# Author: <NAME>
"""
all function needed
"""
import os
import gc
import sys
import json
import time
from typing import Union
import fitz
from PyQt5 import (
QtGui,
QtCore,
QtWidgets,
)
from PyQt5.QtWidgets import (
QInputDialog,
QHBoxLayout,
QFileDialo... |
import datetime
import json
import logging
import os
import smtplib
import unittest
import tornado
from tornado.testing import AsyncHTTPTestCase
from collections import namedtuple
from unittest.mock import Mock, patch
from sf2_webapp import config
from sf2_webapp import model
class TestHelperFunctions(unittest.Test... |
""" Fix time / date / timezone for photos in Apple Photos """
import datetime
import os
import pathlib
import sys
from functools import partial
from textwrap import dedent
import click
import pytimeparse
from cloup import (
Command,
Context,
HelpFormatter,
HelpTheme,
Style,
command,
constr... |
from functools import wraps
from pype3.type_checking import *
from functools import reduce
from collections import defaultdict
import itertools
from copy import deepcopy
from operator import itemgetter
import pprint as pp
import numpy as np
import time as tm
# from numba import njit,jit
import pickle as pk
import json ... |
# Copyright (C) 2019 NTT DATA
# 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 ... |
import os
import json
import numpy as np
from reentrancy.vec2onehot_tmp import vec2onehot
"""
S, W, C features: Node features + Edge features + Var features;
Node self property + Incoming Var + Outgoing Var + Incoming Edge + Outgoing Edge
"""
dict_AC = {"NULL": 0, "LimitedAC": 1, "NoLimit": 2}
dict_NodeName = {"NULL... |
#! /usr/bin/env python
from __future__ import division
from __future__ import print_function
import numpy as np
import math
import tqdm
def layer_dist(layers, nopores, distribution, monomers, alt_1, alt_2):
layer_distribution = np.zeros([layers*nopores], dtype=int)
if distribution == 'uniform':
fo... |
import os
from os.path import dirname, join, abspath
import sys
import datetime
import dateutil
import dateutil.tz
import numpy as np
import random
import torch
import torch.nn.functional as F
import time
from tqdm import tqdm
import shutil
import argparse
from config import cfg, cfg_from_file
from model import Mod... |
"""
A slack bot to help ESN Trondheim
"""
import os
import time
import logging
from logging.handlers import RotatingFileHandler
import traceback
from slackclient import SlackClient
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import requests
import watermark as wm
import cove... |
"""
Classes for interfacing with the KBase relation engine database, specifically with graphs that
are versioned with batch time travelling (see
https://github.com/kbaseIncubator/relation_engine_incubator/blob/master/delta_load_algorithm.md)
The classes and methods here were created for the purpose of supporting the g... |
# donate/controllers.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
from config.base import get_environment_variable
from datetime import datetime, timezone
from donate.models import DonationManager
from wevote_functions.functions import get_ip_from_headers, positive_value_exists
from wevote_functio... |
#
# This file is part of the profilerTools suite (see
# https://github.com/mssm-labmmol/profiler).
#
# Copyright (c) 2020 mssm-labmmol
#
# 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 withou... |
# coding: utf-8
"""
Module to represents whole models
"""
from typing import Dict, List
from functools import partial
import torch
import torch.nn as nn
from torch import Tensor
from joeynmt.initialization import initialize_model
from joeynmt.embeddings import Embeddings, FeatureEmbeddings
from joeynmt.encoders impo... |
# Copyright 2017 <NAME>
#
# Licensed under the modified BSD (3-clause BSD) License.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for... |
# -*- coding: utf-8 -*-
"""
Product: PyCharm
Project: Consensus
File: wb_spider
Author : ZXR
date: 2019/5/10
time: 9:26
"""
import os
import re
import random
import time
import requests
import django
import threading
from urllib import parse
from microblog.userg... |
#!/usr/bin/env python3
'''
A set of unit tests for the 'gandalf' script.
'''
import csv
import yaml
import mako
import unittest
import argparse
import datetime
from unittest import mock
import gandalf
class TestViewSet(unittest.TestCase):
'''
A set of tests for ViewSet class.
'''
def test_... |
# Copyright (c) 2021 Mira Geoscience Ltd.
#
# This file is part of geoapps.
#
# geoapps is distributed under the terms and conditions of the MIT License
# (see LICENSE file at the root of this source code package).
import re
import numpy as np
from geoh5py.io import H5Writer
from geoh5py.objects import Curve, Poi... |
"""
Helper function for computing different performance metrics
"""
import numpy as np
from sklearn.metrics import confusion_matrix
from collections import OrderedDict
import utilities.utilities as thex_utils
from thex_data.data_consts import UNDEF_CLASS, ORDERED_CLASSES
# Computing helpers
def clean_class_name(clas... |
"""
Module to generate an interactive app to visualize and train a QoE predictive model
It relies of Streamlite library for the visualization and display of widgets
"""
import os.path
from catboost import Pool, CatBoostRegressor, CatBoostClassifier
import pandas as pd
import streamlit as st
import numpy as np
import... |
"""plotting functions"""
import geopandas as gpd
import matplotlib
import numpy as np
from IPython.display import HTML
from matplotlib import animation
from matplotlib import pyplot as plt
from matplotlib.lines import Line2D
from matplotlib.patches import Patch
from mpl_toolkits.axes_grid1 import make_axes_locatable
... |
"""
Parse GFF3 file by wrapping the library :mod:`gffutils`.
Functions that call :mod:`gffutils` directly require that the filepaths be local paths that exist, because gffutils
cannot handle remote streams. Other functions accept any type of open file handle.
This module contains the default parser function :meth:`de... |
"""
pandajob.columns_config
"""
import logging
_logger = logging.getLogger('bigpandamon')
COLUMNS = {}
ORDER_COLUMNS = {}
COL_TITLES = {}
FILTERS = {}
UPDATE_COL_TITLES = {}
SUMMARY_FIELDS = {}
SMRYCOL_TITLES = {}
DEFAULT_COLDEF = {'sort': True, 'vis': True, 'c': '', 't': ''}
def skimColumns(myColumnsID, allColu... |
#!/usr/bin/env python
# Description: run job
import os
import sys
import subprocess
import time
from libpredweb import myfunc
from libpredweb import webserver_common as webcom
import glob
import hashlib
import shutil
import site
import fcntl
import json
progname = os.path.basename(sys.argv[0])
wspace = ''.join([" "]*l... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 19 12:19:43 2020
@author: neilthomson
"""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
##THIS SCRIPT WAS USED TO CALCULATE THE FI... |
from __future__ import print_function, absolute_import
import os
import sys
import time
import datetime
import argparse
import os.path as osp
import numpy as np
from PIL import Image
import pdb
import torch
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.utils.data import DataLoader
from torch.op... |
import copy
from django.db.models.fields import *
from django.db.models.fields.related import *
from django.db import models
from django.utils.datastructures import SortedDict
from django.utils.functional import curry
from django_evolution.signature import ATTRIBUTE_DEFAULTS
from django_evolution import CannotSimulat... |
#!/usr/bin/env python3
import argparse
import glob
import numpy as np
import os
import pandas as pd
import quaternion
import sys
import trimesh
import json
from tqdm import tqdm
from scipy.spatial.distance import cdist
import warnings
warnings.filterwarnings("ignore")
__dir__ = os.path.normpath(
os.path.join(
... |
#!/usr/bin/python3
import os
import sys
import time
import subprocess
import json
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as pl
import matplotlib.legend_handler as lh
from scipy import stats
from scipy.stats.stats import pearsonr
import numpy as np
from parameters import *
#
# This calculat... |
#!/usr/bin/env python
import sys,os,glob, inspect
#,re,numpy,math,pyfits,glob,shutil,glob
import optparse
import scipy as sp
import numpy as np
import pylab as pl
from scipy.interpolate import interp1d
from scipy import optimize
#from mpmath import polyroots
import time
import pprint, pickle
#from snclasses import my... |
# vim:fileencoding=UTF-8
#
# Copyright © 2015, 2016, 2017 <NAME>
#
# Licensed under the Apache License, Version 2.0 with modifications
# and the "Commons Clause" Condition, (the "License"); you may not
# use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# https://raw.g... |
import argparse
import os
import os.path as osp
import numpy as np
import torch
import torchvision
import torch.nn as nn
import torch.optim as optim
import loss
from torch.utils.data import DataLoader
from torch.autograd import Variable
import random
import pdb
import math
import sys, copy
from tqdm import tqdm
import ... |
# -*- coding: utf-8 -*-
"""Board game recommenders."""
import csv
import logging
import os
import tempfile
import sys
# from datetime import date
from typing import Any, Dict, Optional, Tuple, Type
from pytility import arg_to_iter, clear_list
import turicreate as tc
from .utils import (
condense_csv,
filt... |
"""
An experimental support for curvilinear grid.
"""
from itertools import chain
from .grid_finder import GridFinder
from .axislines import \
AxisArtistHelper, GridHelperBase
from .axis_artist import AxisArtist
from matplotlib.transforms import Affine2D, IdentityTransform
import numpy as np
from matplotlib.p... |
# Copyright (c) 2015-2017, NVIDIA CORPORATION. All rights reserved.
from __future__ import absolute_import
import os
import re
import tempfile
import flask
import werkzeug.exceptions
from .forms import GenericImageModelForm
from .job import GenericImageModelJob
from digits.pretrained_model.job import PretrainedMode... |
__copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
import asyncio
import os
import sys
import tempfile
import time
from typing import List, Callable, Optional
from typing import Tuple
import zmq
import zmq.asyncio
from .. import __default_host__
from ..enums import ... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks.
Original Paper: https://arxiv.org/abs/2005.11401
... |
#!/usr/bin/env python
#
# NOTE: this script originally comes from python-fitparse v1.0.1, and has been
# slightly corrected and improved to fit fitdecode's needs.
#
# Horrible, dirty, ugly, awful, and terrible script to export the Profile.xls
# that comes with the FIT SDK to the Python data structures in profile.py. Yo... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This python script extracts string resources, calls Google translate
# and reassembles a new strings.xml as fitted for Android projects.
# Regex for format info for android studio string and number placeholder = (%(\d+\$)?s|(%(\d+\$)?d))
# LANGUAGE CODES FOR REFERENCE... |
#! /usr/bin/env python
from collections import Counter
from sklearn.linear_model import LogisticRegression
from nltk.classify.scikitlearn import SklearnClassifier
import stanford_parse
DATA = {}
# Required files with each dataset:
# 1. file containing the sentences with the fragments flagged with '*' (nucle_frag_mod... |
# Copyright 2014 Red Hat, 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, s... |
from urllib.request import urlopen
from requests import get as requests_get
from zlib import decompress
from os import path
from os import makedirs
from re import match as re_match
from re import sub as re_sub
from json import dump
from json import load
from .yeaseq_config import WorkDir
from .yeaseq_config import NCB... |
#!/usr/bin/env python
import sys
import re
from itertools import chain, cycle, takewhile, accumulate, repeat, compress
from string import Template
from datetime import timedelta, datetime as dt
# Google Colab input:
začátek_školního_roku = '2020-09-07' #@param {type:"date"}
předěl_roku = '2021-01-01' #@param {type:... |
#!/usr/bin/env python3
"""
Copyright 2006--2007-01-21 <NAME>
http://www.paul.sladen.org/projects/compression/
You may use and distribute this code under any DFSG-compatible
license (eg. BSD, GNU GPLv2).
Stand-alone pure-Python DEFLATE (gzip) and bzip2 decoder/decompressor.
This is probably most useful for research purp... |
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
#
# Copyright(c) 2019-2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause-Clear
#
import logging
from ctypes import c_int, c_void_p, byref, c_uint32
from random import randrange
from itertools import count
import pytest
from pyocf.ocf import OcfLib
from pyocf.types.cache import Cache, CacheMode, MetadataL... |
import tokenize as tok
from io import BytesIO
from os.path import isfile
import inspect
import random
import pickle
import sys
import re
from nltk.tokenize import word_tokenize
from tqdm import tqdm
import utils.utils as utils
RESERVED_WORDS = [
"False", "class", "finally", "is", "return", "None", "continue", "f... |
from datetime import datetime
from flask import Flask, redirect, url_for, render_template, request, jsonify, send_from_directory
from flask_restx import Resource, Api
from audioop import add
from doctest import master
from email import header
from json.tool import main
from os import stat
from grpc import ServicerConte... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
#
# Copyright 2021 The NiPreps Developers <<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 ... |
import warnings
from collections import OrderedDict
from typing import Any, Dict, List, Optional, Tuple
import torch
import torch.nn.functional as F
from torch import nn, Tensor
from ...ops import boxes as box_ops
from ...transforms._presets import ObjectDetection
from ...utils import _log_api_usage_once
from .._api ... |
import re
class destination(object):
outer_space = 0
planet = 1
debris = 2
moon = 3
def convert_to_destinations(dest):
if dest is None:
return destination.outer_space
elif 'moon' in dest:
return destination.moon
elif 'tf' in dest:
return destination.debris
els... |
from __future__ import division
import re
from itertools import product
import gc
import os
import warnings
from collections import OrderedDict
import copy
from IPython import embed
import pandas as pd
import numpy as np
import dask.dataframe as dd
from qlknn.dataset.data_io import put_to_store_or_df, save_to_store, ... |
import os
import io
import logging
import json
import random
from shutil import copy2
from collections import defaultdict
from datetime import datetime
from operator import itemgetter
from xml.etree import ElementTree
from uuid import uuid4
from label_studio_converter import Converter
from label_studio.utils.misc im... |
"""
Copyright MIT and Harvey Mudd College
MIT License
Summer 2020
Lab 5B - LIDAR Wall Following
"""
########################################################################################
# Imports
########################################################################################
import sys
import cv2 as cv
i... |
"""Main module."""
import asyncio
import json
import logging
import pathlib
import re
import shutil
from asyncio.exceptions import TimeoutError
from datetime import datetime, timedelta, timezone
from typing import Callable, List, Optional
import aiocron
import pytz
from aiohttp.client_exceptions import ClientPayloadEr... |
"""Copyright 2020 ETH Zurich, <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, merge, publish, distribute, ... |
# orm/util.py
# Copyright (C) 2005-2011 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
from sqlalchemy import sql, util, event, exc as sa_exc
from sqlalchemy.sql import express... |
"""
websocket - WebSocket client library for Python
Copyright (C) 2010 <NAME>(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at ... |
import numpy as np
import sys, os
import matplotlib as mpl
import seaborn as sns
import pandas
#mpl.rcParams['font.family'] = 'stixgeneral'
from matplotlib import pyplot as plt
import matplotlib.gridspec as gridspec
from statsmodels.stats.proportion import proportion_confint
from astropy import units
from astr... |
# Copyright 2019-2021 ETH Zurich and the DaCe authors. All rights reserved.
""" Scalar to symbol promotion functionality. """
import ast
import collections
from platform import node
from dace import symbolic
from dace.sdfg.sdfg import InterstateEdge
from dace import (dtypes, nodes, sdfg as sd, data as dt, properties a... |
# -*- coding: utf-8 -*-
"""
@created on: 2/17/20,
@author: <NAME>,
@version: v0.0.1
@system name: badgod
Description:
..todo::
"""
import os
import subprocess
import glob
import librosa
import librosa.display
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pickle
import pysptk
from math... |
# ------------------------------------------------------------------------
# Copyright (c) 2021 megvii-model. All Rights Reserved.
# ------------------------------------------------------------------------
# Modified from nn.MultiheadAttention
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# ---... |
# coding:utf8
import json
import time
from datetime import datetime
from functools import wraps
from twisted import version as twistedVersion
from twisted.internet.interfaces import IHandshakeListener
from twisted.protocols.basic import LineReceiver
from twisted.python.versions import Version
from zope.interface.decla... |
from ..multiagentenv import MultiAgentEnv
import numpy as np
import pandapower as pp
from pandapower import ppException
import pandas as pd
import copy
import os
from collections import namedtuple
from .pf_res_plot import pf_res_plotly
from .voltage_barrier.voltage_barrier_backend import VoltageBarrier
def convert(d... |
# Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... |
from __future__ import absolute_import, division, print_function
import pytest
import itertools
import numpy as np
import pandas as pd
from datetime import datetime, date
from blaze.compute.core import compute, compute_up
from blaze.expr import symbol, by, exp, summary, Broadcast, join, concat
from blaze.expr impo... |
"""Test discern.preprocessing."""
import json
import pathlib
from contextlib import ExitStack as no_raise
import anndata
import numpy as np
import pandas as pd
import pytest
import scanpy as sc
import scipy
from discern import functions, io, preprocessing
def _create_csvfile(filepath, shape, sep=','):
data = p... |
# Copyright (c) 2016-present, Facebook, Inc.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# pyre-unsafe
import argparse
import json
import logging
import re
import subprocess
import sys
import traceback
from collections import defaultdi... |
# ===============================================================================
# Copyright 2013 <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/LI... |
# Copyright 2021 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 -*-
# Copyright 2010 <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 ... |
"""
Library Features:
Name: drv_model_rfarm_io_base
Author(s): <NAME> (<EMAIL>)
Date: '20190903'
Version: '1.0.0'
"""
#################################################################################
# Library
import logging
import os
import re
import numpy as np
import pandas as pd
import... |
################################################################################
# Copyright (c) 2011-2019, National Research Foundation (Square Kilometre Array)
#
# Licensed under the BSD 3-Clause License (the "License"); you may not use
# this file except in compliance with the License. You may obtain a copy
# of the... |
from __future__ import print_function
# Author: <NAME> <<EMAIL>>
#
# License: Simplified BSD
import warnings
from math import sqrt, ceil
import numpy as np
from scipy import linalg
from .mxne_debiasing import compute_bias
from ..utils import logger, verbose, sum_squared
from ..time_frequency.stft import stft_norm2, s... |
import torch.nn.functional as F
from NN.Errors import *
from NN.PyTorch.Auto.Optimizers import *
# TODO: Support 'SAME' padding
# Abstract Layers
class Layer:
LayerTiming = Timing()
def __init__(self, shape):
"""
:param shape: shape[0] = units of previous layer
shape[... |
"""Implements https://eprint.iacr.org/2020/152.
This module implements the circuit satisfiability protocol
(Protocol 8) from ``Compressed Sigma-Protocol Theory and
Practical Application to Plug & Play Secure Algorithmics''.
Example:
>>> proof = circuit_sat_prover(generators, code, x, ...)
>>> tests = ... |
# -*- coding: utf-8 -*-
# Author: <NAME> <<EMAIL>>
#
# License: BSD (3-clause)
import os.path as op
import pytest
import numpy as np
from numpy.testing import (assert_array_less, assert_allclose,
assert_array_equal)
from scipy.spatial.distance import cdist
import mne
from mne import (Source... |
# -*- coding: utf-8 -*-
import requests
import requests_cache
import re
import dateutil.parser
from datetime import datetime, timedelta
import time
from django.utils.html import strip_tags
from .base import Importer, register_importer, recur_dict
from .yso import KEYWORDS_TO_ADD_TO_AUDIENCE
from events.models import E... |
# coding=utf-8
# Copyright (c) 2016 The Pycroft Authors. See the AUTHORS file.
# This file is part of the Pycroft project and licensed under the terms of
# the Apache License, Version 2.0. See the LICENSE file for details.
from collections import defaultdict
from datetime import datetime, timedelta, date
import difflib... |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import os
from collections import defaultdict
import logging
from pathlib import Path
import numpy as np
from cxotime import CxoTime
import astropy.units as u
from astropy.table import Table, unique as table_unique
# kadi.commands.commands_v2 is also a d... |
"""Module containing the logic for the DLApp."""
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
from tkinter import messagebox
from tkinter.font import Font
from os import path
from pprint import pformat
import webbrowser
from dlapp import create_from_csv_data
from dlapp import create_fr... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2014 IBM Corporation
# Copyright 2017-2018 Lenovo
#
# 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/licens... |
# coding=utf-8
"""
Conversion of Czesl XML to Manatee
"""
import argparse
import sys
import bs4
import traceback
from czeslconv import iotools
from czeslconv.iotools import MetaFile, MetaXml
from bs4 import BeautifulSoup
from collections import defaultdict, deque
from typing import Any, Dict, Iterable, Iterator, Li... |
# 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 torch.nn as nn
import torch
import numpy as np
import os
import argparse
import time
import librosa
import pickle
import preprocess
from trainingDataset import trainingDataset
class GLU(nn.Module):
def __init__(self):
super(GLU, self).__init__()
# Custom Implementation because the Voice ... |
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 23 20:02:25 2022
@author: dv516
"""
import numpy as np
import random
import time
from Functions.test_functions import f_d2, f_d3
class INDIVIDUAL():
def __init__(self, Dim, Bound, VBound, func):
### Init the var
self.var = list()
for i in ... |
import math
import datetime
from z3 import Int, IntVector, Bool, Optimize, Implies, And, Or, If, sat
from olsq.input import input_qasm
from olsq.output import output_qasm
from olsq.device import qcdevice
import pkgutil
def collision_extracting(list_gate_qubits):
"""Extract collision relations between the gates,... |
""" Get component information from metrics file. """
import sys, os
import logging
import json
from os.path import join, dirname
import functools
from collections import defaultdict
import cStringIO as StringIO
import numpy as np
from lxml import etree
from rpl.tools.geometry.geom_utils import trans_mat_f... |
import tensorflow as tf
import tensorflow_addons as tfa
import tensorflow.keras as keras
import datetime
import os
import time
from matplotlib import pyplot as plt
from IPython import display
import numpy as np
import cv2
import librosa.display
from scipy import signal
import keras.backend as K
import argparse
os.envi... |
#!/usr/bin/python
import time
import os
import sys
import csv
import argparse
import pandas as pd
import numpy
from rdkit import Chem
from rdkit.Chem import PandasTools
from tqdm import tqdm
from functools import partial
from Graph import *
def GetProperLabel(struct,index):
return Chem.Atom.GetSymbol(Chem.Mol.GetAtom... |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: volume.py
# Purpose: Objects for representing volume, amplitude, and related
# parameters
#
# Authors: <NAME>
#
# Copyright: Copyright © 2011-2012 <NAME> and the music21 Pr... |
# encoding: utf-8
import cgi
import json
import random
from string import Template
from datetime import datetime
from utils import get_address
from zopen.apps.adapters import json2field
from zopen.edo.oc.operator.utils import getRoot
from zopen.team.utils import get_teamaware
from zopen.personselector.selected import S... |
""" Module which contains the classes related to the TreeView
"""
import wx
import json
import os
import sys
import time
from Utils.voice_synthese import my_speak
from Serial_manager.send_infos import put_cmd
class DeviceTree(wx.TreeCtrl):
"""[summary]
:param wx.TreeCtrl: Class to derivate
:type wx.Tre... |
import os
import importlib
import re
import datetime
from typing import Optional, List
import resource
import platform
import sys
import traceback
import requests
from parsel import Selector
import json
from urllib.request import urlopen
from sys import argv
from telegram import Message, Chat, Update, Bot, User
from te... |
from datetime import datetime
import numpy as np
import pandas as pd
from tqdm import tqdm
from bisect import bisect_right
import random
import pickle
from typing import Any
from bootstrapping.nsp2011 import get_households_within_habitants_range, get_data, get_data_for_voy, \
get_people_in_households
from bootstrap... |
#!/usr/bin/env python
import sys,string
import os
from pprint import pprint
import sys, os
from pprint import *
import math
import pdb
import tempfile
import argparse
import csv
import re
import uuid
import subprocess
from subprocess import call
#********************************************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.