text stringlengths 8.04k 46.5k |
|---|
import sys
sys.path.insert(0, '../pyged/lib')
import pyged
from . import config, utils, viz
import numpy as np
import torch
import torch_geometric as tg
import torch_geometric.data
import torch_geometric.datasets
from tqdm.auto import tqdm
import networkx as nx
import heapq
import itertools as it
import torch.multip... |
from __future__ import absolute_import, division, print_function
from itertools import zip_longest
from xarray import Dataset, DataArray, merge
import numpy
from colour import Color
from collections import defaultdict
from datacube.storage.masking import make_mask
import logging
from datetime import datetime
# pyl... |
from typing import Tuple, List, Union, Dict, Optional, cast
import random
import math
import torch
from kornia.constants import Resample, BorderType
from kornia.augmentation.utils import (
_adapted_uniform,
_check_and_bound
)
from .types import (
TupleFloat,
UnionFloat,
UnionType,
FloatUnionT... |
# Copyright (c) 2011-2016 Berkeley Model United Nations. All rights reserved.
# Use of this source code is governed by a BSD License (see LICENSE).
import json
import requests
import os
from decimal import Decimal
from django.conf import settings
from django.core.exceptions import ValidationError
from django.core.m... |
# ---------------------------------------------------------------
# sg_interpreter.py
# Set-up time: 2020/11/4 16:28
# Copyright (c) 2020 ICT
# Licensed under The MIT License [see LICENSE for details]
# Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT
# Contact: <EMAIL> [OR] <EMAIL>
# ---------------------------... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Author: <NAME>
# Date: 23 IV 2011
# This file is a part of AutomaticTexPlugin plugin for Vim.
# It is distributed under General Public Licence v3 or higher.
#
# Note: this script, in order to work well, needs a high value of
# max_print_line (ATP uses 2000) in order to not br... |
# Copyright (c) 2020-2021 <NAME>. All rights reserved.
# License: http://opensource.org/licenses/MIT
"""
ACDC --- Reader for ACDC dataset
=================================================
**Source code:** `ACDC.py <https://github.com/ol-sen/medreaders/blob/master/medreaders/ACDC.py>`_
The :mod:`ACDC` module contains t... |
#################################################################
### @author:郑晋图 JintuZheng
### Email: <EMAIL>
### Remarks: Please respect my labor achievements, and contact me to modify the source code
### Date:2020-03-11
################################################################
import argparse
import time
i... |
#!/usr/bin/env python
#
# This file is part of snmpsim software.
#
# Copyright (c) 2010-2018, <NAME> <<EMAIL>>
# License: http://snmplabs.com/snmpsim/license.html
#
# SNMP Snapshot Data Recorder
#
import getopt
import time
import sys
import os
import socket
import traceback
from pyasn1.type import univ
from pysnmp.prot... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Authors: <NAME>
# <NAME>
# <NAME>
# <NAME> <<EMAIL>>
import os
import cv2
import argparse
import functools
import numpy as np
from termcolor import colored
from tensorpack.utils.gpu import get_nr_gpu
from tensorpack import *
from tensorpack.t... |
import music21 as m21
m21.humdrum.spineParser.flavors['JRP'] = True
import pandas as pd
import numpy as np
import json
import argparse
from fractions import Fraction
import sys
# These paths must exist:
# ${mtcroot}/MTC-FS-INST-2.0/metadata
# ${mtcroot}/MTC-LC-1.0/metadata
# ${mtcroot}/MTC-ANN-2.0.1/metadata
# ${mtck... |
# Copyright 2021 Google 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
# -*- coding: utf-8 -*-
"""
sheetfu.model
~~~~~~~~~~~~~
Implement the sheetfu model (Spreadsheet > Sheet > Range).
:copyright: © 2018 by Social Point Labs.
:license: MIT, see LICENSE for more details.
"""
from sheetfu.helpers import convert_a1_to_coordinates, convert_coordinates_to_a1, append_sh... |
"""
Value-Distance
Separate facet value types (numeric (>95%), alpha (>95%) or mixed)
Does analysis depending on the type. Either bag of words or chi2 etc.
This script should aim to produce as much data as nessesary. It is
not designed to be optimised to run on all samples (a licence for
it to explore and go slow).
F... |
#!/usr/bin/env python
######################################################
## Edits ROMS masks using a GUI
## Nov 2014
## <EMAIL>
######################################################
import os
import wx
from matplotlib.backends.backend_wxagg import FigureCanvasWxAgg as FigureCanvas
from matplotlib.backends.backend... |
#!/usr/bin/env python3
# -*- coding:utf-8 -*-
# Copyright 2020 <NAME>-Carter
# MIT License
"""chargePlacer: Python implementation of a charge positioning algorithm
This is a command line script to determine a reasonably energy
minimised proton sequence for an input PDB file (INPUT) for a given
charge state (CHARGE). A... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''oldpf.py - <NAME> (<EMAIL>) - Jan 2017
This contains deprecated and incomplete period-finding tools from periodbase.py:
- dworetsky period finder
- scipy LSP
- townsend LSP
Kept around just in case.
'''
#############
## LOGGING ##
#############
import logging
from... |
import sys
import ipywidgets as widgets
#from PyQt5.QtWidgets import QApplication
#from PyQt5.QtWidgets import QFileDialog
import json
import dicttoxml
from IPython.core.display import display
import ipydatetime
from ipywidgets import FileUpload, Button
#from file_import_qt5 as fileImportQt5
"""
Each widget object is... |
from pathlib import Path
import os , re
import datetime as dt
import numpy as np
import xarray as xr
from io import StringIO
def is_valid_cptv10(da, assertmissing=True, assert_units=True):
valid_dims = ['T', 'X', 'Y', 'Mode', 'index', 'C']
valid_coords = ['T', 'Ti', 'Tf', 'S', 'X', 'Y', 'Mode', 'index', '... |
# Copyright (C) 2006-2011, University of Maryland
#
# 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,... |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Module that contains tpRigToolkit-libs-controllib function implementations for Maya
"""
from __future__ import print_function, division, absolute_import
import maya.cmds
from tpDcc import dcc
from tpDcc.core import command
from tpDcc.libs.python import python
from... |
import json
from secrets import compare_digest
from typing import TYPE_CHECKING
import six
from pyramid.httpexceptions import (
HTTPBadRequest,
HTTPConflict,
HTTPException,
HTTPInternalServerError,
HTTPUnprocessableEntity,
exception_response
)
from pyramid.renderers import render_to_response
fr... |
import os
import cv2
import pdb
import json
import shutil
import numpy as np
import pandas as pd
import random
from tqdm import tqdm
import argparse
from pycocotools import mask
from pycocotools.coco import COCO
from skimage import measure
try:
import moxing as mox
mox.file.shift('os', 'mox')
except:
pass
... |
# -*- coding: utf-8 -*-
import argparse
import inspect
import math
import numpy as np
import os
from PIL import Image, ImageFont, ImageDraw
from pprint import pprint
import sys
# add parent directory to sys path to import relative modules
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfra... |
"""
Composable proof statements, provers, and verifiers.
"""
import abc
import copy
import random
from hashlib import sha256
from collections import defaultdict
from petlib.bn import Bn
from petlib.pack import encode
from zksk.consts import CHALLENGE_LENGTH
from zksk.base import Prover, Verifier, SimulationTranscrip... |
"""
Test file for agents.
"""
import multiprocessing
import os
import random
import time
from threading import Timer
from uuid import uuid4
import Pyro4
import pytest
import osbrain
from osbrain import Agent
from osbrain import AgentAddress
from osbrain import AgentProcess
from osbrain import Proxy
from osbrain impor... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Mar 27 14:39:59 2020
@author: wantinglin
"""
import os
import sys
import time
import h5py
import matplotlib
import numpy as np
import open3d as o3d
import pandas as pd
import pyvista as pv
import trimesh
import vtk
from scipy import spatial
from vtk.uti... |
# Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is govered by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""Convert a user's issue search AST into SQL clauses.
The main query is done on the Issues tab... |
# coding=utf-8
import time
import json
import numpy as np
import argparse
from random import randint
import cv2
from sklearn.preprocessing import LabelBinarizer
with open('../infos/directory.json') as fp: all_data_dir = json.load(fp)
ANN_FILE_train = all_data_dir + 'Annotations_hico/train_annotations.json'
ANN_FILE_t... |
import math
import types
import sqlite3
import pickle
import os
from alive_progress import alive_bar
from sqlite3 import Error as SQLError
from datetime import date, datetime
from datetime import timedelta
from OTXv2 import OTXv2
pickle.DEFAULT_PROTOCOL = 5
rootDir = os.getcwd()
firstInitializationAllPulses = False... |
import json
import logging
import os
from concurrent.futures.thread import ThreadPoolExecutor
from contextlib import contextmanager
from typing import List, Optional, Union
import math
import time
from autobahn.exception import Disconnected
from autobahn.twisted import WebSocketClientFactory, WebSocketClientProtocol
f... |
# encoding: utf-8
"""
Following the notation in [1]_, the Kalman filter framework consists of
a *dynamic model* (state transition model)
.. math::
x_k = A x_{k-1} + q_{k-1}, \\qquad q_{k-1} \\sim N(0, Q)
and a *measurement model* (observation model)
.. math::
y_k = H x_k + r_k, \\qquad r_k \\sim N(0, R),
... |
# Copyright (c) 2009-2014 <NAME> and gevent contributors. See LICENSE for details.
from __future__ import absolute_import
# standard functions and classes that this module re-implements in a gevent-aware way:
_implements = [
'create_connection',
'socket',
'SocketType',
'fromfd',
'socketpair',
]
__... |
import datajoint as dj
import numpy as np
from . import experiment, ephys, get_schema_name, foraging_analysis
from .model.bandit_model_comparison import BanditModelComparison
schema = dj.schema(get_schema_name('foraging_model'))
@schema
class ModelClass(dj.Lookup):
definition = """
model_class: varchar(32) ... |
#!/usr/bin/env python
# @license
# Copyright 2017 Google Inc.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
from xlrd import colname
from collections import OrderedDict
from .models import Run, Identifier
from .signals import progress, import_complete, new_metadata
from functools import wraps
from django.db import transaction
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth import get_user... |
# Python Library for Mesh Bee
# helping to easier communicate with Mesh Bee module
#
# Copyright (C) 2014 at seeedstudio
# Author: <NAME> (<EMAIL>)
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fil... |
from time import sleep
from threading import *
import threading
import mysql.connector as connector
import math
import os
import random
from pathlib import Path
# * IMPORTS THE ENTIRE CONVERTER MODULE
import converter
# * IMPORTS THE ENTIRE CONVERTER MODULE FROM PACKAGE
import ecommerce.shipping
from converter import ... |
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
import numpy as np
import matplotlib.pyplot as plt
from operator import itemgetter
from astropy.io import ascii
from pathlib import Path
import apogee_tools as ap
try:
from TheCannon import apogee, dataset, model
except:
print("apogee_tools: Optional dependency TheCannon is not installed. To use cannon_tools, run 'p... |
import math
import random
from pandas import DataFrame
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import TransformerEncoderLayer, TransformerEncoder, Transformer, LayerNorm
from torch.nn.init import xavier_uniform_
from torch.nn.utils import weight_norm
cl... |
# hgweb/webutil.py - utility library for the web interface.
#
# Copyright 21 May 2005 - (c) 2005 <NAME> <<EMAIL>>
# Copyright 2005-2007 <NAME> <<EMAIL>>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolu... |
"""
Copyright (c) 2022 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import json
import sys
from io import BytesIO
import pytest
from flexmock import flexmock
from osbs.utils import ImageName
from requests.exc... |
import asyncio
ip_address = '192.168.127.12'
ip_port = 5000
# The VP-734 is very quirky. When you power it off through the LAN connection, it will lose its
# connection, and in order to reestablish communication with it, you will need to close the socket
# and open another. Additionally, if DHCP is enabled, it seems... |
import tensorflow as tf
import tensorlayer as tl
import math
from tensorflow.contrib.losses.python.losses.loss_ops import *
from tensorflow.contrib.framework.python.ops import add_arg_scope
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import math_ops... |
"""Module for adapting HTTP requests to AWS API Gateway events"""
from abc import ABC, abstractmethod
from base64 import b64encode, b64decode
from collections import Counter
from collections.abc import Mapping
import contextlib
import importlib
import inspect
import json
from pathlib import Path
import re
import subpr... |
import collections
import logging
import os
import re
import subprocess # nosec
import time
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
import runez
LOG = logging.getLogger(__name__)
FETCH_AGE_FILES = ["FETCH_HEAD", "HEAD"]
FRESHNESS_THRESHOLD = 12 * runez.date... |
import pandas as pd
import sys
import os
import numpy as np
import signatureanalyzer as sa
from typing import Union
import nimfa
from tqdm import tqdm
import sklearn
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from qtl.norm import deseq2_size_factors
import warnings
warnings.filterwarnings("igno... |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
"""
解析docker 容器的启动参数
require: python 3
author: <NAME>
mail: <EMAIL>
date: 2021-09-24
"""
import docker
from docker.errors import ImageNotFound, APIError
from sys import argv
import re, os
def unit_converter(size: int) -> str or int:
"""存储单位转换
byte 转换 GB、MB... |
import os
from time import time
import pickle
import cv2
import numpy as np
from PIL import Image
import scipy.misc
import json
import sys
import tensorflow as tf
from tensorflow.python.client import timeline
from graph_single import build_multi_tower_graph, build_single_graph
from input_pipeline import build_input_q... |
#Functions for learning policy by ARS
# Importing the libraries
import numpy as np
import os
import argparse
import gym.wrappers as wrappers
import ARS.code.logz as logz
#Hyper Parameters
class Hp():
def __init__(self,
nb_steps = 1000,
episode_length = 2000,
learnin... |
#!/usr/bin/python3
from bluepy.btle import Peripheral
from bluepy import btle
from sphero_constants import *
import struct
import time
import sys
class sphero_mini():
def __init__(self, MACAddr, verbosity = 4, user_delegate = None):
'''
initialize class instance and then build collect BLE sevices ... |
# The contents of this file are subject to the BitTorrent Open Source License
# Version 1.1 (the License). You may not copy or use this file, in either
# source code or executable form, except in compliance with the License. You
# may obtain a copy of the License at http://www.bittorrent.com/license/.
#
# Software di... |
#!/usr/bin/env python
import argparse, collections, functools, os, matplotlib.patches as patches, matplotlib.pyplot as plt, numpy as np, pathlib, scipy.interpolate
from astropath.slides.align.plots import shiftplotprofile, closedlooppulls, plotpairwisealignments, shiftplot2D
from astropath.slides.align.isotropy import... |
import urllib.request
import re
import unicodedata
import sys
import string
import nltk
from bs4 import BeautifulSoup
#Lista de palavras-chave da operação 'Lava Jato', cada uma contendo uma pontuação baseada na especificidade da palavra com o assunto eem questão (a palavras mais genéricas é atribuída uma nota menor)
k... |
"""
Training and validating models
"""
import argparse
import collections
import os
import pickle
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import skimage.transform
from tqdm import tqdm
import metric
import pydicom
import pytorch_retinanet.dataloader
import pytorch_retinanet.model
impo... |
#!/usr/bin/env python3
import sys
import os
import math
sys.path.append(os.path.join(sys.path[0],"..","..","..")) # for KicadModTree
sys.path.append(os.path.join(sys.path[0],"..","..","tools")) # for drawing_tools
from KicadModTree import *
from drawing_tools import *
# According to IEC 60603-2 §3 and DIN 41612-1 §... |
from __future__ import annotations
import enum
import os
from typing import List, Union, Optional, Tuple
from ravendb import constants
from ravendb.documents.session.misc import OrderingType
from ravendb.data.timeseries import TimeSeriesRange
from ravendb.documents.indexes.spatial import SpatialUnits
from ravendb.doc... |
"""
This is a extention of tkinter
Any error is welcome to be pointed out
via '<EMAIL>'.
"""
__version__ = '0.0.5'
import tkinter as tk
import tkinter.ttk as ttk
__all__ = ["DesktopFrame", "Page"]
class DesktopFrame():
"""
Traditional Desktop Application Layout
—————————————————————————————————————————————... |
from datetime import datetime
import requests.exceptions
from http.client import HTTPException
import urllib3.exceptions
from colorama import Fore, init
import socket
import time
from helpers.fileManagement import FileManager
from helpers.klinesManager import TaManager
from helpers.binaceTrader import BinanceTrader
f... |
import pyodbc
import pandas as pd
import math
continents = {
0: 'Africa',
1: 'Asia',
2: 'Europe',
3: 'North America',
4: 'Oceania',
5: 'South America'
}
age_groups = {
0: 'Under 1 year',
1: '0-17 years',
2: '1-4 years',
3: '5-14 years',
4: '15-24 years',
5: '18-29 years... |
from collections import OrderedDict
def split_into_list(s):
"""
Input: String
Output: A list of variables and the connectives (in English)
1. Remove the punctuations from the sentence such as "if A, then B", but not parentheses.
2. Split the sentence into a list of words composing the sentence.
3. Remove the ... |
# Copyright 2018 Waseda University (<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 i... |
# Function: Converts Pattern string into array
# Input: Pattern string
# Ouput: A H x W array containing the pattern where H is the height of the pattern and W is the width
def pattern_str_to_list( st ):
# Split pattern string into appropriate rows and remove last (empty) row
row_strings = st.split("\n")
ro... |
#-------------------------------------------------------------------------------
# Name: line_intersection
# Purpose: utilities for detecting and fixing line intersections
# Author: <NAME>
# Created: 17/01/2018
# Licence: MIT License
#-------------------------------------------------------------... |
import numpy as np;
import matplotlib.pyplot as plt;
import scipy;
from scipy.ndimage import gaussian_filter, uniform_filter, median_filter;
from scipy.special import gammainc, gamma;
from scipy.interpolate import interp1d
from . import log, files, headers, setup, oifits;
def airy (x):
''' Airy function, with it... |
import collections
from functools import lru_cache, reduce
from operator import getitem
import pandas as pd
from jira import JIRA
from jira.client import translate_resource_args, ResultList
from jira.resources import GreenHopperResource, Comment, Issue
import copy
import numpy as np
import json
import re
from box impor... |
# -*- coding: utf-8 -*-
"""
@author: Clément & Arnaud
"""
#%% Import
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as mcolors
from mpl_toolkits.axes_grid1.inset_locator import inset_axes
import matplotlib.ticker
import vapeplot
clrs = vapeplot.palette('vaporwave')
clrlub=clrs[2]
clrpole=c... |
"""Generates a Cython wrappers for C++ classes from description dictionaries.
This module relies heavily on the type system to convert between C/C++, Cython, and
Python types in a seamless way. While this module does not explicitly rely on the
auto-describer, it sure helps! The functions in this module are conceptual... |
import re
import sys
import appJar
import pprint
sys.path.append('../')
from HighLevelBehaviorLanguage.hlb_parser import HLBParser, HLBHintType
from deploy.constraints import removeEndDigit
import globals
try:
from tkinter import filedialog
except ImportError:
import tkFileDialog
try:
import xir
from... |
import socket
import threading
import time
import copy
import sys
import os
import queue
import logging
import json
from collections import deque
import network
from constants import *
from routingTable import routingTable
from fileSystem import fileSystem
# import p2p.network as network
# from p2p.constants import *
#... |
"""
CPAchecker is a tool for configurable software verification.
This file is part of CPAchecker.
Copyright (C) 2007-2014 <NAME>
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 a... |
""" Slave Sub Function - Treat solar power!"""
"""
In this file, all sub-functions are stored that are used for storage design and operation.
They are called by either the operation or optimization of storage.
"""
import numpy as np
from cea.optimization.constants import *
from cea.constants import *
def Storage... |
import random
import sys
from os import path
import os
turnsdoc=open(r"C:\Users\User\Desktop\program crap\Simulation of Nations and stuff\specifics\turns",("r"))
stuff = turnsdoc.read()
stuff = stuff.split("\n")
overview=open(r'C:\Users\User\Desktop\program crap\Simulation of Nations and stuff\specifics\over... |
import numpy as np
import matplotlib.pyplot as plt
#from .invlap import *
import inspect # Used for storing the input
import sys
from .aquifer_parameters import param_3d, param_maq
from .aquifer import Aquifer
#from .bessel import *
from .invlapnumba import compute_laplace_parameters_numba, invlap, invlapcomp
from .uti... |
# -*- coding: utf-8 -*-
"""
.. module:: citationanalysis
:synopsis: Set of functions for typical bibliometric citation analysis
.. moduleauthor:: <NAME> <<EMAIL>>
"""
import os
import sys
import itertools
from functools import reduce
from collections import defaultdict
import pandas as pd
import numpy as np
impor... |
"""numpy tracing utilities."""
from copy import deepcopy
from functools import partial
from typing import Any, Callable, Dict, List, Optional, Tuple, Union, cast
import numpy
from numpy.typing import DTypeLike
from ..common.data_types.dtypes_helpers import mix_values_determine_holding_dtype
from ..common.debugging.cu... |
import llvmlite.ir as ir
from collections import ChainMap
from contextlib import contextmanager
from llvmlite.ir import IRBuilder
from ..ast import c_ast as c_ast
bool_t = ir.IntType(1)
int8_t = ir.IntType(8)
int32_t = ir.IntType(32)
int64_t = ir.IntType(64)
voidptr_t = int8_t.as_pointer()
int64ptr_t = int64_t.as_poin... |
""" Holds domain objects for orders and the items attached to them """
import json
import datetime
import copy
from api.util.dbconnect import DBConnectException, db_instance
import psycopg2.extensions as db_extns
from api.domain.scene import Scene, SceneException
from api.domain import sensor, format_sql_params
from a... |
from qtpy.QtWidgets import QSplitter, QGridLayout, QWidget, QListView
from xicam.core import msg
from xicam.gui.widgets.imageviewmixins import BetterButtons
from pyqtgraph import PlotWidget, mkPen
from qtpy.QtCore import Qt, QItemSelectionModel
from qtpy.QtGui import QStandardItemModel
from functools import partial
fro... |
#!/usr/bin/env python
from inspect import trace
import os
import json
import pytz
import re
import traceback
import tornado.gen
import tornado.httpserver
import tornado.ioloop
import tornado.web
from mongo_db_controller import ZoomUserDB
from settings import Settings
from spark import Spark
from msft_functions import... |
"""
Contains the core logic for resolving Entities by executing Tasks.
"""
from collections import defaultdict
import logging
import warnings
import attr
from .datatypes import ResultGroup, DescriptorMetadata, TaskKey, VersioningPolicy
from .descriptors.parsing import entity_dnode_from_descriptor
from .descriptors i... |
import os
import torch
import torch.nn as nn
from torch.nn import DataParallel
from torch.utils.data import DataLoader
from tensorboardX import SummaryWriter
from torchvision import transforms
import numpy as np
import math
import shutil
from torch.nn import functional as F
from data_utils.transformer import RandomFl... |
from __future__ import print_function
import argparse
import random
import torch
import torch.nn as nn
import torch.nn.parallel
import torch.backends.cudnn as cudnn
import torch.optim as optim
import torch.utils.data
import torchvision.datasets as dset
import torchvision.transforms as transforms
import torchvision.util... |
import sys, os
import subprocess
import functools
import getpass
from io import open
from yaml import load
from yaml import Loader
from time import sleep
COMMANDS = {}
NONINTERACTIVE = {}
CONFIG = {
'default_container': 'django',
'compose_files': ['docker-compose.DEV.yml']
}
COMPOSE_FILE = {}
def command(_f... |
from random import sample
from reinforces.reinforce_utils import *
from reinforces import rephraser
from reinforces.ReplayBuffer import SharedReplayBuffer, ReplayBuffer
from reinforces.trans_env import Translate_Env
from src.utils.logging import *
from src.utils.common_utils import *
from src.data.dataset import Datase... |
#import matplotlib
#matplotlib.use("TkAgg")
import warnings
warnings.filterwarnings("ignore")
import matplotlib.pyplot as plt
import numpy as np
import cv2
import glob
import matplotlib.pyplot as plt
import matplotlib.animation as animation
#from shapely.geometry.polygon import LinearRing, Polygon
#from shapely.geomet... |
# -*- coding: utf-8 -*-
##########################################################################
# NSAp - Copyright (C) CEA, 2019
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
#... |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from datasets import dataset_factory
from deployment import model_deploy
from nets import nets_factory
from preprocessing import preprocessing_factory
from datasets.utils import *
import... |
# -*- coding: utf-8 -*-
"""
Created on Mon Jun 18 09:17:23 2018
@author: Manuel
the pentaton logic go around II
"""
import random
import time
random.seed(0)
print(random.getrandbits(5))
# =============================================================================
#
# Variables
# ============================... |
"""
A basic (and perhaps strict) implementation of some functions regarding the
rHEALPIX projection.
The primary requirement was for taking arrays of longitudes and latitudes
and generating rHEALPIX region code identifiers. These could then be used
for creating density maps, and survey coverage in general. The coverage... |
from __future__ import print_function
import PyKDL as kdl
import rospy
import sys
import tf_conversions.posemath as pm
from geometry_msgs.msg import Pose
from costar_robot_msgs.srv import SmartMoveRequest
from costar_robot_msgs.srv import ServoToJointStateRequest
from costar_robot_msgs.srv import ServoToPoseRequest
f... |
# ######################################################################################################################
# Copyright 2020 TRIXTER GmbH #
# ... |
import concurrent.futures as cf
import logging
import sys
from abc import ABC, abstractmethod
from enum import Enum
from threading import Event, RLock
from traceback import StackSummary, extract_stack
from typing import (
Any,
Dict,
Iterable,
List,
Optional,
Set,
Tuple,
Type,
TypeVar... |
import imageio
import os
os.environ["IMAGEIO_FFMPEG_EXE"] = "/usr/bin/ffmpeg"
from mujoco_py import MjSim, MjViewer, cymj
from robosuite.mcts.tree_search_v3 import *
from robosuite.models.base import MujocoXML
from robosuite.models.objects import MujocoXMLObject
from robosuite.utils import transform_utils as T
from r... |
#!/usr/bin/env python
# coding: utf-8
# # Recomendation system : Book Recommendation
# ### Oleh : [<NAME>](https://www.linkedin.com/in/ahmad-habib-husaini-1705711b0/)
#
# #### Pendahuluan
# Pada proyek ini, topik yang dibahas adalah mengenai pembuatan sistem rekomendasi dengan data book . Proyek ini dibuat untuk pr... |
#!/usr/bin/env python3
#
# Copyright (c) <NAME> and the University of Texas MD Anderson Cancer Center
# Distributed under the terms of the 3-clause BSD License.
import argparse
import re
import sys
import time
from io import StringIO
import nbformat
from nbconvert.exporters import Exporter
from nbconvert.preprocessor... |
from pathlib import Path
import multiprocessing
import psutil
import logging
from itertools import combinations
import numpy as np
from scipy.stats import pearsonr
import pandas as pd
from skimage import io, exposure
from .util import natural_sort, bboxes_overlap, is_notebook
from .gauss import fit_gaussi... |
import asyncio
import websockets
import json
import random
import string
import sys
req_id = 0
# specify your own token
trader_token = "SET_YOUR_TOKEN_HERE"
trading_available = False
active_orders = {}
open_contracts = {}
active_cond_orders = {}
def round_price(price):
tick_size = 5
return round(price / tic... |
import torch
import torch.nn as nn
from torch.nn import init
from torch.autograd import Variable
import pickle
import numpy as np
import time
import random
from collections import defaultdict
from User_Item_Context_Encoders import User_Item_Context_Encoder
from User_Item_Context_Aggregators import User_Item_C... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.