input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
<reponame>MILAB-yhg/models<filename>research/object_detection/meta_architectures/faster_rcnn_meta_arch.py<gh_stars>1-10
# Copyright 2017 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.
# Y... | |
command=lambda: af.append_digit5(self))
self.action5.grid(column=1, row=2, padx=4, pady=2)
self.action6 = ttk.Button(self.inKeys, text=" 6 ", takefocus=False, command=lambda: af.append_digit6(self))
self.action6.grid(column=2, row=2, padx=4, pady=2)
# Adding digit entry buttons 1 to 3
self.action7 = ttk.Button... | |
# The MIT License (MIT)
#
# Copyright (c) 2016 <NAME>, National Institutes of Health / NINDS
#
# 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 limitatio... | |
# -*- coding:utf-8 -*-
import numpy as np
from .hydrology import PearsonThree
def calc_kps(ps, cvs, css):
"""
计算各设计频率下的模比系数 Kp
:param ps: iterable object -> floats 需要计算的频率
:param cvs: iterable object -> floats 各历时变差系数
:param css: iterable object -> floats 各历时偏态系数
:return: len(ps) * len(cvs)D 矩阵 flo... | |
line, 2pt break, 10pt line, 2pt break
# line2, = ax.plot(iter_list, cur_global_fitness_list, label='Global Iteration {0}\nentity number {1}\nDimension {2}'.format(iter_num, entity_num, dim))
# line2.set_dashes([2, 2, 10, 2]) # 2pt line, 2pt break, 10pt line, 2pt break
# ax.legend()
# plt.xlabel('Iteration times')
... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Author: <NAME>
# Most comments are above the line they are commenting
# import cmath
# import scipy
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import cm
from textwrap import wrap
# define constants
epsilon = 8.85E-12
c = 299792458
def f(k, z,... | |
import numpy as np
import ipywidgets as widgets
from IPython.display import display
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from mpl_toolkits.axes_grid1.axes_divider import make_axes_locatable
import lsst.afw.table
from lsst.afw.image import MultibandExposure
from scarle... | |
indent.
section_splitter = _yield_section(
lambda x: not x[0].isspace(), strip=False)
for section in section_splitter(chunks):
header = section[0].split(None, 1)[0]
parser = _PARSER_TABLE.get(
header, _parse_section_default)
if header == 'FEATURES':
# This requires 'LOCUS' line parsed before 'FEATURES', which ... | |
'0'})
},
u'orm.helptext': {
'Meta': {'object_name': 'HelpText'},
'area': ('django.db.models.fields.IntegerField', [], {}),
'build': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'helptext_build'", 'to': u"orm['orm.Build']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': ... | |
= {self}
while x in assignment:
if x in visited:
from lamb import meta
from lamb.meta import logger
logger.error(
"breaking loop in substitution (x: '%s', visited: '%s', , assignment: '%s')"
% (x, visited, assignment))
break
visited |= {x}
x = assignment[x]
return x
else:
return self
def key_str(self):
... | |
'''
P_blobs is a terminal fork of intra_blob. It calls comp_g and then comp_P (edge tracing) per terminated stack.
Pixel-level parameters are accumulated in contiguous spans of same-sign gradient, first horizontally then vertically.
Horizontal spans are Ps: 1D patterns, and vertical spans are first stacks of Ps, th... | |
= []
local_var_files = {}
body_params = None
# HTTP header `Accept`
header_params['Accept'] = self.api_client.select_header_accept(
['application/json']) # noqa: E501
# Authentication setting
auth_settings = [] # noqa: E501
return self.api_client.call_api(
'/admin/application/{application_id}', 'PATCH',
pa... | |
"""Sets of metrics to look at general sky coverage - nvisits/coadded depth/Teff.
"""
import numpy as np
import rubin_sim.maf.metrics as metrics
import rubin_sim.maf.slicers as slicers
import rubin_sim.maf.plots as plots
import rubin_sim.maf.metricBundles as mb
import rubin_sim.maf.utils as mafUtils
from .colMapDict imp... | |
<reponame>s0hvaperuna/music-player<filename>src/_database.py
raise DeprecationWarning('Use the new database file')
import logging
import os
import pathlib
import pickle
import threading
import time
from collections import deque
from functools import wraps
from queue import Queue
from random import choice, shuffle
imp... | |
<gh_stars>1-10
__all__ = ["ReferrerMixin"]
import hashlib
import logging
from urllib.parse import quote_plus
import requests
import ratelimit
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.db import transaction
from django.db.models import Q
from django.forms.widget... | |
<gh_stars>1-10
"""
Copyright 2021 Merck & Co., Inc. Kenilworth, NJ, USA.
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to ... | |
<gh_stars>1-10
import json
from PyQt5 import QtCore
from PyQt5.QtCore import QLocale
from PyQt5.QtWidgets import QDialog
from PyQt5.QtWidgets import QVBoxLayout, QHBoxLayout, QPushButton
from narwhallet.control.shared import MShared
from narwhallet.core.kex import KEXclient
from narwhallet.core.ksc import Scripts
from ... | |
<gh_stars>0
from manimlib.imports import *
from manimlib.imports import *
class LinedCode(Text):
CONFIG = {
'size' : 0.5,
'color' : WHITE,
'stroke_color' : WHITE,
'stroke_weight': 0,
'ln_color' : GRAY,
}
def __init__(self, *text, **config):
digest_config(self, config)
res_text = ''
i = 1
for each_text in... | |
for reading video using OpenCV.
The input video can be a standalone video file like "/path/to/video.mp4"
or a directory of frames like "/path/to/frames/%05d.png". This path is
passed directly to cv2.VideoCapture. So, for example, if you specify a
directory of frames, the frame numbering must start from 0-3.
A fr... | |
<reponame>mcyos118/DSF-image-generator-python
from PIL import Image
from IPython.display import display
import random
import json
import sys
from traitlets.traitlets import Int
# Each image is made up a series of traits
# The weightings for each trait drive the rarity and add up to 100%
background = [
"background... | |
"""
Random walker segmentation algorithm
from *Random walks for image segmentation*, <NAME>, IEEE Trans
Pattern Anal Mach Intell. 2006 Nov;28(11):1768-83.
This code is mostly adapted from scikit-image 0.11.3 release.
Location of file in scikit image: random_walker function and its supporting
sub functions in skimage.... | |
<filename>gwent/vendor/pygwinc_clone/gwinc/noise/substratethermal.py
from __future__ import division, print_function
from numpy import exp, inf, pi, sqrt
import numpy as np
import scipy.special
import scipy.integrate
from .. import const
from ..const import BESSEL_ZEROS as zeta
from ..const import J0M as j0m
def car... | |
from future.utils import iteritems
from builtins import range
import numpy as np
from numpy.polynomial.polynomial import polyval3d
from numpy.polynomial.legendre import legval
from numpy.polynomial.chebyshev import chebval
import scipy.optimize as opt
from collections import OrderedDict
from operator import add, mul
... | |
= t2[i][j][k][l]
self.assertEqual(qt1[i][j][k][l], qt2[i][j][k][l])
# 1D tensor assignment verification
qt1[i][j][k][2:l] = t2[i][j][k][2:l]
self.assertEqual(qt1[i][j][k][2:l], qt2[i][j][k][2:l])
qt1[i][j][k] = t2[i][j][k]
self.assertEqual(qt1[i][j][k], qt2[i][j][k])
# 2D tensor assignment verification
qt1[i][j... | |
# pylint: disable=no-member
# pylint: disable=unsubscriptable-object
"""
Defines :class:`.BcrClinicalXmlToJsonParser`, a class (that is instantiated
with a given project_code) which consumes BCR Clinical XML and produces JSON.
Pylint ``no-member`` error is disabled because for some reason there are a lot
of false posi... | |
cast(bool, data.attrib.get('transcodeHwFullPipeline', '0'))
self.transcodeHwRequested = cast(bool, data.attrib.get('transcodeHwRequested', '0'))
self.videoCodec = data.attrib.get('videoCodec')
self.videoDecision = data.attrib.get('videoDecision')
self.width = cast(int, data.attrib.get('width'))
@utils.registerPle... | |
of tracked position on ball
self.trackBodyCurPos = self.cnstrntBody.to_world(x=self.cnstrntOnBallLoc) #self.cnstrntBody.com()
self.trackBodyVel = (self.trackBodyCurPos - self.trackBodyLastPos)/self.timestep
#print('setSimVals : Tracked Body Position : {} |\tLast position : {} |\tVel : {}'.format(self.trackBodyCurPos... | |
parser for the dictionary plotter to a user provided subparser
'''
plot_parser = subparser.add_parser('plot', help=" A simple example: plot -pf your_pickle_file.p --dictionary_name mat_eng --x_data time --y_data mat_name ")
input_type_parser = plot_parser.add_mutually_exclusive_group(required=True)
input_type_parse... | |
<gh_stars>1-10
import os
import importlib
from glob import glob
from subprocess import call
from collections import OrderedDict
from devito.compiler import make
from devito.exceptions import CompilationError
from devito.logger import debug, yask as log
from devito.yask import cfac, nfac, ofac, exit, configuration
fro... | |
a_tfrom1[1]
a_t_cont = sylvester(a_syl, b_syl, q_syl)
a_t_list.append(a_t_cont)
for i in range(1, q_tfrom1.size(0)-1):
a_syl = 2 * self.kappa * q_tfrom1[i]
b_syl = c_xtxt[i]
q_syl = c_xtxtm1[i] + self.kappa * q_tfrom1[i] @ (a_t_cont + a_tfrom1[i+1])
a_t_cont = sylvester(a_syl, b_syl, q_syl)
a_t_list.append(a_t... | |
<gh_stars>1-10
import config
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import time
import os
from datetime import datetime, timedelta
from xgboost import XGBRFRegressor
from xgboost import plot_importance
from matplotlib import pyplot
from sklearn.preprocessing import LabelBinarizer
from sk... | |
level, already_processed, namespaceprefix_, name_='LatestDropOffDetail')
if self.hasContent_():
outfile.write('>%s' % (eol_, ))
self.exportChildren(outfile, level + 1, namespaceprefix_, namespacedef_, name_='LatestDropOffDetail', pretty_print=pretty_print)
showIndent(outfile, level, pretty_print)
outfile.write('</... | |
from matplotlib._api.deprecation import MatplotlibDeprecationWarning
import matplotlib.colors as mcolors
import matplotlib.widgets as widgets
import matplotlib.pyplot as plt
from matplotlib.testing.decorators import check_figures_equal, image_comparison
from matplotlib.testing.widgets import do_event, get_ax, mock... | |
"left", on = 'Scribe')
self.df_biplot.drop_duplicates(inplace = True)
self.df_biplot.reset_index(drop = True, inplace = True)
self.df_biplot[['Classification','Tool & Chamber']].replace('', np.nan, inplace=True)
self.df_biplot.dropna(subset=['Classification','Tool & Chamber'], inplace=True)
elif self.Tool... | |
Whether to mark the edit as a bot edit
:param summary: Edit summary
"""
if claim.isReference or claim.isQualifier:
raise ValueError('The claim cannot have a source.')
params = {'action': 'wbsetreference', 'statement': claim.snak,
'baserevid': claim.on_item.latest_revision_id,
'summary': summary, 'bot': bot, 'tok... | |
path corresponding to a kernel_name."""
return '%s/%s.cl' % (self.KERNELS_PATH, kernel_name)
def inject_kernel_source(self, kernel_name):
"""Prepend LOADED_SOURCES[kernel_name] with necessary sources."""
pass
def get_kernel_source(self, kernel_name, **kwargs):
"""
Return the kernel source corresponding to a ke... | |
"""multipy: Python library for multicomponent mass transfer"""
__author__ = "<NAME>, <NAME>"
__copyright__ = "Copyright (c) 2022, <NAME>, <NAME>"
__license__ = "MIT"
__version__ = "1.0.0"
__maintainer__ = ["<NAME>"]
__email__ = ["<EMAIL>"]
__status__ = "Production"
import numpy as np
import pandas as pd
import random... | |
<reponame>onderogluserdar/boardInstrumentFramework
##############################################################################
# Copyright (c) 2016 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obta... | |
<reponame>libyal/vstools
# -*- coding: utf-8 -*-
"""Project and solution file reader classes."""
import abc
import re
from vstools import resources
class FileReader(object):
"""File reader."""
def __init__(self, encoding='utf-8'):
"""Initializes a file reader.
Args:
encoding (str): encoding.
"""
super(File... | |
<reponame>JasperJuergensen/elastalert
import copy
import logging
from datetime import datetime, timedelta
from typing import List, Tuple, Union
from elastalert import config
from elastalert.clients import ElasticSearchClient
from elastalert.exceptions import EARuntimeException
from elastalert.queries import BaseQuery
... | |
# -*- coding: utf-8 -*-
#
# ***********************************************************************************
# MIT License
#
# Copyright (c) 2020 <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
# i... | |
GH_LayoutPanel,reader: GH_IReader) -> bool """
pass
def Sort(self):
""" Sort(self: GH_LayoutPanel) """
pass
def Write(self,writer):
""" Write(self: GH_LayoutPanel,writer: GH_IWriter) -> bool """
pass
def __init__(self,*args):
""" x.__init__(...) initializes x; see x.__class__.__doc__ for signaturex.__... | |
import pdb
import sys
import torch
import numpy as np
import cv2
def write_calib(K,bl,shape,maxd,path):
str1 = 'camera.A=[%f 0 %f; 0 %f %f; 0 0 1]'%(K[0,0], K[0,2], K[1,1],K[1,2])
str2 = 'camera.height=%d'%(shape[0])
str3 = 'camera.width=%d' %(shape[1])
str4 = 'camera.zmax=%f'%(maxd)
str5 = 'rho=%f'%(bl*K[0,0])
... | |
"1975:76"): "metadataonly",
("sou", "1975:70"): "metadataonly",
("sou", "1975:45"): "metadataonly",
("sou", "1974:97"): "metadataonly",
("sou", "1974:92"): "metadataonly",
("sou", "1974:68"): "metadataonly",
("sou", "1974:56"): "metadataonly",
("sou", "1974:30"): "metadataonly",
("sou", "1973:39"): "metadataonl... | |
import pickle
import warnings
import collections.abc
from math import isnan
from statistics import mean, median, stdev, mode
from abc import abstractmethod, ABC
from numbers import Number
from collections import defaultdict
from itertools import islice, chain
from typing import Hashable, Optional, Sequence, Union, Ite... | |
#!/usr/bin/env python
# coding=utf-8
import eventlet
# BGPSpeaker needs sockets patched -> breaks SRL registration if done too late
# eventlet.monkey_patch( socket=True, select=True ) # adding only ( socket=True ) allows SRL, but then BGP doesn't work :(
eventlet.monkey_patch() # need thread too
# Google core librar... | |
(self):
return ###
c = self.c ; log = c.frame.log ; tabName = self.tabName
parentFrame = log.frameDict.get(tabName)
w = log.textDict.get(tabName)
w.pack_forget()
# Set the common background color.
bg = c.config.getColor('log_pane_Spell_tab_background_color') or 'LightSteelBlue2'
#@+<< Create the outer fram... | |
6, 2]), axis=1)
eye_dist = tf.sqrt(tf.reduce_sum(tf.square(p1 - p2), axis=1))
return landmarks_rms_err / eye_dist
else:
return landmarks_rms_err
if self.mode is 'TRAIN':
# calculate L2 loss between ideal and predicted heatmaps
primary_maps_diff = self.pred_hm_p - self.heatmaps_small
fusion_maps_diff = self.... | |
<gh_stars>0
# coding=utf-8
# Copyright 2018 The Google AI Language Team 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 requ... | |
struct.unpack("<L", dir_stream.read(4))[0]
REFERENCEREGISTERED_Libid = dir_stream.read(REFERENCEREGISTERED_SizeOfLibid)
REFERENCEREGISTERED_Reserved1 = struct.unpack("<L", dir_stream.read(4))[0]
check_value('REFERENCEREGISTERED_Reserved1', 0x0000, REFERENCEREGISTERED_Reserved1)
REFERENCEREGISTERED_Reserved2 = struc... | |
SLHA_TABLE = '''
# ISAJET SUSY parameters in SUSY Les Houches Accord 2 format
# Created by ISALHA 2.0 Last revision: <NAME> 27 May 2014
Block SPINFO # Program information
1 ISASUGRA/ISASUSY from ISAJET # Spectrum Calculator
2 7.88 02-JAN-2018 11:01:14 # Version number
Block MODSEL # Model selection
1 2 # Minimal ga... | |
#! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
from __future__ import with_statement
import atexit, os, sys, errno, inspect, re, datetime, platform, base64, signal, functools, time
try:
import cPickle
except ImportError:
import pickle as cPickl... | |
<reponame>sireliah/polish-python
"""Text wrapping oraz filling.
"""
# Copyright (C) 1999-2001 <NAME>.
# Copyright (C) 2002, 2003 Python Software Foundation.
# Written by <NAME> <<EMAIL>>
zaimportuj re
__all__ = ['TextWrapper', 'wrap', 'fill', 'dedent', 'indent', 'shorten']
# Hardcode the recognized whitespace chara... | |
= IwahoriHeckeAlgebra("B2", 1)
sage: bases = H._BasesCategory()
sage: bases.super_categories()
[Category of realizations of Iwahori-Hecke algebra of type B2 in 1,-1 over Integer Ring,
Category of finite dimensional algebras with basis over Integer Ring]
"""
return [Realizations(self.base()), self.base()._category... | |
import os
import requests
import xml.etree.ElementTree as ET
import webbrowser
import shutil
from bs4 import BeautifulSoup, SoupStrainer
from nltk.corpus import words
from ._common import *
EDGAR_BASE_URL = "https://www.sec.gov"
EDGAR_BROWSE_URL = "/cgi-bin/browse-edgar?action=getcompany"
EDGAR_ARCHIVE_URL = "/Archiv... | |
<reponame>Masa-Yasuno/oase
# Copyright 2019 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | |
#!/usr/bin/env python
# PROGRAM: plot_sst.py
# ----------------------------------------------------------------------------------
# Version 0.18
# 19 August, 2019
# michael.taylor AT reading DOT ac DOT uk
# PYTHON DEBUGGER CONTROL:
#------------------------
# import os; os._exit(0)
# import ipdb
# ipdb.set_trace()
i... | |
wave
list = v1 + (v2-v1)*np.random.random(size=n)
# Program wave
loadWavetable(list,second)
# Return list
if returnList:
return list
'''
@setWaveFrequency@
setWaveFrequency(freq)
Set wave frequency by changing sample frequency
Required parameters:
freq : Wave frequency in Hz
Return ... | |
DH currently, press /status."
context.bot.editMessageText(text=warnText,
chat_id=user.id,
parse_mode=ParseMode.HTML)
return ConversationHandler.END # end convo if user pressed start but is in DH
else:
# get user intention from button pressed
pressed = str(query.data)
if pressed == 'INTENT_0':
intention = "TAK... | |
" + measure_write + " order by desc limit 1")
key_write = write_ss.keys()
print(key_write[:])
write_inter = write_ss[key_write[0]]
write_items = list(write_inter)
print(write_items[:])
write_now = int(write_items[0]['modulate'])
if aim_ns not in ns_list and (write_now == 0):
yichang = True
break
pod_status = ... | |
<filename>utils/pose_utils_np.py
"""
Copyright (C) 2018 NVIDIA Corporation. All rights reserved.
Licensed under the CC BY-NC-SA 4.0 license (https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode).
"""
import torch
from torch.nn import Module
from torch.autograd import Variable
from torch.nn.functional import pad... | |
# Author: <NAME>, <NAME>
"""API for computing integrals."""
import json
from flask import request
from flask.json import jsonify
from lark import Lark, Transformer, v_args, exceptions
from fractions import Fraction
from sympy import expand_multinomial
import pathlib
import os
import integral
from logic import basic
f... | |
wavelengths (in nanometers) that correspond to the bands (last dimension) in the data.
:param threshold: radiance values.
:param bandrange: band numbers, defined as a tuple (band_a, band_b, band_c), to screen for clouds.
:return: Binary Mask with 1/True where clouds occur, 0/False for normal pixels.
"""
if thresho... | |
<reponame>PlasticMem/tencentcloud-sdk-python
# -*- coding: utf8 -*-
# Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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 Lic... | |
<filename>CHI2017_retrain.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# U... | |
10.0, 15.0, 10.0],
[20.0, 10.0, 0.0, 9.969209968386869e36],
],
[
[50.0, 40.0, 30.0, 9.969209968386869e36],
[
9.969209968386869e36,
9.969209968386869e36,
9.969209968386869e36,
9.969209968386869e36,
],
[
9.969209968386869e36,
9.969209968386869e36,
9.969209968386869e36,
9.969209968386869e36,
],
],
],
un... | |
System.String.Format(System.String,System.Object).
format: The formatting string.
arg0: The object to write into the format string.
arg1: The object to write into the format string.
WriteLine(self: TextWriter, buffer: Array[Char])
Writes an array of characters followed by a line terminator to the... | |
import os
import pickle
import time
import numpy as np
import pandas as pd
from pylearn2.datasets import DenseDesignMatrix
from pylearn2.datasets.dense_design_matrix import DefaultViewConverter
from pylearn2.format.target_format import OneHotFormatter
from scipy.io import loadmat
from scipy.signal import firwin, filtf... | |
<reponame>cmatija/probreg
from __future__ import print_function
from __future__ import division
import abc
from collections import namedtuple
import six
import numpy as np
import open3d as o3
from . import transformation as tf
from . import gaussian_filtering as gf
from . import gauss_transform as gt
from . import se3_... | |
freq points (float)
S: array of (2,2) matrices same size as flist
return:
S-matrix for point f
'''
S11=S[:,0,0];S12=S[:,0,1];S21=S[:,1,0];S22=S[:,1,1]
if len(flist) != len(S11):
raise ValueError("Diffrent Length of f and S")
Si = zeros((2,2),dtype=complex)
Si[0,0] = interp(f,flist,S11)
Si[0,1] = interp(f,flis... | |
"""This file is nearly the same as flask.cli except for some modifications."""
import ast
import inspect
import os
import platform
import re
import sys
import traceback
from functools import update_wrapper
import click
import flask
from flask.cli import (
locate_app,
prepare_import,
_called_with_wrong_args,
_vali... | |
<gh_stars>0
'''
Created on May 25, 2012
@author: kwalker
'''
'''
notes:
-conversion to shape shortens long field names and that can mess stuff up.
'''
import arcpy, os, math
arcpy.env.overwriteOutput = True
#
###
#inRoutesFullPath = r'C:\KW_Working\Udot\CalibrationPointScript\CaliPointTesting.gdb\Route1534p'
inRout... | |
"""
THIS CODE IS UNDER THE BSD 2-Clause LICENSE. YOU CAN FIND THE COMPLETE
FILE AT THE SOURCE DIRECTORY.
Copyright (C) 2017 <NAME> - All rights reserved
@author : <EMAIL>
Publication:
A Novel Unsupervised Analysis of Electrophysiological
Signals Reveals New Sleep Sub-stages in Mice
******************... | |
(resp, filedata) = self.doHTTP_GET(
resource="datasets/TestSubmission-testdir/directory/file1.b",
expect_status=200, expect_reason="OK", expect_type="text/plain")
checkdata = open("testdata/testrdf/directory/file1.b").read()
self.assertEqual(filedata, checkdata, "Difference between local and remote data!")
# Unp... | |
<gh_stars>100-1000
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | |
{
return a.__cmp__(b);
} else if ((typeof b == 'object' || typeof b == 'function') && typeof b.__cmp__ == 'function') {
return -b.__cmp__(a);
}
if (a && b && (typeof a.__class__ != 'undefined' || typeof b.__class__ != 'undefined')) {
if (a === b)
return 0;
return -1;
}
if (a == b) return 0;
if (a > b) return... | |
patch title:\n"
)
for pkg_name in used_packages.values():
print(bcolors.OKGREEN + pkg_name + bcolors.ENDC)
print(
"\nThe following packages are not used in any policies, "
"PreStage Enrollments, or patch titles:\n"
)
for pkg_id, pkg_name in unused_packages.items():
print(bcolors.FAIL + f"[{pkg_id}] " + pkg_na... | |
""" Handle the confluence uploading"""
from decouple import config
import datetime
from atlassian import Confluence
from pylabnet.utils.helper_methods import load_config, get_os, load_script_config, get_config_filepath
import ctypes
import os
from PyQt5 import QtWidgets, uic, QtCore, QtGui
import sys
from functools im... | |
i11iIiiIii - I11i
if 71 - 71: OoO0O00 - I11i
if 96 - 96: I1Ii111 / Ii1I
if 65 - 65: I1ii11iIi11i * O0 . IiII
def lisp_timeout_map_cache ( lisp_map_cache ) :
I1I1i = [ [ ] , [ ] ]
I1I1i = lisp_map_cache . walk_cache ( lisp_timeout_map_cache_walk , I1I1i )
if 11 - 11: I11i / Ii1I % oO0o
if 50 - 50: i11iIiiIii
if ... | |
only obtain information from remote locations, by default
False
Returns
-------
Optional[dict]
An index of the directory in the form:
{
dirs: {...},
files: {...}
}
"""
if path and path.startswith('key://'):
path_resolved: str = self.resolveKeyPath(path)
if not path_resolved:
return None
else:
path_res... | |
or
self.ideEmpregador is not None or
self.infoEmpregador is not None
):
return True
else:
return False
def export(self, outfile, level, namespace_='', name_='evtInfoEmpregador', namespacedef_='', pretty_print=True):
imported_ns_def_ = GenerateDSNamespaceDefs_.get('evtInfoEmpregador')
if imported_ns_def_ is not... | |
<filename>backslash/contrib/slash_plugin.py
from __future__ import print_function
import functools
import hashlib
import itertools
import json
import os
import pkg_resources
import socket
import sys
import time
import webbrowser
import logbook
import requests
import vintage
try:
import git
except Exception as e: # ... | |
import abc
import pytest
import py_vsys as pv
from test.func_test import conftest as cft
class TestNFTCtrt:
"""
TestNFTCtrt is the collection of functional tests of NFT contract.
"""
@pytest.fixture
async def new_ctrt(self, acnt0: pv.Account) -> pv.NFTCtrt:
"""
new_ctrt is the fixture that registers a new N... | |
[0.0744211226702,0.722495436668,-0.687358558178],
[0.0362210273743,0.761889100075,-0.646693944931],
[0.108097285032,0.757922053337,-0.643326640129],
[-0.0744211226702,0.722495436668,-0.687358558178],
[-0.108097285032,0.757922053337,-0.643326640129],
[-0.0362210273743,0.761889100075,-0.646693944931],
[0.0,0.... | |
#!/bin/env python
#
# output.py: functions for outputting analysis results
# Copyright (C) University of Manchester 2015-2019 <NAME>,
# <NAME> & <NAME>
#
"""
output.py
Functions for outputing analysis results
"""
from . import distances
from .Peaks import Peak
import io
import tempfile
##############################... | |
<reponame>yinxusen/deepword<gh_stars>1-10
import math
import random
import sys
import time
import traceback
from os import path
from queue import Queue
from threading import Thread
from typing import Tuple, List, Union, Any, Optional, Dict, Generator
import numpy as np
import tensorflow as tf
from deeptextworld.agents... | |
import copy
import numpy as np
from math import cos, sin, pi, atan2
import warnings
import matplotlib.patches as mpatches
from matplotlib.path import Path
from matplotlib.lines import Line2D
from matplotlib.transforms import Affine2D, Bbox, IdentityTransform
from matplotlib.text import Annotation
def rotated_polygon(... | |
],
lorentz = [ L.VVSS1 ],
couplings = {(0,0):C.GC_388})
V_1289 = Vertex(name = 'V_1289',
particles = [ P.W__minus__, P.W__plus__, P.sl3__plus__, P.sl3__minus__ ],
color = [ '1' ],
lorentz = [ L.VVSS1 ],
couplings = {(0,0):C.GC_414})
V_1290 = Vertex(name = 'V_1290',
particles = [ P.W__minus__, P.W__plus__, P.sd... | |
"""
:param qw_number: number of quantum wells in the sample.
:type qw_number: int
:return: None
"""
"""
This method turns the absorption to the absorbance per quantum well. Is
that how this data should be reported?
Also, I'm not sure if columns 1 and 2 are correct.
"""
temp_abs = -np.log(self.proc_data[:, 1... | |
<reponame>xarkes/pydis<filename>pydis/generate_types.py
from enum import IntEnum
class ISAExt(IntEnum):
INVALID = 0
ADOX_ADCX = 1
AES = 2
AMD = 3
AMD3DNOW = 4
AVX = 5
AVX2 = 6
AVX2GATHER = 7
AVX512BW_128 = 8
AVX512BW_128N = 9
AVX512BW_256 = 10
AVX512BW_512 = 11
AVX512BW_KOP = 12
AVX512CD_128 = 13
AVX51... | |
"""
This module is the computational part of the geometrical module of ToFu
"""
# Built-in
import sys
import warnings
# Common
import numpy as np
import scipy.interpolate as scpinterp
import scipy.integrate as scpintg
if sys.version[0]=='3':
from inspect import signature as insp
elif sys.version[0]=='2':
from inspe... | |
self.default_apikey
self.apiclient.connection.securityKey = self.default_secretkey
self.vmdata["name"] = self.acldata["vmD2A"]["name"] + "-shared-scope-account-root-admin"
self.vmdata["displayname"] = self.acldata["vmD2A"]["displayname"] + "-shared-scope-account-root-admin"
try:
vm = VirtualMachine.create(
self.a... | |
(38, ( 3,-3)),
1099: (38, ( 0,-1)),
1100: (38, ( 0,-2)),
1101: (38, ( 0,-3)),
1102: (38, ( 0,-4)),
1103: (38, ( 0,-5)),
1104: (38, ( 0,-6)),
1105: (38, (-1,-1)),
1106: (38, (-2,-2)),
1107: (38, (-3,-3)),
1108: (38, (-4,-4)),
1109: (38, (-2, 1)),
1110: (38, ( 2, 1)),
1111: (38, ( 2,-1)),
1112: (38, ( 1,-2)... | |
from __future__ import division, print_function
__all__ = ["Signal", "LikelihoodError"]
from .global_imports import *
from . import global_imports
from .Data import Data
from .Instrument import Instrument, ChannelError
from .Background import Background
from .Interstellar import Interstellar
from .tools.energy_inte... | |
import cv2
import mxnet as mx
import time
from tools import image_processing
#from mx.model import FeedForward
import numpy as np
from config import config
from tools.nms import py_nms
class MtcnnDetector(object):
"""
Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks
see htt... | |
<gh_stars>100-1000
from __future__ import unicode_literals
from __future__ import print_function
from __future__ import absolute_import
from ..elements import Attribute
from ..elements.elementbase import LogicElement
from ..tags.context import ContextElementBase, DataSetter
from .. import logic
from ..urlmapper import... | |
, (3, 0, None, None) , 0 , )),
(( 'Mileage' , 'Mileage' , ), 34100, (34100, (), [ (8, 1, None, None) , ], 1 , 4 , 4 , 0 , 136 , (3, 0, None, None) , 0 , )),
(( 'NoAging' , 'NoAging' , ), 34062, (34062, (), [ (16395, 10, None, None) , ], 1 , 2 , 4 , 0 , 140 , (3, 0, None, None) , 0 , )),
(( 'NoAging' , 'NoAging' , ),... | |
<gh_stars>1-10
# -----------------------------------------------------------------------
# Name: inputs.py
# Purpose: Read in input parameters to set up and run the model.
# Read in meteorological data, and if desired calculate derived
# data to run the model.
# Author: <NAME>
# Created: 06/11/2018
# Copyright:(c) <N... | |
self.nets['style_encoding'] = build_generator(style_encoding)
self.nets_ema['style_encoding'] = build_generator(style_encoding)
if discriminator:
self.nets['discriminator'] = build_discriminator(discriminator)
self.latent_dim = latent_dim
self.lambda_reg = lambda_reg
self.lambda_sty = lambda_sty
self.lambda_cyc ... | |
1028903, 1028939, 1028941, 1028953, 1028957,
1028969, 1028981, 1028999, 1029001, 1029013, 1029023, 1029037, 1029103,
1029109, 1029113, 1029139, 1029151, 1029157, 1029167, 1029179, 1029191,
1029199, 1029209, 1029247, 1029251, 1029263, 1029277, 1029289, 1029307,
1029323, 1029331, 1029337, 1029341, 1029349, 1029359, 1... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.