text stringlengths 6.04k 39.5k |
|---|
# Copyright (c) 2016-2018, The University of Texas at Austin
# & University of California, Merced.
#
# All Rights reserved.
# See file COPYRIGHT for details.
#
# This file is part of the hIPPYlib library. For more information and source code
# availability see https://hippylib.github.io.
#
# hIPPYlib is free software;... |
# coding=utf-8
# Copyright 2019 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
import tensorflow as tf
import numpy as np
import glob
import os
import xmltodict
import json
from datetime import datetime, date, time
import cv2
import sys
import signal
import getopt
import pickle
import voc
import common
import multiprocessing
from tqdm import tqdm
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_integer("b... |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.shortcuts import render
from django.db.models import Q
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404
fro... |
import argparse
import logging
import os
import sys
import warnings
import matplotlib.pyplot as plt
import numpy as np
from astropy.io import fits
from logutils import BraceMessage as __
from spectrum_overload import Spectrum
import simulators
from mingle.models.broadcasted_models import inherent_alpha_model
from min... |
import pygame
import os
from ship import Ship
from item import Bonus, Asteroid, Bullet, BULLET_SCALE, Heart, Explosions_vfx
from random import randint
import pygame.freetype
from pygame.sprite import Sprite
from pygame.rect import Rect
from enum import Enum
from SpriteAnim import BASE_ASSET_PATH, BASE_PATH
PARALLAX_B... |
import random
BLACK_JACK = 21
OPCION_PEDIR_CARTA = "1"
OPCION_PLANTARSE = "2"
OPCION_PERDIO = "3"
TOKEN_SEPARACION_DATOS_CARTA = "|"
TOKEN_SEPARACION_CARTAS = "&"
TREBOL = "TREBOL"
PICA = "PICA"
DIAMANTE = "DIAMANTE"
CORAZON = "CORAZON"
PINTAS = [TREBOL, PICA, DIAMANTE, CORAZON]
AS = "AS"
TWO = "TWO"
THREE = "THREE"
F... |
import numpy as np
from numpy import cross
from numpy.linalg import norm
import pinocchio
from pinocchio import SE3, Quaternion, Motion
from pinocchio.utils import rotate
from ndcurves import polynomial, SE3Curve, SO3Linear
from hpp.corbaserver.rbprm.rbprmstate import State, StateHelper
from random import uniform
impo... |
import math
from functools import partial
from pathlib import Path
import cv2
import numpy as np
import pandas as pd
from matplotlib import pyplot as plt
from sklearn.cluster import DBSCAN
from sklearn.neighbors import LocalOutlierFactor
from statsmodels.stats.weightstats import DescrStatsW
from tqdm import tqdm
from ... |
from __future__ import print_function
from run_state import RunState
import argparse
import numpy as np
import pandas as pd
import csv
import os
from astropy.io import fits
from sklearn.metrics import roc_auc_score
from sklearn.model_selection import train_test_split
from sklearn.model_selection import StratifiedSh... |
# Original Author: Keenan
# Author: <NAME>
# Date: August 24, 2017
#
# Description: A Spark application to register drone images. Images should be in
# in a group of 5 chennels. For example, IMG_OOO1 group should have
# 5 images representing various chennels e.g IMG_OOO1_1.png to IMG_OOO1_5.pn... |
""" Vision Transformer (ViT) in PyTorch
A PyTorch implement of Vision Transformers as described in
'An Image Is Worth 16 x 16 Words: Transformers for Image Recognition at Scale' - https://arxiv.org/abs/2010.11929
The official jax code is released and available at https://github.com/google-research/vision_transformer
... |
import numpy as np
np.seterr(divide='ignore', invalid='ignore')
import time
from collections import deque
from random import shuffle
from settings import s
from settings import e
import random
from sklearn.ensemble import RandomForestRegressor
#####################################################################... |
# coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import clean_html, parse_duration, unescapeHTML, urljoin
class NhkBaseIE(InfoExtractor):
_API_URL_TEMPLATE = 'https://api.nhk.or.jp/nhkworld/%sod%slist/v7a/%s/%s/%s/all%s.json'
_BASE_URL_REGEX = ... |
# QtCreator debugging helpers for CodePorting.Native.Cs2Cpp
from dumper import Children, SubItem
from utils import DisplayFormat
NULL_VALUE = '<null>'
EMPTY_VALUE = '<empty>'
OBJECT_DELETED = '<object deleted>'
NOT_INITIALIZED = '<not initialized>'
DAY_OF_WEEK = [ 'Sunday', 'Monday', 'Tuesday', 'Wednesday'... |
"""
Function:
motivation, why should we cansider the Noisy Input in Gaussian Processing (NIGP):
The influence of noisy input on standard GP algorithms
Setting:
Noisy input with OR without?
Running very slowly
Figure 1 in PAC-NIGP introduction section
"""
import numpy as ... |
# -*- test-case-name: wokkel.test.test_data_form -*-
#
# Copyright (c) <NAME>.
# See LICENSE for details.
"""
Data Forms.
Support for Data Forms as described in
U{XEP-0004<http://xmpp.org/extensions/xep-0004.html>}, along with support
for Field Standardization for Data Forms as described in
U{XEP-0068<http://xmpp.org... |
# -*- coding: utf-8 -*- #
# Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... |
#!/usr/bin/env python
from __future__ import absolute_import, division, print_function, unicode_literals
import sys
import os
import json
import requests
from requests.auth import HTTPBasicAuth
import utility
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "lib"))
from splunklib.searchcommands import... |
import csv
import json
from itertools import tee
import numpy as np
from Bio import SeqIO
import pysam
import pandas as pd
import seaborn as sns
import matplotlib
import matplotlib.pyplot as plt
matplotlib.use('Agg')
def extract_lanl_genome(lanl_input, lanl_id, fasta_output):
records = SeqIO.to_dict(SeqIO.parse(l... |
import sys, codecs
from unidecode import unidecode
import re
import matplotlib.pyplot as plt
import networkx as nx
from statistics import median
from collections import Counter
import numpy as np
import matplotlib.patches as mpatches
G = nx.Graph()
GM = nx.Graph()
#threshold=0.0
fh=codecs.open("modi... |
"""Takes a webhook request from API gateway and clones a repository to an S3 bucket
A AWS lambda function that is triggered by a API gateway endpoint. It clones a repository
from either Bitbucket Cloud or from Github and creates a zip file that is uploaded to
a specified S3 bucket for consumption by e.g a CodePipeline... |
#!/usr/bin/env python
from __future__ import absolute_import
from .annotator import Annotator, AnnoTier, AnnoSpan
from .spacy_annotator import SpacyAnnotator
from .structured_data_annotator import StructuredDataAnnotator
from dateparser.date import DateDataParser
from dateutil.relativedelta import relativedelta
import ... |
import abc
import asyncio
import copy
import enum
from concurrent.futures.thread import ThreadPoolExecutor
from typing import List, Dict
from discord import File, Message
from wiezenlibrary.Card import Card
from wiezenlibrary.Card import CardType
from wiezenlibrary.Deck import Deck
from wiezenlibrary.Player import Pl... |
# -*- coding: utf-8 -*-
"""
utils.web
~~~~~~~~~
Some web app tool classes and functions.
:copyright: (c) 2019 by staugur.
:license: BSD 3-Clause, see LICENSE for more details.
"""
import imghdr
from posixpath import basename, splitext
from os.path import join as pathjoin
from io import BytesIO
fr... |
"""Use information provided by input file to generate NDI data request.
**Input file**:
- SAS7BDAT, CSV, JSON
- specify column names using parameters
**Output file**:
- file according to NDI coding specifications
.. note:: National Center for Health Statistics. National Death Index user’s guide. Hyatt... |
import csv
import torch
import dgl
from dgl.data import dgl_dataset
f = open('D:\subject\graduate\graph computation\data\offline\\train0.csv', 'r')
reader = csv.reader(f)
'''
day = 0
num = 0
dic = [{}, {}]
for i in reader:
# print(i)
if (int(i[1]) > day):
dic = [{}, {}]
day = int(i[1])
i... |
__all__ = [
# InstructionField
"Operand"
, "Opcode"
, "Reserved"
, "re_disas_format"
, "Instruction"
, "InstructionTreeNode"
, "build_instruction_tree"
, "check_unreachable_instructions"
]
from .constants import (
BYTE_BITSIZE,
)
from bisect import (
insort,
)
from collections i... |
# Opencv GUI
##Revisions##
# positions should be stored in the window class with the items instead of in the object's class
#############
import cv2
import numpy as np
import warnings
import matplotlib.pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure imp... |
#!/usr/bin/env python3
import dis
import functools
import importlib
import inspect
import itertools
import math
import os
import random
import re
import shutil
import sys
import textwrap
import traceback
from contextlib import contextmanager, redirect_stderr, redirect_stdout
from dataclasses import dataclass
from path... |
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
import pdb, os, argparse
from tqdm import tqdm
from datetime import datetime
from model.DCF_models import DCF_VGG
from model.DCF_ResNet_models import DCF_ResNet
from model.depth_calibration_models import discriminator, d... |
""" Part of the YABEE
"""
bl_info = {
"name": "Panda3d EGG format",
"author": "<NAME>",
"blender": (2, 6, 0),
"api": 41226,
"location": "File > Import-Export",
"description": ("Export to Panda3D EGG: meshes, uvs, materials, textures, "
"armatures, animation and curves"),
... |
# Helper functions for differentiable image warping
# Code based on https://github.com/seasonSH/WarpGAN
import torch
import numpy as np
import time
def umeyama(src, dst, estimate_scale):
"""Estimate N-D similarity transformation with or without scaling.
Parameters
----------
src : (M, N) array
S... |
""" Level 4 geometry functions
"""
import itertools
import numpy
import automol.graph
import automol.zmat.base
import automol.inchi.base
from automol import util
from automol.geom import _pyx2z
from automol.geom.base import from_subset
from automol.geom.base import symbols
from automol.geom.base import coordinates
fro... |
#!/usr/bin/env python3
#
# Requirements:
# - ( python3-mimeparse: Read MIME type )
# - python3-exif: Image TAG reading
# - python3-mediainfodll: Music/Video TAG reading
# - ( python3-pytaglib: Music/Video TAG reading )
# - ( python3-mutagen: Music/Video TAG reading )
#
# import logging
# from sys import argv, stdout
# ... |
from CommonServerPython import *
from CommonServerUserPython import *
''' IMPORTS '''
from google.cloud import storage
from typing import Any, Dict
import requests
import traceback
import urllib3
''' GLOBALS/PARAMS '''
RFC3339_DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S.%fZ'
DEMISTO_DATETIME_FORMAT = '%Y-%m-%dT%H:%M:%S'
... |
import numpy as np
import cv2
import matplotlib.pyplot as plt
# ----------------------------------------------------------------------- #
# ------------------ Convolution Sliding Window Search ------------------ #
# ----------------------------------------------------------------------- #
def window_mask(width, heigh... |
import argparse
import math
import h5py
import numpy as np
import tensorflow as tf
import socket
import importlib
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
ROOT_DIR = os.path.dirname(BASE_DIR)
sys.path.append(BASE_DIR)
sys.path.append(ROOT_DIR)
sys.path.append(os.path.join(ROOT_DIR, 'm... |
import sys
import numpy as np
import torch
from config import config
import pydicom as dicom
import numpy as np
from scipy.sparse import csc_matrix
from collections import defaultdict
import os
import shutil
import operator
import warnings
import numpy as np
# import matplotlib as mpl
# mpl.use('TkAgg')
# import matplo... |
import glob
import json
import os
import pickle
import random
import sys
import time
from contextlib import contextmanager
from functools import wraps
from queue import PriorityQueue
from typing import (
Callable,
Dict,
Hashable,
Iterable,
List,
NamedTuple,
Optional,
Sequence,
Set,
... |
"""
File Name: genome_dataset.py
Project: bioseq-learning-cd
File Description:
"""
import os
import random
import logging
import resource
from bisect import bisect
from multiprocessing import Pool, cpu_count
from typing import Tuple, List, Set, Dict, Iterable, Iterator, Optional, Union
import tor... |
from pandas import CategoricalDtype
import pandas
import pydre.core
import numpy as np
import logging
import os
import datetime
import struct
import typing
from typing import List
from pathlib import Path
logger = logging.getLogger(__name__)
filtersList = {}
filtersColNames = {}
def registerFilter(jsonname=None,... |
#!/usr/bin/env python
"""
Collects statistics from the Couchbase REST API and forwards them to a 3rd party
monitoring server.
Dependencies
* python-requests
* PyYAML
For Nagios:
* nsca-client or nsca-ng-client
"""
import argparse
import json
import logging as log
import logging.config
import numbers
import ope... |
import cv2
import numpy as np
from xml.dom import minidom
import os
import subprocess
import matplotlib.pyplot as plt
class Point(object):
def __init__(self, x, y):
self.x = x
self.y = y
class Object(object):
def __init__(self, obj_id):
self.obj_id = obj_id
self.times = []
... |
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
def to_contiguous(tensor):
if tensor.is_contiguous():
return tensor
else:
return tensor.contiguous()
class RewardCriterion(nn.Module):
def __init__(self):
su... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Functions to manage the 3d simulation
"""
import math
import os
import random
from matplotlib import pyplot as plt
from matplotlib import cm
import numpy as np
from PIL import Image
from . import depth_manager
IMAGE_WIDTH = 1280
IMAGE_HEIGHT = 720
H_FOV_DEGREES ... |
import numpy as np
import pymsgbox
from quickfs_scraping.web_scraping import scrape_yahoo_analyst_growth_rate
from quickfs_scraping.api_scraping import get_general_ticker_data, get_ttm_eps
from quickfs_scraping.dataframe_handler import rule1_results_to_dataframe
# Formula for calculating compound growth rates
def ca... |
import numpy as np
import pandas as pd
# import seaborn as sns
# import matplotlib.pyplot as plt
import plotly.express as px
import plotly.io as pio
import plotly.graph_objects as go
import math
# from matplotlib import style
import urllib.request
import json
from pathlib import Path
import os
import warnings
warn... |
import discord
from discord.ext import commands
from cogs.utils import checks
from cogs.utils.dataIO import dataIO
from cogs.utils.chat_formatting import box, pagify
from copy import deepcopy
import asyncio
import logging
import os
log = logging.getLogger("red.admin")
class Admin:
"""Admin tools, more to come."... |
#!/usr/bin/python3
import numpy as np
import nltk
import os
import ast
import pickle
import tensorflow as tf
import random
import configparser
from tqdm import tqdm
import string
import argparse
import math
import sys
def getWordID(word, shouldAddToDict=True):
word = word.lower()
wordID = wordIDMap.get(word, -1)
i... |
"""
I initially didn't think of how to rewrite the expansions as an
expression, so I thought I would have to manipulate the parent
block by adding these hiddious temporary variables.
a = [*[1, 2, *[3, 4], 5], 6]
upg_args_0 = []
upg_args_1 = []
upg_args_1.append(1)
upg_args_1.append(2)
upg_args_1.extend([3, 4])
upg_ar... |
# The MIT License (MIT)
# Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors
#
# 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 wi... |
# #!
# # NNabla by Examples
# # (https://nnabla.readthedocs.io/en/latest/python/tutorial/by_examples.html)
import matplotlib.pyplot as plt
import nnabla as nn
import nnabla.functions as F
import nnabla.parametric_functions as PF
import nnabla.solvers as S
import numpy as np
from nnabla.ext_utils import get_extension_... |
#!/usr/bin/env python3
"""
Statistical module for phys2cvr.
Attributes
----------
LGR :
Logger
"""
import logging
import os
import numpy as np
import matplotlib.pyplot as plt
import scipy.stats as sct
from phys2cvr import io
from phys2cvr.io import SET_DPI, FIGSIZE
from phys2cvr.signal import resample_signal
... |
# Copyright (c) 2022 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... |
#!/usr/bin/env python3
""" Methods for manipulating linkographs."""
import json # For handling files in the json format.
import csv # For parsing csv style files.
import argparse # For command line parsing.
class Linkograph(list):
""" Linkographs are lists of tuples. """
def __init__(self, items=[], lab... |
"""
Python job scheduling for humans.
An in-process scheduler for periodic jobs that uses the builder pattern
for configuration. Schedule lets you run Python functions (or any other
callable) periodically at pre-determined intervals using a simple,
human-friendly syntax.
Inspired by <NAME>' article "Rethinking Cron" ... |
# -*- coding: utf-8 -*-
#
# django-codenerix-invoicing
#
# Codenerix GNU
#
# Project URL : http://www.codenerix.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/l... |
# Standard Library
import contextlib
import warnings
from copy import deepcopy
from functools import lru_cache
# GraphQL
import graphene
from graphene.types.inputobjecttype import InputObjectTypeOptions
from graphene.types.utils import get_field_as
from graphene_sqlalchemy.converter import convert_sqlalchemy_type
from... |
"""
TUNIT: Truly Unsupervised Image-to-Image Translation
Copyright (c) 2020-present NAVER Corp.
MIT license
"""
"""
R-TUNIT: Really Truly Unsupervised Image-to-Image Translation
<NAME> - Ecole Normale Superieure.
Apache license 2.0
"""
import argparse
import warnings
from datetime import datetime
from glob import glob... |
"""Offer functions for generating outputs in the drive.
This module offer functions to generate outputs in the drive.
The module depends on the ``database`` module.
The module contains the following public functions to be called externally:
``init()`` initializes the ``outputtools`` module.
``create_temp()`` creates... |
"""Implements Well class."""
# pylint: disable=abstract-method
import warnings
from copy import copy, deepcopy
from functools import wraps
from collections import defaultdict, Counter
import numpy as np
import pandas as pd
from .base_delegator import BaseDelegator
from .abstract_classes import AbstractWell
from .wel... |
from datetime import datetime
import requests
import json
import hashlib
import sqlite3
from bs4 import BeautifulSoup
import os.path
from os import path
import time
import random
import threading
import os
# import pytesseract
# try:
# import Image
# except ImportError:
# from PIL import Image
agents = [
... |
import os
import sqlite3
import pandas as pd
import imp
imp.load_source("PostProcessDbUtils", os.path.join(os.path.dirname(os.path.realpath(__file__)), "post-process-db-utils.py"))
from PostProcessDbUtils import *
def getNodeAggregatedTimeStats(db, runID, processID, callPathID, window=None):
## 1 - handle windowed ... |
import torch
import torch.nn as nn
import torch.nn.modules.conv as conv
from torch import Tensor
from typing import Type, Any, Callable, Union, List, Optional
class AddCoords(nn.Module):
def __init__(self, rank, with_r=False, use_cuda=False):
super(AddCoords, self).__init__()
self.rank = rank
... |
#
# Copyright (c) 2013-2018 Quarkslab.
# This file is part of IRMA project.
#
# 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 in the top-level directory
# of this distribution and at:
#
# http:... |
#!/bin/python
#pylint: disable=too-few-public-methods, missing-docstring, C0413
#-----------------------------------------------------------------------------
# Image Processing Library
#
# MIT License
# Copyright (c) 2018 <NAME> (<EMAIL>)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy... |
import h5py
import matplotlib.pyplot as plt
from matplotlib import animation
import numpy as np
# Read vtk files and store them in a hdf5 file
def read_vtk(save_file, case, path, filename, h=None, close=True):
"""Read the .vtk file and store it in a HDF5 file
Parameters
----------
save_file : str
... |
#!/usr/bin/python3
"""Saved output comparison plots for the ETGM paper"""
# Standard Packages
import sys; sys.path.insert(0, '../'); sys.path.insert(0, '../../')
import logging
# 3rd Party Packages
import matplotlib.pyplot as plt
# Local Packages
import modules.utils as utils
from plotting.modules.plotstyles import... |
'''
Jogo Flappy Bird em Python
Utilizando a biblioteca: PyGame
Criado por: <NAME>
Versão: 1.0
Atualizado em: 11/06/2021
'''
# pylint: disable=no-member
# pylint: disable=too-many-locals
# pylint: disable=too-many-branches
# pylint: disable=too-many-statements
# pylint: disable=c-extension-no-member
# pylint: disable=n... |
# 导入类库
import os.path
import os
import datetime
import lightgbm as lgb
from sklearn.model_selection import train_test_split
from gensim.models import Word2Vec
from pandas import read_csv
import re
import pandas as pd
import numpy as np
import itertools
import sys
def get_dict(file): ... |
from manimlib.imports import *
LEFT_DIST = 4
FUNC_LABEL_FACT = 1.2
VERT_DIST = 4
L = 0.5
R = 3
NUM_SECT = 3
SECT2 = 6
SECT3 = 12
DX = (R-L)/NUM_SECT
DX2 = (R-L)/SECT2
DX3 = (R-L)/SECT3
xi = 2.64064
class graphs(GraphScene, ZoomedScene):
CONFIG = {
"y_max": 15,
"y_min": 0,
"x_max": 3.5,
... |
import os, sys
import pandas as pds
from rdflib import Graph, URIRef, OWL, RDF, RDFS, Literal, BNode, Namespace
from rdflib.namespace import RDFS, DCTERMS, NamespaceManager
def mixs_sheet_df_to_rdf (
sheet_df,
mixs_version,
package_name,
file_name,
term_type='class',
b... |
import os
import pygame
import random
from pygame import *
import numpy as np
from .sprites.sprite_path import sprite_path
import gym
from gym import error, spaces, utils
from gym.utils import seeding
pygame.init()
scr_size = (width,height) = (600,150)
gravity = 0.6
black = (0,0,0)
white = (255,255,255)
backgroun... |
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse,HttpRequest,HttpResponseRedirect,QueryDict
from django.test.client import Client
import urllib3
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from django.contrib.auth.models imp... |
from datetime import datetime, timedelta
from django.core.cache import cache
from django.db import models
from django.utils.translation import ugettext_lazy as _lazy
from elasticutils.contrib.django import Indexable, MLT
from product_details import product_details
from rest_framework import serializers
from statsd im... |
'''
MIT License
Copyright (c) 2019 <NAME> and <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publ... |
# -*- coding: UTF-8 -*-
# vim: sw=4:expandtab:foldmethod=marker
#
# Copyright (c) 2006, <NAME>
# 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 th... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals # at top of module
import json
import logging
import os
import sys
import zipfile
import random
from io import open
from lxml import etree
from lxml import html
from markdown import markdown
from pprint import pprint
from yattag impo... |
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 22 16:29:08 2018
@author: usuario
"""
"""
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
SECTION 0.
loading libraries and defining some variables
"""
import logging
logging.getLogger("tensorflow").setLevel(logging.WARNING)
from numpy.rando... |
from tetris_mino import tetrimino
from tetris_utils import fire
from network_config import *
from tetris_data import *
import pygame as pg
import random
import torch
import numpy as np
import time
import copy
import asyncio
class controller:
I_mino = tetrimino(1, I_layout, i_srs, i_spawn)
J_mino = tetrimino(2... |
"""
Calculate traditional approximately neutral surfaces, namely potential density
surfaces and in-situ density (or specific volume) anomaly surfaces, from
structured ocean data.
"""
import numpy as np
from time import time
from neutralocean.surface._vertsolve import _make_vertsolve
from neutralocean.ppinterp import... |
import os.path
import time
from collections import defaultdict
# import ray
import cv2
import numpy as np
import pandas as pd
import utils.metrics as metrics
from joblib import Parallel, delayed
from scipy import spatial
from tqdm import tqdm
from utils.hpatch import get_patch
from utils.misc import green
PARALLEL_E... |
#
# Copyright 2017 Atomwise Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
# associated documentation files (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge, publish, distrib... |
#!/usr/bin/env python
import sys
import os
import argparse
import logging
import struct
import datetime as dt
import numpy as np
from netCDF4 import Dataset
__version__ = '1.3.5'
C = 299792458 # m.s-1
TYPES = {
'float32': 'f',
'float64': 'd',
'int16': 'h',
'int32': 'i',
'uint8': 'B',
'uint1... |
# Copyright 2022 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 bookmarks
import messages
from pluginupdateservice import PluginUpdateService
from DumbTools import DumbKeyboard, DumbPrefs
from AuthTools import CheckAdmin
TITLE = 'PrimeWire'
PREFIX = '/video/lmwtkiss'
GIT_REPO = 'Twoure/lmwt-kiss.bundle'
DEFAULT_C... |
# arblib.py
#
# AR Builder Library
# Utility classes and methods for AR Builder.
# pylint: disable=missing-docstring
import enum
import scipy
from arena import (Box, Circle, Color, Cone, Cylinder, Dodecahedron,
Icosahedron, Light, Material, Object, Octahedron, Plane,
Position, R... |
"""Home Assistant control object."""
import asyncio
from contextlib import asynccontextmanager, suppress
from datetime import datetime, timedelta
from ipaddress import IPv4Address
import logging
import os
from pathlib import Path
import re
import secrets
import time
from typing import Any, AsyncContextManager, Awaitabl... |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# =====================================
# @Time : 2021/12
# @Author : <NAME> (Tsinghua Univ.)
# @FileName: train_script4fsac.py
# ALL todos are env-related
# =====================================
import argparse
import datetime
import json
import logging
import sys
i... |
"""This module contains code to train/eval GCSL on a modified cartpole environment.
The goal of the modified cartpole environment ist to maintain an upright pole and
reach a specific cart location. A goal, g, is described by a tuple
g = (pos,pole_angle_rad)
In training, we sample goal cart locations uniformly acro... |
# Copyright (C) 2020 The Raphielscape Company LLC.
#
# Licensed under the Raphielscape Public License, Version 1.d (the "License");
# you may not use this file except in compliance with the License.
#
import html
import json
import re
import textwrap
from io import BytesIO, StringIO
import aiohttp
import... |
import argparse
import json
import os
import random as rn
import time
from datetime import datetime
import numpy as np
import tensorflow as tf
import models
# from gradcam import GradCAM
from inputs import create_batched_dataset
from metrics import CustomMetrics
from models import MODELS_CLASS
SEED = 42
def evalu... |
#!/usr/bin/env python3
# Copyright (c) 2021, NVIDIA CORPORATION. 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
#
# U... |
# # ⚠ Warning
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
# NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIA... |
from kraken.core.maths import Vec3
from kraken.core.maths.xfo import Xfo
from kraken.core.maths.xfo import xfoFromDirAndUpV
from kraken.core.objects.components.base_example_component import BaseExampleComponent
from kraken.core.objects.attributes.attribute_group import AttributeGroup
from kraken.core.objects.attribut... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
from collections import Iterable
import numpy as np
from .form.utils import docval, getargs, popargs, fmt_docval_args, call_docval_func
from . import register_class, CORE_NAMESPACE
from .base import TimeSeries, _default_resolution, _default_conversion
from .image import ImageSeries
from .core import NWBContainer, Mul... |
import asyncio
import discord
import praw
from bot import commprocessor
from bot import dbmanager
from bot import pubg
import random
import logging
import urllib
import io
import json
from os import path, listdir
from os.path import isfile, join
import traceback
client = discord.Client()
configData = None
botAdmin = N... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.