text stringlengths 6.04k 39.5k |
|---|
import h5py
import json
import multiprocessing
import neuroglancer
import numpy as np
import os
import pickle
import webbrowser
import tqdm
from phathom.pipeline.detect_blobs import main as detect_blobs_main
from eflash_2018.collect_patches import main as collect_patches_main
from eflash_2018.train import Application... |
import aiohttp
import asyncio
import base58
import functools
import json
import logging
import sys
import websockets
from queue import PriorityQueue
from web3.auto import w3 as web3
import os
import uuid
from uuid import UUID
import logging
from time import sleep
from eth_account.messages import defunct_hash_message... |
# -*- coding: utf-8 -*-
# Copyright © 2019 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... |
# python version of falco_gen_dm_poke_cube.m
import sys
import os
import numpy as np
import scipy
import scipy.io as sio
from falco import utils # ceil_even, ceil_odd
sys.path.append('y:/src/Falco/falco-python/falco/')
def sind(tdeg):
return np.sin((np.pi / 180.) * tdeg)
def cosd(tdeg):
... |
"""__init__.py.
This is a light wrapper around the spaCy training workflow functions. Most functions
are methods of the `LanguageModel` class, but debugging is done through separate functions.
"""
import sys
from pathlib import Path
from time import time
from wasabi import Printer
from typing import List, Optional, Un... |
import pandas as pd
import matplotlib.ticker as ticker
from pylab import *
import igraph as ig
import matplotlib.pyplot as plt
def prepare_firenzedata(records, nodes):
"""
Alter type and format of some columns from firenze card log database results
Args:
records (Pandas.DataFrame): records from t... |
from inspect import currentframe
from pprint import pformat
import sys
from tabulate import tabulate as _tabulate
WHITE_BLACK = [231,188,145,102,59,16]
WHITE_RED_BLACK = [231,224,217,210,203,196,160,124,88,52,16]
WHITE_YELLOW_BLACK = [231,230,229,228,227,226,184,142,100,58,16]
WHITE_GREEN_BLACK = [231,194,157,1... |
import matplotlib.pyplot as plt
import networkx as nx
import numpy as np
import seaborn as sns
import scipy
from scipy.optimize import minimize
from autoins.common import common, io
class AdjacentMatrixComputer():
def __call__(self, label_demo, nb_subgoal):
## (1) Count frequency
node_frequency =... |
# from collections import OrderedDict
# from graphql.execution.executor import Executor
# from graphql.execution.middlewares.gevent import GeventExecutionMiddleware, run_in_greenlet
from graphql.execution.executors.gevent import GeventExecutor #, run_in_greenlet
import yaml
import datetime
import inspect
import strin... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
__version__ = '0.1.1'
import configparser
import json
import logging
import os
import string
from datetime import datetime
from io import StringIO, BytesIO
from telegram import (ReplyKeyboardMarkup, ReplyKeyboardRemove, Document)
from telegram.ext import (Updater, CommandH... |
# Copyright (c) 2017, CNRS-LAAS
# 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 conditions and the f... |
"""
Java world
"""
import os
import sys
import jpype
import lib_util
import lib_common
from jpype import java
from jpype import javax
globJavaJVM = None
# It is possible to return a similar object, but on a remote machine.
def JPypeLocalStartJVM():
global globJavaJVM
if globJavaJVM:
return globJavaJVM
try:
i... |
import numpy as np
import sys
import os
from functools import reduce, partial
import logging
# Suppressing warnings
import warnings
# Plots
import matplotlib.pyplot as plt
# Progress bars
from tqdm import tqdm, trange
# Parallelising fitness
from inspect import getfullargspec
import multiprocessing as mp
class Gen... |
import re
from collections import defaultdict
from importlib import import_module
from django.conf import settings
from django.contrib.admindocs.views import simplify_regex
from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
from django.utils import six
from django.utils.encoding import force_text, s... |
import os
import glob
import shutil
import h5py
import json
import numpy as np
from numpy.lib.function_base import extract
from tqdm import tqdm
import pickle as pkl
from preprocess.tools.denseface_extractor import DensefaceExtractor
from preprocess.tools.bert_extractor import BertExtractor
from preprocess.MSP.make_co... |
import argparse
import json
from random import randint
from configurations.config_grabber import Configuration
import os
parser = argparse.ArgumentParser(description='Arguments for creating the environments and its configuration')
parser.add_argument('--environment_file', type=str, required=False, help="A json file co... |
import numpy as np
import pandas as pd
from sklearn import *
import os
import sys
import time
from datetime import datetime, timedelta
from ttictoc import tic, toc
from subseasonal_data.utils import get_measurement_variable
from subseasonal_toolkit.utils.general_util import printf
from subseasonal_toolkit.utils.experi... |
# -*- coding: utf-8 -*-
from datetime import datetime, timedelta
import six
from sqlalchemy import (
Column, Integer, String, Boolean, PickleType,
Index, UniqueConstraint)
from sqlalchemy import func, or_, and_
from sqlalchemy.ext.declarative import declared_attr
from sqlalchemy.orm import synonym
from sqlalc... |
import numpy as np
import os
import time
import platform
if platform.system() == 'Windows':
CLEAR_STR = "cls"
else:
CLEAR_STR = "clear"
print(platform.system())
def mat_str(mat, numspace=4 ,trunc=False, large=False):
# convert matrix in a string, eventually truncating its values (or making the... |
from django.shortcuts import render
import urllib.request
from .models import Museo, Comentario, Seleccionado, CSS
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseNotFound, HttpResponseRedirect
from django.views.decorators.csrf import csrf_exempt
from django.template.loader... |
"""
Original data:公司股市代號對照表.csv
Conditions:
1.單月營收歷月排名 1高
from 月營收創新高.xlsx
2.負債比 < 40%
季度
https://goodinfo.tw/StockInfo/StockList.asp?RPT_TIME=&MARKET_CAT=%E7%86%B1%E9%96%80%E6%8E%92%E8%A1%8C&INDUSTRY_CAT=%E8%B2%A0%E5%82%B5%E7%B8%BD%E9%A1%8D%E4%BD%94%E7%B8%BD%E8%B3%87%E7%94%A2%E6%AF%94%E6%9C%80%E9%AB%98%4... |
import os
import configparser
from configparser import NoOptionError
import fnmatch
import pprint
import shutil
import time
import sys
from urllib.error import URLError
from urllib.request import urlopen
from urllib.error import URLError, HTTPError
from socket import timeout
import json
# pip install these packages:
t... |
#
# Copyright 2017 Hyperkernel 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... |
import os
import os.path as osp
from datetime import datetime
import shutil
from time import sleep
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pytz
import seaborn
import tqdm
import yaml
import torch
from torch.autograd import Variable
import torchfcn
from portraitseg.utils import (... |
# Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... |
from models import DCGAN_64_Discriminator, DCGAN_64_Generator, StandardCNN_Discriminator, StandardCNN_Generator, InceptionV3
from torch.utils.data import Dataset as dst
from glob import glob
import torch
import torch.nn as nn
from torch.cuda import FloatTensor as Tensor
from torch import clamp
from torch.autograd impor... |
"""Event loop and event loop policy."""
__all__ = ['AbstractEventLoopPolicy',
'AbstractEventLoop', 'AbstractServer',
'Handle', 'TimerHandle',
'get_event_loop_policy', 'set_event_loop_policy',
'get_event_loop', 'set_event_loop', 'new_event_loop',
'get_child_watcher... |
from keckdrpframework.primitives.base_primitive import BasePrimitive
from kcwidrp.primitives.kcwi_file_primitives import kcwi_fits_writer, \
kcwi_fits_reader
import time
import os
import math
import pickle
import numpy as np
from skimage import transform as tf
from astropy.coordinates import SkyCoord
from astropy ... |
# Copyright 2018 The Fuego 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 wr... |
import io
import tensorflow as tf
import h5py
from tensorflow.python.keras.saving import hdf5_format
import basics.base_utils as _
from mlpug.trainers.training import *
from mlpug.mlpug_exceptions import TrainerInvalidException, \
TrainerStateInvalidException, \
BatchNotChunkableException, \
MLPugExcept... |
#!/usr/bin/env python
# coding: utf-8
# ## Overview
# It is a follow-up notebook to "Fine-tuning ResNet34 on ship detection" (https://www.kaggle.com/iafoss/fine-tuning-resnet34-on-ship-detection/notebook) and "Unet34 (dice 0.87+)" (https://www.kaggle.com/iafoss/unet34-dice-0-87/notebook) that shows how to evaluate th... |
# Copyright 2018 Tsinghuanet 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... |
# Author: <NAME>
# Created: 7/23/20, 9:36 AM
import copy
import logging
import argparse
import pandas as pd
from typing import *
# noinspection All
from Bio import SeqIO
from intervaltree import IntervalTree, Interval
import pathmagic
# noinspection PyUnresolvedReferences
import mg_log # runs init in mg_log and con... |
"""A pure-Python Python bytecode interpreter."""
# Adapted from:
# 1. pyvm2 by <NAME> (z3p), from http://www.twistedmatrix.com/users/z3p/
# 2. byterun by <NAME>, github.com/nedbat/byterun
import dis, operator, sys, collections, inspect, types
class Frame(object):
def __init__(self, code_obj, global_names,... |
# -*- coding: utf-8 -*-
'''
Functions used for CLI argument handling
'''
# Import python libs
from __future__ import absolute_import, print_function, unicode_literals
import copy
import fnmatch
import inspect
import logging
import re
import shlex
# Import salt libs
from salt.exceptions import SaltInvocationError
from... |
# Copyright (c) 2018 Siphon Contributors.
# Distributed under the terms of the BSD 3-Clause License.
# SPDX-License-Identifier: BSD-3-Clause
"""Test National Data Buoy Center (NDBC) dataset access."""
from datetime import datetime
import numpy as np
from numpy.testing import assert_almost_equal, assert_equal
import p... |
"""Trustwave Fusion Integration for Cortex XSOAR"""
import demistomock as demisto
from CommonServerPython import * # noqa # pylint: disable=unused-wildcard-import
from CommonServerUserPython import * # noqa
import requests
import traceback
from typing import Dict, Any
import urllib.parse
# Disable insecure warning... |
#
# Written by <NAME>
# Copyright (C) 2015 Aalto University
#
# 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 ... |
# Copyright (c) 2015 Mirantis inc.
# 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 require... |
import uuid, random, time, signal, logging, yaml, queue, json
from unittest import TestCase
from nose.tools import TimeExpired
from termcolor import colored
from test_suite.framework.zero_store_cli import ZeroStoreCLI
from test_suite.framework.iyo_client.base import Client
import threading
from hashlib import md5
impor... |
# -*- coding: utf-8 -*-
"""
This tokenizer has been copied from the ``tokenize.py`` standard library
tokenizer. The reason was simple: The standard library tokenizer fails
if the indentation is not right. To make it possible to do error recovery the
tokenizer needed to be rewritten.
Basically this is a stripped do... |
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... |
# -*- coding: utf-8 -*-
"""Implementation of ranked based evaluator."""
import itertools as itt
import logging
from collections import defaultdict
from dataclasses import dataclass, field, fields
from typing import DefaultDict, Dict, Iterable, List, Optional, Sequence, Tuple, Union
import numpy as np
import pandas a... |
from ...torch_core import *
from ...layers import *
from .awd_lstm import RNNDropout, LinearDecoder, SequentialRNN
__all__ = ['Activation', 'PositionalEncoding', 'GeLU', 'Swish', 'feed_forward', 'MultiHeadAttention', 'MultiHeadRelativeAttention',
'DecoderLayer', 'Transformer', 'TransformerXL', 'tfmer_lm_con... |
"""Copyright 2018 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, software
dis... |
# Copyright 2015 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... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# License under MIT
from __future__ import absolute_import
import collections
import contextlib
import base64
import os
import re
import sys
import subprocess
import time
import tempfile
import warnings
import logging
import uuid
import xml.dom.minidom
from uiautomato... |
# Copyright (c) 2013 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.0
#
# Unless... |
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 12 12:37:58 2022
@author: gojja och willi
"""
import pandas as pd
from datetime import datetime
import matplotlib.pyplot as plt
from statsmodels.graphics.tsaplots import plot_acf, plot_pacf
from statsmodels.tsa.api import VAR
from scipy.stats import pearsonr
import numpy... |
# coding=utf-8
# Copyright 2020 The Tensor2Tensor 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... |
"""
doctr
A tool to automatically deploy docs to GitHub pages from Travis CI.
The doctr command is two commands in one. To use, first run::
doctr configure
on your local machine. This will prompt for your GitHub credentials and the
name of the repo you want to deploy docs for. This will generate a secure key,
w... |
from django.db import models
from django.db.models import Q
from django.contrib.auth import get_user_model
from django.contrib.contenttypes.fields import GenericForeignKey, GenericRelation
from django.contrib.contenttypes.models import ContentType
from django.db.models.fields.related import ForeignKey
from django.templ... |
import tensorflow as tf
from sklearn.model_selection import train_test_split
import pandas as pd
import numpy as np
import altair as alt
import os
from .normalizers import get_norm_method
from .tf_dataset_pipeline import prepare_tf_dataset
from .load_yaml import yaml_to_dataframes
from ..plotting.plots import boxplot,... |
import copy
import logging
import multiprocessing
import os
import sqlite3
import time
from multiprocessing import Process
from multiprocessing.dummy import DummyProcess
from typing import Tuple
import mapproxy
import yaml
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# This file is part of readmemaker
#
# Copyright (c) 2020 <NAME> <a.k.a. atareao>
#
# 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 re... |
from __future__ import unicode_literals
from collections import OrderedDict
import re
from bisect import bisect
import warnings
from django.conf import settings
from django.db.models.fields.related import ManyToManyRel
from django.db.models.fields import AutoField, FieldDoesNotExist
from django.db.models.fields.proxy... |
import gym
import torch
import random
import math
import datetime
import os
import wandb
import argparse
import time as t
import logging as log
import numpy as np
import torch.optim as optim
import torch.autograd as autograd
import torch.nn.functional as F
import matplotlib.pyplot as plt
import cv2
fr... |
import glob
import os
from copy import copy, deepcopy
from dataclasses import dataclass, field
from typing import List, Optional, Tuple, Union
import imageio
import numpy as np
import pandas as pd
from PIL import Image
from fedot.core.data.load_data import JSONBatchLoader, TextBatchLoader
from fedot.core.data.merge i... |
import torch
from torch.autograd import Variable
import torch.nn.functional as F
from torch.utils import data
from torch.utils.data import SequentialSampler
from torch import nn
from tqdm import tqdm
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from time import time
from sklearn.metrics impo... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import warnings
import numpy as np
import pandas as pd
from typing import Union
from qlib.model.base import BaseModel
class RiskModel(BaseModel):
"""Risk Model
A risk model is used to estimate the covariance matrix of stock returns.
... |
# Copyright (c) 2017 The Khronos Group 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 ... |
# -*- coding: utf-8 -*-
from copy import deepcopy
from datetime import timedelta
from itertools import combinations
from typing import Tuple, Sequence
import numpy as np
from ..base import Property
from ..models.transition.base import TransitionModel
from ..models.transition.linear import ConstantTurn, ConstantVeloci... |
import argparse
import gzip
import operator
import json
import os
import ast
import pandas as pd
class Transform:
def __init__(self, review_file, output_path, meta_file):
self.word_map = {'': 0}
self.user_map = {}
self.product_map = {}
self.query_map = {'': 0, }
self.word_... |
# -*- coding: utf-8 -*-
"""
Module :mod:`multipro` defines :class:`BackendProcess` as a subclass of
``multiprocessing.Process`` or ``threading.Thread``. You can opt between
deriving from :mod:`multiprocessing` or :mod:`threading` by selecting the
corresponding parameter in :func:`~xrt.runner.run_ray_tracing`. The
multi... |
# python3
# pylint: disable=g-bad-file-header
# Copyright 2021 DeepMind Technologies Limited. 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... |
#!/usr/bin/env python3
import sys
import numpy as np
import sympy as sp
from selfdrive.locationd.models.constants import ObservationKind
from rednose.helpers import KalmanError
from rednose.helpers.ekf_sym import EKF_sym, gen_code
from rednose.helpers.sympy_helpers import euler_rotate, quat_matrix_r, quat_rotate
EAR... |
from os.path import exists, join
from os import makedirs
from sklearn.metrics import confusion_matrix
from tool import DataProcessing as DP
import tensorflow as tf
# tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR) # xuek tensorflow报错提示取消
import numpy as np
import tf_util
import time
def log_out(out_s... |
__all__ = [
'GetNanoTime', 'GetTSC',
'tic', 'toc',
'ticx', 'tocx',
'tt', 'ttx',
'ticp', 'tocp',
'ticf', 'tocf',
'utcnow'
]
'''
Timing and profiling functionality
'''
import logging
from typing import TYPE_CHECKING, Optional
import numpy as np
import riptide_cpp as rc
fr... |
"""Webapp for storing what books you own and have already read"""
from mako.lookup import TemplateLookup
MY_LOOKUP = TemplateLookup(directories=['html'], output_encoding='utf-8',
encoding_errors='replace')
import cherrypy
from cherrypy.lib import static
import json
import os
LOCAL_DIR = os.pa... |
import os
import itertools
import numpy as np
from skimage import data_dir
from skimage.io import imread
from skimage.transform import radon, iradon, iradon_sart, rescale
from skimage._shared import testing
from skimage._shared.testing import test_parallel
from skimage._shared._warnings import expected_warnings
PH... |
#!/usr/bin/env python3
# Copyright (c) Meta Platforms, Inc. and affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, cast
import n... |
#!/usr/bin/python
from __future__ import print_function
import collections
import argparse
import itertools
import re
import sys
INDENT_1 = "\n "
BRACE_INDENT_2 = "},\n {"
WHITESPACE = b" \t\n\r\x0b\x0c\xc2\xad"
PUNCTUATION = b"!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~"
TABLE_GO = """package models
import "githu... |
import numpy as np
import tensorflow as tf
import tflearn
GAMMA = 0.99
A_DIM = 6
ENTROPY_WEIGHT = 0.3
ENTROPY_EPS = 1e-06
S_INFO = 4
S_LEN = 8
DEFAULT_QUALITY = 1
VIDEO_BIT_RATE = [300,
750,
1200,
1850,
2850,
4300]
REBUF_PENALTY =... |
from pydantic import BaseModel
from sly import Parser, Lexer
import io
import os
import pandas as pd
import re
import spacy
from nltk.tokenize import RegexpTokenizer
from rich import pretty
import subprocess
from subprocess import Popen, PIPE, STDOUT
pretty.install()
try:
nlp = spacy.load('en_core_web_lg')
except... |
# Copyright 2012-present MongoDB, 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 wri... |
import collections
import glob
import logging
import multiprocessing as mp
import numpy as np
import os
import shutil
import six
import subprocess
import sys
import time
import threading
import torch
from metagrok import battlelogs
from metagrok import config
from metagrok import constants
from metagrok import formats... |
import logging
import os
import re
import sys
from collections import namedtuple
from os import environ
from pkg_resources import parse_version as v
import pytest
from qbittorrentapi import Client
from qbittorrentapi import exceptions
from qbittorrentapi.request import Request
from qbittorrentapi.torrents import Torr... |
# -*- coding: utf-8 -*-
# vim: ts=2 sw=2 et ai
###############################################################################
# Copyright (c) 2012,2021 <NAME> <EMAIL>
# <NAME> <EMAIL>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and assoc... |
"""A class for generating/visualizing protein atomic coordinates from measured angles."""
from io import UnsupportedOperation
import numpy as np
import torch
from sidechainnet.utils.sequence import ONE_TO_THREE_LETTER_MAP, VOCAB
from sidechainnet.structure.build_info import SC_BUILD_INFO, BB_BUILD_INFO, NUM_COORDS_PE... |
import csv
import os
import django
django.setup()
from dados.povoar_docentes import carregar_docente
from dados.baixar_dados import downloads_dados
from mysite.settings import BASE_DIR
from dados.povoar_funcoes_gratificadas import carregar_funcoes_gratificadas
from dados.povoar_turma import carregar_turma
from dados.p... |
from collections import defaultdict
from datetime import date, datetime, timedelta
from django.template.loader import render_to_string
from django.utils.translation import ugettext as _
from dateutil.relativedelta import relativedelta
from corehq.util.quickcache import quickcache
from couchforms.analytics import (
... |
import numpy
import torch
from torch.distributions import MultivariateNormal
import torch.nn.functional as F
from torch_ac.format import default_preprocess_obss
from torch_ac.utils import DictList, ParallelEnv
class BaseContinuousAlgo:
def __init__(
self,
envs,
acmodel,
device,
... |
#
# Copyright 2016 University of Southern California
#
# 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... |
"""
Copyright (c) 2018-2022 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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wri... |
import logging
import uuid
from typing import List, Union
from galaxy import model
from galaxy.util import ExecutionTimer
from galaxy.workflow import modules
from galaxy.workflow.run_request import (
workflow_request_to_run_config,
workflow_run_config_to_request,
WorkflowRunConfig
)
log = logging.getLogge... |
"""
TensorFlow policy class used for APPO.
Adapted from VTraceTFPolicy to use the PPO surrogate loss.
Keep in sync with changes to VTraceTFPolicy.
"""
import numpy as np
import logging
import gym
from typing import Dict, List, Optional, Type, Union
from ray.rllib.agents.impala import vtrace_tf as vtrace
from ray.rll... |
#!/usr/bin/env python3
# Enable coverage if installed and enabled through COVERAGE_PROCESS_START environment var
try:
import coverage
coverage.process_startup()
except ImportError:
pass
import argparse
import urllib.parse
import urllib.request, urllib.parse, urllib.error
import requests
import sys
import os... |
from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import copy
import json
import numpy
import logging
import networkx
from os import path, pardir
from collections import namedtuple
logger = logging.getLogger(__name__)
THIS_DIR = path.dirname(path.abspath(__file... |
# Copyright 2015 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... |
from flask import Flask, Response, jsonify, request, redirect, url_for, g
from jinja2 import Template
from . import settings
from .bcdc import package_id_to_web_url, package_id_to_api_url, prepare_package_name, package_create, resource_create, get_organization
from .emailer import send_email
import os
import json
impor... |
#!/usr/bin/env python
"""
@package ion.agents.platform.util.network
@file ion/agents/platform/util/network.py
@author <NAME>
@brief Supporting elements for representation of a platform network
"""
__author__ = '<NAME>'
__license__ = 'Apache 2.0'
# NOTE: No use of any pyon stuff in this module mainly to also f... |
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from __future__ import print_function
import argparse
from collections import OrderedDict
import csv
import math
import os
import sys
sys.path.append("..")
import graph
import utils
def compute_partitioning(compute_times, activation_sizes, par... |
# Controller.py
# author: <NAME>
# Adapted from <NAME>' code here: http://pydoc.net/Python/jaraco.input/1.0.1/jaraco.input.win32.xinput/ under the MIT licence terms
# last update: 8/14/2018
# Description:
# Provides XBOX controller interface to communicate with DeepNNCar
# BUTTON LAYOUT
# Right trigger => accele... |
# Copyright 2010-2012 the SGC project developers.
# See the LICENSE file at the top-level directory of this distribution
# and at http://program.sambull.org/sgc/license.html.
"""
Base widget, all widgets inherit from this.
"""
import pygame
from pygame.locals import Rect, SRCALPHA
from pygame import draw
from ._loc... |
import re
import os
import gzip
import warnings
import pandas as pd
from glob import glob
from datetime import datetime
from string import ascii_letters, digits
# TODO: Ideally these should be imported from Qiita
REQUIRED_COLUMNS = {'well_description', 'sample_plate', 'sample_well',
'i7_index_id'... |
'''
Code for reading in combined and individual visit spectra.
Any way that you can get your hands on the spectra should be fine, as long as you
Here we adopt APOGEE DR14. Edit os.environs below for a later version of APOGEE data release.
Since our spectral model training set was normalized using the DR12 wavelength ... |
import collections
from tube.etl.indexers.base.lambdas import (
merge_and_fill_empty_props,
merge_dictionary,
swap_key_value,
)
from tube.etl.indexers.base.translator import Translator as BaseTranslator
from tube.etl.indexers.aggregation.lambdas import (
intermediate_frame,
get_frame_zero,
get_n... |
"""
2nd-order accurate finite-volume implementation of linear advection with
piecewise linear slope reconstruction.
We are solving a_t + u a_x = 0
This script defines two classes:
-- the Grid1d class that manages a cell-centered grid and holds the
data that lives on that grid
-- the Simulation class that is b... |
"""
Simple config
=============
Although CherryPy uses the :mod:`Python logging module <logging>`, it does so
behind the scenes so that simple logging is simple, but complicated logging
is still possible. "Simple" logging means that you can log to the screen
(i.e. console/stdout) or to a file, and that you can easily ... |
import cv2
import math
import numpy as np
import torch
import config_debug
from .utils import random_crop, draw_gaussian, draw_gaussian_line, gaussian_radius, normalize_, color_jittering_, lighting_
def _resize_image(image, detections, size):
detections = detections.copy()
height, width = image.shape[0:2]... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.