text stringlengths 6.04k 39.5k |
|---|
# Copyright (C) 2013-2015 The python-bitcoinlib developers
#
# This file is part of python-bitcoinlib.
#
# It is subject to the license terms in the LICENSE file found in the top-level
# directory of this distribution.
#
# No part of python-bitcoinlib, including this file, may be copied, modified,
# propagated, or dist... |
#!/usr/bin/python3
# Copyright 2020 The KNIX Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... |
# Copyright (c) Facebook, Inc. and its affiliates.
import copy
import dataclasses
import getpass
import logging
import os
import pprint
import signal
import socket
import time
from typing import Optional
import coolname
import hydra
import moolib
import omegaconf
import torch
import torch.nn as nn
import torch.nn.func... |
'''
/* Copyright (C) 2019 Intel Corporation. All rights reserved.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*/
'''
import select
import socket
import queue
from time import sleep
import struct
import threading
import time
from ctypes import *
import json
import logging
import os
attr_type_list = [... |
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import
import base64
import csv
import errno
import fileinput
import hashlib
import itertools
import json
import os
import shutil
from contextlib import cl... |
# Copyright (c) 2021 PPViT Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
import os
import re
import logging
import importlib
import itertools
import contextlib
import subprocess
import inspect
from .vendor import pather
from .vendor.pather.error import ParseError
import avalon.io as io
import avalon.api
import avalon
log = logging.getLogger(__name__)
# Special naming case for subproces... |
import numpy as np
import cv2
import cv2.aruco as aruco
import socket
import heapq
import time
ADDRESS = ('', 10000)
central = None
conn_pool = []
central = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
central.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
central.setblocking(False)
central.bind(ADDRESS)
... |
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
from typing import List, NamedTuple
import numpy as np
import torch
from torch import nn
from vissl.config import AttrDict
from... |
from z3 import *
# def to_signed32(n):
# n = n & 0xffffffff
# return (n | (-(n & 0x80000000)))
def prove(r, f):
s = Solver()
s.add(Not(f))
if s.check() == unsat:
print ("proved rule: " + r)
else:
print ("failed to prove rule: " + r)
print(s.model())
def vec2bool(v):
... |
# -*- coding: utf-8 -*-
'''
Module for Optimization of functions with spherical parameters
'''
from __future__ import absolute_import, division, print_function
__author__ = '<NAME>'
__license__ = '''Copyright 2019 <NAME>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file excep... |
import asyncio
import sys
import weakref
import copy
import os
import random
import datetime
import json
import inspect
from threading import Thread
import newrelic.agent
from aiohttp import web, streams
from pony import orm
from api.settings import CODE_DATABASE, APP_NAME, TRANSACTION_HEADER, RESPONSE_CODE_NAMES, RB... |
"""
A GUI to automatically create the twist structure for an upper arm.
\b Requirements:
AM_ShoulderConstraint.py
To use this tool, select one or more elbow joints and enter the desired data
into the option fields before pressing either the Create or Apply button.
To skin the model, the arm mesh should be skinned in... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import six
import re
import greentest
import socket
from time import time
import gevent
import gevent.socket as gevent_socket
from util import log
from six import xrange
resolver = gevent.get_hub().resolver
log('Resolver: %s', resolver)
if getattr(resolver, 'pool', None) is ... |
#
# Copyright 2014 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
'''
numpy implementation of 2d box intersection with test cases.
to demonstrate the idea and validate the result of torch implementation
author: <NAME>
2020.8
'''
import numpy as np
import math
import cv2
import matplotlib.pyplot as plt
EPSILON = 1e-8
def line_seg_intersection(line1:np.array, line2:np.array):
"... |
#!/usr/bin/env python
"""A simple script for making latex author lists from the csv file
produced by the DES Publication Database (PubDB).
Some usage notes:
(1) By default, the script preserves the order of the input file. The
'--sort' option does not respect tiers (use '--sort-builder' instead).
(2) An exact match is... |
# -*- coding: utf-8 -*-
# PyMeeus: Python module implementing astronomical algorithms.
# Copyright (C) 2018 <NAME>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of... |
from collections import namedtuple
import cv2 as cv
import numpy as np
import csv
import os
# Debugging ways
DEBUG = False
Point = namedtuple('Point', ['x', 'y'])
# Upper bound
upper_boud_lecture = [255, 150, 150]
def distance_between(pt1, pt2):
""" @param pt1 and pt2 : tupĺe of positions
@return di... |
from __future__ import print_function
import ctypes
from contextlib import contextmanager
from functools import partial
import pytest
import numpy as np
from numba import cuda
from libgdf_cffi import ffi, libgdf
from .utils import new_column, new_context, unwrap_devary, get_dtype
@contextmanager
def _make_input(... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import datetime
import random
from flask import url_for, current_app, redirect, request
from flask.ext.mistune import markdown
from quokka.core import TEXT_FORMATS
from quokka.core.db import db
from quokka.core.fields import MultipleObjectsRetur... |
"""
triangle.py
Triangle and Triangle Mesh implementation.
Created by Jiayao on July 27, 2017
Modified on Aug 13, 2017
"""
from __future__ import absolute_import
from pytracer import *
import pytracer.geometry as geo
import pytracer.transform as trans
from pytracer.shape import Shape
__all__ = ['create_triangle_mesh... |
#
# For licensing see accompanying LICENSE file.
# Copyright (C) 2020 Apple Inc. All Rights Reserved.
#
import os.path
import numpy as np
import torch
import multiprocessing
import os
import cv2
from tqdm import tqdm
import glob
from typing import Optional, Tuple
from torch import Tensor, nn
from torch.cuda.amp import... |
import os
import numpy as np
from vmaf.config import VmafConfig, VmafExternalConfig
from vmaf.core.executor import Executor
from vmaf.core.feature_extractor import FeatureExtractor
from vmaf.tools.decorator import override
from vmaf.tools.misc import make_absolute_path, run_process
from vmaf.tools.stats import ListSta... |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
# ----------------------------------------------------------------
# Copyright 2016 Cisco Systems
#
# 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/LICENS... |
# Copyright (c) 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 agreed to ... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append('/home/xm/gitrepo/gogame_bot/python')
from app_global.color_print import CONST
from app_global.gogame_config import app_config
from chessboard_cell import ChessboardCell
import logging
class ChessboardLayout():
def __init__(self,name):... |
#winKernel.py
#A part of NonVisual Desktop Access (NVDA)
#Copyright (C) 2006-2019 NV Access Limited, <NAME>, <NAME>, <NAME>, Mozilla Corporation, Babbage B.V., <NAME>
#This file is covered by the GNU General Public License.
#See the file COPYING for more details.
"""Functions that wrap Windows API functions from kerne... |
"""
Filtering transMap. This process has 6 steps:
1) Filter out all projections whose genomic span is more than 5 times the original transcript. This is a hard coded
filter to deal with the possibility of rearrangements leading to massive transMap projections. This is required also
to allow the minSpan filter in pslCD... |
import math
from collections import deque
import cv2
import numpy as np
import digit_recognizer as dr
# import linear_eq as lq
# import quadra_eq as qd
# import trigno_eq_akks as tr
def printeq(frame, text):
cv2.putText(frame, text, (350, 340), cv2.FONT_HERSHEY_DUPLEX, 1, (255, 255, 255), 2, cv2.LINE_AA)
... |
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
This module implements fMRI Design Matrix creation.
Design matrices are represented by Pandas DataFrames
Computations of the different parts of the design matrix are confined
to the make_first_level_de... |
import json
import random
import datetime
from collections import OrderedDict
from flask import request, abort
from pytz import timezone
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage, ImageSendMessage,
)
from config import app... |
import os
import os.path
from optparse import OptionParser
import difflib
import re
class ProcessFile(object):
def __init__(self, filename):
self.filename = filename
self.process()
self.indexLines()
self.bnames = set(self.idxnames.keys())
def process(self):
self.blocks... |
import os
import time
import logging
import numpy as np
import argparse
import pybullet_planning as pp
from pybullet_planning.motion_planners.utils import elapsed_time
from termcolor import cprint, colored
from copy import deepcopy
from compas.robots import Joint
from pybullet_planning import wait_if_gui, wait_for_us... |
"""
Copyright (c) Microsoft Corporation.
Licensed under the MIT license.
UNITER finetuning for RE
"""
import argparse
import json
import os
from os.path import exists, join
from time import time
import torch
from torch.nn.utils import clip_grad_norm_
from torch.utils.data import DataLoader
from torch.optim import Ada... |
"""
Contains a class as a datastore for model parameters
"""
import random
import typing
import mesh_tensorflow as mtf
import tensorflow as tf
from tensorflow.python.tpu.device_assignment import DeviceAssignment
class BlockConfig:
def __init__(self, config, memory_reduction_strategy: str):
if isinstance(... |
# -*-python-*-
#
# Copyright (C) 1999-2018 The ViewCVS Group. All Rights Reserved.
#
# By using this file, you agree to the terms and conditions set forth in
# the LICENSE.html file which can be found at the top level of the ViewVC
# distribution or at http://viewvc.org/license-1.html.
#
# For more information, visit h... |
import json
from habitat_baselines.rl.ddppo.policy.resnet_policy import (
PointNavResNetPolicy,
)
from collections import OrderedDict, defaultdict
import argparse
import random
import numpy as np
import torch
from gym import spaces
from gym.spaces.dict_space import Dict as SpaceDict
from PIL import Image
import... |
#!/usr/bin/env python3
# Copyright 2004-present Facebook. All Rights Reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
"""Miscellaneous I/O utility functions for setting up the render pipeline.
Abstracts over the setup that has... |
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import datetime
import random
import math, os
import time
plt.rcParams["mathtext.fontset"]="cm"
plt.rcParams["axes.formatter.use_mathtext"]=True
class GridWorld:
# this environment does not hold a state; instead, it takes the s... |
"""
Tools for working with terrain
Notes
-----
For SRTM data download (in GeoTIFF (.tif) format:
- install with `conda install -c conda-forge gdal` or `pip install gdal`
- install with `conda install -c conda-forge elevation` or `pip install elevation`
- check with `eio selfcheck`
For processing downloaded GeoTIFF da... |
# @Author: <NAME><Nareshvrao>
# @Date: 2020-12-22, 12:44:08
# @Last modified by: Naresh
# @Last modified time: 2019-12-22, 1:13:26
import warnings
warnings.filterwarnings("ignore")
from pathlib import Path
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import tqdm
f... |
"""Kaldi Random Access Dataset Class"""
import os
import sys
import time
import numpy as np
import cPickle
from collections import defaultdict
from datasets import *
from datasets.base_dataset import BaseDataset
from datasets.label import load_time_aligned_labels, load_label
from tools.kaldi.prep_kaldi_feat import unf... |
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
import argparse
import json
import time
import os
import numpy as np
import tensorflow as tf
from dataset import DataSet
from elmo import Model
from elmo_utils import *
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3' # 忽略警告
tf.compat.v1.logging.set_verbosity(tf.compat.v1.l... |
# Copyright (c) 2018 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... |
# Author: bbrighttaer
# Project: ivpgan
# Date: 5/23/19
# Time: 1:39 PM
# File: layers.py
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from abc import ABC
import torch
import torch.nn as nn
from torch_scatter import scatter_add, scatter_max
from ivpg... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import bitsandbytes.functional as F
from copy import deepcopy
from itertools import chain
from collections import defaultdic... |
import logging
import os
import threading
from queue import Queue
import cv2
import glob
import json
import math
import numpy as np
import time
from inspect import stack
from pathlib import Path
from enum import Enum
from typing import Optional, Any, Tuple, Callable
from urllib.parse import urlparse
from datetime impo... |
"""Edit a 'rotomap' series of images.
In all modes:
Press 'q' to quit.
Press 'Q' to quit with exit code 1.
Press left for previous image, right for next image.
Press up for previous map, down for next map.
Ctrl-click on a point to zoom in on it.
Press 'z' or 'x' to adjust the zoom level.
P... |
# -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... |
# pylint: disable=invalid-name
# pylint: disable=bare-except
"""
Useful basic routines for managing polarization with the Stokes/Mueller calculus.
The routines are broken up into four groups: (1) creating Stokes vectors, (2)
creating Mueller matrix operators, (3) interpretation, and (4) conversion.
Functions to creat... |
"""
ZopePageTemplate regression tests.
Ensures that adding a page template works correctly.
"""
import unittest
import transaction
import Zope2
import zope.component.testing
from Products.PageTemplates.interfaces import IUnicodeEncodingConflictResolver
from Products.PageTemplates.PageTemplateFile import guess_type
f... |
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the NiBabel package for the
# copyright and license terms.
#
### ### ### #... |
#!/usr/bin/env python2
# Copyright (C) 2016-2019
#
# <NAME> - <EMAIL>
# Aalborg University
# Robotics, Vision and Machine Intelligence Laboratory
# Department of Materials and Production
# <NAME> 15, 2450 Copenhagen SV, Denmark
# http://rvmi.aau.dk/
#
# All rights reserved.
#
# Redistribution and use in source and bin... |
import pandas as pd
import os
import sys
import glob
import numpy as np
import random
import matplotlib.pyplot as plt
import queue
import math
import copy
import matplotlib.pyplot as plt
import statistics as stat
import json
from scipy.spatial import distance
def getEuclidean(point1, point2):
'''
I use the the ... |
'''
This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de).
PM4Py 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 late... |
import datetime
import itertools
import logging
import multiprocessing as mp
import os
import queue
import random
import shutil
import string
import subprocess as sp
import threading
import time
from collections import defaultdict
from pathlib import Path
import psutil
from peewee import JOIN, DoesNotExist
from friga... |
# coding: utf-8
# In[1]:
# In[2]:
from scipy import ndimage
from weighted import median as wmedian
from weighted import quantile as wquantile
import weightedstats as wstats
import copy
# In[3]:
import glob
# In[4]:
import os
import sys
import numpy as np
from sedfitter.fit_info import FitInfoFile
from sedfit... |
# Copyright 2013,2018 <NAME>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at:
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... |
from enigma import *
from enigma import Enigma
class Rotors:
"""
"""
def __init__(self, ):
self.rotors = list()
self.num_of_rotors = 0
def add_rotor_to_rotors(self, new_rotor):
self.rotors.append(new_rotor)
self.num_of_rotors += 1
self.rotors[self.num_of_roto... |
import os
import re
import json
import logging
from typing import Union, Tuple, List
from pathlib import Path
import filetype # type: ignore
import torch
from torchvision.transforms import Compose, Resize, CenterCrop, ToTensor # type: ignore
from PIL import Image # type: ignore
from sentence_transformers import Sent... |
import calendar
import time
from collections import defaultdict, deque
from sys import getsizeof
from typing import List, Mapping, Optional
import discord
from redbot.core import Config, commands
from redbot.core.bot import Red
from redbot.core.utils import chat_formatting as cf
from redbot.vendored.discord.ext import... |
import os
import numpy as np
import torch
import dataset_utils.kitti.utils as utils
from torch.utils.data import Dataset
from common.laserscan import LaserScan
from torch.utils.data import DataLoader, random_split
from random import seed
import math
EXTENSIONS_SCAN = ['.bin']
EXTENSIONS_LABEL = ['.label']
def is_sca... |
# -*- encoding: utf-8 -*-
from django.contrib.auth.decorators import login_required
from django.contrib.admin.views.decorators import staff_member_required
from django.shortcuts import render, get_object_or_404, redirect
from django.template import loader
from django.urls import reverse
from django.http import HttpRes... |
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompa... |
# -*- coding: utf-8 -*-
"""
Image processing functions.
Created on Wed Dec 14 09:51:20 2016
@author: mkonrad
"""
from logging import warning
from math import degrees, radians
import numpy as np
import cv2
from pdftabextract.common import ROTATION, SKEW_X, SKEW_Y, DIRECTION_HORIZONTAL, DIRECTION_VERTICAL
from pdfta... |
import math
import re
import tkinter as tk
import tkinter.messagebox
from OST_helper.UI.tk_objects import TopDownSizeConfig, set_entry_value
from OST_helper.data_handler import Data
from OST_helper.parameter import *
class CoursePanel(tk.Frame):
def __init__(self, master, size_config: TopDownSizeConfig):
... |
#!/usr/bin/env python
# coding: utf-8
# # Monte Carlo and Root Finding
# **CS1302 Introduction to Computer Programming**
# ___
# ## The Monty-Hall Game
# In[ ]:
get_ipython().run_cell_magic('html', '', '<iframe width="912" height="513" src="https://www.youtube.com/embed/rn1y-HrmA5c?end=23" frameborder="0" allow="... |
from abc import ABCMeta
from collections import Sequence, OrderedDict, Mapping
from datetime import datetime
from enum import Enum
from iso8601 import parse_date, ParseError
from operator import attrgetter
from futile import basestring, issubclass, NOT_SET
from futile.logging import LoggerMixin
from openmtc.model.exc ... |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2006 <NAME> <<EMAIL>>
# Copyright (C) 2011-2014 <NAME> <<EMAIL>>
# Copyright (C) 2014 <NAME> <<EMAIL>>
# Copyright (C) 2014 <NAME> <<EMAIL>>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
import ... |
import pygame as pg
from math import *
import shapes
from sceneFile import scene,world,player
from random import randint
pg.init()
VERSION = "Beta 0.1"
w = 800
h = 600
zscale = 400.0
translate = (w/2,h/2)
d = pg.display.set_mode((w,h))
pg.display.set_caption("Ivy3d v " + VERSION)
pg.display.set_icon(pg.image.loa... |
# Copyright 2020, Battelle Energy Alliance, LLC
# ALL RIGHTS RESERVED
"""
Defines the Economics entity.
Each component (or source?) can have one of these to describe its economics.
"""
from __future__ import unicode_literals, print_function
import sys
from collections import defaultdict
import numpy as np
from Val... |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Copyright 2020 Tianshu AI Platform. 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/LICE... |
#!/usr/bin/env python3
import math
import time
import random
from abc import ABC, abstractmethod, abstractproperty
import pymunk
import pyglet
from pyglet import gl
from pyglet import font
from pyglet.window import key
from pyglet.graphics import Batch
from pyglet.graphics import OrderedGroup
from pyglet.sprite impo... |
from __future__ import print_function
from setuptools import setup, Extension
from distutils.errors import LibError
from setuptools.command.install import install
from distutils.command.build_ext import build_ext
from distutils.command.install_lib import install_lib
from os import mkdir, chdir, link, rename
from os.pat... |
import random
import time
import warnings
import math
import gc
import pathlib
warnings.filterwarnings("ignore", message="Optimal rotation is not uniquely or poorly defined ")
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import pypcd.pypcd as pypcd
from scipy.spatial.transform ... |
#!/usr/bin/env python3
import sys
import os
import argparse
import cv2
from skimage.metrics import structural_similarity
from skimage import img_as_ubyte
from datetime import datetime, timedelta, timezone
import time
import numpy as np
import subprocess as sp
from threading import Thread, Event
from queue import Queue... |
import numpy as np
from scipy.integrate import odeint
import matplotlib.pyplot as plt
import itertools
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from scipy.integrate import odeint
import scipy.integrate
from sklearn.metrics import mean_squared_error
from scipy.linalg import svd
from scipy.... |
"""
Main digitize controller. All callbacks flow through here
"""
import re
import tkinter as tk
from tkinter import messagebox
from tkinter import filedialog
import screeninfo
from x7.geom.typing import *
from x7.geom.colors import PenBrush
from x7.geom.drawing import DrawingContext
from x7.geom.geom import Vector, ... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
Basic script which allows local human keyboard input to talk to a trained model.
Examples
--------
.. code-block:: ... |
#!/usr/bin/env python
#
# COORDS.PY - coordinate utility functions.
#
from __future__ import print_function
__authors__ = '<NAME> <<EMAIL>>'
__version__ = '20190723' # yyyymmdd
import numpy as np
from scipy.spatial import cKDTree
from . import utils
def rotsph(lon,lat,clon,clat,anode=None,reverse=False,original=Fa... |
import io, sys, re, os, tempfile, subprocess
from glob import glob
from argparse import ArgumentParser
from collections import defaultdict
from nltk import sent_tokenize, word_tokenize
from six import iterkeys
from depedit import DepEdit
from tt2conll import conllize
PY3 = sys.version_info[0] == 3
parser_path = 'C:\\... |
#/*
# * Copyright (c) 2019,2020 Xilinx Inc. All rights reserved.
# *
# * Author:
# * <NAME> <<EMAIL>>
# *
# * SPDX-License-Identifier: BSD-3-Clause
# */
import copy
import struct
import sys
import types
import unittest
import os
import getopt
import re
import subprocess
import shutil
from pathlib import Path
fro... |
# coding=utf-8
"""This module contains extended functionality for related to the arcpy.mapping module."""
# Python 2/3 compatibility
# pylint: disable=wildcard-import,unused-wildcard-import,wrong-import-order,wrong-import-position
from __future__ import (absolute_import, division, print_function, unicode_literals)
fro... |
"""
This code is based on the training code found at
https://github.com/facebookresearch/fastMRI/blob/master/models/unet/train_unet.py
"""
import sys, os
import gc
import logging
import pathlib
import random
import shutil
import time
import numpy as np
import torch
import torchvision
from torch.utils.tensorboard imp... |
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import platform
import configparser
import os
import xlrd
from datetime import datetime
import openpyxl
import re
import traceback
# import shutil
__version__ = '0.8.7'
configFileName = 'config_%s.ini' % __version__
DEBUG_FILE = 'debug_log.txt'
config = configparser.ConfigPa... |
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 18 11:55:58 2021
@author: rringuet
Instead of writing individual wrappers for each model, this file is used to
do anything model-specific, such as importing the right readers.
Help on coordinate systems:
The resource information on SpacePy's coordinate con... |
#! /usr/bin/env python3
#
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... |
"""
Description: This library contains all the base functions used for defining the signal perceptron
Please refer to each of the functions/classes for a full description of what they do.
Functions (True are the implemented Functions):
SP_Matrix:
SP_r_Matrix:
frequencies_gen:
... |
from __future__ import absolute_import, division, print_function
from six.moves import range
from scitbx.array_family import flex
from scitbx import matrix
from six.moves import zip
"""Standalone program gives tile translations for the CXI pad detector;
based on lysozyme test powder arcs.
Fixed coordinates for ... |
from sklearn.mixture import GaussianMixture
from sklearn.preprocessing import normalize
from sklearn.mixture._gaussian_mixture import _compute_precision_cholesky
import os
import pickle
import numpy as np
from sklearn.decomposition import PCA
import sys
import provider
import yaml
def log_string(out_str):
LOG_FOUT... |
import os
import logging
import colorama
from .symbol import Symbol, Type
from .lexer import Lexer, Lexem, LIdent, LKeyword, LMisc, LLiteral, LOperator
ASSIGNMENT_OPERATORS = [
LOperator.ADDASSIGN, LOperator.BITWISEANDASSIGN, LOperator.BITWISEORASSIGN,
LOperator.BITWISEXORASSIGN, LOperator.DIVASSIGN, LOperator... |
# TODO: For now only include the code we actually used for EAP-pwd
# TODO: Program unit tests so we can easily keep our EAP-pwd code correct
#!/usr/bin/env python3
from scapy.all import *
from .wifi import *
import sys, struct, math, random, select, time, binascii
from Crypto.Hash import HMAC, SHA256
from Crypto.Publi... |
#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
`demo_sendstreams.py` performs filesystem operations to generate some
send-stream data, this records the send-strea... |
import os
import re
import sys
import time
import logging
import subprocess
if sys.version_info[:2] >= (3, 0):
# pylint: disable=E0611,F0401,I0011
from urllib.request import urlopen, build_opener
from urllib.error import HTTPError, URLError
from urllib.parse import parse_qs, urlparse
uni, pyver = s... |
# -*- coding: utf-8; -*-
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
from django.utils.http import urlquote
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.db.models import Sum
from django.db.models.signals ... |
"""
Main file for running the game
"""
import os
from random import randrange
from threading import Thread, Timer
from time import sleep
import config as c
from irregular import IrregularObjects, print_cloud
from motion import Player, Stones, Enemies, MovingBridges
from music import Music
from objects import Obj, Extr... |
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
import torch
import torch.nn.functional as F
from fairnr.data import data_utils as D
try:
from fairnr.clib._ext import... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.