text stringlengths 6.04k 39.5k |
|---|
#!/usr/bin/env python3
import sys
import re
import html
from tkinter import *
from tkinter import ttk
import languages
import numberings
try:
import sigil_bs4
embedded_ = True
except ImportError:
import bs4 as sigil_bs4
sigil_bs4.element.STRUCTURAL_TAGS = ("article","aside","blockquote",
"bod... |
#!/usr/bin/env python
"""
Write text on a plot
This module was written by <NAME> while at Department of Computational
Hydrosystems, Helmholtz Centre for Environmental Research - UFZ, Leipzig,
Germany, and continued while at Institut National de Recherche pour
l'Agriculture, l'Alimentation et l'Environnement (INRAE), N... |
import pyodbc as sql
import pandas as pd
import datetime as dt
import requests
import os
import json
import shutil as sh
import fileinput
import chess
import chess.pgn
def archiveold():
output_path = r'C:\Users\eehunt\Documents\Chess\Scripts\output'
archive_path = r'C:\Users\eehunt\Documents\Chess\Scripts\outp... |
"""SMT-based experiments of `A Low-Randomness Second-Order Masked AES
<https://eprint.iacr.org/2021/1111>`_.
To run, call `find_best_key_schedule_characteristic` or `find_best_encryption_characteristic`.
"""
import functools
from decimal import Decimal
from cascada.bitvector.core import Constant, Term
from cascada.bi... |
# vim: set sts=4 ts=8 sw=4 tw=99 et:
import errno
import subprocess
import re, os, sys, locale
import uuid
import platform
from tempfile import NamedTemporaryFile
try:
import __builtin__ as builtins
except ImportError:
import builtins
try:
import cPickle as pickle
except ImportError:
import pickle
# W... |
"""Tools for topological associated domain analysis."""
from copy import copy
from functools import total_ordering
from typing import Union, Tuple, List, Optional
import numpy as np
from scipy import sparse
from .utils.numtools import mask_array, get_diag, cumsum2d
from .utils.utils import suppress_warning
@suppre... |
#!/usr/bin/env python3
import sys
import os
import click
import csv
import re
import vcf
import vcf.model
import copy
from gooch_maf_tools.formats import MAF
from intervaltree import Interval, IntervalTree
@click.group(no_args_is_help=True, help="prepare and check status of COSMIC entries")
def cli():
pass
maxInt =... |
"""A script for converting a Notion "database" (table) into ORM declarations.
First, ensure that `NOTION_API_KEY` is set in your environment, and authenticated
to the table you're interested in.
Then run this as:
python db2py.py $NOTION_DATABASE_ID
...and it will print out Python code on stdout."""
import sys
... |
from typing import Optional, Union, List, Tuple, Dict, Any
from pandas.core.common import apply_if_callable
from pandas.core.construction import extract_array
import pandas_flavor as pf
import pandas as pd
import functools
from pandas.api.types import is_list_like, is_scalar, is_categorical_dtype
from janitor.utils im... |
# -*- coding: utf-8 -*-
#The MIT License
#Copyright 2018 <NAME>
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, ... |
#!/usr/bin/env python
"""
Jedi EPC server.
Copyright (C) 2012 <NAME>
Author: <NAME> <aka.tkf at g<EMAIL>>
This file is NOT part of GNU Emacs.
Jedi EPC server is free software: you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation, ei... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2018-2019 Nekoka.tt
#
# 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 li... |
import numpy as np
import pandas as pd
from scipy.interpolate import interp1d
from typing import Dict, List, Optional
from pandas.api.types import is_numeric_dtype
from pymsm.utils import stepfunc
from pymsm.event_specific_fitter import EventSpecificFitter, CoxWrapper
class EventSpecificModel:
"""Event specific m... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, <NAME> <<EMAIL>>
# Copyright: (c) 2019, Ansible Project
# MIT License (https://opensource.org/licenses/MIT)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1', 'status':... |
import math
import matplotlib.pyplot as plt
import numpy as np
import os
import sys
import tarfile
import urllib.request
import warnings
from matplotlib.backends import backend_gtk3
from pylatex import Document, Package
from pylatex.utils import NoEscape
# NOTE with the current method, SINDy (like other complex netw... |
import re
import mmd_scripting.core.nuthouse01_io as io
import mmd_scripting.core.nuthouse01_core as core
import mmd_scripting.core.nuthouse01_vmd_struct as vmdstruct
_SCRIPT_VERSION = "Script version: Nuthouse01 - v0.5.03 - 10/10/2020"
# This code is free to use and re-distribute, but I cannot be held responsible f... |
import numpy as np
import tensorflow as tf
import time
import math
import ipdb
from utils import *
np.random.seed(SEED)
from nav_model import *
from test_baseline import *
def create_model(session,config_object,is_training=True, force_new=False):
"""
session: tensorflow session
config_object: Config() instance wi... |
# 循环训练所有上市日期<399300开始日期的股票
import os
import sys
nb_dir = os.path.split(os.path.dirname(__file__))[0]
if nb_dir not in sys.path:
sys.path.append(nb_dir)
if os.getcwd() not in sys.path:
sys.path.append(os.getcwd())
from keras.backend import clear_session
from LSTM_for_Stock.model import SequentialModel
from LS... |
import os
import numpy as np
import itertools
from numpy.core.defchararray import multiply
import prody as pr
import datetime
import math
import string
from ..basic import hull
from ..basic import utils
from ..basic.filter import Search_filter
from .graph import Graph
from .comb_info import CombInfo
from ..basic impor... |
import copy, six, traceback
from maya import OpenMaya as om
import pymel.core as pm
from pprint import pprint
from maya.app.general.shelfEditorWindow import shelfEditorWindow
from zMayaTools import maya_helpers, preferences
try:
from importlib import reload
except ImportError:
pass
from zMayaTools import maya_... |
import re
from collections import OrderedDict
import coreapi
import coreschema
import django_filters
from celery.worker.control import revoke
from django.http import QueryDict
from rest_framework.decorators import action
from rest_framework import status
from rest_framework.permissions import IsAuthenticated
from rest... |
import os
from ast import literal_eval
import numpy as np
import pandas as pd
from doepy import build
from tqdm import tqdm
from src import log, scoring, model
from src.approx import clustering
from src.log import append_data
def try_all_sampling(input_model: model.Model, k_list, log_file, num_samples=None, ds_scal... |
"""
Upstream these are imported into stats.diagnostic from
sandbox.stats.diagnostic. The remainder of this docstring is copied from that
file's docstring.
Author: josef-pktd
License: BSD-3
Notes
-----
Almost fully verified against R or Gretl, not all options are the same.
In many cases of Lagrange multiplier tests b... |
import datetime
import logging
import threading
import requests
from cartographer.models import TerraformCloudOrganization
logger = logging.getLogger(__name__)
def parse_tf_datetime_str(datetime_str):
"""Parse Terraform Cloud time string into a datetime object.
Example Terraform Cloud format: 2019-12-12T08... |
import csv
import datetime
import xlwt
from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.mail import EmailMultiAlternatives
from django.http import HttpResponseRedirect, HttpResponse, JsonResponse
from django.shortcuts import... |
#Use scikit-learn to grid search the batch size and epochs
import csv
import os
import numpy as np
import pandas as pd
from standard_plots import *
from sklearn.grid_search import GridSearchCV
from keras.wrappers.scikit_learn import KerasClassifier
from math import sqrt
from sklearn.metrics import mean_squared_error
fr... |
import numpy as np
import torch
import os
import sys
import functools
import torch.nn as nn
from torch.autograd import Variable
from torch.nn import init
import torch.nn.functional as F
import torchvision.models as M
class GANLoss(nn.Module):
def __init__(self, target_real_label=1.0, target_fake_label=0.0,
... |
#!/usr/bin/env python
from PySide import QtGui, QtCore
from PySide.QtCore import Qt, QEventLoop, QEvent, QObject
from juma.core import *
from juma.core.ModelManager import *
from juma.qt.controls.GenericTreeWidget import GenericTreeWidget
from juma.qt.helpers import addWidgetWithLayout, restrainWidgetToScreen
fro... |
from Modules.FileManager import FileManager, ProjectFileManager
from PIL import Image
from PIL import ImageEnhance
import matplotlib.pyplot as plt
# These disable some of the default key strokes that we will use
plt.rcParams['keymap.all_axes'] = '' # a
plt.rcParams['keymap.back'] = ['left', 'backspace', 'MouseButton.... |
#!/usr/bin/env python
# Given DNA sequence of a genome or a gene or a genomic region, analyze its codon usage
#
# Author: <NAME>
# Affiliation : National University of Singapore
# E-mail : <EMAIL>
#
# Input:
# The fasta file of gene sequence
#
# Output:
# Measures of codon usage:
# CUB, AAB, CHI, CAI, CBI, Fop
#
imp... |
import pygame
import numpy as np
from PPdraft_grid_algorithm import adj_tiles, maze_algorithm
import AI_v2
import time
grid_size = 4
pygame.init()
pygame.font.init()
# window setup 720p
display_width = 960
display_height = 720
# colours
black = (0, 0, 0)
white = (255, 255, 255)
red = (255, 0, 0)
green = (0, 255, 0)
b... |
#!/usr/bin/env python3
'''launches instances and runs JMeter on them'''
import argparse
import datetime
import glob
import logging
import math
import os
import re
import shutil
import subprocess
import sys
import ncscli.batchRunner as batchRunner
import jmxTool # assumed to be in the same dir as this script
logger ... |
#!/usr/bin/env python
# coding: utf-8
# ## 1. Multi-Class Classification:
# For the multiclass classification problem, there were six different datasets. Some of the datasets contain missing values. For example, TrainData1, TestData1 and TrainData3 contain some missing values (1.00000000000000e+99). Therefore, the fir... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import six
import random
import string
import sys
import uuid
import re
import copy
import datetime
from collections import OrderedDict
from six.moves import urllib_parse as urlparse, range
from IPy import IP, MAX_IPV4_ADDRESS, MAX_IPV6_ADDRESS
from . impo... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import datetime
import os
import sys
import warnings
# parse args
parser = argparse.ArgumentParser(
description='This is the main mnist and fashion mnist experiment.')
parser.add_argument(
'--outfile',
type=str,
help='json file to dump resu... |
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Models registries.
"""
from collections import Mapping, defaultdict, deque
from contextlib import closing
from operator import attrgetter
from weakref import WeakValueDictionary
import logging
import os
import threa... |
#!/usr/bin/env python2
from __future__ import print_function
import argparse
from sys import stdin, stdout, stderr, exit
import re
import os
import shutil
from tempfile import NamedTemporaryFile
# Quacks like a dict and an object
class slurpy(dict):
def __getattr__(self, k):
try:
return self[k]... |
# -*- coding: utf-8 -*-
"""
Created on Sun Dec 3 08:44:23 2017
@author: amitrc
"""
import tensorflow as tf
import numpy as np
import cv2
from glob import glob
import scipy.misc as scimisc
import os
import time
def im2double(inp):
return cv2.normalize(inp.astype(np.float32), None, 0.0, 1.0, cv2.NORM_MINMAX)
def... |
import threading
from tkinter import font
import tkinter, sys, getopt, os, textwrap
from math import floor, ceil
from time import sleep
from PIL import Image, ImageTk
from fuzzywuzzy import fuzz
from configparser import SafeConfigParser
import subprocess
def text2int(textnum, numwords={}):
if not numwords:
... |
import json
import random
from db import Db
# VARIABLES GLOBALES
db = Db()
gaNom = [ "Shaddock", "Bashunga", "VaChier", "GitansLand", "Iphone", "Pizza" ]
def creerGame():
""" Creer une nouvelle partie. """
gameNom = random.choice(gaNom)
db.execute("INSERT INTO Game(ga_nom, ga_latitude, ga_longitude, ga_centrex, g... |
import bson
import copy
import datetime
import dateutil.parser
import difflib
import pymongo
import re
from .. import files
from .. import util
from .. import config
from .basecontainerstorage import ContainerStorage
from ..auth import has_access
from ..web.errors import APIStorageException, APINotFoundException, APIP... |
#! /usr/bin/env python
# -*- coding: UTF-8 -*-
'''
A graph output class able to generate GraphML output with the yEd attributing extensions.
Created on 05.06.2012
@status: This is currently incomplete. It is based on a copy of
infrastructure.graph_layout.graphviz; when it has matures, the common parts
of both i... |
# -*- coding: UTF-8 -*-
#
# Copyright 2015-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 ... |
import os,sys
# add ibexHelper path , NEEDS TO BE ABSOLUTE !!!
# sys.path.append('/home/donglai/lib/ibex_fork/ibexHelper')
sys.path.append('/n/home00/nwendt/scriptsAndSoftware/repos/ibexHelper')
from ibexHelper.skel import CreateSkeleton, ReadSkeletons
from ibexHelper.util import GetBbox, ReadH5, WriteH5
from ibexHelp... |
from __future__ import print_function, division
import torch.nn as nn
import torch.nn.functional as F
import torch.utils.data
import torch
##############################
# U-NET
##############################
class UNetDown(nn.Module):
def __init__(self, in_size, out_size, normalize=True, dropout=0.0):... |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... |
"""
Silica's Control Flow Graph (CFG)
TODO: We need an explicit HeadBlock object?
"""
import tempfile
from copy import deepcopy
import ast
import astor
import magma
from silica.transformations import specialize_constants, replace_symbols, constant_fold
from silica.visitors import collect_names
from silica.cfg.types ... |
import abc
import glob
import hashlib
import logging
import os
import subprocess
import zipfile
import matplotlib.pyplot as plt
import numpy as np
import torch
from PIL import Image
from skorch.utils import to_numpy
from torch.utils.data import DataLoader, Dataset
from torchvision import datasets, transforms
from tqdm... |
# -*- coding: utf-8 -*-
"""
trace_simexp.execute
********************
Main module for execute phase related activities
"""
__author__ = "<NAME>"
def get_input() -> dict:
"""Get the command line arguments, read the info file, and construct dict()
The source of inputs are: command line arguments ... |
# Copyright 2017 Diamond Light Source
#
# 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... |
def gpu_queue(options):
"""
Queued up containers waiting for GPU resources
"""
import docker
import json
import os
import time
from vent.helpers.meta import GpuUsage
status = (False, None)
if (os.path.isfile('/root/.vent/vent.cfg') and os.path.isfile('/root/.vent/plugin_manifes... |
import os
import time
from datetime import timedelta
import pandas as pd
import pytest
from peakina.cache import InMemoryCache
from peakina.datasource import DataSource, read_pandas
from peakina.helpers import TypeEnum
from peakina.io import MatchEnum
@pytest.fixture
def read_csv_spy(mocker):
read_csv = mocker.... |
from os import getcwd
from sys import path
from time import sleep, time
from cv2 import resize
path.append(getcwd())
from foo.pictureR import pictureFind, ocr, wordsTemplate
from foo.adb import adbCtrl
from foo.logisticDepartment import ruleEncoder
class Room:
def __init__(self, adb, roomName, roomDirect):
... |
import logging
from threading import Thread, Lock
from schedule import Scheduler, Job, ScheduleError, ScheduleValueError
from resticweb.tools.job_build import JobBuilder
from resticweb.tools.local_session import LocalSession
from resticweb.models.general import Schedule, ScheduleJobMap
from wtforms import ValidationErr... |
# VXT
# Developed by <NAME>
#
# MIT License
# Copyright (c) 2021 <NAME>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, ... |
QURANCLOSE = '﴾'
QURANOPEN = '﴿'
COMMA = '\u060C'
SEMICOLON = '\u061B'
QUESTION = '\u061F'
HAMZA = '\u0621'
ALEF_MADDA = '\u0622'
ALEF_HAMZA_ABOVE = '\u0623'
WAW_HAMZA = '\u0624'
ALEF_HAMZA_BELOW = '\u0625'
YEH_HAMZA = '\u0626'
ALEF = '\u0627'
BEH = '\u0628'
TEH_MARBUTA = '\u0629'
TEH = '\u062a'
THEH = '\u062b'
JEEM = ... |
# This was based on some code from https://github.com/mirumee/saleor
# but adapted to use relay, automatic field detection and some code adjustments
import collections
import collections.abc
import itertools
from typing import Any, Dict, Generic, List, Optional, Type, TypeVar, cast
from django.core.exceptions import ... |
#!/usr/bin/env python
# encoding: utf-8
# <NAME> <<EMAIL>>
# Fri 21 Mar 2014 10:37:40 CET
'''General utilities for building extensions'''
import os
import re
import sys
import glob
import platform
import pkg_resources
from . import DEFAULT_PREFIXES
def construct_search_paths(prefixes=None, subpaths=None, suffix=Non... |
# Copyright (c) 2018 Cisco and/or its affiliates.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... |
import os.path as op
from subprocess import check_output
import pandas as pd
from ob_genomics.config import cfg
import ob_genomics.database as db
from ob_genomics.utils import is_numeric
REFERENCE = cfg['REFERENCE']
# TODO: move these to config.yml
IMMUNE_LANDSCAPE = op.join(REFERENCE, 'tcga', 'immune_landscape.csv... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import re
import pwd
import sys
sys.dont_write_bytecode = True
from copy import deepcopy
from ruamel import yaml
from pathlib import Path
from fnmatch import fnmatch
from contextlib import contextmanager
from argparse import ArgumentParser, Action
from leather... |
from mqtt_client import MqttClient
import stmpy
import logging
import json
import time
from threading import Thread
MQTT_BROKER = "mqtt.item.ntnu.no"
MQTT_PORT = 1883
MQTT_TOPIC_SENSOR = "ttm4115/team_1/project/sensor"
MQTT_TOPIC_CONNECTION = "ttm4115/team_1/project/connectionController"
MQTT_TOPIC_QR = "ttm4115/team... |
# -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2018, GEM Foundation
# OpenQuake is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the Licen... |
from collections import OrderedDict
import gin
import matplotlib.cm as cm
import numpy as np
import pandas as pd
import plotly.graph_objs as go
import seaborn as sns
import torch
from graphviz import Digraph
from matplotlib import pyplot as plt
from sklearn.cluster import KMeans
from sklearn.decomposition import PCA
i... |
from time import time
import numpy as np
import biorbd
from casadi import Function, MX
from biorbd_optim import (
Instant,
OptimalControlProgram,
Constraint,
ConstraintList,
Objective,
ObjectiveList,
DynamicsType,
DynamicsTypeList,
BidirectionalMapping,
Mapping,
StateTransi... |
#
# Copyright (c) 2012, 2013, 2014 Hewlett-Packard Development Company, L.P.
#
# 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 requi... |
from django.shortcuts import render, redirect
from basicInfo.models import account as Account, course as Course, student as Student, major as Major, discipline as Discipline, takeup as Takeup, teacher as Teacher, college as College, belong as Belong
from .models import Selection, Teach, CreditNeed, Curriculum, SelectCo... |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import copy, re, os, functools
from waflib import Task, Utils, Logs, Errors, ConfigSet, Node
feats = Utils.defaultdict(set)
HEADER_EXTS = ['.h', '.hpp', '.hxx', '.hh']
class task_gen(object):
... |
import os
import errno
import stat
import subprocess
from pwd import getpwuid
from uuid import uuid4
from pathlib import Path
from tempfile import TemporaryDirectory, NamedTemporaryFile
from urllib.parse import urljoin
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.contrib.auth.mode... |
from datetime import datetime
from re import A
import gym
import gym.spaces
import numpy as np
import os
import random
import torch
from torch.distributions.categorical import Categorical
from torch.distributions.multivariate_normal import MultivariateNormal
import torch.nn as nn
import torch.nn.functional as F
from to... |
#!/usr/bin/env python
# http://trac.secdev.org/scapy/ticket/353
# scapy.contrib.description = IKEv2
# scapy.contrib.status = loads
from scapy.all import *
import logging
## Modified from the original ISAKMP code by <NAME> <<EMAIL>>, June 2010.
import struct
from scapy.packet import *
from scapy.fields import *
fr... |
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
# Copyright 2020 <NAME>
# Modified model creation / weight loading / state_dict helpers
import logging
import os
import sys
import math
from collections import OrderedDict
from copy import deepcopy
from typing import Callable
import torch
import ... |
import os, functools
import pandas as pd
import numpy as np
import seaborn as sns
from scipy.stats import pearsonr, spearmanr
import matplotlib.pyplot as plt
import matplotlib
from matplotlib.colors import ListedColormap
from sklearn.preprocessing import minmax_scale
from matplotlib import colors
from utilities.stati... |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
impor... |
import tkinter as tk
import time as tm
import datetime
import os
import glob
import inspect
# Display Settings
monitor_resolution = '1024x600'
fullscreen_boolean = False
# Gets the canonical path, eliminating any symbolic links
module_path = inspect.getfile(inspect.currentframe())
# Builds working directory using ca... |
# Copyright (C) 2020 Red Hat Inc.
#
# Authors:
# <NAME> <<EMAIL>>
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
from typing import IO, Match, NamedTuple, Optional, Literal, Iterable, Type, Dict, List, Any, TypeVar, NewType, Tuple, Union
from pa... |
"""One of the primary purposes of mokapot is to assign confidence estimates to
PSMs. This task is accomplished by ranking PSMs according to a score and using
an appropriate confidence estimation procedure for the type of data. mokapot
can provide confidence estimates based any score, regardless of whether it was
the re... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Other support utils.
"""
import logging
from bisect import bisect
from fnmatch import fnmatch
import getpass
from datetime import datetime
import os
import tempfile
from collections import MutableMapping as DictMixin
import dateutil.relativedelta as relativedelta
fro... |
import random
import json
import colorama
from colorama import Fore, Back, Style, init
colorama.init()
init(autoreset=True)
#Variaveis------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------... |
"""
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import contextlib
import itertools
import unittest
from collections import defaultdict
from os.path import dirname, join, realpath
from decimal import Decimal
from aspen import log, resources
from aspen.utils import utcnow
from... |
"""
ZCML directives for everest.
This file is part of the everest project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Created on Jun 16, 2011.
"""
from pyramid.compat import iteritems_
from pyramid.threadlocal import get_current_registry
from pyramid_zcml import IViewDirective
from ... |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import json
import os
import threading
import time
import math
from obscmd import globl
from obscmd.constant import STORAGE_CLASS, STORAGE_CLASS_TR, HEADER_PARAMS
from obscmd.utils import calculate_etag
from obs import ObsClient, DeleteObjectsRequest, Object, ListMultipart... |
#!/usr/bin/env python
#-*- coding:utf-8; mode:python; indent-tabs-mode: nil; c-basic-offset: 2; tab-width: 2 -*-
import csv, json
from .check import check
from .size import size
from .string_util import string_util
from bes.compat.StringIO import StringIO
class table_row(list):
def __init__(self, *args, **kwargs)... |
import torch.utils.data as data
from PIL import Image
import os
import os.path
import zipfile as zf
import io
import logging
import random
import copy
import numpy as np
import time
import torch
import sys
from dataloaders.utils import decode_segmap
from torch.utils.data import DataLoader
import matplotlib.pyplot as p... |
# plotting_static
# TO BE EDITED
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
import seaborn as sns
from pandas.plotting import register_matplotlib_converters
import matplotlib.dates as mdates
from matplotlib import rcParams, rc
import sys
import pickle
register_matplotlib_converters()
# impo... |
import tensorflow as tf
from tensorflow.contrib import autograph
def get_model(is_training):
texture = tf.placeholder(tf.float32, shape=(None, 256, 256, 3), name='texture_input')
ref = tf.placeholder(tf.float32, shape=(None, 64, 64, 3), name='ref_input')
label = tf.placeholder(tf.float32, shape=(None, 256, 256, 1),... |
import time
import pandas as pd
import os
from hungarian import *
from collections import deque
import multiprocessing as mp
import numpy as np
import sys
sys.setrecursionlimit(1000000)
sys.getrecursionlimit()
class TreeNode: # This is the node for tree serch
def __init__(self, builidng_id, location_id, tree_... |
# Copyright (c) 2021 Graphcore Ltd. 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 l... |
from argparse import ArgumentParser
import torch
import torch.nn as nn
from torch import Tensor
import torch.nn.functional as F
from torchvision.models.mobilenetv2 import _make_divisible
from typing import Callable, List, Union
from .torch_model import BaseModel
from functools import partial
from .EfficientNet import S... |
#! /usr/bin/env python
"""
Prepare prefixes and conflicts data from jarvis for route leaks detection.
entry points:
create_from_scratch
Create merged files from input daily files from jarvis
update_day_from_files
Update merged files with one additional day (daily file from jarvis)
"""
import argparse
from datetime i... |
import sys
from gibson2.envs.base_env import BaseEnv
import time
import pybullet as p
import numpy as np
from numpy import array
import torch
import matplotlib.pyplot as plt
import ray
import itertools
import cv2
import copy
from importlib import reload
import math
from src.nn_nav import CNN_nav, Decoder_nav
from sr... |
import torch
from torch import distributions, nn
import torch.nn.functional as F
from typing import *
from .conv_blocks import ResidualModel
from ..config import *
class BasicActorCriticNetwork(nn.Module):
def __init__(
self,
block_kwargs: Sequence[Dict],
use_adaptive_avg_pool... |
#!/usr/bin/env python
from __future__ import print_function
"""
The module corresponds to the low level control system of the vehicle, contains the path following algorithms so at to the
vehicle follows the determined path and the algorithms for the speed control
"""
# =================================================... |
import tkinter as tk, threading
from tkinter import *
import tkinter.font
from tkinter import filedialog
from tkinter.font import *
import imageio
from imageio import *
from PIL import *
import cv2
from cv2 import *
import PIL
from PIL import Image, ImageTk
from PIL import *
import os, sys
import time
fr... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import *
import json, pickle
from django.db import models
from django.db.models import F, Func
from django.utils import timezone
from config.constants import ALL_DEVICE_PARAMETERS
from django.contrib.postgres import fields
from config.s... |
import os
import os.path
import time
import subprocess
import numpy as np
import imageio
import read_log
from entity_layer import EntityLayer
from terrain_layer import TerrainLayer
from overlay_layer import OverlayLayer
from resource_layer import ResourceLayer
class Timer:
def __init__(self):
self.total... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author : sdhm
# Description:
# Date : 06/08/2019 14:22 PM
# File Name : cal_grasp_from_file.py
# Note: this file is written in Python2
import numpy as np
import voxelgrid
import pcl
from autolab_core import YamlConfig
from dexnet.grasping import RobotGripper
f... |
import sys
import time
import argparse
import numpy as np
from donkeycar.parts.network import MQTTValuePub, MQTTValueSub
sys.path.insert(1, "/u/95/zhaoy13/unix/ICRA/donkeycar-dreamer")
sys.path.insert(1, "/home/ari/Documents/donkeycar-dreamer")
sys.path.insert(1, "/u/70/viitala1/unix/Documents/Dippa/donkeycar-dreamer"... |
import pygame
import random
import time
import sys
pygame.init()
# definicion de colores
blanco = pygame.Color(255,255,255)
negro = pygame.Color(0,0,0)
rojo = pygame.Color(255,0,0)
rojo_o = pygame.Color(100,0,0)
gris = pygame.Color(200,200,200)
verde = pygame.Color(0,250,100)
verde_o = pygame.Color(0,150,50)
morado = ... |
#!/usr/bin/env python
import sys, os, re
from cachetools import cached
import subprocess
import zipfile
import shutil
import random
import strbalance
num_re = r'\[([0-9]+.?END[0-9]*)\]'
image_postfix = '[Twine.image]'
formats = shutil.get_unpack_formats()
valid_zip_extensions = []
for f in formats:
valid_zip_extens... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.