input stringlengths 2.65k 237k | output stringclasses 1
value |
|---|---|
self.is_mcmc):
# #x.append(xblob[name][skip:stop][loc])
# y.append(yblob[loc])
# elif samples is not None:
# y.append(yblob[keep == 1])
# elif percentile:
# lo, hi = np.percentile(yblob[keep == 1], (q1, q2))
# y.append((lo, hi))
# else:
# dat = yblob[keep == 1]
# lo, hi = dat.min(), dat.max()
# y.append((lo,... | |
Machete+7",
352408: "Magic Demon Great Machete+8",
352409: "Magic Demon Great Machete+9",
352410: "Mag. Demon Great Machete+10",
352500: "Ench. Demon Great Machete",
352501: "Ench. Demon Great Machete+1",
352502: "Ench. Demon Great Machete+2",
352503: "Ench. Demon Great Machete+3",
352504: "Ench. Demon ... | |
<filename>src/basic/video_detect_smooth_dlib.py
import cv2
import dlib
import time
import math
import numpy as np
import matplotlib.pyplot as plt
import sys
# http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2
<<<<<<< HEAD
predictorPath = r"../../dep/shape_predictor_68_face_landmarks.dat"
predictorIdx = [... | |
push_points = np.zeros((n_slices, n_columns, n_rows), dtype=np.complex)
push_points_1d = np.zeros(n_rows, dtype=np.complex)
# walk through the data column-by-column
for col in np.arange(n_columns):
# walk through the data spectrum-by-spectrum
for spec in np.arange(n_slices):
# first, initialize: push_points_1d ... | |
import os
import unittest
import json
import trebek
import entities
import fakeredis
import time
import datetime
# Reference this SO post on getting distances between strings:
# http://stackoverflow.com/a/1471603/98562
def get_clue_json():
with open('test-json-output.json') as json_data:
clue = json.load(json_data) ... | |
<reponame>combinatorist/mac_apt
'''
Copyright 2011 <NAME>, <NAME>
Using New BSD License:
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list o... | |
<reponame>IMULMUL/etl-parser
# -*- coding: utf-8 -*-
"""
Microsoft-Windows-SEC
GUID : 16c6501a-ff2d-46ea-868d-8f96cb0cb52d
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from etl.dty... | |
import os
import random
import sys
from dotenv import load_dotenv
import characters
import items
import names
import random_lists
import shared_functions
import traits
import wizard
from bot import bot as bot
from shared_functions import party as party
from shared_functions import npcs as npcs
from shared_functions i... | |
<filename>cgnet/feature/statistics.py
# Authors: <NAME>, <NAME>
# Contributors: <NAME>
import copy
import numpy as np
import torch
import scipy.spatial
import warnings
from .geometry import Geometry
g = Geometry(method='numpy')
KBOLTZMANN = 1.38064852e-23
AVOGADRO = 6.022140857e23
JPERKCAL = 4184
class GeometrySt... | |
2, 4, 6],
[2, 0, 2, 4],
[4, 2, 0, 2],
[6, 4, 2, 0],
[8, 6, 4, 2]])
>>> sa.getOpFromLocation(4, 3)
<ChangeOps.Insertion: 0>
>>> sa.getOpFromLocation(2, 2)
<ChangeOps.NoChange: 3>
>>> sa.getOpFromLocation(0, 2)
<ChangeOps.Deletion: 1>
>>> sa.distanceMatrix[0][0] = 1
>>> sa.distanceMatrix
array([[1, 2, 4... | |
<filename>toboggan/flow.py
#
# This file is part of Toboggan, https://github.com/TheoryInPractice/Toboggan/,
# and is Copyright (C) North Carolina State University, 2017. It is licensed
# under the three-clause BSD license; see LICENSE.
#
# python libs
import math
from collections import defaultdict
import itertools
im... | |
<gh_stars>0
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
"""
Executes state tests on multiple clients, checking for EVM trace equivalence
"""
import json, sys, re, os, subprocess, io, itertools, traceback, time, collections
from contextlib import redirect_stderr, redirect_stdout
import ethereum.transactions as trans... | |
= self
self._super_call = True
try:
res = getattr(PyFloatProperty, funcname)(*args2, **kwargs)
finally:
del self._super_call
return res
def _RegisterMethods(self):
cls = self.__class__
if not hasattr(cls,'_pyswig_methods_registered'):
cls._pyswig_methods_registered = True
ls = [ab for ab in cls.__dict__.ite... | |
True
def _parse_atom_attributes(token):
"""
Parse bracketed tokens.
Parameters
----------
token: str
Token in the form of a json dictionary.
Returns
-------
dict
"""
if not token.strip().startswith('{'):
raise ValueError('The token should start with a curly bracket.')
try:
attributes = json.loads(toke... | |
'buffer', 'offset', 'size'])
def glBindBufferRange(target, index, buffer, offset, size):
pass
@params(api='gl', prms=['v'])
def glNormal3iv(v):
pass
@params(api='gl', prms=['program', 'location', 'params'])
def glGetUniformdv(program, location, params):
pass
@params(api='gl', prms=['target', 's', 't', 'r', 'q'... | |
<reponame>ModelDBRepository/137676
#encoding: utf-8
"""
analysis.py -- Parallelized data collection and figure creation
BaseAnalysis provides general functionality for running many 'embarrassingly
parallel' long-running calls in an IPython.kernel ipcluster in order to collect
data (e.g., running model simulations fo... | |
#!/usr/bin/python
"""Use a trunnel input file to generate examples of that file for
fuzzing.
Here's the strategy:
First, sort all the types topologically so that we consider
every type before any type that depends on it.
Then, for we iterate over each type to make examples of it. We do
a recursive descent on t... | |
from script."
STR_DEBUGGEE_UNKNOWN = "Failed to find script."
STR_MULTIPLE_DEBUGGEES = "WARNING: There is more than one debuggee '%s'."
MSG_ERROR_HOST_TEXT = """The debugger was not able to set the host to '%s'.
The following error was returned:
%s"""
STR_SOURCE_NOT_FOUND = "Failed to get source from debuggee."
STR_SCR... | |
kwargs.get("_preload_content", True)
kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
kwargs["_host_index"] = kwargs.get("_host_index")
return self.remove_resul... | |
import os
import math
import requests
import json
import datetime
import hashlib
from pygdpr.models.dpa import DPA
from bs4 import BeautifulSoup
from pygdpr.services.filename_from_path_service import filename_from_path_service
from pygdpr.services.pdf_to_text_service import PDFToTextService
from pygdpr.specifications i... | |
# coding: utf-8
# flake8: noqa
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 4
Contact: <EMAIL>
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
# import apis into sdk package
from isi_sdk_8_0_1.a... | |
u'DigPattern_RefTrig_Pattern': 8583,
u'DigPattern_RefTrig_Src': 5175,
u'DigPattern_RefTrig_When': 5176,
u'DigPattern_StartTrig_Pattern': 8582,
u'DigPattern_StartTrig_Src': 5136,
u'DigPattern_StartTrig_When': 5137,
u'Exported_10MHzRefClk_OutputTerm': 8814,
u'Exported_20MHzTimebase_OutputTerm': 5719,
u'Exported_A... | |
import pickle
from collections import defaultdict
from pathlib import Path
from typing import Optional, Callable
import numpy as np
import torch
import torch.utils.data as torchdata
from ignite.contrib.handlers import ProgressBar
from ignite.engine import create_supervised_evaluator, Events, Engine
from ignite.metrics... | |
"""
from scipy.ndimage import zoom
if os.path.isfile(fn):
segm = fits.getdata(fn)
segm_out = zoom(segm, zoom=0.5, order=1)
fits.writeto(fn_out, segm_out, overwrite=True)
else:
pass
def process_resampling(fn, bounds, obj_name, band,
pixel_scale=DF_pixel_scale, r_scale=12,
mag_limit=15, dir_measure='./', w... | |
to plot the actual coeff, not the target
# should specify this in the paper
except AssertionError:
print('Clustering target not reached')
unsuccessful_flags_3.append(i)
peak_times_3[i] = np.nan
peak_heights_3[i] = np.nan
peak_heights_sd_3[i] = np.nan
period_prevalences_3[i] = np.nan
period_prevalences_sd_3[i]... | |
#!/usr/bin/python3
# -*- encoding: utf-8 -*-
__version__ = 1.2
from tkinter.ttk import *
from tkinter.messagebox import *
from tkinter.scrolledtext import *
from tkinter import *
from bs4 import BeautifulSoup
from urllib.request import urlopen
from mailcomposer import MailComposer
from threading import Thread
import ... | |
<filename>DeepLearning/RunNN.py<gh_stars>0
# -*- coding: utf-8 -*-
"""
Created on Sat Dec 8 22:05:38 2018
@author: Chandar_S
"""
from cnn import cnn
from fnn import fnn
from rnn import rnn
from nn_utilities_py import nn_utilities
import tensorflow as tf
from scipy.misc import imread
import os
import numpy as np
impor... | |
response = self._webclient.APICall('GET', u'object/%s/scenejs/' % objectpk, timeout=timeout)
geometries = []
for encodedGeometry in response['geometries']:
geometry = {}
positions = numpy.fromstring(base64.b64decode(encodedGeometry['positions_base64']), dtype=float)
positions.resize(len(positions) / 3, 3)
geometr... | |
<filename>gae_app/lib/fixture/loadable/loadable.py
"""Abstract classes for :class:`fixture.base.Fixture` descendants that load / unload data
See :ref:`Using LoadableFixture<using-loadable-fixture>` for examples.
"""
# from __future__ import with_statement
__all__ = ['LoadableFixture', 'EnvLoadableFixture', 'DBLoadab... | |
lbl='입체/종이퍼즐'),
1058: SChildCategory(b=array([24]), m=array([73]), lbl='키보드/마우스 세트'),
1059: SChildCategory(b=array([33]), m=array([368]), lbl='일반세탁기'),
1060: SChildCategory(b=array([41]), m=array([369]), lbl='탄산음료'),
1061: SChildCategory(b=array([27]), m=array([370]), lbl='치즈'),
1062: SChildCategory(b=array([37]),... | |
<gh_stars>0
# -*- coding: iso-8859-15 -*-
"""
Diese Klasse ist die Hauptsteuerroutine des Frameworks.
Sie steuert das gesamte Verhalten.
Es werden die Subklassen instanziert
"""
import cgi
import os
import sys
import traceback
from urlparse import *
from cgi import FieldStorage
from cgi import MiniFieldStorage
from ... | |
# Code for plan-net
# <NAME>, Feb 2019
# Keras
import keras
from keras import backend as K
from keras.models import Sequential, Model
from keras.metrics import binary_accuracy
from keras.layers import Convolution1D, Dense, MaxPooling1D, Flatten, Input, Lambda, Wrapper, merge, concatenate
from keras.engine import Input... | |
"""
Interp-level definition of frequently used functionals.
"""
import sys
from pypy.interpreter.baseobjspace import W_Root
from pypy.interpreter.error import OperationError, oefmt
from pypy.interpreter.gateway import interp2app, unwrap_spec, WrappedDefault
from pypy.interpreter.typedef import TypeDef
from rpython.rl... | |
# -*- coding: utf-8 -*-
"""
Logic for controlling worker processes
"""
import copy
import json
import logging
import os
import pickle
import signal
import time
from collections import Iterable, defaultdict
from datetime import timedelta
from functools import wraps
from multiprocessing import Process
from threading imp... | |
<reponame>MarioBonse/hanabi-learning-environment
# coding=utf-8
# Copyright 2018 The TF-Agents 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/LICE... | |
MEDIAL FORM
FE7E ARABIC SUKUN ISOLATED FORM
FE7F ARABIC SUKUN MEDIAL FORM
FE80 ARABIC LETTER HAMZA ISOLATED FORM
FE81 ARABIC LETTER ALEF WITH MADDA ABOVE ISOLATED FORM
FE82 ARABIC LETTER ALEF WITH MADDA ABOVE FINAL FORM
FE83 ARABIC LETTER ALEF WITH HAMZA ABOVE ISOLATED FORM
FE84 ARABIC LETTER ALEF WITH HAMZA ABOVE FINA... | |
get_energy(W, b, s, beta)))
joints /= np.sum(joints)
return joints
def get_theo_joints_pm(W, b, beta):
"""calculate the theoretical state distribution for a Boltzmann
machine
"""
N = len(b)
joints = []
states = get_states(N)
for s in states:
joints.append(np.exp(-1. * get_energy(W, b, (2. * s - 1.), beta))... | |
<gh_stars>0
import sys
import pygame as pg
import logging
import Project_GameState
from settings import *
# What each module does
# sys - This will set the recursion limit so that algorithms won't run on forever.
# settings - This will import the settings file in the current directory.
# Importing the GameState which... | |
if False in checks.values():
raise ValueError('i2c read check failed: ' + repr(checks))
# current and max values
return int.from_bytes(ba[6:8], 'big'), int.from_bytes(ba[4:6], 'big')
@classmethod
def get_display_info(cls, display: Optional[Union[int, str]] = None) -> List[dict]:
'''
Returns information about d... | |
<gh_stars>0
# 在训练和前向传播预测时为什么有区别
# 在原先使用tf.layers.batch_normalization函数的代码中,我们通过传入一个'training'参数告诉神经层我们是否正在训练网络
# eg:batch_normalized_output = tf.layers.batch_normalization(linear_output, training=self.is_training)
# 这就导致我们在feed_dict向神经网络中传值时需要提供一个self.is_training的参数,例如在NeuraNet的train方法中:
# session.run(train_step, feed_... | |
if domain+"--"+slot_type in dom_type_list:
break
# not labeled
last_turn = turn["context"].split("<system>")[-1]
sys_utt, user_utt = last_turn.split("<user>")
slots_string = ", ".join([" ".join(slot) for slot in turn["slots"]])
if domain == "hotel":
if "hotel" not in last_turn and ("guesthouse" in user_utt or "... | |
self.tunnel["destination"]:
if self.rtr.isCPE():
id = "%s-%s-%s" % (
"tunnel",
self.tunnel["destination"],
self.tunnel["source"],
)
else:
id = "%s-%s-%s" % (
"tunnel",
self.tunnel["source"],
self.tunnel["destination"],
)
return id
## Procedure to override Product info based on extra parameters
## this ... | |
# coding: utf-8
"""
validateapi
The validation APIs help you validate data. Check if an E-mail address is real. Check if a domain is real. Check up on an IP address, and even where it is located. All this and much more is available in the validation API. # noqa: E501
OpenAPI spec version: v1
Generated by: http... | |
was here????!
nvoice.autoProg(self._cprog, self._progc, self._csize, ncount, tweights, mweights) ### ncount wasnt here?!?
self._voices[mtype] = self._voices[mtype] + (nvoice,)
self._sorting = self._sorting + (tvindicator(mtype, len(self._voices[mtype])-1),)
def addVoiceAsIs(self, voic): # Copies voice !!voi... | |
columns.index('Door to arterial puncture time (IQR)')
)
mechanical_thrombectomy_outcome_format = self._add_group_header_format(
workbook, '#BEBCBC'
)
self._add_group_text(
worksheet,
mechanical_thrombectomy_outcome_format,
'Outcome after mechanical thrombectomy (as per NIHSS score)',
columns.index('# of patie... | |
of view for this particular renderer"""
return self._vfov
@property
def v_angles(self):
"""Vertical angular scale of the image frame."""
v_angles = self._v_angles[...]
v_angles.setflags(write=False)
return v_angles
@property
def calc(self):
"""Calc object used to calculate verticle rays."""
return self._ca... | |
1)
xy_stretched_ident = np.repeat(x_stretched_ident, y_stretch, 0)
indices = np.where(xy_stretched_ident == 1.0)
if rank == 2:
base_array[indices[0], indices[1]] = m
else:
arr = base_array[[[i] for i in middle_indices]][0]
arr[indices[0], indices[1]] = m
base_array[[[i] for i in middle_indices]] = arr
return ... | |
total gates.
For example, `populate(base='11:22:33:44:00', count = 10, gate_count = 2) would
route addresses 11:22:33:44::(00, 02, 04, 06, 08) out a gate 0 and the odd-suffixed
addresses out gate 1.
:param base: The base MAC address
:param count: How many addresses beyond base to populate into the routing table
... | |
# This file is part of the clacks framework.
#
# http://clacks-project.org
#
# Copyright:
# (C) 2010-2012 GONICUS GmbH, Germany, http://www.gonicus.de
#
# License:
# GPL-2: http://www.gnu.org/licenses/gpl-2.0.html
#
# See the LICENSE file in the project's top-level directory for details.
import re
import itertools
fro... | |
<reponame>lizhangjie316/Minner<gh_stars>1-10
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SumDialog.ui'
#
# Created by: PyQt5 UI code generator 5.15.0
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what y... | |
<reponame>tpulkit/txt2vid
# Script to analyze pilot study data collected using qualtrics on one content
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# params
# data_file = 'Video Quality Survey (640x480)_May 7, 2021_07.55.csv'
data_file = 'Video Quality Survey (640x480)_May 14, 2021_08.10.csv... | |
if columns is not None:
# if columns parameter is supplied: slice columns from dataframe
_assert_has_columns(data, [columns])
data = data.loc[:, columns]
_assert_num_columns(data, 5)
_assert_value_range(data, score_range)
return pd.DataFrame(data.sum(axis=1), columns=[score_name])
def idq_post_scan(data: pd.D... | |
0)), ((0, 1), (0, 1))),
]
def test_point_requirements(placement1, placement1owncol, placement1ownrow):
assert placement1._point_requirements((2, 3)) == [
[GriddedPerm(Perm((0,)), ((3, 4),))]
]
assert placement1ownrow._point_requirements((2, 3)) == [
[GriddedPerm(Perm((0,)), ((2, 4),))]
]
assert placement1ownc... | |
date = date.Date ('2014-05-10')
, weekend_allowed = 0
, required_overtime = 0
)
dr = db.daily_record.create \
( user = user
, date = date.Date ('2014-05-11')
, weekend_allowed = 0
, required_overtime = 0
)
dr = db.daily_record.create \
( user = user
, date = date.Date ('2014-05-12')
, weekend_allowed = 0
... | |
# %% [markdown]
# # FOI-based hospital/ICU beds data analysis
import pandas
import altair
altair.data_transformers.disable_max_rows()
# %% [markdown]
# ## BHSCT FOI data
#
# * weekly totals, beds data is summed (i.e. bed days)
bhsct_beds = pandas.read_excel('../data/BHSCT/10-11330 Available_Occupied Beds & ED Atts 20... | |
2, 3], 'val': ['a', 'b', 'c']})
t2 = XFrame({'id': [1, 2, 4], 'doubled': ['aa', 'bb', 'dd']})
res = t1.join(t2, how='right').sort('id').head()
assert len(res) == 3
assert res.column_names() == ['id', 'val', 'doubled']
assert res.column_types() == [int, str, str]
assert res[0] == {'id': 1, 'val': 'a', 'doubled': '... | |
"""
simple, elegant templating
(part of web.py)
Template design:
Template string is split into tokens and the tokens are combined into nodes.
Parse tree is a nodelist. TextNode and ExpressionNode are simple nodes and
for-loop, if-loop etc are block nodes, which contain multiple child nodes.
Each node can emit som... | |
<reponame>ftc-team-8813/website
# Builder.py v1.4
# Basic template-based HTML compiler.
# Requires Python 3.x
# THE FORMAT
# To avoid conflicting with standard HTML, metadata is stored in standard HTML comments:
# <!-- $command -->
# There can be a maximum of ONE command per line; later commands will be ignored.
# Com... | |
the position of the specified vehicle (relative to the
current edge).
Parameters
----------
veh_id : str or list<str>
vehicle id, or list of vehicle ids
error : any, optional
value that is returned if the vehicle is not found
Returns
-------
str
"""
if isinstance(veh_id, (list, np.ndarray)):
return [sel... | |
commit of a repo.
After a scan, record what is the most recent commit scanned, such that
another (future) scan will not process the same commits twice.
Parameters
----------
url: str
The url of the repository scanned
last_commit: str
The most recent commit scanned
Returns
-------
bool
`True` if the updat... | |
def tags(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
pulumi.set(self, "tags", value)
@pulumi.input_type
class _VappContainerState:
def __init__(__self__, *,
cpu_expandable: Optional[pulumi.Input[bool]] = None,
cpu_limit: Optional[pulumi.Input[int]] = None,
cpu_reservation: Optional[pulumi.... | |
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name,too-many-instance-attributes, too-many-arguments
"""
Copyright 2019 <NAME>
Copyright 2015 <NAME>.
FilterPy library.
http://github.com/rlabbe/filterpy
Documentation at:
https://filterpy.readthedocs.org
Supporting book at:
https://github.com/rlabbe/Kalman-and-Baye... | |
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0xC0,
0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00,
0x08, 0x02, 0x04, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x88, 0x60, 0x0F,
0xE3, 0x83, 0xF9, 0xC3, 0xF9, 0xE0, 0x0F, 0xFC, 0x00, 0xFF, 0xC0, 0x07,
0xF8, 0x06, 0x3E, 0x0F, 0x03, 0xF8... | |
<gh_stars>0
import re
import fasttext
# To download the fasttext model:
# wget -O /tmp/lid.176.bin https://dl.fbaipublicfiles.com/fasttext/supervised-models/lid.176.bin
import sentencepiece
import kenlm
import pathlib
from languages_id import langs_id
from parameters_filtering import parameters_filtering
from norm... | |
c:
c.argument('planner_bucket_id', type=str, help='key: id of plannerBucket')
c.argument('planner_task_id', type=str, help='key: id of plannerTask')
c.argument('select', nargs='+', help='Select properties to be returned')
c.argument('expand', nargs='+', help='Expand related entities')
with self.argument_context('... | |
<gh_stars>1-10
# -*- coding: utf-8 -*-
"""Tools for hydrology.
hydrotoolbox baseflow_sep --area 59.1 --area_units 'mile**2' linear < daily.csv
hydrotoolbox baseflow_sep sliding < daily.csv
hydrotoolbox baseflow_sep eckardt,sliding < daily.csv
...
hydrotoolbox recession """
from __future__ import absolute_import, div... | |
except:
child_comments = resp.json
except:
# WE need logging in the web app!
try:
import sys
sys.stderr.write('Error: got a {c} from {u}\n'.format(c=resp.status_code,
u=get_children_url))
except:
pass # well that sucks, we failed to even write to stderr
metadata = parse_comment_metadata(comment['body'])
##p... | |
##############################################################################
# Copyright by The HDF Group. #
# All rights reserved. #
# #
# This file is part of HSDS (HDF5 Scalable Data Service), Libraries and #
# Utilities. The full HSDS copyright notice, including #
# terms governing use, modification, and redistri... | |
# -*- coding: utf-8 -*-
"""
Created on Thu Sep 12 13:37:37 2019 by <NAME> - <EMAIL>
Write this
"""
import torch
import torch.nn as nn
import torch.optim as optim
import torch.backends.cudnn as cudnn
import torchvision.transforms.functional as TF
from torchvision import transforms
import time
import ... | |
0, 0, 0, 0],
[1503, 22.309103, 0, 9999, -9999, 1.0, 100, 1, 45.972187, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1504, 78.164168, 0, 9999, -9999, 1.0, 100, 1, 188.822836, 0.0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
[1505, 2.662713, 0, 9999, -9999, 1.0, 100, 1, 26.765913, 0.0, 0, 0, 0, 0, 0,... | |
<gh_stars>1-10
# Copyright (c) 2021 <NAME>
#
# Rehabilitation project for lower extremity stroke patients.
#
# Project consist of several scripts running concurrently in a multi-threaded fashion
# All programs are run by raspberry pi 4
# mainProg.py: Rehab-bot system execution.
# livePlotter.py: plotting important st... | |
will be created as required during the repository initialization.
:param url: git-clone compatible URL, see git-clone reference for more information
If None, the repository is assumed to exist, and the url of the first
remote is taken instead. This is useful if you want to make an existing
repository a submodule of... | |
# OO OO OO
0x3C, 0x03, 0x00, # OOOO OO
0x6E, 0x03, 0x00, # OO OOO OO
0x66, 0x03, 0x00, # OO OO OO
0xC3, 0x03, 0x00, # OO OO OO
0xC1, 0x86, 0x00, # OO OO OO
0xC0, 0xC6, 0x00, # OO OO OO
0xE0, 0x64, 0x00, # OOO OO O
0x60, 0x30, 0x00, # OO OO
0x78, 0x0F, 0xE0, # OOOO OOOOOOO
0x3F, 0xFF, 0xF0, # OOOOOOO... | |
return imgProj, imgMask, dstXY0
def bbox(xys):
min_xy, max_xy = xys.min(axis=0), xys.max(axis=0)
#print("min_xy:%s, max_xy:%s"%(min_xy, max_xy))
min_xy, max_xy = np.floor(min_xy).astype(np.int16), np.ceil(max_xy).astype(np.int16)
# print("min_xy:%s, max_xy:%s"%(min_xy, max_xy))
return min_xy[0], max_xy[0], min... | |
for step 3')
print('Finished Exporting ')
return allist
# In[ ]:
def getperson():
allist=[]
allfaith=[]
faithpic={}
traitpic={}
dyncoapic={}
titlecoapic={}
dynprespic={}
titlerankpic={}
#-------------------------------------------LIVING-------------------------------------------------------
for i in set... | |
<reponame>PanDAWMS/panda-bigmon-atlas<gh_stars>0
from django.contrib.auth.models import User
from django.contrib.messages.context_processors import messages
from django.http.response import HttpResponseBadRequest
from rest_framework.generics import get_object_or_404
from rest_framework.parsers import JSONParser
from a... | |
import configparser
import traceback
from pathlib import Path
from shutil import copyfile
from tkinter import filedialog, messagebox
from niq_misc import replace_entry
def save_config(gui, out_file=None):
"""
Prompts user to provide a save file name and location then generates a configuration file from
the curren... | |
= xl_rowcol_to_cell(row, start_col + columns['qty']['col']),
unit_price = xl_rowcol_to_cell(row, start_col + columns['unit_price']['col'])
),
wrk_formats['currency']
)
# If not asked to scrape, to correlate the prices and available quantities.
if distributor_dict.keys():
# Enter the spreadsheet formula to find ... | |
vectors of length 4 whose entries is in {0, ..., 4} enumerated up to the action of Permutation Group with generators [(1,2,3,4)]
"""
if self._sum is not None:
if self._max_part >= 0:
return "Vectors of length %s and of sum %s whose entries is in {0, ..., %s} enumerated up to the action of %s"%(self.n, self._sum, se... | |
#
# Copyright 2016 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 writin... | |
+ rpad("RcrsRecBal", 12)
output += "\n"
ii=0
last = None
for cat in accounts:
if not cat.getAccountOrParentIsInactive(): continue
if not (cat.getBalance() == 0
# and cat.getClearedBalance() == 0
and cat.getConfirmedBalance() == 0
and cat.getCurrentBalance() == 0
# and cat.getReconcilingBalance() == 0
and ca... | |
conf = AppConfig(minimal=True, root_controller=RootController())
conf.renderers = ['jinja']
app = conf.make_wsgi_app()
def test_setup_sqlalchemy(self):
class RootController(TGController):
@expose()
def test(self):
return 'HI!'
package = PackageWithModel()
conf = AppConfig(minimal=True, root_controller=RootCo... | |
#!/usr/bin/env python
# Copyright 2020 Informatics Matters Ltd.
#
# 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 applicab... | |
<reponame>jgori-ouistiti/interaction-agents
from coopihc.space.Space import Space
from coopihc.space.State import State
from coopihc.space.StateElement import StateElement
import numpy
import yaml
from collections import OrderedDict
import matplotlib.pyplot as plt
class _Bundle:
"""Main class for bundles.
Main cl... | |
(dt = ' + str(self._dt) + ') not in dt_fracs = ' + str(self._dt_fracs))
if self.stdout_msgs:
print 't = ',self._t
# If there are negative concentrations
else:
# Create fractional dt's it hasn't been already created. Do not update time in this case
if self._t in self._time_points:
# First remove all previousl... | |
not static_shape or len(static_shape) != 4:
raise ValueError("Inputs to conv must have statically known rank 4. "
"Shape: " + str(static_shape))
# Add support for left padding.
if kwargs.get("padding") == "LEFT":
dilation_rate = (1, 1)
if "dilation_rate" in kwargs:
dilation_rate = kwargs["dilation_rate"]
assert... | |
to IDD field `Dry-Bulb Temperature Difference Range 8 Upper Limit`
"""
self["Dry-Bulb Temperature Difference Range 8 Upper Limit"] = value
@property
def range_8_equipment_list_name(self):
"""field `Range 8 Equipment List Name`
Args:
value (str): value for IDD Field `Range 8 Equipment List Name`
Raises:
Val... | |
cell.append("-1.0 * " + reaction_id)
else:
for reaction_id in matrix[product].get(substrate):
if '*' in reaction_id:
cell.append("-0.5 * " +
reaction_id.replace("*", ""))
else:
cell.append("-1.0 * " + reaction_id)
if len(cell) != 0:
cell_string = ' + '.join(cell)
if self.configuration['callbacklevel'] == 7:
... | |
<gh_stars>0
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... | |
import numbers
import warnings
from collections import defaultdict
try:
from collections.abc import Mapping
except ImportError:
from collections import Mapping
import numpy as np
from psims.xml import XMLWriterMixin, XMLDocumentWriter
from psims.utils import TableStateMachine
from .components import (
Component... | |
# encoding: utf-8
#
# mschtml.py
# Managed Software Center
#
# Created by <NAME> on 2/24/14.
#
import os
from operator import itemgetter
from random import shuffle
from string import Template
from unicodedata import normalize
import MunkiItems
import msclib
import msclog
import munki
from AppKit import NSApp
from F... | |
#!/usr/bin/env python3
#
# pico.workflow.executor - manages the execution of workflows
#
# Background
#
# The Workflow and Executor classes were factored out of BAP.py when its
# execution logic became too unwieldy. They are simple implementations
# of a generic workflow definition language and execution engine.
#
# Th... | |
from base64 import b64decode, b64encode
from datetime import datetime, timezone
from email import utils
from re import findall, fullmatch
from typing import Dict, List, Optional, Tuple, Union
from urllib.parse import quote as url_quote
from kiss_headers.models import Header
from kiss_headers.utils import (
class_to_h... | |
#!/usr/bin/python
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | |
import json
import os
import re
from io import BufferedReader, TextIOWrapper
from tempfile import TemporaryDirectory
import pytest
from cognite.client import CogniteClient
from cognite.client._api.files import FileMetadata, FileMetadataList, FileMetadataUpdate
from cognite.client.data_classes import (
FileMetadataFi... | |
<reponame>usegalaxy-no/usegalaxy
#!/usr/bin/python
# This file is part of Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
---
module: aws_s3
version_added: ... | |
every epoch). Defaults to
`'epoch'`
**kwargs: Additional arguments for backwards compatibility. Possible key
is `period`.
"""
def __init__(
self,
filepath,
monitor="val_loss",
verbose=0,
save_best_only=False,
save_weights_only=False,
mode="auto",
save_freq="epoch",
exclude_initial_epochs=0,
**kwargs,
)... | |
<filename>pacu/models/awsapi/codecommit.py
# generated by datamodel-codegen:
# filename: openapi.yaml
# timestamp: 2021-12-31T02:46:26+00:00
from __future__ import annotations
from datetime import datetime
from enum import Enum
from typing import Annotated, Any, List, Optional
from pydantic import BaseModel, Extra, ... | |
# Predict approximated geometric range
delta_r = gnss_meas[i, 2:5].T - est_r_ea_e
approx_range = np.sqrt(delta_r.T * delta_r)
# Calculate frame rotation during signal transit time
ctm_e_i = ecef_to_eci_ctm(OMEGA_ie, approx_range, c)
# Calculate geometric range
delta_r = ctm_e_i * gnss_meas[i, 2:5].T - est_r_ea_... | |
stack frame, keeping all locals in that frame alive
until the next garbage collection occurs.
Before an except clause's suite is executed, details about the
exception are stored in the "sys" module and can be accessed via
"sys.exc_info()". "sys.exc_info()" returns a 3-tuple consisting of the
exception class, the excep... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.