text stringlengths 8.04k 46.5k |
|---|
from datetime import datetime
from os import listdir, name as os_name
from random import shuffle
if os_name == 'nt':
from os import add_dll_directory
add_dll_directory(r'C:\Program Files\VideoLAN\VLC')
from pynput import keyboard
from PySide2.QtCore import Qt, QTimer
from PySide2.QtGui import QIcon, QKeySeq... |
# -*- coding: utf-8 -*-
from .clf import clf
import numpy as np
def read_cd11(clf_file,amount='all'):
'''
read clf file, find CD-1.1 frames in accompanying CD-1.1 binary data file specified in clf_file,
read CD-1.1 frames from binary data file
input:
clf_file [string] path to clf... |
import inspect
import itertools
import logging
import warnings
from collections import OrderedDict
from collections.abc import Mapping
from timeit import default_timer
import nengo
import nengo.utils.numpy as npext
import numpy as np
from nengo.builder.processes import SimProcess
from nengo.exceptions import ReadonlyE... |
import sys
# Global dictionary from hash to ID[0-680]
# a = { id : State}
hash_to_id ={}
# id is the position of that state in the list
# List of all possible states
all_states = []
class State:
def __init__(self, hp, mc, ha, nas, bet, dealer_card, blackjack='F', splitted_aces='F'):
self.has_pair = ... |
"""This module contains the classes used for constructing and conducting an Experiment (most notably,
:class:`CrossValidationExperiment`). Any class contained herein whose name starts with 'Base' should not be used directly.
:class:`CrossValidationExperiment` is the preferred means of conducting one-off experimentation... |
"""
A Simple logging system 4 python based around the power of sqlite3.
Advantages over python's built in logging module:
1. With logging I've often found myself going back to the config dict constantly to increase verbosity or
remove noise and have to restart the program every time to find out whats going on. This is... |
import numpy as np
import pandas as pd
import os
import logging
import random
import pywt
import time
from multiprocessing import Pool
import sys
import tensorflow as tf
import datetime
import argparse
from sklearn.metrics import mean_squared_error, mean_absolute_error
sys.path.append("../")
from core import WANN
# co... |
#!/usr/bin/env python3
##########################################################
## <NAME> ##
## Copyright (C) 2019 <NAME>, IGTP, Spain ##
##########################################################
"""
Calls ARIBA_ software for several databases and custom dataset.
"""
## useful imports
import time
... |
import numpy as np
from crowddynamics.core.geometry import geom_to_linear_obstacles
from crowddynamics.simulation.agents import Circular, ThreeCircle, NO_TARGET, \
Agents, AgentGroup
from crowddynamics.simulation.field import Field
from crowddynamics.simulation.logic import Reset, InsideDomain, Integrator, \
Fl... |
# -*- encoding: utf-8 -*-
#
# Module Writen to OpenERP, Open Source Management Solution
#
# Copyright (c) 2013 Vauxoo - http://www.vauxoo.com/
# All Rights Reserved.
# info Vauxoo (<EMAIL>)
#
# Coded by: <NAME> (<EMAIL>)
#
# This program is free software: you can redistribute it and/or modify
# it ... |
##################################################
# Copyright (c) <NAME> [GitHub D-X-Y], 2019 #
##################################################
import os, sys, torch
import os.path as osp
import numpy as np
import torchvision.datasets as dset
import torchvision.transforms as transforms
from copy import deepcopy
fro... |
import streamlit as st
import pandas as pd
import numpy as np
import math
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import LSTM, Dense, TimeDistributed,Lambda, Dropout,BatchNormalization
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.callbacks import ModelCheckpoint... |
# Imports
import math
import numpy as np
import matplotlib.pyplot as plt
# Global Variables
HEIGHT = 10
SLOPE = 53
M = 2
DATA = {'slope_angle': SLOPE,
'h': HEIGHT,
'radius_range': np.arange(0.5,2.5*M*HEIGHT/math.tan(math.radians(SLOPE)),1.5),
'left_right': [M*HEIGHT, 1.5*M*HEIGHT],
'sl... |
"""Utilities for ChIP-seq analysis."""
import gzip
import http.client
import io
from os import PathLike
from pathlib import Path
import shutil
import subprocess
import typing
import urllib.request
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy.stats
# Type that can represent a pa... |
import copy
import datetime
import os
import re
import tempfile
import threading
import time
import girder_large_image
import histomicsui.handlers
from bson import ObjectId
from girder import logger
from girder.api import access
from girder.api.describe import Description, autoDescribeRoute
from girder.api.rest import... |
# future
from __future__ import annotations
# stdlib
import functools
import itertools
import secrets
from typing import Any
from typing import Callable
from typing import Dict
from typing import Iterable
from typing import List
from typing import Optional
from typing import Tuple
from typing import Union
# third par... |
# encoding: UTF-8
"""
Common tests that apply to multiple Attr-derived classes.
"""
import copy
from collections import namedtuple, Mapping, ItemsView, KeysView, ValuesView
from itertools import chain
import pickle
from sys import version_info
from nose.tools import (assert_equals, assert_not_equals,
... |
import sys
import logging
import configparser
import os
import subprocess
import time
from distutils.util import strtobool
from pathlib import Path
from .util import import_string
from .docker import docker
from liquid_node.jobs import Job, liquid, hoover, dokuwiki, rocketchat, \
nextcloud, codimd, ci
log = logg... |
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... |
'''
Numerical integration functions.
'''
import string
import operator
from functools import reduce
import sympy
from sympy.core.sympify import SympifyError
from pyparsing import (Literal, Group, Word, ZeroOrMore, Suppress, restOfLine,
ParseException)
from angela2.parsing.sympytools import str_... |
import string
import pytest
from dicetables import (
DiceTable,
DetailedDiceTable,
DiceRecord,
ParseError,
LimitsError,
InvalidEventsError,
DiceRecordError,
Die,
ModDie,
WeightedDie,
ModWeightedDie,
StrongDie,
Exploding,
ExplodingOn,
Modifier,
BestOfDiceP... |
from itertools import product as it_product
from typing import List, Dict
import numpy as np
import os
import pandas as pd
from scipy.stats import spearmanr, wilcoxon
from provided_code.constants_class import ModelParameters
from provided_code.data_loader import DataLoader
from provided_code.dose_evaluation_class imp... |
from sympy import *
from sympy.solvers.ode.ode import get_numbered_constants, _remove_redundant_solutions, constantsimp
def find_riccati_sol(eq, log=False):
"""
Finds and returns all rational solutions to a Riccati Differential Equation.
"""
# Step 0 :Match the equation
w = list(eq.atoms(Derivativ... |
# Copyright (c) 2020 <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,... |
# Copyright (c) 2013 Hortonworks, 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 ... |
# 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.
import logging
import math
import warnings
from enum import Enum
from typing import Dict, List, Tuple
import torch
import torch.distributed as... |
"""
Translation support for admin forms.
*django-parler* provides the following classes:
* Model support: :class:`TranslatableAdmin`.
* Inline support: :class:`TranslatableInlineModelAdmin`, :class:`TranslatableStackedInline`, :class:`TranslatableTabularInline`.
* Utilities: :class:`SortedRelatedFieldListFilter`.
Ad... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jul 10 16:04:15 2019
@author: annaquinlan
Github URL: https://github.com/tidepool-org/Loop/blob/
8c1dfdba38fbf6588b07cee995a8b28fcf80ef69/Loop/Managers/LoopDataManager.swift
"""
# pylint: disable=R0913, R0914, W0105, C0200, R0916
from datetime import t... |
# Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
import argparse
import logging
import os
import platform
import re
import threading
from enum import Enum
from os import environ
from subprocess import CalledProcessError
from typing import Iterable, Optional
from packaging import version
from packaging.version import InvalidVersion
from . import CONFIG_VERSION_PATH,... |
from training_config import Config, secs_to_str, update#, immut
from configparser import ConfigParser
import os
import shutil
import sys
import subprocess
import math
import random
from history import TrainTestHistory
from model_utils import newest_checkpoint
import bayes_search as bayes
import exploration_policy
impor... |
""" INT_SERV_MIB
The MIB module to describe the Integrated Services
Protocol
"""
from collections import OrderedDict
from ydk.types import Entity, EntityPath, Identity, Enum, YType, YLeaf, YLeafList, YList, LeafDataList, Bits, Empty, Decimal64
from ydk.filters import YFilter
from ydk.errors import YError, YModelErr... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import sys
import six
import cv2
import numpy as np
import time
from shapely.geometry import Polygon
import pyclipper
'''
arg parser
'''
import argparse
__di... |
#! /usr/bin/env python
from PIL import Image, ImageDraw, ImageFont
import os, sys, gzip, math, argparse, colorsys, datetime
from collections import defaultdict
from itertools import *
urlretrieve = lambda a, b: None
try:
import urllib.request
urlretrieve = urllib.request.urlretrieve
except:
import urllib
... |
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Image assessment algorithms. Typical overlap and error computation
measures to evaluate results from other processing units.
"""
import os
import os.path as op
import nibabel as... |
from sympy import sqrt, pi, E, exp, Rational
from sympy.core import S, symbols, I
from sympy.discrete.convolutions import (
convolution,
convolution_fft,
convolution_ntt,
convolution_fwht,
convolution_subset,
covering_product,
intersecting_product,
)
from sympy.testing.pytest import raises
f... |
# Python imports
import os
import uuid
# Django imports
from django.contrib.gis.db import models
from django.contrib.contenttypes.models import ContentType
from django.utils.html import mark_safe, format_html
# Django countries imports
from django_countries.fields import CountryField
# Wagtail imports
#from wagtail.co... |
''' show_authentication_sessions.py
IOSXE parsers for the following show commands:
* show authentication sessions
* show authentication sessions interface {interface}
* show authentication sessions interface {interface} details
'''
# Python
import re
# Metaparser
from genie.metaparser import MetaParser
f... |
import itertools
import collections
from functools import partial
import pytest
import numpy as np
from jax import dtypes, jit, custom_jvp, lax, test_util as jtu
from fastar import test_util as tu
from fastar.core import Ones
from fastar.rules import conv_incounts, pad_dependency_rule
# This is borrowed from lax_t... |
# -*- coding: utf-8 -*-
"""Models for the Signbank dictionary/corpus."""
from __future__ import unicode_literals
import re
import json
import reversion
from itertools import groupby
from collections import OrderedDict
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import u... |
"""****************************************************************************
@author: damv_ Hecho con amor, no olvides eso
Equilibrio para proyecto Calculos Equilibrio
Funciones y algoritmos necesarios para calculo de equilibrio. Libreria personal.
VALORES CONSTANTE R
R = 83.14472 Bar cm3 / mol K
R = 8.3144... |
#!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... |
import picamera
import xml.etree.ElementTree as ET
import requests
import logging
import traceback
from fractions import Fraction
from ast import literal_eval
from socketserver import ThreadingMixIn
from pathlib import Path
from http.server import BaseHTTPRequestHandler, HTTPServer
from urllib.parse import parse_qs, ur... |
import sys
import os
import h5py
import json
import numpy as np
import scipy.signal
import librosa
import itertools
import argparse
import pdb
sys.path.append('/packages/msutil')
import util_stimuli
from dataset_util import initialize_hdf5_file, write_example_to_hdf5
sys.path.append('/om4/group/mcdermott/user/msaddl... |
# coding=utf-8
# Copyright 2019 The TensorFlow GAN 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 applicabl... |
"""
Throughout this file, the following notations are consistently used for variables:
* `x` always refers to user histories, and will generally be a tensor of dimension
num_interactions x num_users x compress_dim
* `y` always refers to the output probabilities of the neural net, and will generally
... |
import string
import sys
import numpy as np
import pandas as pd
import scipy.stats.mstats as mstats
import re
import gensim
import tensorflow as tf
from keras import Sequential
from keras import layers
from keras.preprocessing.text import Tokenizer
from keras.preprocessing.sequence import pad_sequences
from keras impor... |
#
# 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, software
# ... |
import sys
sys.path.append('/home/saxelrod/htvs-ax/htvs')
import os
import django
os.environ["DJANGO_SETTINGS_MODULE"]="djangochem.settings.orgel"
django.setup()
# Shell Plus Model Imports
from django.contrib.contenttypes.models import ContentType
from jobs.models import Job, JobConfig
from django.contrib.auth.m... |
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
"""Implementation of vpype's data model
"""
import logging
import math
from typing import Callable, Dict, Iterable, Iterator, List, Optional, Tuple, Union, cast
import numpy as np
from shapely.geometry import LinearRing, LineString, MultiLineString
from .geometry import crop, reloop
from .line_index import LineIndex
... |
#!/usr/bin/env python3
'''A library and a command line tool to interact with the LOCKSS daemon's
content configuration service via its Web Services API.'''
__copyright__ = '''\
Copyright (c) 2000-2021, Board of Trustees of Leland Stanford Jr. University
All rights reserved.
'''
__license__ = '''\
Redistribution and ... |
from enum import Enum
import cv2 as cv
import numpy as np
import pyautogui
pyautogui.FAILSAFE = False
pyautogui.PAUSE = 0
mouse_now = pyautogui.position()
SCREEN_SIZE = pyautogui.size()
CURSOR_SPEED_MULTIPLIER = 2
# MAX_DELTA = 20
MIN_DELTA_X = 1
MIN_DELTA_Y = 2
CURSOR_POOL = 5
KEY_WAIT_DURATION = 1
CALIBRATION_D... |
# -*- coding: utf-8 -*-
# vim: ts=4 sw=4 tw=100 et ai si
#
# Copyright (C) 2019-2021 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
# Author: <NAME> <<EMAIL>>
"""
This module provides various functions impelementing the 'wult' and 'ndl' tools deployment.
"""
import os
import sys
import time
import zipfil... |
# coding: utf-8
from django.db import models
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User, Group as GroupSys
from filebrowser.fields import FileBrowseField
from ximpia.xpcore.models import BaseModel, MetaKey
import ximpia.xpcore.constants as CoreK
from ximpia... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, <NAME> <<EMAIL>>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at yo... |
# Copyright 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.
from __future__ import absolute_import
import logging
import os
import posixpath
import re
import subprocess
import threading
import time
import six
from te... |
# GPL # "author": "DreamPainter"
import bpy
from math import sqrt
from mathutils import Vector
from functools import reduce
from bpy.props import (
FloatProperty,
EnumProperty,
BoolProperty,
)
from bpy_extras.object_utils import object_data_add
# this function creates a chain of quads... |
# Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.com/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... |
#!/usr/bin/python3
# Copyright 2019 Sonatype 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 a... |
import logging
import os
from functools import reduce
from typing import List
import dask
from dask import delayed
from cidan.LSSC.SpatialBox import SpatialBox
from cidan.LSSC.functions.data_manipulation import reshape_to_2d_over_time
from cidan.LSSC.functions.eigen import generateEigenVectors, saveEigenVectors, \
... |
'''Those are normalized functions that could be used in all platforms'''
# Python
import re
import random
import logging
from enum import Enum
from copy import deepcopy
from ipaddress import _BaseAddress
from collections import defaultdict
from collections.abc import Iterable
from prettytable import PrettyTable as pta... |
# coding: utf-8
# <NAME> (<EMAIL>, twitter @hirax)
# This code is based on Brun0oO's work(MIT License)
# https://github.com/Brun0oO/Pythonista/blob/master/arkit/main.py
# and Char<NAME>'s work.
# https://github.com/scj643/objc_tools/blob/master/objc_tools/scenekit/sk_scene.py
# Following thread will be heplful for unde... |
from .api.functions import *
import posixpath
import csv
def attributes():
"""Output file attributes."""
lexical = [
'num_dot_url', 'num_hyphen_url', 'num_underline_url',
'num_bar_url', 'num_question_url', 'num_equal_url',
'num_atsign_url', 'num_ampersand_url', 'num_exclamation_url',
... |
import scipy.stats as sts
import pandas as pd
from .utils import approx_greater_equal_zero, assert_log, apy_to_target_rate, target_rate_to_apy
from .uniswap import get_output_price, get_input_price, buy_to_price, sell_to_price
import models.system_model_v3.model.parts.failure_modes as failure
import models.system_model... |
# 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, ... |
# Implements parsing elections results from the website of
# the Central Election Commission of Ukraine
import shutil
import os
import requests
from bs4 import BeautifulSoup
import logging
import time
import random
import pandas as pd
import re
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.ut... |
import numpy as np
from .base import OdeSolver, DenseOutput
from .common import (validate_max_step, validate_tol, select_initial_step,
norm, warn_extraneous, validate_first_step)
from . import dop853_coefficients
# Multiply steps computed from asymptotic behaviour of errors by this.
SAFETY = 0.9
... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
__author__ = 'ar'
import os
import sys
import glob
import time
import json
try:
import cPickle as pickle
except:
import pickle
import matplotlib.pyplot as plt
import keras
from keras.models import Sequential
from keras.layers import Dense, Activation, Flatten, Convolu... |
# -*- coding: utf-8 -*-
import abc
from datetime import datetime, timedelta
import os
from typing import List, Optional, Tuple, Union
import torch
import torch.nn as nn
import torch.distributed as dist
from torch.optim import Adam
from torch.optim.lr_scheduler import ExponentialLR
from supar.parsers.parser import Pa... |
######################################################################################################
# @package wlmData
# @file wlmConst.py
# @copyright HighFinesse GmbH.
# @author <NAME> <<EMAIL>>
# @date 2018.09.15
# @version 0.1
#
# Homepage: http://www.highfinesse.com/
#
# @brief Constant values for wlm... |
from abc import (
ABC,
abstractmethod,
)
import argparse
from contextlib import (
contextmanager,
)
from enum import (
Enum,
auto,
)
import json
from pathlib import (
Path,
)
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
NamedTuple,
Tuple,
Type,
TypeVar... |
# Copyright: (c) 2020, <NAME> (@jborean93) <<EMAIL>>
# MIT License (see LICENSE or https://opensource.org/licenses/MIT)
import typing
from spnego._asn1 import (
ASN1Value,
get_sequence_value,
pack_asn1,
pack_asn1_integer,
pack_asn1_octet_string,
pack_asn1_sequence,
TagClass,
unpack_asn... |
import os
from copy import deepcopy
from typing import Optional
import pytest
from demisto_sdk.commands.common.constants import (FEED_REQUIRED_PARAMS,
FETCH_REQUIRED_PARAMS)
from demisto_sdk.commands.common.git_tools import git_path
from demisto_sdk.commands.common.ho... |
# -*- coding: utf-8 -*-
"""UNIT TESTS FOR SIGNAL
This module contains unit tests for the modopt.signal module.
:Author: <NAME> <<EMAIL>>
"""
from unittest import TestCase, skipIf, skipUnless
import numpy as np
import numpy.testing as npt
from builtins import zip
from modopt.opt import *
try:
import sklearn
exc... |
"""
Root system data for relabelled Cartan types
"""
#*****************************************************************************
# Copyright (C) 2008-2013 <NAME> <nthiery at users.sf.net>,
#
# Distributed under the terms of the GNU General Public License (GPL)
# http://www.gnu.org/licenses/
#... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import absolute_import
from soma import aims, aimsalgo
import numpy
import os
import six
import sys
from six.moves import range
def mergeLabelsFromTexture(tex, labels_list, new_label):
"""
inputs:
t... |
import os
import sys
import random
import torch
import torch.nn as nn
import numpy as np
from itranslit.config import LANGDATA
from itranslit.utils import download_model_and_get_path
class Encoder(nn.Module):
'''
Simple RNN based encoder network
'''
def __init__(self, input_dim, embed_dim, hidden_dim ... |
import argparse
import builtins
import os
import pickle
import random
import shutil
import subprocess
import warnings
from pathlib import Path
from typing import Any, Dict, List, Optional
import h5py
import numpy as np
import timm
import torch
import torch.backends.cudnn as cudnn
import torch.distributed as dist
impor... |
r"""
Rings
"""
#*****************************************************************************
# Copyright (C) 2005 <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
# 2008 <NAME> (CNRS) <<EMAIL>>
# 2008-2011 <NAME> <nthiery at users.sf.net>
#
# Distributed under the ... |
#!/usr/bin/env python3
import tempfile
__doc__ = f"""convert graphml files to ttl files
Usage:
graphml-to-ttl [options] <file>
graphml-to-ttl methods [options] <file>
graphml-to-ttl workflow [options] <file>
graphml-to-ttl paper [options] <file>
Options:
-o --output-location=LOC write converted... |
import time
import numpy as np
from matplotlib import pyplot as plt
import matplotlib.animation as animation
import pandas as pd
import sys
from matplotlib import gridspec
import matplotlib.pyplot as plt
import cartopy
import cartopy.io.shapereader as shpreader
import cartopy.crs as ccrs
import geopandas as gpd
def f... |
import sys
import os
import copy
import collections
try:
Counter=collections.Counter
pass
except AttributeError:
# python 2.6 and earlier don't have collections.Counter.
# Use local version py26counter.py instead
import py26counter
Counter=py26counter.Counter
pass
import numpy as np
i... |
#!/usr/bin/env python
"""
#########################################################################################
#
# This function allows to run a function on a large dataset with a set of parameters.
# Results are extracted and saved in a way that they can easily be compared with another set.
#
# Data should be org... |
## TECHNICHAL ANALYSIS
import pandas as pd
import numpy as np
# import talib
from plotly.graph_objs import Figure
from .utils import make_list
class StudyError(Exception):
pass
def _ohlc_dict(df_or_figure,open='',high='',low='',close='',volume='',
validate='',**kwargs):
"""
Returns a dictionary with the act... |
"""Transformer-based models for bAbi tasks.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensor2tensor.data_generators import text_encoder
from tensor2tensor.utils import registry
from tensor2tensor.utils import t2t_model
from tensor2tensor.laye... |
import torch.nn as nn
import torch.nn.functional as F
import math
import torch
import torch.optim as optim
from torch.nn.parameter import Parameter
from torch.nn.modules.module import Module
from deeprobust.graph import utils
from copy import deepcopy
import sys
from scipy import stats
import tensorly as tl
tl.set_bac... |
import sys
import re
import tokenize
from pathlib import Path
import pygraphviz
import networkx as nx
from lib2to3 import pygram, pytree
from lib2to3.pgen2 import driver, token
from lib2to3.pgen2.parse import ParseError
from lib2to3.pygram import python_symbols as syms
from lib2to3.pytree import Leaf, Node
class Clu... |
# coding=utf-8
# Copyright 2021 The Trax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
import configparser
import datetime
import json
import logging
#import lxml
import os
from pprint import pprint
import sys
import time
import boto3
import botocore as botocore
from bs4 import BeautifulSoup
import requests
from slackclient import SlackClient
import wget
#logging.basicConfig()
logger = logging.getLogge... |
# necessary imports
import glob # open files
import os # manage filepaths
import pickle # use pickle data
import cv2 # read, write, and manipulate png files
import numpy as np # manage arrays
from pathlib import Path # manage files
class CameraCalibrati... |
# This file is part of the litprog project
# https://github.com/litprog/litprog
#
# Copyright (c) 2018-2021 <NAME> (<EMAIL>) - MIT License
# SPDX-License-Identifier: MIT
import re
import typing as typ
import logging
import collections
from pathlib import Path
from . import common_types as ct
logger = logging.getLogge... |
import re
import subprocess
import logging
import shutil
import shlex
import ipaddress
import difflib
import textwrap
import os
import tarfile
from datetime import datetime
from collections import OrderedDict
from pathlib import Path
from operator import attrgetter
from fwgen.helpers import ordered_dict_merge, random_... |
#!/usr/bin/python3.6 -u
#NOTE: The -u option is required for unbuffered stdin/stdout.
# If stdin/stdout are buffered, the manager program will not recieve any messages and assume that the agent has timed out.
import sys
import random
ranks = ['B','1','2','3','4','5','6','7','8','9','s','F', '?', '!', '+']
"""
The ... |
#!/bin/bash python
"""
Main entry point for the ANDES CLI and scripting interfaces.
"""
# [ANDES] (C)2015-2022 <NAME>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of ... |
# -*- coding: utf-8 -*-
# @Author: <NAME>
# @Email: <EMAIL>
# @Date: 2019-06-04 18:24:29
# @Last Modified by: <NAME>
# @Last Modified time: 2020-07-31 10:51:21
import os
import logging
import pprint
import numpy as np
import matplotlib.pyplot as plt
from argparse import ArgumentParser
from .utils import Intensity... |
from threading import RLock
import logging
from datetime import datetime
import collections
import shelve
try:
import cPickle as pickle
except:
import pickle
from opcua import ua
from opcua.server.user_manager import UserManager
class AttributeValue(object):
def __init__(self, value):
self.value... |
# This function counts the number of panels in the ground truth label images and then gives the estimates
from numpy.core.defchararray import array, mod
from numpy.core.numeric import _moveaxis_dispatcher
from skimage import io
import os
import numpy as np
import pandas as pd
import imagesize
from mrs_utils.eval_utils ... |
"""
@author: magician
@file: redis_action_ch07.py
@date: 2021/12/6
"""
import re
import unittest
import uuid
import math
import redis
AVERAGE_PER_1K = {}
STOP_WORDS = set('''able about across after all almost also am among
an and any are as at be because been but by can cannot could dear did
do does either else ... |
#!/usr/bin/env python
# Copyright (c) 2017, DIANA-HEP
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.