input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
<gh_stars>1-10
# -*- coding: utf-8 -*-
#
# This file is part of the pyFDA project hosted at https://github.com/chipmuenk/pyfda
#
# Copyright © pyFDA Project Contributors
# Licensed under the terms of the MIT License
# (see file LICENSE in root directory for details)
"""
Widget for plotting impulse and general transien... | |
= np.zeros((520,520,3),dtype=np.uint8)
inds = [0,0]
pixels_output = [0,0]
img = cv2.resize(result_img, (520, 520))
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
x = img.shape[1] # 获取图像大小
y = img.shape[0]
self.zoomscale = 1 # 图片放缩尺度
frame = QImage(img, x, y, QImage.Format_RGB888)
pix = QPixmap.fromImage... | |
<reponame>guillaume-florent/PyGeM<filename>pygem/radial.py
"""
Module focused on the implementation of the Radial Basis Functions interpolation
technique. This technique is still based on the use of a set of parameters, the
so-called control points, as for FFD, but RBF is interpolatory. Another
important key point of R... | |
per_channel : bool or float or imgaug.parameters.StochasticParameter, optional
Whether to use (imagewise) the same sample(s) for all
channels (``False``) or to sample value(s) for each channel (``True``).
Setting this to ``True`` will therefore lead to different
transformations per image *and* channel, otherwise on... | |
<gh_stars>1-10
import dataclasses
import numpy as np
import casadi as ca
import control
INTERP_DEFAULT = 'linear'
#INTERP_DEFAULT = 'bspline'
TABLE_CHECK_TOL = 1e-9 # need to increase if using bspline
def saturate(x, min_val, max_val):
"""
A casadi function for saturation.
"""
return ca.if_else(x < min_val, min... | |
<gh_stars>0
# Lint as: python3
# Copyright 2021 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
#
#... | |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
##
# @file test_siso_classifier.py
# @author <NAME> (<NAME> <<EMAIL>>
# @date 2018-02-12
#
# @brief Testing a scalable indoor localization system (up to reference points)
# based on Wi-Fi fingerprinting using a single-input and single-output
# (SIMO) deep neural network (D... | |
<reponame>nagineni/chromium-crosswalk
# Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Chromium presubmit script for src/chrome/browser/extensions.
See http://dev.chromium.org/developers/how-tos/dep... | |
<filename>paul_analysis/Python/labird/fieldize.py
# -*- coding: utf-8 -*-
"""Methods for interpolating particle lists onto a grid. There are three classic methods:
ngp - Nearest grid point (point interpolation)
cic - Cloud in Cell (linear interpolation)
tsc - Triangular Shaped Cloud (quadratic interpolation)
Each ... | |
can't
figure everything out in this method, so we figure out as much as we can
and then defer everything else to the .interface_type and .schema properties, this
allows the parser to hopefully finish loading the modules before we have to
parse the classpath to find the foreign key schema
:param field_type: mixed,... | |
<gh_stars>0
'''
Manage Azure Managed Disks.
'''
from .. pyaz_utils import _call_az
def create(name, resource_group, accelerated_network=None, disk_access=None, disk_encryption_set=None, disk_iops_read_only=None, disk_iops_read_write=None, disk_mbps_read_only=None, disk_mbps_read_write=None, edge_zone=None, enable_burs... | |
<reponame>rmorgan10/KNC-Live<gh_stars>0
"""
KN-Classify hand-engineered lightcurve features
"""
import numpy as np
import pandas as pd
class FeatureExtractor():
"""
Class to contain all feature extraction methods
"""
def __init__(self):
# Establish feature families
self.features = [x for x in dir(self) if x[0:1... | |
_RMF_HDF5.StringDataSetAttributes1D_swigregister
StringDataSetAttributes1D_swigregister(StringDataSetAttributes1D)
class StringDataSetAttributes2D(StringConstDataSet2D):
"""Proxy of C++ RMF::HDF5::MutableAttributes<(RMF::HDF5::ConstDataSetD<(RMF::HDF5::StringTraits,2)>)> class."""
__swig_setmethods__ = {}
f... | |
"""Quote
Archive, search, and recite humorous, inspiring, or out-of-context quotes.
Includes a variety of commands for searching and managing quotes, as well as
reporting quote database statistics.
"""
from __future__ import annotations
import itertools
import re
import sqlite3
import textwrap
from collections impor... | |
try:
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
i... | |
# encoding: utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import argparse
import numpy as np
import shutil
import random
import time
from tqdm import tqdm
import torch
import torch.nn as nn
import t... | |
f = np.sum(f,axis=0)
f = (np.fft.fft(f)/nptszf) * phase1
else:
f = (np.fft.fft(f[0,:])/nptszf) * phase1
# Add in baseline unless nobase is True ---
if not nobase:
if f.ndim > 1:
for i in range(len(f)): f[i,:] = f[i,:] + self.fit_baseline
else:
f = f + self.fit_baseline
# Finish calc of Mmol here and a... | |
azmodels.StorageEntity('cont')
ase._mode = azmodels.StorageModes.File
ase._size = 16
ase._client = mock.MagicMock()
ase._client.primary_endpoint = 'ep'
ase._name = 'name'
ase._vio = mock.MagicMock()
ase._vio.total_slices = 2
lp = pathlib.Path(str(tmpdir.join('b')))
dd = models.Descriptor(lp, ase, opts, mock.M... | |
#!/usr/bin/env python
import time
import torch
import torch.nn as nn
import torch.nn.functional as F
from .gp import PriorFactor, GPFactor
from .obstacle import ObstacleFactor
from .custom_factors import NonHolonomicFactor, VelocityLimitFactor
import matplotlib.pyplot as plt
from diff_gpmp2.env import Env2D
from diff_g... | |
logscale_)
def reinit(self, min_, max_):
"""reinit(QpltColor self, float min_, float max_)"""
return _qplt.QpltColor_reinit(self, min_, max_)
def __init__(self, *args):
"""
__init__(aiw::QpltColor self) -> QpltColor
__init__(aiw::QpltColor self, char const * pal_, float min_, float max_, bool logscale_=False... | |
# block_dim must be 2
# Increasing this will require adding more tf.nn.depthwise_conv2d functions.
# There is a depthwise_conv2dfor each element in a single filter
# there are block_dim^2 elements in a filter
block_filters = create_block_filters(block_dim)
# Reshaping to satisfy required shape for weight ar... | |
import torch
import torch.nn as nn
import torch.nn.functional as F
import math
__all__ = ['UNetRNN', 'VGG16RNN', 'ResNet18RNN', 'ResNet50RNN', 'ResNet34RNN', 'ResNet101RNN', 'ResNet152RNN', 'ResNet50UNet', 'ResNet50FCN']
class RDC(nn.Module):
def __init__(self, hidden_dim, kernel_size, bias, decoder='GRU'):
"""
Re... | |
<filename>quotebot.py
# updated
import discord, asyncio
from discord.ext import commands
import logging
import time
import random
import os
import math
import re
import quote_manager2 as qm
import tag_manager as tm
import corpus_manager as cm
import memory_manager as mm
from quote_utils import qparse, to_filename, i... | |
<reponame>nishantkr18/PettingZoo<filename>pettingzoo/butterfly/pistonball/pistonball.py
import os
os.environ['PYGAME_HIDE_SUPPORT_PROMPT'] = 'hide'
import pygame
import pymunk
import pymunk.pygame_util
import math
import numpy as np
import gym
from gym.utils import seeding
from pettingzoo import AECEnv
from pettingzoo.... | |
from PyQt5.QtCore import QObject, pyqtSignal
from Models.Transition import Transition
from Models.Etat import Etat
from Models.Alphabet import Alphabet
from graphviz import Digraph
import datetime
class Type:
AFD = 'Automate Fini Deterministe'
AFN = 'Automate Fini Non Deterministe'
eAFN = f'Epsilon {AFN}'
class... | |
<filename>sparce/bin_manipulations.py<gh_stars>1-10
import os
import re
import sys
import math
import seaborn as sns
import glob
import io
import math
import os
from collections import Counter
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
from numpy import where
import sklearn
from sklearn.ense... | |
import numpy as np
import cv2
import open3d as o3d
from Config import Config
from matplotlib import pyplot as plt
from Optimizer import *
from Keyframe import *
from utilities import rot_to_angle, rot_to_heading
from scipy.spatial.transform import Rotation
class Tracking:
"""Track the input image with respect to pr... | |
<filename>bet365.py<gh_stars>0
# Dependencies
# =============================================================================================================
import undetected_chromedriver.v2 as uc
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.support.ui import WebDriverWait
f... | |
<filename>parse_season.py
import numpy, os, sys, matplotlib, datetime
# matplotlib.use("GTK")
import pylab
from operator import itemgetter
from L2regression import LogisticRegression
from math import exp, log
from scipy.optimize import leastsq, fmin
if len(sys.argv) != 4:
print >>sys.stderr, "usage: python %s cbbgaXX... | |
# Copyright 2020 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, softw... | |
with the X and Y coordinates of the shoreline
"""
# convert pixel coordinates to world coordinates
contours_world = SDS_tools.convert_pix2world(contours, georef)
# convert world coordinates to desired spatial reference system
contours_epsg = SDS_tools.convert_epsg(contours_world, image_epsg, settings['output_eps... | |
'\U0001f34b',
'banana': '\U0001f34c',
'watermelon': '\U0001f349',
'grapes': '\U0001f347',
'blueberries': '\U0001fad0',
'strawberry': '\U0001f353',
'melon': '\U0001f348',
'cherries': '\U0001f352',
'peach': '\U0001f351',
'mango': '\U0001f96d',
'pineapple': '\U0001f34d',
'coconut': '\U0001f965',
'kiwi': '\U000... | |
<reponame>SamuelMarks/enforce<filename>tests/test_types.py
import numbers
import typing
import unittest
from abc import ABC
from collections import namedtuple
from collections.abc import Sized
from enforce.types import (
is_type_of_type,
is_named_tuple,
EnhancedTypeVar,
Integer,
Boolean,
)
class Animal(object):... | |
decoded[2:]:
self._unbundle(msg)
def handle(self):
"""Handle incoming OSCMessage
"""
decoded = decodeOSC(self.packet)
if not len(decoded):
return
self._unbundle(decoded)
def finish(self):
"""Finish handling OSCMessage.
Send any reply returned by the callback(s) back to the originating cli... | |
from google.auth.transport.requests import AuthorizedSession # type: ignore
import json # type: ignore
import grpc # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
from google.auth import credentials as ga_credentials # type: ignore
from google.api_core import exceptions as core_excep... | |
this Warning. # noqa: E501
:type: str
"""
self._activity_level_name = activity_level_name
@property
def danger_type(self):
"""Gets the danger_type of this Warning. # noqa: E501
:return: The danger_type of this Warning. # noqa: E501
:rtype: str
"""
return self._danger_type
@danger_type.setter
def danger... | |
lv '%s-%s' "
"not found" % (name, vg_name, origin_name))
return
if lv_name in origin.snapshots:
return
log.debug("adding %dMB to %s snapshot total"
% (lv_size, origin.name))
origin.snapshotSpace += lv_size
origin.snapshots.append(lv_name)
return
elif lv_attr[0] == 'v':
# skip vorigins
return
elif lv_attr... | |
<gh_stars>10-100
#!/usr/bin/env python
"""
_Subscription_t_
Testcase for the Subscription class
"""
from builtins import str, range
import random
import unittest
from WMCore.DataStructs.File import File
from WMCore.DataStructs.Fileset import Fileset
from WMCore.DataStructs.Run import Run
from WMCore.DataStructs.Sub... | |
the circuits
in parallel does not make sense.
Parameters
----------
circuit : A Circuit object
The circuit to be tensored.
line_order : List, optional
A list of all the line labels specifying the order of the circuit in the updated
circuit. If None, the lines of `circuit` are added below the lines of this cir... | |
import inspect
import logging
import traceback
import uuid
import warnings
from datetime import datetime
from functools import wraps
from importlib import import_module
from typing import List, Any
import numpy as np
import pandas as pd
from dateutil.parser import parse
from great_expectations.data_asset import DataAs... | |
self._http_request(
method='POST',
url_suffix='/actions/get_action_status/',
json_data={'request_data': request_data},
timeout=self.timeout
)
return reply.get('reply').get('data')
def get_file(self, file_link):
reply = self._http_request(
method='GET',
full_url=file_link,
timeout=self.timeout,
resp_type='c... | |
{} UTC'.format(
colour_text, fav_count, colour_text, rel_time))
return em
def _group_beatmaps(self, beatmap_list):
combined_beatmaps = {}
for beatmap in beatmap_list:
if beatmap['beatmapset_id'] not in combined_beatmaps:
combined_beatmaps[beatmap['beatmapset_id']] = []
combined_beatmaps[beatmap['beatmapset_... | |
################################################################################
# Copyright (c) 2006-2017 Franz Inc.
# All rights reserved. This program and the accompanying materials are
# made available under the terms of the MIT License which accompanies
# this distribution, and is available at http://opensource.o... | |
<reponame>skanav/cst_transform<filename>run_experiment.py
import os
import logging
import argparse
import random
import numpy as np
import json
import torch
from torch_geometric.data import DataLoader
from transformers import AdamW, get_linear_schedule_with_warmup
from tqdm import tqdm, trange
import inspect
import... | |
"""
This code trains and tests our InferBert model as described in our paper "Teach the Rules, Provide the Facts: Targeted Relational-knowledge Enhancement for Textual Inference"
paper is available here: https://aclanthology.org/2021.starsem-1.8.pdf
"""
from __future__ import absolute_import, division, print_function... | |
If split dataset does not already have the mapped dataset ID, we update it now.
if force_split_dataset_id or split_dataset.metadata.query_field((), 'id') != split_dataset_id:
# We make a copy for the case that no-split is use.
split_dataset = split_dataset.copy()
split_dataset.metadata = split_dataset.metadata.upda... | |
<filename>cicat/generator/scenGEN.py<gh_stars>10-100
# -*- coding: utf-8 -*-
"""
:::::::::::::::::::::::: Critical Infrastructure Cyberspace Analysis Tool (CICAT) :::::::::::::::::::::::::::::::::::::::
NOTICE
The contents of this material reflect the views of the author and/or the Director of the Center for Advanc... | |
<reponame>labstructbioinf/localpdb
#! /usr/bin/env python3
import os
import argparse
import logging
import sys
import shutil
import socket
import tarfile
import json
import ftplib
import importlib
from tqdm import tqdm
from pathlib import Path
from localpdb import PDB, PDBVersioneer, PDBDownloader
from localpdb.plugins... | |
<gh_stars>0
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: fromCapellaXML.py
# Purpose: Module for importing capellaXML (.capx) files.
#
# Authors: <NAME>
#
# Copyright: Copyright © 2012 <NAME> and the music21 Project
# License: LGPL or BSD, see license.... | |
# -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# #
# The code is hosted on GitHub at https://github.com/aiidateam/aiida_core #
# For further information on the license, s... | |
point_top2).point
point_top3_cam = self.listener.transformPoint("a_bot_camera_calibrated_frame_link", point_top3).point
point_top4_cam = self.listener.transformPoint("a_bot_camera_calibrated_frame_link", point_top4).point
#point_test_center_cam = geometry_msgs.msg.Point(0, 0, 0.4)
#print(point_test_center_cam)
... | |
import numpy as np
import pandas as pd
import os
from urbansim_defaults import datasources
from urbansim_defaults import utils
from urbansim.utils import misc
import orca
from utils import geom_id_to_parcel_id, parcel_id_to_geom_id
from utils import nearest_neighbor
#####################
# TABLES AND INJECTABLES
####... | |
"""
Classes for querying the information in a test coverage report.
"""
from __future__ import unicode_literals
import re
from collections import defaultdict
import os
import itertools
import posixpath
from diff_cover.command_runner import run_command_for_code
from diff_cover.git_path import GitPathTool
from diff_cov... | |
#!/usr/bin/env python
# coding: utf-8
# # Parts-of-Speech Tagging - Working with tags and Numpy
# In this lecture notebook you will create a matrix using some tag information and then modify it using different approaches.
# This will serve as hands-on experience working with Numpy and as an introduction to some eleme... | |
'state_after': sorted([(key, val) for key, val in json.loads(c.state_after).iteritems()]) if c.state_after else {},
} for c in models.Change.objects.all().order_by('-id')[:100]],
})
@login_required
@kt_utils.kt_permission_required('approve_review')
def suggested_reviews(request):
return render(request, 'ktapp/list... | |
<reponame>allaparthi/monorail<gh_stars>0
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file or at
# https://developers.google.com/open-source/licenses/bsd
"""WorkEnv is a context manager and API for high-level... | |
data with space imbetween
f.write('\n') #allows space to be added between the end of body data and a new keyword
elif row=='Bond Coeffs':
f.write('\n{0}'.format(row)) #new line between header and body portion or two body keywords
f.write('\n') #new line between body keyword and body data
for lin... | |
from impl_test_util import impl_jit_test
def test_new(cmdopt):
def build_test_bundle(bldr, rmu):
"""
Builds the following test bundle.
.typedef @i64 = int<64>
.typedef @refi64 = ref<@i64>
.const @NULL_refi64 <@refi64> = NULL
.funcsig @sig__i64 = () -> (@i64)
.funcdef @test_fnc VERSION @test_fnc.v1 <@sig__i64>... | |
import time as _time
from typing import Any as _Any
from typing import Iterable as _Iterable
from typing import List as _List
from typing import Optional as _Optional
from typing import Tuple as _Tuple
from typing import Type as _Type
from typing import TypeVar as _TypeVar
from weakref import WeakMethod as _WeakMethod... | |
063A",
65233: "<isolated> 0641",
65234: "<final> 0641",
65235: "<initial> 0641",
65236: "<medial> 0641",
65237: "<isolated> 0642",
65238: "<final> 0642",
65239: "<initial> 0642",
65240: "<medial> 0642",
65241: "<isolated> 0643",
65242: "<final> 0643",
65243: "<initial> 0643",
65244: "<medial> 0643",
65245:... | |
# -*- coding: utf-8 -*-
import wx
import wx.aui as aui
import wx.grid as grid
import wx.lib.scrolledpanel as scrolled
import os
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from matplotlib.figure import Figure
try:
from uimpl import FigureCanvas # Customized canvas
import setplot
import uim... | |
= Device(name='aDevice')
empty_output = {'execute.return_value': ''}
golden_parsed_output1 = {
'bgp_id': 5918,
'vrf':
{'L3VPN-1151':
{'neighbor':
{'192.168.10.253':
{'address_family':
{'vpnv4':
{'activity_paths': '5564978/1540171',
'activity_prefixes': '2722671/700066',
'as': 61100,
'attribute_entri... | |
<reponame>tylerlaws/geopy
import asyncio
import functools
import inspect
import threading
from geopy import compat
from geopy.adapters import (
AdapterHTTPError,
BaseAsyncAdapter,
BaseSyncAdapter,
RequestsAdapter,
URLLibAdapter,
)
from geopy.exc import (
ConfigurationError,
GeocoderAuthenticationFailure,
Geoco... | |
# -*- coding: utf-8
import pycurl
import os
import shutil
import threading
import lxml.etree as etree
from io import BytesIO
from re import sub
from webdav.connection import *
from webdav.exceptions import *
from webdav.urn import Urn
try:
from urllib.parse import unquote
except ImportError:
from urllib import unqu... | |
sub.set_xlabel(r'$\mathtt{log}\;\mathtt{M_{halo}}\;\;[\mathtt{M_\odot}]$', fontsize=25)
sub.set_ylabel(r'$\mathtt{log}\;\mathtt{M_{SHAM}}\;\;[\mathtt{M_\odot}]$', fontsize=25)
sub.legend(loc='upper right')
fig_file = ''.join([UT.fig_dir(), 'test_CentralMS_SMHMR_MS', '.M_sham', '.png'])
fig.savefig(fig_file, ... | |
import base64
import json
import math
from collections import OrderedDict
from io import TextIOBase, TextIOWrapper
from math import isnan
from cassis.cas import NAME_DEFAULT_SOFA, Cas, IdGenerator, Sofa, View
from cassis.typesystem import *
RESERVED_FIELD_PREFIX = "%"
REF_FEATURE_PREFIX = "@"
NUMBER_FEATURE_PREFIX = ... | |
<filename>ikbtleaves/sum_id.py
#!/usr/bin/python
#
# BT Nodes for specific symbolic steps
# Copyright 2017 University of Washington
# Developed by <NAME> and <NAME>
# BioRobotics Lab, University of Washington
# Redistribution and use in source and binary forms, with or without modification, are permitted provided th... | |
#
# Copyright © 2021 Ingram Micro Inc. All rights reserved.
#
from collections import defaultdict
from datetime import datetime
from uuid import uuid4
from dj_rql._dataclasses import FilterArgs, OptimizationArgs
from dj_rql.constants import (
ComparisonOperators,
DjangoLookups,
FilterLookups,
FilterTypes,
ListOp... | |
<filename>kol/util/ChatUtils.py
from kol.manager import PatternManager
from kol.util import Report
from kol.util import StringUtils
CHAT_CHANNELS = [
"clan",
"dev",
"dread",
"foodcourt",
"games",
"haiku",
"hardcore",
"harem",
"hobopolis",
"kwe",
"lounge",
"mod",
"newbie",
"normal"
"pvp",
"radio",
"sli... | |
<gh_stars>0
# coding: utf-8
"""
Canopy.Api
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F... | |
import logging
logger = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO)
import os
import suds
from suds.client import Client
from suds.sax.element import Element
import urllib
import urlparse
import base64
from datetime import date
try:
from pysimplesoap.client import SoapClient
except:
# Just m... | |
<gh_stars>1-10
from abc import ABC, abstractmethod,ABCMeta
import sys
import os
import math
import pandas as pd
from sklearn.preprocessing import MinMaxScaler
from yahoo_quote_download import yqd
from datetime import datetime
from collections import OrderedDict,Set
import numpy as np
import matplotlib.pyplot as plt
... | |
<filename>sparkmagic/sparkmagic/kernels/kernelmagics.py
"""Runs Scala, PySpark and SQL statement through Spark using a REST endpoint in remote cluster.
Provides the %spark magic."""
# Copyright (c) 2015 <EMAIL>
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function
import jso... | |
import copy
import json
import logging
import os
import colorcet as cc
import pandas as pd
import pyproj
import pytoml
import tornado
import tornado.escape
import yaml
from bokeh.layouts import row, widgetbox, layout
from bokeh.models import Select, CustomJS, Jitter, DataTable, TableColumn, Slider, Button
# noinspecti... | |
assume attack is .5 seconds, and decay is .5 seconds. If a note is
held for .75 seconds, the envelope won't pass through the entire
attack-and-decay (specifically, it will execute the entire attack, and
only .25 seconds of the decay).
If this is confusing, don't worry about it. ADSR's do a lot of work
behind the ... | |
Json like output
"""
if not query_output:
raise RuntimeError("[ERROR] The output of 'describe formatted' that was provided is empty. That is not supposed to happen.")
describe_json = {}
sub_section = None
for row in query_output:
row = [
field.strip().rstrip(':') if isinstance(field, str) else None
for field i... | |
% exp)
bval_ = self.gds_validate_base64(bval_, node, 'Image')
else:
bval_ = None
self.Image = bval_
self.Image_nsprefix_ = child_.prefix
# end class UploadImageDetail
class UploadImagesReply(GeneratedsSuper):
__hash__ = GeneratedsSuper.__hash__
subclass = None
superclass = None
def __init__(self, HighestSeve... | |
<gh_stars>0
import os, sys, pathlib, numpy
from fairgraph.client import KGClient
from fairgraph.uniminds import Person, BrainStructure, CellularTarget, License, ModelFormat, ModelInstance, ModelScope, Publication, StudyTarget, FileBundle, Organization, Dataset, AbstractionLevel
sys.path.append(str(pathlib.Path(__file_... | |
dropSettings = {
'type': AppKit.NSFilenamesPboardType,
'callback': self.callbackDropOnLocationList,
'allowDropBetweenRows': False
}
if version >= "3.2":
self.w.selectedNames = vanilla.List(
(catWidth+10, topRow, -205, -5),
[],
columnDescriptions=columnDescriptions,
selectionCallback=self.callbackGlyphNameSele... | |
<reponame>BradB111/galaxy_blizzard_plugin
import asyncio
import json
import os
import sys
import multiprocessing
import webbrowser
from collections import defaultdict
import requests
import requests.cookies
import logging as log
import subprocess
import time
import re
from typing import Union, Dict
from galaxy.api.co... | |
#!/bin/python3
#If you want to try it with python2 change tkinter to Tkinter
from tkinter import *
import time, random, os
playername = os.getlogin()
print(playername)
alph = ["a", "b", "c", "d"]
level = 1
goal = 5
minimal_delay = 250
delay = 1750
base_delay = 1750
debug = 0
width = 360
rotation = 0
spx = width/2
s... | |
as are
available.
**keywords :
additional parameters can be given via arbitrary
keyword arguments. These can be either standard
parameters (with names drown from the
``SIAQuery.std_parameters`` list) or paramters
custom to the service. Where there is overlap
with the parameters set by the other arguments... | |
value set to false, '
'representing incomplete items.')
c.argument('applied_categories', type=validate_file_or_dict, help='plannerAppliedCategories Expected value: '
'json-string/@json-file.')
c.argument('assignee_priority', type=str, help='Hint used to order items of this type in a list view. The '
'format is def... | |
# Copyright 2014 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... | |
samples.
- If float, then draw `max_samples * X.shape[0]` samples.
- If "auto", then `max_samples=min(256, n_samples)`.
If max_samples is larger than the number of samples provided,
all samples will be used for all trees (no sampling).
contamination : 'auto' or float, default='auto'
The amount of contamination of... | |
# kivy and python with pdf
# command to make atlas
#python -m kivy.atlas data/images/images 600 data/images/*
import kivy
from kivy import platform
from kivy.uix.button import Button
from kivy.uix.screenmanager import Screen, ScreenManager
from kivy.uix.behaviors import DragBehavior
from kivy.uix.gridlayout import Gri... | |
- m.x375 - m.x377 - m.x379 == 0)
m.e164 = Constraint(expr= m.x120 - m.x374 - m.x376 - m.x378 - m.x380 == 0)
m.e165 = Constraint(expr= m.x101 - m.x333 - m.x335 - m.x337 - m.x339 == 0)
m.e166 = Constraint(expr= m.x102 - m.x334 - m.x336 - m.x338 - m.x340 == 0)
m.e167 = Constraint(expr= m.x123 - m.x381 - m.x383 - m.x385 - ... | |
self.assertEqual(response.status_code, 403)
self.assertDictEqual(response.json(), {'detail': 'You do not have permission to perform this action.'})
def test_get_fail_wrong_device_id(self):
headers = self.headers
headers['HTTP_SSL_CLIENT_SUBJECT_DN'] = 'CN=device1.d.wott-dev.local'
response = self.client.get(self.... | |
<filename>src/containerapp/azext_containerapp/tests/latest/test_containerapp_commands.py
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for li... | |
with ', e.returncode)
trace(1, e.output)
sys.exit(e.returncode)
@property
def str_result(self):
return self.result.decode() if isinstance(self.result, bytes) else self.result
##----- End executor.py ------------------------------------------------------##
return locals()
@modulize('main')
def _main(__name... | |
path = 'qrs/stream'
if opt:
path += '/full'
return json.loads(self.get(path, filterparam, filtervalue).decode('utf-8'))
def get_servernode(self, opt=None, filterparam=None, filtervalue=None):
"""
Returns the server node
:param filterparam: Property and operator of the filter
:param filtervalue: Value of the fi... | |
the Network User.
logon_id: The logon identifier of the Network User.
logout_time: The logout timestamp of the Network User.
name: The name of the Network User.
network: The reference to the network to which the Network User
belongs.
network_view: The name of the network view in which this Network
User resides.
... | |
'tftp', 'chrome-bot', self.board, 'vmlinuz')
has_tftp = True
readme_path = os.path.join(bundle_dir, 'README.md')
with open(readme_path, 'w') as f:
fw_ver = self.GetFirmwareUpdaterVersion(self.firmware)
fsi_fw_ver = self.GetFirmwareUpdaterVersion(release_firmware_updater)
info = [
('Board', self.board),
('Bundl... | |
####################
# ES-DOC CIM Questionnaire
# Copyright (c) 2017 ES-DOC. All rights reserved.
#
# University of Colorado, Boulder
# http://cires.colorado.edu/
#
# This project is distributed according to the terms of the MIT license [http://www.opensource.org/licenses/MIT].
####################
from django.conf im... | |
<filename>clair/model.py
import warnings
with warnings.catch_warnings():
warnings.filterwarnings('ignore', category=DeprecationWarning)
warnings.filterwarnings("ignore", category=FutureWarning)
from tensorflow.python.util import deprecation
deprecation._PRINT_DEPRECATION_WARNINGS = False
import tensorflow as tf
f... | |
#import numpy as np
import cupy as cp
from ArraysCollection import ArraysCollection
import functools
import math
class DirectionalFilterBank():
""" Class that perform a directional filter bank, which means one step of the curvelet transform for one scale.
The procedure was taken from the article the uniform discrete... | |
multiple number of axi.datawidth')
pack_size = ram_datawidth // self.datawidth
dma_size = (self.write_size << int(math.log(pack_size, 2))
if math.log(pack_size, 2) % 1.0 == 0.0 else
self.write_size * pack_size)
op_id = self._get_write_op_id(ram, port, ram_method)
port = vtypes.to_int(port)
if op_id in self.wr... | |
from __future__ import print_function
from properties import Properties
from changedetection import ChangeDetection
from ensemble import Ensemble
from stream import Stream
from model import Model
import time, sys
from py4j.java_gateway import JavaGateway, GatewayParameters, CallbackServerParameters
import numpy as np
... | |
# this is the python library created for using BigGAN in evolution.
import sys
from os.path import join
sys.path.append("C:/Users/zhanq/OneDrive - Washington University in St. Louis/GitHub/pytorch-pretrained-BigGAN")
# sys.path.append("E:\Github_Projects\pytorch-pretrained-BigGAN")
from pytorch_pretrained_biggan import... | |
To make an
asynchronous HTTP request, please pass async_req=True
>>> thread = api.remove_trusted_project1(id, trustedid, async_req=True)
>>> result = thread.get()
:param async_req bool: execute request asynchronously
:param str id: ID of project (required)
:param str trustedid: ID of trusted project (required)
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.