text stringlengths 8.04k 46.5k |
|---|
# Copyright 2020,2021 Sony Corporation.
# Copyright 2021 Sony Group Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
import os
import tempfile
import unittest
from typing import Any
import mug
class TestWriteRead(unittest.TestCase):
def setUp(self):
_, self.temp_file_name = tempfile.mkstemp(prefix="mug_")
def tearDown(self):
os.remove(self.temp_file_name)
def test_write_read(self):
e1 = mug.E... |
import ast
import pickle
from datetime import datetime
from inspect import isclass, signature
from functools import partial
from pathlib import Path
from typing import Any, List, Optional
from darts.utils.statistics import plot_hist
import numpy as np
import darts.datasets as ds
import darts.models as models
import ma... |
# coding=utf-8
# Copyright 2017-2019 The THUMT Authors
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
import tensorflow as tf
import thumt.layers as layers
import thumt.losses as losses
import thumt.utils as utils
from thumt.models.model impo... |
#
#
# All Rights Reserved.
# Copyright 2010 OpenStack Foundation
# 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.... |
from __future__ import unicode_literals, print_function, division
from io import open
import unicodedata
import string
import re
import random
import torch
import torch.nn as nn
from torch import optim
import torch.nn.functional as F
from sklearn.model_selection import train_test_split
import time
impor... |
# pyfc4 - tests
from pyfc4.models import *
from tests import localsettings
import datetime
import inspect
import pdb
import pytest
import rdflib
import time
# logging
import logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
# target location for ... |
"""Interface to Zenodo or similar Invenio-backed repositories
"""
from .api import Login, Deposit, Records
from . import catalog, simannex, surrogatemodeling
# See https://github.com/moble/nb-marine-science for other examples using the Zenodo API
# The other python API interface I found is here: https://github.com/... |
# Copyright (c) 2020 DeNA Co., Ltd.
# Licensed under The MIT License [see LICENSE for details]
# kaggle_environments licensed under Copyright 2020 Kaggle Inc. and the Apache License, Version 2.0
# (see https://github.com/Kaggle/kaggle-environments/blob/master/LICENSE for details)
# wrapper of Hungry Geese environment... |
# coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
#!/usr/bin/env python3
"""
PyNOT -- Response GUI
Graphical interface to determine instrumental response
"""
__author__ = "<NAME>"
__email__ = "<EMAIL>"
__credits__ = ["<NAME>"]
import os
import re
import sys
import numpy as np
from matplotlib.backends.backend_qt5agg import FigureCanvas, NavigationToolbar2QT as... |
# Copyright (c) 2016 Ansible, Inc.
# All Rights Reserved.
# Python
import json
import logging
from uuid import uuid4
from copy import copy
from urllib.parse import urljoin
# Django
from django.db import connection, models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from dj... |
import os, sys
import numpy as np
from pycalfem import createdofs
from pycalfem_utils import which
def cmp(a, b):
return (a > b) - (a < b)
#def dofsFromNodes(listOfNodes, dofs):
# D = []
# for node in listOfNodes:
# D.extend(dofs[node])
# return D
def _offsetIndi... |
# -*- encoding: utf-8 -*-
#
# Copyright © 2020 Mergify SAS
#
# 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... |
import pandas as pd
import numpy as np
import requests
import shutil
from typing import *
import custom_paths
import utils
from data import DataInfo
import openml
import mat4py
def download_if_not_exists(url: str, dest: str):
"""
Simple function for downloading a file from an url if no file at the destinatio... |
#!/usr/bin/env python
# ******************************************************************************
# Copyright 2017-2018 Intel 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
... |
# -*- coding: utf-8 -*-
"""
:Purpose: This class module provides an interface to the Windows/Linux
command line interfaces (CLI), enabling the user to easily print
text, headings and banners in a variety of pre-defined
(and customisable) colour layouts, to the terminal.
... |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... |
"""Visitor(s) for walking ASTs.
This module contains broadly useful basic visitors. Visitors that are more
specialized to pytype are in visitors.py. If you see a visitor there that you'd
like to use, feel free to propose moving it here.
"""
import collections
import logging
import re
from pytype.pytd import base_vis... |
"""
Dirichlet-multinomial models for statistical analysis of compositional changes in single-cell data.
For further reference, see:
Büttner, Ostner et al.: scCODA: A Bayesian model for compositional single-cell data analysis
:authors: <NAME>
"""
import numpy as np
import time
import warnings
import tensorflow as tf
... |
""" methods to generate various tables used in configured_plots.py """
from html import escape
from math import sqrt
import datetime
import numpy as np
from bokeh.layouts import widgetbox
from bokeh.models import ColumnDataSource
from bokeh.models.widgets import DataTable, TableColumn, Div
from helper import (
... |
from pathlib import Path
import logging
import tempfile
import shutil
import tarfile
import signal
import re
import os
import stat
import platform
import subprocess
import pickle
from datetime import datetime
from typing import Iterable, Union, List, Tuple, Optional, Dict
from tempfile import TemporaryDirectory
import... |
from django.db import models
import requests
import csv
import logging
import datetime
from django.db.models import Sum, Count
from django.conf import settings
from .constants import *
from _collections import OrderedDict
from .IndexWrapper import IndexWrapper
# Un journaliseur
logger = logging.getLogger(settings... |
"""
Computation engines for executing Pipelines.
This module defines the core computation algorithms for executing Pipelines.
The primary entrypoint of this file is SimplePipelineEngine.run_pipeline, which
implements the following algorithm for executing pipelines:
1. Determine the domain of the pipeline. The domain... |
import matplotlib.pyplot as plt
import numpy as np
from termcolor import colored
from .utils import _process_rnn_args, _kw_from_configs, _save_rnn_fig
from .inspect_gen import detect_nans
from . import scalefig
def rnn_histogram(model, _id, layer=None, input_data=None, labels=None,
mode='weights',... |
#!/usr/bin/env python
# Copyright (c) 2016, Multimedia Laboratory, The Chinese University of Hong Kong
# 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 ret... |
import os
import json
import torch
import shutil
import codecs
import collections
import numpy as np
import torch.nn as nn
import bhabana.utils as utils
from torch import optim
from sacred import Experiment
from bhabana.datasets import IMDB
from bhabana.datasets import AmazonReviews
from bhabana.datasets import Senti... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jul 16 12:22:29 2021
@author: angir
"""
import json
import csv
from io import StringIO
import re
import chemaboxwriters.common.commonvars as commonv
from chemaboxwriters.ontocompchem.prefixes import comp_pref, \
data_pref, ... |
import torch
from torch import optim
import torch.nn.functional as F
import torch.nn as nn
from torch.nn.modules.container import ModuleList
from torch.optim.lr_scheduler import MultiStepLR
import torch_geometric.nn as PyGnn
import pytorch_lightning as pl
from cgl.utils.params import ParamDict
from cgl.utils.optim im... |
# encoding: utf-8
"""
peer.py
Created by <NAME> on 2009-08-25.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
import time
from collections import defaultdict
# import traceback
from exabgp.vendoring import six
from exabgp.util import ordinal
from exabgp... |
import csv
# https://blog.csdn.net/john_xyz/article/details/79208564
from gensim.test.utils import common_texts
from gensim.models.doc2vec import Doc2Vec, TaggedDocument
from sklearn.model_selection import train_test_split
# import torch
# from torch_geometric.data import Data
# data.x: Node feature matrix with shape ... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
from django.conf.urls import patterns, url
from django.db import models
import json
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exempt
from django.db import IntegrityError
from da... |
#!/bin/env python
"""
Authors: <NAME>
FMRIB, Oxford University
06-Apr-2019 18:03:23
Version $1.0
ProjectDir =
"""
import os, sys, argparse
sys.path.insert(1, os.path.dirname(__file__) + "/..")
import bb_pipeline_tools.bb_logging_tool as LT
class MyParser(argparse.ArgumentParser):
def error(self, message... |
import weakref
import asyncio
import logging
from enum import Enum
from random import randint
from asyncio import TimeoutError
from zthreading.thread_queue import Queue
from queue import Empty
from typing import Dict, Callable, List, Generator, AsyncGenerator
class Event:
def __init__(self, name: str, args: list... |
#! /usr/bin/env python
"""
filter_trim.py
Background
Many of the various analysis pipelines implemented by CS, including
the clinical single_sample_exome pipeline utilize two perl scripts to
filter out low quality reads and to trim 3' bases whose quality is
less than a specified cutoff. This process takes several ho... |
from .utils import Atom, Residue, ActiveSite
# JAMES
import prody as pd
import numpy as np
import scipy as sp
from scipy.cluster import hierarchy
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import collections
from .utils import ClusterPartition
from.io import write_hierarchical_clusterin... |
import sys
import os
import shutil
import math
import numpy as np
import pandas as pd
import scipy.sparse as ss
from sklearn.preprocessing import StandardScaler, MinMaxScaler
from datetime import datetime
import time
import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from to... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Tagger implementations. Used for part-of-speech tagging and named entity recognition.
"""
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from abc import ABCMeta, abstractmethod
from collections import defau... |
# from test import Ui_Dialog
from loader2 import Ui_MainWindow
from SelectAlgorithm import Ui_Dialog
#import splashScreen
from ui_splash_screen import Ui_SplashScreen
from PyQt5 import QtCore, QtGui, QtWidgets
'''from PyQt5.QtWidgets import (
QApplication,
QLabel,
QMainWindow,
QPushButton,
QVBoxL... |
from IPython.display import display, Markdown, Latex
import pandas as pd
import textwrap
import re
import os
import pydot
from io import BytesIO
import IPython
from cognipy.interop import cognipy_create, cognipy_delete, cognipy_call
def CQL(cql, ns='http://www.cognitum.eu/onto#'):
"""Converts CQL query into pur... |
###############################################################################
# FIRESTARTER - A Processor Stress Test Utility
# Copyright (C) 2017 TU Dresden, Center for Information Services and High
# Performance Computing
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
# -*- coding: utf-8 -*-
"""
..
Copyright © 2017-2018 The University of New South Wales
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 limita... |
# Source: https://github.com/nyu-mll/unsupervised-treelstm/commit/bbe1946e123e396362ecd071d1673766013463f2
# Original author of core encoder: <NAME>, Seoul National Univ.
import numpy as np
# PyTorch
import torch
import torch.nn as nn
from torch.nn import init
from torch.autograd import Variable
import torch.nn.funct... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
import sys
import traceback
def python_version_supported():
major, minor = sys.version_info[:2]
return (major == 2 and minor >= 7) or (major, minor) >= (3, 2)
if not python_version_supported():
sys.exit("Error... |
# encoding utf-8
"""
Top level preprocessing classes.
"""
import logging
import numpy as np
import pandas as pd
from sklearn.decomposition import PCA
from sklearn.preprocessing import LabelEncoder
from automatminer.utils.pkg import (
AutomatminerError,
compare_columns,
check_fitted,
set_fitted,
)
from... |
# Copyright 2021 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... |
from __future__ import annotations
import ast
import html
import json
import re
import time
import traceback
from collections.abc import Iterable, Iterator
from os import getenv
from pathlib import Path
from typing import (
Any,
Literal,
Optional,
overload,
Type,
TYPE_CHECKING,
TypedDict,
... |
from __future__ import absolute_import
from argparse import ArgumentParser, RawTextHelpFormatter
import os
import sys
import datetime
import mimetypes
import logging
import fnmatch
import csv
import errno
import json
from io import BytesIO
from warcio.warcwriter import WARCWriter
from warcio.timeutils import datetim... |
#!/usr/bin/env python3
import sys
import os
import copy
import argparse
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.ticker as mticker
from mpl_toolkits import mplot3d
from matplotlib import cm
from math import log10, floor
superscript = str.maketrans("-0123456789.", "⁻⁰¹²³⁴⁵... |
'''MRX7-D Signal Processor (based on XMV Series amp recipe.'''
# taken from (the large) manual:
# http://download.yamaha.com/api/asset/file/?language=en&site=countrysite-master.prod.wsys.yamaha.com&asset_id=63959
DEFAULT_TCPPORT = 49280
param_Disabled = Parameter({'schema': {'type': 'boolean'}})
param_IPAddress = P... |
import binascii
import pickle
import sys
import logging
import urllib.request, urllib.parse, urllib.error
from logging.handlers import TimedRotatingFileHandler
from twisted.application.service import Service
from twisted.internet import defer
from twisted.internet import reactor
from twisted.web.client import Agent
fr... |
# coding=utf-8-unix
"""
Copyright (C) 2009 <NAME>
Copyright (C) 2016, 2019 <NAME>
Copyright (C) 2021 <NAME>
This file is part of QuantLib, a free-software/open-source library
for financial quantitative analysts and developers - http://quantlib.org/
QuantLib is free software: you can redistribute it and/or modi... |
import torch
from torch import nn, optim
from tqdm import tqdm
import copy
import re
from math import floor
import numpy as np
from sklearn.metrics import f1_score, recall_score, precision_score, roc_auc_score, average_precision_score
from pytorch_metric_learning import miners
import itertools
try:
import mlflow
e... |
import numpy as np
from collections import namedtuple
import mediapipe_utils as mpu
import depthai as dai
import cv2
from pathlib import Path
from FPS import FPS, now
import time
import sys
from string import Template
import marshal
SCRIPT_DIR = Path(__file__).resolve().parent
PALM_DETECTION_MODEL = str(SCRIPT_DIR / ... |
"""
Module for working with large geographical areas
"""
import itertools
import json
import math
import os
from abc import ABCMeta, abstractmethod
from typing import Any, Dict, Iterable, List, Optional, Tuple, TypeVar, Union, cast
import shapely
import shapely.geometry
import shapely.ops
from shapely.geometry import ... |
# Copyright 2020 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... |
"""Enums, vowels, and consonants for gruut-ipa"""
import typing
import unicodedata
from dataclasses import dataclass
from enum import Enum
LANG_ALIASES = {
"ar": "ar",
"cs": "cs-cz",
"de": "de-de",
"en": "en-us",
"es": "es-es",
"fa": "fa",
"fr": "fr-fr",
"it": "it-it",
"nl": "nl",
... |
# FERepo to Lex Talionis Format for Full Combat Animations
# Takes in FERepo data... a set of images along with a *.txt file that serves as the script.
import os, sys, glob, datetime
from collections import OrderedDict, Counter
from PIL import Image
COLORKEY = 128, 160, 128
WIDTH_LIMIT = 240 * 5
class Logg... |
import datetime
import json
import logging
import math
import pathlib
import sys
import tempfile
import shutil
import traceback
import docker
import redis
import os
from pathlib import Path
from redistimeseries.client import Client
from docker.models.containers import Container
from redisbench_admin.run.common import ... |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: musedata.translate.py
# Purpose: Translate MuseData into music21 objects
#
# Authors: <NAME>
# <NAME>
#
# Copyright: Copyright © 2010-2012 <NAME> and the music21 Project
# ... |
from ast import Assert
from dataclasses import dataclass, field
import abc
import datetime
import enum
import hashlib
from pathlib import Path
import uuid
from typing import (
Dict,
List,
Literal,
Optional,
OrderedDict,
Protocol,
Set,
Tuple,
TypedDict,
Union,
runtime_checkabl... |
# -*- coding: utf-8 -*-
import tensorflow as tf
import numpy as np
import copy
slim = tf.contrib.slim
from math import exp
from .dataset_configs import FLYING_CHAIRS_ALL_DATASET_CONFIG, SINTEL_FINAL_ALL_DATASET_CONFIG,\
SINTEL_ALL_DATASET_CONFIG, FLYING_THINGS_3D_ALL_DATASET_CONFIG, FC_TRAIN_SINTEL_VAL_DATASET_CONF... |
from typing import Iterable, Optional, Union
import warnings
import torch
import torch.nn as nn
from kornia.geometry.linalg import transform_points
from kornia.geometry.linalg import inverse_transformation
class PinholeCamera:
r"""Class that represents a Pinhole Camera model.
Args:
intrinsics (torc... |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Sokoban Solver
#-------------------------------------------------------------------------------
#To do:
#Use heuristics
#Convert DFS solution to instructions for robot using path-findin... |
"""
Module to determine inputs and outputs from code snippets.
"""
from functools import reduce
import parso
from soorgeon import detect, definitions
_BUILTIN = set(__builtins__)
class ImportsParser:
"""Parses import statements to know which ones to inject to any given task
Parameters
----------
c... |
# Copyright 2019 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... |
""" Tests for relocating libraries """
from __future__ import division, print_function
import os
from os.path import (join as pjoin, dirname, basename, relpath, realpath,
splitext)
import shutil
from ..delocating import (DelocationError, delocate_tree_libs, copy_recurse,
... |
# Copyright 2012-2013 OpenStack Foundation
#
# 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 ... |
from __future__ import annotations
from collections import deque
from copy import copy
import pandas as pd
from numpy import random as np_random
from pandaSuit.common.constant.date_constants import DATE_GROUPINGS
from pandaSuit.common.constant.df import ALPHABET, DISTRIBUTIONS
from pandaSuit.common.decorators import... |
from flask import Blueprint, render_template, Markup, redirect, url_for, flash, request, session
from flask_login import login_required, current_user
from sqlalchemy import extract
import datetime, pytz, calendar, json, locale
# Forms
from app.forms import FiltersForm, NewOperationForm, UserSettingsForm, AddCurrencyFo... |
""" Base classes for representing and manipulating data. """
import logging
import re
import os
import sys
import numpy as np
import pandas as pd
from scipy import sparse
from neurosynth.base import mask, imageutils, transformations
from neurosynth.base import lexparser as lp
from neurosynth.utils import deprecated
#... |
# -*- coding: utf-8 -*-
"""
This module implements maximum likelihood-based estimation (MLE) of
Gaussian regression models for finite-dimensional observations made on
infinite-dimensional processes.
The ProcessMLE class supports regression analyses on grouped data,
where the observations within a group are dependent (... |
# This encapsulates rdflib features, and may help to implement differently triplestore features.
from __future__ import print_function
import sys
import os
import re
import six
import collections
import rdflib
import time
import datetime
import tempfile
import logging
import traceback
from rdflib.namespace import RDF,... |
# -*- coding: utf-8 -*-
#----------------------------------------------------------------------------
# Name: page.py
# Purpose:
#
# Author: <NAME> <<EMAIL>>
#
# Created:
# Version:
# Date:
# Licence: wxWindows license
# Tags: phoenix-port, unittest, documented, py3-port
#--------------------... |
import math
from pyticc.base import CCBase
class CCAddr(object):
WRITE_SINGLE_BYTE = 0x00
WRITE_BURST = 0x40
READ_SINGLE_BYTE = 0x80
READ_BURST = 0xC0
# COMMAND STROBE REGISTERS
# -------------------------------------------
SRES = 0x30 # Reset chip
SFSTXON = 0x31
SXOFF = 0x... |
"""
Interactive filters
Copyright: 2013-2021 (c) Sahana Software Foundation
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 limitati... |
#########################################################################
#
# spyfile.py - This file is part of the Spectral Python (SPy) package.
#
# Copyright (C) 2001-2010 <NAME>
#
# Spectral Python is free software; you can redistribute it and/
# or modify it under the terms of the GNU General Public Licens... |
# -*- coding: utf-8 -*-
"""
JAMF Packages
"""
__author__ = '<NAME>'
__email__ = '<EMAIL>'
__copyright__ = 'Copyright (c) 2020 University of Utah, Marriott Library'
__license__ = 'MIT'
__version__ = "1.1.3"
# import re
import os
import shutil
import hashlib
import logging
import pathlib
import plistlib
import subproc... |
from corvus.structures import Handler, Exchange, Loop, Update
import corvutils.pyparsing as pp
import os, sys, subprocess, shutil #, resource
import re
import numpy as np
import matplotlib.pyplot as plt
import pprint
# Debug: FDVi
import pprint
pp_debug = pprint.PrettyPrinter(indent=4)
# Define dictionary of implement... |
#!/usr/bin/env python3
import os
import threading
import paramiko
import time
import wakeonlan
import scp
import json
from PIL import Image, ImageDraw, ImageFont
from StreamDeck.DeviceManager import DeviceManager
from StreamDeck.ImageHelpers import PILHelper
#from multiprocessing import Process, Queue
... |
"""
Class summary
=============
.. autosummary::
AudioEnergyValidator
AudioReader
Recorder
"""
from __future__ import division
import sys
from abc import ABC, abstractmethod
import warnings
from functools import partial
from audioop import tomono
from .io import (
AudioIOError,
AudioSo... |
"""Core functionality of ncbi-genome-download."""
from __future__ import print_function
from appdirs import user_cache_dir
import argparse
import codecs
from datetime import datetime, timedelta
import errno
import hashlib
import logging
import os
import sys
from io import StringIO
from multiprocessing import Pool
imp... |
#
# Copyright (C) 2014-2016 UAVCAN Development Team <uavcan.org>
#
# This software is distributed under the terms of the MIT License.
#
# Author: <NAME> <<EMAIL>>
# <NAME> <<EMAIL>>
#
from __future__ import division, absolute_import, print_function, unicode_literals
import os
import sys
import time
import in... |
#!/usr/bin/env python
"""
cactusAggregatePlotter.py
22 February 2011
<NAME>, dearl(a)soe ucsc edu
This script takes an aggregate text file and produces
a pretty picture. Files look like:
[dearl@hgwdev demo]$ cat agg.A1.txt
columnLength 0 100 1000 10000 100000 1000000 10000000 100000000
hapA1/hapA2/assembly 101277168... |
import enum
import functools
from typing import Callable, Dict, List, Optional, Tuple
import chunk
import debug
import function
import scanner
import value
UINT8_MAX = 8
UINT8_COUNT = UINT8_MAX + 1
def expose(f):
"""Print the function signature and return value, implemented where function
returns processor ... |
from transformers import (BartForConditionalGeneration, BartConfig)
from transformers.generation_utils import BeamHypotheses
import torch
import torch.nn.functional as F
from torch import nn
from src.models.CORAL_BART.utils import load_pickled_tree, separate_regions
import glob
import numpy as np
import os
import sys
... |
# Code based on Carla examples, which are authored by
# Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
# How to run:
# cd into the parent directory of the 'code' directory and run
# python -m code.tests.control.carla_sim
import glob
import os
import sys
try:
sys.path.append(glob.gl... |
import yaml
import re
import custom_view
from django.http import HttpResponse
from django.http.response import JsonResponse
from django.db.models import Q
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
from django.shortcuts import redirect
from django.urls import reverse
from urllib.parse im... |
import os
import re
import copy
import abc
# ============================================================================
import numpy as np
# ============================================================================
from crds.core import log, utils, timestamp, selectors, config
from crds.core.exceptions import ... |
import os
file_path = "/home/shen/myproject/habitat/SemanticAnticipation/"
os.chdir(file_path)
from habitat.core.env import RLEnv
from habitat_baselines.common.utils import (
batch_obs,
)
from einops import rearrange
from occant_utils.map import (
dilate_tensor, process_image,
transpose_image,
)
from habit... |
# Copyright 1996-2021 Cyberbotics 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 agreed to in... |
#!/usr/bin/python3
import sys
from os.path import join, dirname, abspath
import serial
import serial.tools.list_ports as port_list
from qtpy import uic
from qtpy.QtCore import Slot, QTimer, QThread, Signal, QObject, Qt
from qtpy.QtWidgets import QApplication, QMainWindow, QMessageBox, QAction, QDialog, QTableWidgetItem... |
import numpy as np
import pickle
import pyram
import matplotlib.pyplot as plt
from matplotlib.colors import LogNorm
from matplotlib import cm
from pyram.tree import tmtree as tmt
from pyram.utils.cosmology import Timeconvert as TC
#from pyram.mock import ramski # requires ramski_module.so
from pyram import galaxymodu... |
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import utool as ut
import numpy as np
import vtool as vt
from six.moves import zip, map, range
from scipy.spatial import distance
import scipy.cluster.hierarchy
import sklearn.cluster
(print, rrr, profile) = ut.in... |
# Copyright (c) 2011, <NAME> <<EMAIL>>
# All rights reserved.
#
# 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 cond... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:set ts=4 sw=4 et:
# <NAME> 2015/08/05
# dédicacé à <NAME>
# rappels
# hectopascal (hPa) : 1 hPa = 100 Pa = 100 N⋅m⁻² = 1 mbar (millibar)
# newton (N) : 1 N = 1 kg⋅m⋅s⁻²
from __future__ import print_function
import sys
import math
import copy
import argparse
... |
# Copyright 2018 Google Inc.
#
# 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.
#
#... |
import numpy as np
import pandas as pd
import cv2
from scipy import ndimage
#Run inference (using OpenCV's dnn module) on images using your model trained
#in AIDeveloper.
#Script contains functions:
#- to pre-preprocess images according to the input criteria of a loaded model
#- forward images through a mod... |
# !/usr/bin/python3.6
# -*- coding: UTF-8 -*-
import numpy as np
import time
import os
import pandas as pd
import warnings
import gc
import sys
path = r'/home/alex/桌面/Python/'
sys.path.append(path)
class DataStream(object):
__slots__ = 'instances', 'dict_instances', 'options', 'isShuffle', 'isLoop', 'isSort', 'nu... |
import re, sys, string, unicodedata, os, itertools, pickle, copy, fasttext, joblib
from collections import Counter, OrderedDict, defaultdict
from glob import glob
import numpy as np
import tensorflow as tf
import tensorflow_hub as hub
import h5py
import tqdm
import pyhocon
from tokenization import convert_to_unicode, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.