text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Copyright 2020 The TensorFlow 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
{"hexsha": "f8d9b21a1a7918ba9eb78aecc9be1941ce66944c", "size": 10437, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_graphics/math/interpolation/tests/slerp_test.py", "max_stars_repo_name": "Liang813/graphics", "max_stars_repo_head_hexsha": "71ab1775228a0a292427551350cbb62bfa8bd01a", "max_stars_repo_...
\chapter{Holomorphic functions} Throughout this chapter, we denote by $U$ an open subset of the complex plane, and by $\Omega$ an open subset which is also simply connected. The main references for this chapter were \cite{ref:dartmouth,ref:bak_ca}. \section{The nicest functions on earth} In high school you were told h...
{"hexsha": "c2fe223ddd6def66aff70ac2fd48f45c04943aed", "size": 29993, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "corpus/napkin/tex/complex-ana/holomorphic.tex", "max_stars_repo_name": "aDotInTheVoid/ltxmk", "max_stars_repo_head_hexsha": "ee461679e51e92a0e4b121f28ae5fe17d5e5319e", "max_stars_repo_licenses": ["...
import numpy as np import pandas as pd import cv2 from matplotlib import pyplot as plt from pathlib import Path import random from skimage.draw import circle from skatingAI.Data.BODY_25_model import BODY_25 from skatingAI.Data.skating_dataset import get_data_names, get_pose_kp path = f"{Path.cwd()}/Data" def normali...
{"hexsha": "ada1c6f0f6586a5f8d4229f82cbc4ede10dc2220", "size": 5432, "ext": "py", "lang": "Python", "max_stars_repo_path": "skatingAI/Data/image_operations.py", "max_stars_repo_name": "na018/awesome.skating.ai", "max_stars_repo_head_hexsha": "50738d5a359dc7fd69ec676cfaa83471b8ffe2e5", "max_stars_repo_licenses": ["MIT"]...
import numpy as np import threading import multiprocessing #As defined in the name this class wraps the processed data file. #It provides methods for further processing of this data, for example inversion analysis. #Potentially look at the RawDataWrapper first if this class is too confusing. class ProcessedDataWrapper...
{"hexsha": "16b240e4777dadb9df966ebdeba34af8c06a5079", "size": 18729, "ext": "py", "lang": "Python", "max_stars_repo_path": "DataModels/ProcessedDataWrapper.py", "max_stars_repo_name": "manuelulreich/TPDAnalysisToolkit", "max_stars_repo_head_hexsha": "ba3bf59658a113543fc5b70f36e38975e26675f3", "max_stars_repo_licenses"...
# Copyright (c) OpenMMLab. All rights reserved. import mmcv import numpy as np import trimesh from os import path as osp from .image_vis import (draw_camera_bbox3d_on_img, draw_depth_bbox3d_on_img, draw_lidar_bbox3d_on_img) def _write_obj(points, out_filename): """Write points into ``obj`...
{"hexsha": "295c28dbd9df24468739ea733a274da046b3d6e4", "size": 10811, "ext": "py", "lang": "Python", "max_stars_repo_path": "mmdet3d/core/visualizer/show_result.py", "max_stars_repo_name": "MilkClouds/mmdetection3d", "max_stars_repo_head_hexsha": "772a7fd2a47b081b9445fba03c2f9f537328cb17", "max_stars_repo_licenses": ["...
### tf-nightly==2.5.0-dev20210104 ### https://google.github.io/flatbuffers/flatbuffers_guide_tutorial.html #!/usr/bin/env python # coding: utf-8 import os import numpy as np import json import tensorflow.compat.v1 as tf import tensorflow as tfv2 import shutil from pathlib import Path import pprint os.environ['CUDA_...
{"hexsha": "71ad88189177ea071e54978b3e39b0f56406eabf", "size": 16832, "ext": "py", "lang": "Python", "max_stars_repo_path": "082_MediaPipe_Meet_Segmentation/02_segm_full_v679_tflite_to_pb_saved_model.py", "max_stars_repo_name": "IgiArdiyanto/PINTO_model_zoo", "max_stars_repo_head_hexsha": "9247b56a7dff37f28a8a7822a7ef4...
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np import pandas as pd from datetime import datetime from typing import List import logging def get_futures_chain(meta_data: pd.DataFrame, asofdate: datetime.date) -> pd.DataFrame: """ get current futures chain on asofdate :param meta_data: data...
{"hexsha": "22e40b6c0f02b47113510502c8badf108c4081af", "size": 10057, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/futures_tools.py", "max_stars_repo_name": "Velocities/QuantResearch", "max_stars_repo_head_hexsha": "2435cf2d109a32c7cff51263bcd7d20ac4874d37", "max_stars_repo_licenses": ["MIT"], "max_star...
/- Copyright (c) 2018 Andreas Swerdlow. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Author: Andreas Swerdlow -/ import Mathlib.PrePort import Mathlib.Lean3Lib.init.default import Mathlib.algebra.module.basic import Mathlib.ring_theory.ring_invo import Mathlib.PostPort unive...
{"author": "AurelienSaue", "repo": "Mathlib4_auto", "sha": "590df64109b08190abe22358fabc3eae000943f2", "save_path": "github-repos/lean/AurelienSaue-Mathlib4_auto", "path": "github-repos/lean/AurelienSaue-Mathlib4_auto/Mathlib4_auto-590df64109b08190abe22358fabc3eae000943f2/Mathlib/linear_algebra/sesquilinear_form.lean"}
import numpy as np class Zeros: def __call__(self, shape): return np.zeros(shape) class Ones: def __call__(self, shape): return np.zeros(shape) class RandomNormal: def __init__(self, mean=0.0, sd=1.0, scale=0.01): self.mean = mean self.sd = sd self.scale=scal...
{"hexsha": "4e35f2b943c625f544ddd2ea9482f64a69194887", "size": 1155, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepynets/initializers.py", "max_stars_repo_name": "akarsh-saxena/DeePyNets", "max_stars_repo_head_hexsha": "b7ea3687530305ccbf83a7374b7ccd4164489009", "max_stars_repo_licenses": ["MIT"], "max_sta...
## Coordinates #==========================================================================================# wing_bounds(lead, trail) = permutedims([ lead trail ]) chop_leading_edge(obj :: HalfWing, span_num; y_flip = false) = chop_coordinates(leading_edge(obj, y_flip), span_num) chop_trailing_edge(obj :: HalfWing, ...
{"hexsha": "6efefd77a7db516239a4a1140442fb0294f93b9a", "size": 13600, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Geometry/AircraftGeometry/Wings/mesh_wing.jl", "max_stars_repo_name": "HKUST-OCTAD-LAB/AeroMDAO.jl", "max_stars_repo_head_hexsha": "0ca9aa924f088cac59d04958eb5c6704b50feb18", "max_stars_repo_l...
/* * Copyright (c) CERN 2013 * * Copyright (c) Members of the EMI Collaboration. 2010-2013 * See http://www.eu-emi.eu/partners for details on the copyright * holders. * * Licensed under Apache License Version 2.0 * */ #include "HdfsNS.h" #include <boost/algorithm/string/predicate.hpp> using nam...
{"hexsha": "b57c1d82e1503c36fb75231a5f40f5f31603ba95", "size": 3022, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/HdfsUtil.cpp", "max_stars_repo_name": "andrea-manzi/dmlite-hdfs-plugin", "max_stars_repo_head_hexsha": "16a9909db7cbdf0328215d30b9df4ea5a752a9b6", "max_stars_repo_licenses": ["Apache-2.0"], "max...
using Protos using Protos.Parsing using Test @testset "Protos.jl" begin @testset "parsing" begin testfile = joinpath(@__DIR__, "test.proto") io = open(testfile) parsed = parse_proto(io) @show parsed @test parsed.comment == "\nThis is a file-wide comment.\n" @test par...
{"hexsha": "463721624e9d45f2b93d2ce49d156ba71ee220f3", "size": 1073, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "tbreloff/Protos.jl", "max_stars_repo_head_hexsha": "6f154a39231268300ca4f9e0f71878cd769eea3c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
import numpy as np import matplotlib.pyplot as plt def estimate_coef(x, y): # number of observations/points n = np.size(x) # mean of x and y vector m_x, m_y = np.mean(x), np.mean(y) # calculating cross-deviation and deviation about x SS_xy = np.sum(y*x) - n*m_y*m_x SS_xx = np.sum(x*x) - n...
{"hexsha": "7c29ce63420201450e16d8972536698fa42db53c", "size": 1226, "ext": "py", "lang": "Python", "max_stars_repo_path": "Regression/SimpleLinearRegression.py", "max_stars_repo_name": "sum-coderepo/HadoopApp", "max_stars_repo_head_hexsha": "0e8d48c5d541b5935c9054fb1335d829d67d7b59", "max_stars_repo_licenses": ["Apach...
"""Exercise 1 Usage: $ CUDA_VISIBLE_DEVICES=2 python practico_1_train_petfinder.py --dataset_dir ../ --epochs 30 --dropout 0.1 0.1 --hidden_layer_sizes 200 100 To know which GPU to use, you can check it with the command $ nvidia-smi """ import argparse import os import mlflow import pickle import numpy as np impo...
{"hexsha": "0ebf6e6f4a1667f2d0b5238c117fa44dfca6f7c4", "size": 10203, "ext": "py", "lang": "Python", "max_stars_repo_path": "tercer_modelo.py", "max_stars_repo_name": "nahuelalmeira/deepLearning", "max_stars_repo_head_hexsha": "f1fcd06f5735c8be9272b0c8392b1ae467c08582", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np from paralleldomain.decoding.decoder import DatasetDecoder from paralleldomain.model.class_distribution import ClassDistribution def test_from_dataset(decoder: DatasetDecoder): dataset = decoder.get_dataset() class_dist = ClassDistribution.from_dataset(dataset=dataset) assert class_dis...
{"hexsha": "3e12232216043ab981613a802fd5bb80a1b54f17", "size": 805, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_paralleldomain/model/test_class_distibution.py", "max_stars_repo_name": "parallel-domain/pd-sdk", "max_stars_repo_head_hexsha": "20e3d052a5cb612a2dd84bda7b1b5487a6a60edc", "max_stars_repo_lice...
# based on the keras documentation # import numpy as np from keras.models import Sequential from keras.layers import Dense, Conv1D,Activation from keras import losses, optimizers import keras.utils as keras_utils import json f = open('data_for_everything') j = json.load(f) # our parameters nn_input_size = len(j[0][...
{"hexsha": "9b8f07e157c6588a775d6619b9a559fea0c384f1", "size": 1750, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/nn/train.py", "max_stars_repo_name": "bahorn/BrumHack7", "max_stars_repo_head_hexsha": "cffa2484f63728e73d6dd2bbe6b24fbd12e1cd93", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": ...
# # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
{"hexsha": "a8613eae27f6f6740cd4054eb1d513606f97e1e9", "size": 4883, "ext": "py", "lang": "Python", "max_stars_repo_path": "samples/python/uff_ssd/utils/boxes.py", "max_stars_repo_name": "martellz/TensorRT", "max_stars_repo_head_hexsha": "f182e83b30b5d45aaa3f9a041ff8b3ce83e366f4", "max_stars_repo_licenses": ["Apache-2....
# -*- coding: utf-8 -*- """ Created on Wed Jul 12 11:00:56 2017 @author: 028375 """ import pandas as pd import numpy as np begindate='20171001' spotdate='20171018' lastdate='20171017' path0='F:\月结表\境内TRS\S201710\\'.decode('utf-8') def TestTemplate(Status,Collateral,Position): path1=('股衍境内TRS检验...
{"hexsha": "676b6ca831e438f7ac593289042c9e7e1e5beb4a", "size": 2602, "ext": "py", "lang": "Python", "max_stars_repo_path": "productcontrol/TRS_EQ.py", "max_stars_repo_name": "JulianGong/littleAccountingTools", "max_stars_repo_head_hexsha": "d315a70ed102b13d48b2df6968283c36934857bb", "max_stars_repo_licenses": ["MIT"], ...
""" Compare our results with FJ model (and upper bound) If we directly modify k nodes' innate opinions, each one modify with at most epsilon, how much will it influence the final measures? Ref: Gaitonde, Jason, Jon Kleinberg, and Eva Tardos. "Adversarial perturbations of opinion dynamics in networks." Proce...
{"hexsha": "345ad8b0321082c7721b876529efcddc14ff0289", "size": 5663, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "compare/CompareFJ.jl", "max_stars_repo_name": "SijingTu/WebConf-22-Viral-Marketing-Opinion-Dynamics", "max_stars_repo_head_hexsha": "8f1cc37b0cf5b392aece17b45cca84e6121d26eb", "max_stars_repo_licen...
from python_helper import log from globals import newGlobalsInstance globalsInstance = newGlobalsInstance( __file__, successStatus = True, errorStatus = True, infoStatus = True, # debugStatus = True, failureStatus = True ) log.info(__name__, 'Importiong libraries') import time import numpy as ...
{"hexsha": "53b2e5e8e0577e88d1f1cd9fa686b55b1b1c86f3", "size": 5812, "ext": "py", "lang": "Python", "max_stars_repo_path": "appTest.py", "max_stars_repo_name": "SamuelJansen/central-point-query", "max_stars_repo_head_hexsha": "1cbf1d5fdab3efe653bfd4e24952d9a1883983ca", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
""" Run Program: horovodrun -np 4 python3 pycylon_horovod_pytorch_example.py """ import argparse import os import socket import horovod.torch as hvd import numpy as np import pandas as pd import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from pycylon import CylonEnv from p...
{"hexsha": "7c5e4f25c9657e0dbd6d852c3ff3fa8db8933e82", "size": 6895, "ext": "py", "lang": "Python", "max_stars_repo_path": "horovod/pycylon_horovod_pytorch_example.py", "max_stars_repo_name": "vibhatha/cylon_applications", "max_stars_repo_head_hexsha": "6af9bdf3b4738c6cc4cf2c3c181a5c60f049d113", "max_stars_repo_license...
import cirq import numpy as np import pandas as pd from typing import List from qnn.qnlp.circuits_words import CircuitsWords def get_overall_run_words(trial_result: cirq.TrialResult, num: int): """ Takes the average of the measurements of a given qubit on a given circuit (the results are on the form of a bitstring...
{"hexsha": "61338eafe37a3edfeddacf3a5680596929dc166e", "size": 5446, "ext": "py", "lang": "Python", "max_stars_repo_path": "qnn/qnlp/optimization_words.py", "max_stars_repo_name": "tomiock/QNNs", "max_stars_repo_head_hexsha": "9822aac1b56e617f92bc5e3670d06285047e5066", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
# -*- coding: utf-8 -*- import logging import os import sys import matplotlib.pyplot as plt import tempfile import numpy as np import wave import subprocess from PyQt4 import QtCore from PyQt4 import QtGui from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_...
{"hexsha": "55b8d8d88cb42117086883871b24eb24f0156212", "size": 4562, "ext": "py", "lang": "Python", "max_stars_repo_path": "wav_plot.py", "max_stars_repo_name": "QuantumEnergyE/wave_plot", "max_stars_repo_head_hexsha": "af2c03d90ca23ddca35051298ad9d1f4e514e932", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Wordle Solver""" import json import logging from pathlib import Path from collections import Counter from functools import cached_property import networkx as nx from .vocab import Vocabulary from .wordle import Wordle from .defaults import COVERAGE_CACHE ###########...
{"hexsha": "50b299b723395ebfbc522d00056cc5baf88e3a98", "size": 7287, "ext": "py", "lang": "Python", "max_stars_repo_path": "wordle/solver.py", "max_stars_repo_name": "hrishikeshrt/python-wordle", "max_stars_repo_head_hexsha": "574f4476a0a3b35ebb0030babc8bd49d8107f34c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import networkx as nx from tools import safe_sample from nature import add_node MIN_LAYERS, MAX_LAYERS = 1, 3 MIN_NODES, MAX_NODES = 1, 2 def Regulon(parent=None): n_layers = safe_sample(MIN_LAYERS, MAX_LAYERS) M, ids = nx.MultiDiGraph(), [] for layer_number in range(n_layers): n_nodes = safe_sa...
{"hexsha": "54217b9f17adf3a2f406e0a6c57b26d895d39cab", "size": 1155, "ext": "py", "lang": "Python", "max_stars_repo_path": "nature/bricks/graph/evolve/regulon.py", "max_stars_repo_name": "bionicles/neuromax", "max_stars_repo_head_hexsha": "a53a17a1c033c11ac607a9e28f43b1f906e58aad", "max_stars_repo_licenses": ["MIT"], "...
from fundopt.fundtsloader import load_funds import pandas as pd import numpy as np import datetime as dt import logging from arctic import Arctic # pyright: reportMissingImports=false from pymongo import MongoClient import keyring import ssl client = MongoClient("localhost") # client = MongoClient(keyring.get_p...
{"hexsha": "3b03ab83cb454909408ef5ae71b5b8c67c716b32", "size": 983, "ext": "py", "lang": "Python", "max_stars_repo_path": "load_fund.py", "max_stars_repo_name": "joshualee155/FundOptimizer", "max_stars_repo_head_hexsha": "da842de6c99f89c767d03c9ef1b392237b726a3f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
""" Simple linear regression example in TensorFlow This program tries to predict the number of thefts from the number of fire in the city of Chicago """ # pylint: disable=invalid-name import numpy as np import matplotlib.pyplot as plt import tensorflow as tf import xlrd DATA_FILE = 'data/fire_theft.xls' LOG_FILE = 'l...
{"hexsha": "34ace8ced91080f8dd0809bca4b704466135ead1", "size": 3262, "ext": "py", "lang": "Python", "max_stars_repo_path": "hw9/hw9_p2_normalized.py", "max_stars_repo_name": "shanaka-desoysa/tensorflow", "max_stars_repo_head_hexsha": "0effc668f42b64bd0712240ab2f5e8a8be42960f", "max_stars_repo_licenses": ["Apache-2.0"],...
import numpy as np from scipy.stats import f class MVRCalculator: """ Class holds the calculations needed to perform the regression on some data. Used to seperate out the data and calculations. """ @staticmethod def searchValue(f, target, tolerance=0.000001, start=0, st...
{"hexsha": "0d273f529c35fcd4b1f7f0b7c8b1f48fd07a931b", "size": 6544, "ext": "py", "lang": "Python", "max_stars_repo_path": "mvr_calc.py", "max_stars_repo_name": "richhaar/multivariable-linear-regression", "max_stars_repo_head_hexsha": "af195fed6031e813da5614c0b77ab2a74190c8b1", "max_stars_repo_licenses": ["MIT"], "max_...
import numpy import csv import matplotlib.pyplot as plt import pprint #change leafsize according to need, i think it was 2000 def kdtree( data, leafsize=10 ): ndim = data.shape[0] ndata = data.shape[1] # find bounding hyper-rectangle hrect = numpy.zeros((2,data.shape[0])) hrect[0,:] = ...
{"hexsha": "10e91a18a52008ddce42682ab629418cd0f8526d", "size": 3555, "ext": "py", "lang": "Python", "max_stars_repo_path": "k-d_tree.py", "max_stars_repo_name": "smellycattt/Data-Mining-Project", "max_stars_repo_head_hexsha": "83f3873df9ccecbfc5bdfc8e1fc6766acb4a2c8e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# Raised Cosine distribution # # Ref: http://en.wikipedia.org/wiki/Raised_cosine_distribution # immutable Cosine <: ContinuousUnivariateDistribution μ::Float64 σ::Float64 Cosine(μ::Real, σ::Real) = (@check_args(Cosine, σ > zero(σ)); new(μ, σ)) Cosine(μ::Real) = new(μ, 1.0) Cosine() = new(0.0, 1.0)...
{"hexsha": "9f3ee9364db998d12332eda28897ede401ff6b70", "size": 1235, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/univariate/continuous/cosine.jl", "max_stars_repo_name": "ericproffitt/Distributions.jl", "max_stars_repo_head_hexsha": "54daf6f7230c6cf1fa46d9a948a33ad68b5fd3b0", "max_stars_repo_licenses": ["...
from flask import Flask, render_template import plotly.figure_factory as ff import json import plotly import pandas as pd import numpy as np import requests app = Flask(__name__) app.debug = True @app.route('/') def index(): info_data = requests.get("http://localhost:8000/test").json() t_o_a = info_data[...
{"hexsha": "71e71b36fc938e4928ad678bdb96af9ffad4f5e5", "size": 3631, "ext": "py", "lang": "Python", "max_stars_repo_path": "servers/Radiation/plotly/app.py", "max_stars_repo_name": "arpitgogia/mars_city", "max_stars_repo_head_hexsha": "30cacd80487a8c2354bbc15b4fad211ed1cb4f9d", "max_stars_repo_licenses": ["BSD-2-Clause...
import numpy as np from RenderPy.Shape import Shape from RenderPy.Tuple import Tuple from RenderPy.Intersection import Intersection # --------------------- """ Cone class helps to describe a cone with a center at point(0,0,0) It inherits all elements from shape Cone class contains the following functions: __init__ l...
{"hexsha": "9c7c6acdf32febfc5fc729500846cb63026a8063", "size": 4928, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/RenderPy/Cone.py", "max_stars_repo_name": "woes-lynne/3DRenderPy", "max_stars_repo_head_hexsha": "44d9106b51ae4ce8307c794b85d4ec649751beb3", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
/* Legendre polynomials An in-class exercise using equations for the Polynomials and solvers as shown in the lecture/manuscript for Numerical Methods for CSE by Prof. R. Hiptmair, ETH Zürich Include the Eigen3 library as shown in documentation for Eigen3. use piping to store the .m file. Example call: legendr...
{"hexsha": "58bb6829d85013d3f24fa231f2aa1caebebfc428", "size": 13948, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "example2/legendre.cpp", "max_stars_repo_name": "pirminschmid/MatlabPlotter", "max_stars_repo_head_hexsha": "6cdc3954ee4a065d978c0248b00406366eafe237", "max_stars_repo_licenses": ["MIT"], "max_stars...
Lose weight permanently Have you lost weight, regained the weight, lost weight again and again and again? If you are like many people, weight management has been a life long struggle. Now is the time to stop the struggle and learn the skills you need in order to lose the weight and keep it off permanently. Diet...
{"hexsha": "963108133cd517075ce8c71135a947a2a52f56b3", "size": 1060, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Weight_No_More.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
""" Retrieves either NZTA or NZS1170.5 code values for the given locations """ from pathlib import Path import argparse import multiprocessing as mp from typing import Sequence import numpy as np import pandas as pd import sha_calc as sha import gmhazard_calc as sc DEFAULT_RETURN_PERIODS = np.array([20, 25, 50, 100...
{"hexsha": "f1b2b9beee3aefdc21321a7e4f4b69cbb2281c3d", "size": 6933, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/gmhazard_scripts/one_off/nz_code_retrieval.py", "max_stars_repo_name": "ucgmsim/gmhazard", "max_stars_repo_head_hexsha": "d3d90b4c94b3d9605597a3efeccc8523a1e50c0e", "max_stars_repo_licenses"...
""" Class Features Name: drv_data_hs_geo Author(s): Francesco Avanzi (francesco.avanzi@cimafoundation.org), Fabio Delogu (fabio.delogu@cimafoundation.org) Date: '20210525' Version: '1.0.0' """ ####################################################################################### # Library...
{"hexsha": "4ed51360827cd95217c5f1af218cd870fb934ffb", "size": 14168, "ext": "py", "lang": "Python", "max_stars_repo_path": "apps/ground_network/hs/drv_data_hs_geo.py", "max_stars_repo_name": "c-hydro/hyde", "max_stars_repo_head_hexsha": "3a3ff92d442077ce353b071d5afe726fc5465201", "max_stars_repo_licenses": ["MIT"], "m...
SUBROUTINE struct_sizes(nat,nsym,ndif,lattic,AA,BB,CC,alpha,structf) IMPLICIT NONE CHARACTER*80, intent(in):: structf INTEGER, intent(out) :: nat, nsym, ndif CHARACTER*4, intent(out):: lattic REAL*8, intent(out) :: AA,BB,CC,alpha(3) !----------- local variables --------------- CHARACTER*4 :: irel...
{"hexsha": "4123d0ce547ba761f7021db0938ace1c110750d4", "size": 21305, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/downfold/latgen.f90", "max_stars_repo_name": "chanul13/EDMFTF", "max_stars_repo_head_hexsha": "967d85d898924991b31861b4e1f45129e3eff180", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...
""" Optimization algorithms """ import numpy as np import numpy.ma as ma import numpy.linalg as LA import copy from tqdm import tqdm from scipy.spatial import distance from sklearn.neighbors import NearestNeighbors import torch import torch.nn as nn """ def grad_free_optimizer(initial_sequence, oracle, N): ...
{"hexsha": "7e931af73a686790cb4cc3d33eccddff4b8b466f", "size": 12490, "ext": "py", "lang": "Python", "max_stars_repo_path": "relso/optim/optim_algs.py", "max_stars_repo_name": "ec1340/ReLSO-Guided-Generative-Protein-Design-using-Regularized-Transformers", "max_stars_repo_head_hexsha": "2320b3ebd97df908474b23e7a4395b8fa...
%% SECTION HEADER ///////////////////////////////////////////////////////////////////////////////////// \section{The Time Integration} \label{sec:time} %% SECTION CONTENT //////////////////////////////////////////////////////////////////////////////////// Similar to the \ac{fem}, the time solution of the governing equ...
{"hexsha": "3de91fbfb7be95d4ee531956dc775fccf2651798", "size": 5671, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "docs/proposal/Dissertation/Chapters/Chapter4/sec:time.tex", "max_stars_repo_name": "pfiborek/model-hc", "max_stars_repo_head_hexsha": "9e49fe23117fd320be14214e5ff6bafd2b1fc1a3", "max_stars_repo_lice...
#!/usr/bin/python3 import matplotlib.pyplot as plt import numpy as np import math import logging from numpy.linalg import norm import astropy.units as u import astropy.constants as const from naima.models import ( ExponentialCutoffPowerLaw, ExponentialCutoffBrokenPowerLaw, Synchrotron, InverseCompton ...
{"hexsha": "b8f897557f45d60778171a62fb662b04a5a6b3fc", "size": 22939, "ext": "py", "lang": "Python", "max_stars_repo_path": "tgblib/fit_results.py", "max_stars_repo_name": "RaulRPrado/tev-binaries-model", "max_stars_repo_head_hexsha": "c60959caaffbcdf3398914b03531647f95e97da0", "max_stars_repo_licenses": ["Apache-2.0"]...
# -*- coding: utf-8 -*- """Creating sets, variables, constraints and parts of the objective function for Flow objects. SPDX-FileCopyrightText: Uwe Krien <krien@uni-bremen.de> SPDX-FileCopyrightText: Simon Hilpert SPDX-FileCopyrightText: Cord Kaldemeyer SPDX-FileCopyrightText: Patrik Schönfeldt SPDX-FileCopyrightText:...
{"hexsha": "4a18d63bf253d6255e1ed516047eae50cffccf8e", "size": 10574, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/oemof/solph/blocks/flow.py", "max_stars_repo_name": "lensum/oemof-solph", "max_stars_repo_head_hexsha": "75789b1578035d0b658c4b97fcc41fc3ca61638e", "max_stars_repo_licenses": ["MIT"], "max_st...
from collections.abc import Iterable import re import warnings import numpy as np import h5py import openmc import openmc.checkvalue as cv from openmc.region import Region _VERSION_SUMMARY = 6 class Summary(object): """Summary of geometry, materials, and tallies used in a simulation. Attributes ------...
{"hexsha": "866dd8288a563efc647b483a6c684116727dc610", "size": 7627, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmc/summary.py", "max_stars_repo_name": "johnnyliu27/openmc", "max_stars_repo_head_hexsha": "d7359f151cc9eece99fb155e80f73a1b3393f7f7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
struct VanDerWaals{S,T,A} <: CubicModel type::S tc::T pc::T ω::T mw::T vc::Union{T,Nothing} _a::T _b::T aij::A function VanDerWaals(tc,pc,ω,mw,vc=nothing,aij = nothing) if length(tc) == 1 type = SINGLE() else type = MULTI() end ...
{"hexsha": "b04fa3e681a09102461ea07f4f2692e657be422e", "size": 5013, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/models/cubic/vdw.jl", "max_stars_repo_name": "longemen3000/ThermoModels.jl", "max_stars_repo_head_hexsha": "a817ba1677c0b1bed39fe5a695d3ada63b673f40", "max_stars_repo_licenses": ["MIT"], "max_s...
from keras.preprocessing.text import Tokenizer #this is used to assign some numeric value to every word that appear in the training set from keras.preprocessing.sequence import pad_sequences import pandas as pd import nltk import numpy as np import re from sklearn.model_selection import train_test_split import s...
{"hexsha": "bc782cb6d120284a38090ecc4a7d567ec4d2453c", "size": 4982, "ext": "py", "lang": "Python", "max_stars_repo_path": "RNN.py", "max_stars_repo_name": "SimralPimenta20/personality-detection-using-social-media-messages", "max_stars_repo_head_hexsha": "f841266fcd2d9e1fd9de7d8e33abe0e9fcd2661c", "max_stars_repo_licen...
##### OVERRIDES FOR EFFICIENCY / CORRECTNESS function add_vertices!(g::AbstractSimpleWeightedGraph, n::Integer) T = eltype(g) U = weighttype(g) (nv(g) + one(T) <= nv(g)) && return false # test for overflow emptycols = spzeros(U, nv(g) + n, n) g.weights = hcat(g.weights, emptycols[1:nv(g), :])...
{"hexsha": "eb6a19d43fdc50b99df9f4ec51718272b942c868", "size": 4663, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/overrides.jl", "max_stars_repo_name": "scheidan/SimpleWeightedGraphs.jl-1", "max_stars_repo_head_hexsha": "e500596d906193d2de8d052f72ceeb750c1de1bf", "max_stars_repo_licenses": ["MIT"], "max_st...
import numpy as np import scipy.stats.distributions as sc_dist from itertools import compress def aggarwal_limits(mu, alpha=0.68268949): """Get Poissonian limits for specified contour levels Parameters ---------- pdfs : array_like The expected number of events (Poisson mean) in each observabl...
{"hexsha": "e098f3ba8bc8d407daa2610883cca99591581e8a", "size": 26216, "ext": "py", "lang": "Python", "max_stars_repo_path": "disteval/visualization/comparison_plotter/functions/calc_funcs.py", "max_stars_repo_name": "jebuss/pydisteval", "max_stars_repo_head_hexsha": "52c1c21cd5568b640732deb29f4216d881d6dd53", "max_star...
[STATEMENT] lemma ex_gt_count_imp_le_multiset: "(\<forall>y :: 'a :: order. y \<in># M + N \<longrightarrow> y \<le> x) \<Longrightarrow> count M x < count N x \<Longrightarrow> M < N" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>\<forall>y. y \<in># M + N \<longrightarrow> y \<le> x; count M x < count ...
{"llama_tokens": 311, "file": null, "length": 2}
(* infotheo: information theory and error-correcting codes in Coq *) (* Copyright (C) 2020 infotheo authors, license: LGPL-2.1-or-later *) From mathcomp Require Import all_ssreflect ssralg fingroup finalg matrix. Require Import Reals Lra. From mathcomp Require Import Rstruct. Require Import ssrZ ...
{"author": "affeldt-aist", "repo": "infotheo", "sha": "5f9efb859dbadcbcae2330e2e21e76f9b632d879", "save_path": "github-repos/coq/affeldt-aist-infotheo", "path": "github-repos/coq/affeldt-aist-infotheo/infotheo-5f9efb859dbadcbcae2330e2e21e76f9b632d879/information_theory/joint_typ_seq.v"}
%--- help for dsge_solver_h --- % % H1 line % % :: % % % Args: % % Returns: % : % % Note: % % Example: % % See also: % % Other functions named dsge_solver_h % % dsge/dsge_solver_h %
{"author": "jmaih", "repo": "RISE_toolbox", "sha": "1b2edfa27830c6d522f9d7d2335d33c3e4d84285", "save_path": "github-repos/MATLAB/jmaih-RISE_toolbox", "path": "github-repos/MATLAB/jmaih-RISE_toolbox/RISE_toolbox-1b2edfa27830c6d522f9d7d2335d33c3e4d84285/classes/models/@dsge/private/+deprecated/dsge_solver_h.m"}
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
{"hexsha": "0c324ba8ee9aa2d16fadfd68e8b19e9e9a3a9abf", "size": 8208, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/paddle/fluid/tests/unittests/distributed_passes/test_dist_gradient_merge_pass.py", "max_stars_repo_name": "DevilCarp/Paddle", "max_stars_repo_head_hexsha": "04325d2cbefb029a4478bdc069d3279c...
function part1(input) risk = reduce(hcat, (parse.(Int, collect(line)) for line in eachline(input))) return shortest_path(risk) end function part2(input) risk = reduce(hcat, (parse.(Int, collect(line)) for line in eachline(input))) h, w = size(risk) ...
{"hexsha": "69921da7f1e26638dc3c87a4bf1f6962629399a1", "size": 1214, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "2021/day15.jl", "max_stars_repo_name": "GunnarFarneback/AdventOfCode.jl", "max_stars_repo_head_hexsha": "2f60011747bfe5d27e954f914f39b4ea2f7b0722", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
""" Jacob Kaplan kmeans.py """ import sys import cv2 as cv import numpy as np def scale(img): """ Take in image Reshape it to have width of 600 pixels Use OpenCV mean shift to recolor each pixel by shifting it towards the mode of a given radius of pixels Return recolored image ""...
{"hexsha": "15f38747372dd6255c68200bfe4f5def584572b2", "size": 1640, "ext": "py", "lang": "Python", "max_stars_repo_path": "kmeans/kmeans.py", "max_stars_repo_name": "jcolekaplan/computer_vision", "max_stars_repo_head_hexsha": "48d39b081a7b6b699019052eeae36ab703bb34eb", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
The Medical Sciences Building (really four buildings known as Med Sci 1A, 1B, 1C, or 1D), is address(located, 38.533564, 121.763794) near the Genome and Biomedical Sciences Facility building in the Health Sciences Complex which is near the western edge of the core campus. Med Sci 1A is more commonly known as Tupper Hal...
{"hexsha": "c22df86b572de95fb6ef17618c76682fe44775a7", "size": 326, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/Medical_Sciences.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- from ctypes import * import numpy as np import time import math class Point(object): x = 0 y = 0 def __init__(self, x=0, y=0): self.x = x self.y = y # 判断速度是否发生突变,每判断一次消耗2us def speed_jump(c1, c2, c3, inter_time): ''' 1、去除每辆车的前10帧,防止刚...
{"hexsha": "e9bd113adef90afbacb4a4e62a3a7a4cd4ba87ad", "size": 1109, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/speed_jump.py", "max_stars_repo_name": "chiyukunpeng/traffic-accident-detection", "max_stars_repo_head_hexsha": "f0e33744d6bd2d634c22ef2d561558c4b10105d6", "max_stars_repo_licenses": ["MIT"...
""" Inferring a binomial proportion via exact mathematical analysis. """ import sys import numpy as np from scipy.stats import beta from scipy.special import beta as beta_func import matplotlib.pyplot as plt import matplotlib.patches as patches #from HDIofICDF import * from scipy.optimize import fmin #from scipy.stats ...
{"hexsha": "49017e15b4bb53e3727fa01344c68fc1443af428", "size": 4896, "ext": "py", "lang": "Python", "max_stars_repo_path": "second-round-intreview/parcoord-brushing/backend/src/code/parallelcoord/ParCoordKmeans.py", "max_stars_repo_name": "halilagin/parcoord-brushing", "max_stars_repo_head_hexsha": "71dde2d9b24038afb51...
# ¿Cómo se mueve un péndulo? > Calificaciones: https://docs.google.com/spreadsheets/d/1X8sAHmrIErYgoAjTocclAFS0Mx_EA8BDWlp6DgYyBVo/edit?usp=sharing > Se dice que un sistema cualquiera, mecánico, eléctrico, neumático, etc., es un oscilador armónico si, cuando se deja en libertad fuera de su posición de equilibrio, v...
{"hexsha": "df61ce55d3084f4b4cf4798e2d45b8f1d441b003", "size": 279998, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Modulo3/Clase15_OsciladorArmonico.ipynb", "max_stars_repo_name": "DiegoBAL23/simmatp2021", "max_stars_repo_head_hexsha": "238e88b58cf0481de444ffd14a8b46dbdfae6066", "max_stars_repo_...
from numpy.testing import assert_array_equal import numpy as np from tadataka.depth import compute_depth_mask def test_compute_depth_mask(): depths = np.array([ [-1, 4, 2, 3, -4], [-8, 5, 1, 0, 2] ]) assert_array_equal( compute_depth_mask(depths, min_depth=0.0), [False, Tr...
{"hexsha": "ac2bda56c04edc0618fe3ff1558ac96c7719e099", "size": 475, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_depth.py", "max_stars_repo_name": "IshitaTakeshi/Tadataka", "max_stars_repo_head_hexsha": "852c7afb904503005e51884408e1492ef0be836f", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import pathlib import shutil import numpy as np from text_recognizer.datasets.emnist_lines import EmnistLinesDataset import text_recognizer.util as util SUPPORT_DIRNAME = pathlib.Path(__file__).parents[0].resolve() / 'emnist_lines' def create_emnist_lines_support_files(): shutil.rmtree(SUPPORT_DIRNAME, ignore...
{"hexsha": "be342a8bbc96def54ceff5970ed2eaabc92e0627", "size": 822, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab6_sln/text_recognizer/tests/support/create_emnist_lines_support_files.py", "max_stars_repo_name": "sergeyk/fsdl-text-recognizer-project", "max_stars_repo_head_hexsha": "8083e181f830f9f493f15b9e8...
[STATEMENT] lemma convol_apply: "BNF_Def.convol f g x = (f x, g x)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. BNF_Def.convol f g x = (f x, g x) [PROOF STEP] unfolding convol_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. (f x, g x) = (f x, g x) [PROOF STEP] ..
{"llama_tokens": 137, "file": null, "length": 2}
[STATEMENT] lemma (in ring) indexed_const_index_free: "index_free (indexed_const k) i" [PROOF STATE] proof (prove) goal (1 subgoal): 1. index_free (indexed_const k) i [PROOF STEP] unfolding index_free_def indexed_const_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>m. i \<in># m \<longrightarrow> (if m...
{"llama_tokens": 154, "file": null, "length": 2}
import argparse import csv import random import sys from pathlib import Path import functools import ipdb import numpy as np import torch import torch.nn as nn from box import Box from tqdm import tqdm from BERT.dataset import create_data_loader from BERT.train import Model from BERT.common.losses import CrossEntropy...
{"hexsha": "4aee44294099ecdf03678447434cc7149b3d1216", "size": 7210, "ext": "py", "lang": "Python", "max_stars_repo_path": "part2/BERT/predict.py", "max_stars_repo_name": "peter850706/Contextual-embeddings-for-sequence-classification", "max_stars_repo_head_hexsha": "e26ba68f6aa30ec07319dcd37a04a8f56e07d7b0", "max_stars...
************************************************************************ * * Subroutine MLELOAD2 Called by: MLELOAD * * * Estimate loads using MLE. Bias correction is done by the * method of Bradu and Mundlak(1970). An estimate of the variance * of the load is obtained...
{"hexsha": "aaba927c3707dd27dbfe4cdfcb45a4a1f61f2143", "size": 2781, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "codeNexampls/[loadest]/loadsrc/loadest/source_USGS/mleload2.f", "max_stars_repo_name": "lthiamodelers/baseflow-coefficients", "max_stars_repo_head_hexsha": "183fef49548fa2e1bf0bb8cff57e96e75d62976...
# Import Flask from flask import Flask, jsonify # Python SQL toolkit and Object Relational Mapper import sqlalchemy from sqlalchemy.ext.automap import automap_base from sqlalchemy.orm import Session from sqlalchemy import create_engine, func import datetime as dt import numpy as np import pandas as pd # set up datab...
{"hexsha": "c1246cae51a213a086ec7fc42e5c8f3dd6d8de6e", "size": 4363, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "etarakci/sqlalchemy-challenge", "max_stars_repo_head_hexsha": "aba9b7b9215755f9f751f99dd6979e89e41a3851", "max_stars_repo_licenses": ["ADSL"], "max_stars_count": n...
#!/usr/bin/env python import rogata_library as rgt import cv2 import cv2.aruco as aruco import numpy as np import sys def calibrate_colors(image): """Utility to calibrate the colors for contour detection Allows the visual calibration of contours which can be saved by pressing the s key Colors are defined ...
{"hexsha": "21fcaeff19924a8fd805965dc42556cced7f3953", "size": 2797, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/calibrate_scene.py", "max_stars_repo_name": "liquidcronos/RoGaTa-Engine", "max_stars_repo_head_hexsha": "3704bbd85c9d07f180f7e7516e282468ac76b557", "max_stars_repo_licenses": ["MIT"], "max...
"""This is the actual code we use to score people's solutions server-side. The interfaces here are not yet stable, but we include them so that people can reproduce our scoring calculations independently. We correspondly do not currently import this module. """ import numpy as np import requests import gym def score...
{"hexsha": "bc9edf5e1a40e3666cf199b44dd7218e26b7821d", "size": 7066, "ext": "py", "lang": "Python", "max_stars_repo_path": "gym/scoreboard/scoring.py", "max_stars_repo_name": "soochyboy/openaiattempt", "max_stars_repo_head_hexsha": "2933a95ec5cc7efd282ed793d5efd6af6f2ce00f", "max_stars_repo_licenses": ["MIT"], "max_sta...
import os import tensorflow as tf import datetime import numpy as np import pandas as pd from tensorflow.keras.callbacks import ModelCheckpoint import utils as ut class ConvBlock: def __init__(self, n_filters=64, filter_size=(3, 3), strides=(1, 1), padding='same', activation='elu', use_bn=True): self.n_fi...
{"hexsha": "16f76a1abf15b199e113967f4156ad16b4b93127", "size": 13803, "ext": "py", "lang": "Python", "max_stars_repo_path": "training.py", "max_stars_repo_name": "tldrafael/FaceReconstructionWithVAEAndFaceMasks", "max_stars_repo_head_hexsha": "a7ec6a424142167e5e68cb2f09552f7a84706362", "max_stars_repo_licenses": ["MIT"...
// // Copyright (C) 2009-2012 Artyom Beilis (Tonkikh) // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #define BOOSTER_SOURCE #ifndef NOMINMAX #define NOMINMAX #endif #include <windows.h> #include <proce...
{"hexsha": "b652aa3ead410c9ace00087e2d6f50d9e6685ed2", "size": 7379, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "booster/lib/thread/src/thread_winapi.cpp", "max_stars_repo_name": "gatehouse/cppcms", "max_stars_repo_head_hexsha": "61da055ffeb349b4eda14bc9ac393af9ce842364", "max_stars_repo_licenses": ["MIT"], "m...
#!/usr/bin/env python3 """ @summary: for the jupyter notebooks: tools, column creators, diagramming routines, etc. @version: v40 (29/November/2018) @since: 26/June/2018 @organization: @author: https://github.com/drandreaskrueger @see: https://github.com/drandreaskrueger/chainhammer for updates @TODO: this...
{"hexsha": "1c41dffec20d92c8af4de2b7464ed7d62eef7243", "size": 23885, "ext": "py", "lang": "Python", "max_stars_repo_path": "reader/blocksDB_diagramming.py", "max_stars_repo_name": "nairobi222/chainhammer", "max_stars_repo_head_hexsha": "94ab5269a9a9c751d355b41f90ac244026ccf46b", "max_stars_repo_licenses": ["MIT"], "ma...
""" cubeset - Defines a CubeSet class that contains code to handle operations on several IFU data cubes, e.g., coaddition """ import os import numpy as np from matplotlib import pyplot as plt from astropy.io import ascii from astropy.io import fits as pf from .oscube import OsCube class CubeSet(list): ...
{"hexsha": "d283ad58515b8f34b747e30d5a0d4d0b7f651b04", "size": 11676, "ext": "py", "lang": "Python", "max_stars_repo_path": "keckcode/osiris/cubeset.py", "max_stars_repo_name": "cdfassnacht/keck_code", "max_stars_repo_head_hexsha": "a952b3806b3e64eef70deec2b2d1352e6ef6dfa0", "max_stars_repo_licenses": ["MIT"], "max_sta...
import os import time import torch import numpy as np from hparam import hparam as hp from speech_embedder_net import get_cossim, R2Plus1DNet import sys def extract(model_path,dataset): device = torch.device("cpu") embedder_net = R2Plus1DNet([2,2,2,2]).to(device) embedder_net.load_state_dict(torch.load(mode...
{"hexsha": "0e297a37e5a0140a1c34e09296d61fd8ff1be08c", "size": 1158, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract.py", "max_stars_repo_name": "amadeusuzx/PyTorch_Speaker_Verification", "max_stars_repo_head_hexsha": "0ad5b01822cbd88da82258cd1930d024c04109f6", "max_stars_repo_licenses": ["BSD-3-Clause"]...
using Oceananigans.Utils: work_layout using Oceananigans.Architectures: device using Oceananigans.TimeSteppers: store_tracer_tendency! import Oceananigans.TimeSteppers: store_tendencies! """ Store source terms for `uh`, `vh`, and `h`. """ @kernel function store_solution_tendencies!(G⁻, grid, G⁰) i, j, k = @index(...
{"hexsha": "cd9dd427a0f441ce35d50eb1d6fef86834857b6d", "size": 1588, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Models/ShallowWaterModels/store_shallow_water_tendencies.jl", "max_stars_repo_name": "ali-ramadhan/OceanDispatch.jl", "max_stars_repo_head_hexsha": "65b8851d37052e90ca4a3e0c4a1c20398b0ee09a", "...
function [compartmentReactions] = findRxnFromCompartment(model, compartment) % Finds all the reactions and their identifiers in a compartment of interest. % % USAGE: % % [compartmentReactions] = findRxnFromCompartment(model,Compartment) % % INPUTS: % model: COBRA model strcture % compartmen...
{"author": "opencobra", "repo": "cobratoolbox", "sha": "e60274d127f65d518535fd0814d20c53dc530f73", "save_path": "github-repos/MATLAB/opencobra-cobratoolbox", "path": "github-repos/MATLAB/opencobra-cobratoolbox/cobratoolbox-e60274d127f65d518535fd0814d20c53dc530f73/src/analysis/exploration/findRxnFromCompartment.m"}
% Conclusions \chapter{Conclusions} \label{ch:conclusion} \gls{spirit} is a novel robotics teleoperation system which overlays the current position and orientation of a vehicle onto previously acquired images. This research focuses on developing a \gls{spirit}-based user interface for aerial robots. The proposed metho...
{"hexsha": "531a0ef80a4225ff40f046a1b68ec1ddfce08b07", "size": 4277, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "reports/thesis/conclusions.tex", "max_stars_repo_name": "masasin/spirit", "max_stars_repo_head_hexsha": "c8366e649eb105a8a579fb7a47dcc5aaeae6a0d8", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
% Part: first-order-logic % Chapter: model-theory % Section: nonstandard-arithmetic \documentclass[../../../include/open-logic-section]{subfiles} \begin{document} \olfileid{mod}{bas}{nsa} \section{Non-standard Models of Arithmetic} \begin{defn} Let $\Lang{L_N}$ be the !!{language} of arithmetic, comprising a !!{con...
{"hexsha": "451377a942b1eccb2c60383f7648dd35a41e7099", "size": 11089, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "content/model-theory/basics/nonstandard-arithmetic.tex", "max_stars_repo_name": "GKerfImf/OpenLogic", "max_stars_repo_head_hexsha": "5791905d3149f68e05885290f448054b98a0e51b", "max_stars_repo_licen...
import numpy as np import matplotlib.pyplot as plt import scipy.integrate as spi #total no. agents n = 50 #fraction of cooperators initial fc0 = 0.7 #amount of resource available initial R0 = 100 # Maximum amount of resource Rmax = 200 # Social parameters ec = 0.483/n #level of effort (cooperators) ed = 1.826/n #lev...
{"hexsha": "4e07feb302fca2de47098470c8c9dc032eb44638", "size": 1656, "ext": "py", "lang": "Python", "max_stars_repo_path": "TSLModel2.py", "max_stars_repo_name": "adrianhindes/network-tsl", "max_stars_repo_head_hexsha": "70de88f3dde801e99481b3e4365b1c0461e54db3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import numpy as np import pandas as pd import os, copy import joblib, logging import skfuzzy as fuzz import difflib, random, pickle from deap import base, creator, tools, algorithms from itertools import repeat from collections import Sequence import re from sklearn.linear_model import LinearRegression, ElasticNetCV fr...
{"hexsha": "2fb15c25f6dfb16e4fc6c0aae7cca0fe6a5c8526", "size": 34313, "ext": "py", "lang": "Python", "max_stars_repo_path": "Fuzzy_clustering/version3/FuzzyClusteringManager/Clusterer_optimize_deep.py", "max_stars_repo_name": "joesider9/forecasting_library", "max_stars_repo_head_hexsha": "db07ff8f0f2693983058d49004f2fc...
import os.path import h5py import numpy as np import PIL import PIL.Image import pyx from pyxutil import * def make_fig_microstructure(name): L = 3 a = 0.75*L dim_shift = 0.6 c = pyx.canvas.canvas() attrs = [pyx.style.linewidth.normal, pyx.deco.earrow()] c.stroke(pyx.path.line(-DIM_LEG, 0, ...
{"hexsha": "8ac64846e779c1880dd9b7a550a08666334fd88f", "size": 2899, "ext": "py", "lang": "Python", "max_stars_repo_path": "sphinx/tutorials/square_basic/make_pyx_figs.py", "max_stars_repo_name": "sbrisard/janus", "max_stars_repo_head_hexsha": "a6196a025fee6bf0f3eb5e636a6b2f895ca6fbc9", "max_stars_repo_licenses": ["BSD...
import shutil import time import numpy import pickle from pathlib import Path from trsfile.common import Header, SampleCoding from trsfile.engine.engine import Engine from trsfile.parametermap import TraceParameterMap from trsfile.trace import Trace from trsfile.traceparameter import ByteArrayParameter class FileEng...
{"hexsha": "7d76f3da6d73ba8e71be7d25e83a5b68bfd44163", "size": 8477, "ext": "py", "lang": "Python", "max_stars_repo_path": "trsfile/engine/file.py", "max_stars_repo_name": "StefanD986/python-trsfile", "max_stars_repo_head_hexsha": "228df9d1cf1f2e18912c68d5c11c45c1493a2ece", "max_stars_repo_licenses": ["BSD-3-Clause-Cle...
# extract_features.r - part of TF2 # Purpose: Take appropriately formatted (what is that?) DNase-1 signal and 'extract features' (binary). 0 means 'missing data', 1 'no', 2 'yes'. # Warning: parallelising this means the peaks might (requires testing) get all messed up, order-wise, so you need to sort-bed on this afterw...
{"hexsha": "f5c8ac6c955a27e436e12ffc9d7db904a621b79e", "size": 3103, "ext": "r", "lang": "R", "max_stars_repo_path": "preprocess/extract_features.r", "max_stars_repo_name": "corcra/tf2", "max_stars_repo_head_hexsha": "46013e22f627f14bfbfa735f1d4b6e8e0a201d8f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
C @(#)chk_aredta.f 20.3 12/21/96 integer function chk_aredta(ptr, field, count, out_buffer) integer ptr, field, count character out_buffer(10)*120 C This subroutine checks AREA(*,PTR) extensively for data errors. include 'ipfinc/parametr.inc' include 'ipfinc/blank.inc' incl...
{"hexsha": "a04811e6641abd973c8fd53f555d1fe95ca70631", "size": 790, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/chk_aredta.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14...
import torch import torch.optim as optim from network import resnet,HRnet,PB_resnet,PB_net from tool.dataset import VOC_Dataset import argparse from torchvision import transforms from torch.utils.data import DataLoader import torch.nn as nn from sklearn.metrics import average_precision_score import torch.nn.fu...
{"hexsha": "d060f652b0f47ff1eae00d3f38cbfea7d3c21445", "size": 2369, "ext": "py", "lang": "Python", "max_stars_repo_path": "Adaptive-Spatial-Feature-Pooling/weight_mask.py", "max_stars_repo_name": "code6levels/Adaptive-Spatial-Feature-Pooling", "max_stars_repo_head_hexsha": "200e10ae5fd99a1a13d7525beedc10912fdb2397", "...
import pandas as pd from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split, StratifiedKFold, cross_val_score, learning_curve, validation_curve, GridSearchCV from sklearn.preprocessing import StandardScaler from sklearn.decomposition import PCA from sklearn.linear_model impor...
{"hexsha": "c7e0857cc681dd1bdeea70dbe1323674c8ad0030", "size": 10683, "ext": "py", "lang": "Python", "max_stars_repo_path": "06_Hyperparameter_Metrics.py", "max_stars_repo_name": "OscarDing/Oscar-s-Machine-Learning-in-Python", "max_stars_repo_head_hexsha": "d9dd359a178f5435b405235821147e5ea8a73c80", "max_stars_repo_lic...
#!/usr/bin/env python # -*- coding: utf-8 -*- import os, argparse, itertools import numpy as np from mCNN.processing import read_csv, save_data_array from scipy.spatial.distance import pdist, squareform def main(): parser = argparse.ArgumentParser() parser.description = 'A script to calculate mCSM features' ...
{"hexsha": "b3acef18a475ef0086e67361648369cb86a97607", "size": 6755, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Spatial/mCSM.py", "max_stars_repo_name": "ruiyangsong/mCNN", "max_stars_repo_head_hexsha": "889f182245f919fb9c7a8d97965b11576b01a96c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
\chapter{``N'' Standard Extension for User-Level Interrupts, Version 1.1} \label{chap:n} \begin{commentary} This is a placeholder for a more complete writeup of the N extension, and to form a basis for discussion. \end{commentary} This chapter presents a proposal for adding RISC-V user-level interrupt and excepti...
{"hexsha": "00812a7bba9854d8ca4bc2a2f1d8b6ed4917c798", "size": 4206, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "src/n.tex", "max_stars_repo_name": "T-J-Teru/riscv-isa-manual", "max_stars_repo_head_hexsha": "ebeb14b4259e078097a2fb07aa25bdecc2e9e4d6", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count":...
Christopher Civil is a fourth year student at UC Davis, majoring in Political Science. He is currently the PR chair in Phi Alpha Delta, the International PreLaw Professional fraternity. Chris is also an intern at the UC Davis News Service UC Davis Campus News Service, where he compiles a daily collection of news articl...
{"hexsha": "4a7531bf4e5e650aa6cb4b12df866f4b0bc6ed63", "size": 573, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/ChristopherCivil.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import datetime import math import time import cv2 import numpy as np ESC_KEY = 27 width = 0 height = 0 ContadorVerde = 0 ContadorAmarelo = 0 AreaContornoLimiteMin = 3000 OffsetLinhasRef = 260 cap = cv2.VideoCapture(0) def TestaInterseccao(y, CoordenadaYLinha): DiferencaAbsoluta = abs(y - CoordenadaYLinha) ...
{"hexsha": "4dfb71d8c6807d67c8a99cc94228131d22ce36d9", "size": 4754, "ext": "py", "lang": "Python", "max_stars_repo_path": "Identificador banana/Identificador+Contador.py", "max_stars_repo_name": "Lucas-Marcelino/CV_Pi-VII", "max_stars_repo_head_hexsha": "a7fdc0955e9710f351a7d16278de2093e9e84c69", "max_stars_repo_licen...
import wandb import pytest import numpy as np import datetime def test_basic_ndx(): # Base Case table_a = wandb.Table(columns=["b"], data=[["a"], ["b"]]) table = wandb.Table(columns=["fi", "c"]) for _ndx, row in table_a.iterrows(): table.add_data(_ndx, "x") assert all([row[0]._table == ta...
{"hexsha": "13baa3400aa8b18627c3423f66560e19fa5a05c8", "size": 7922, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tables.py", "max_stars_repo_name": "borisgrafx/client", "max_stars_repo_head_hexsha": "c079f7816947a3092b500751eb920fda3866985f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import os,sys,inspect sys.path.insert(1, os.path.join(sys.path[0], '../../../')) import datetime import numpy as np import matplotlib.pyplot as plt from torch.utils.data import Dataset, DataLoader import pdb import torch import core.datasets.utils as utils import core.datasets.fastmri.transforms as transforms import co...
{"hexsha": "592b7167030a33f117f2a36cc2411914cf33082e", "size": 6637, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/datasets/fastmri/FastMRIDataset.py", "max_stars_repo_name": "aangelopoulos/im2im-uq", "max_stars_repo_head_hexsha": "b95c3620b4741c09e7104a24fc5e87d77249971c", "max_stars_repo_licenses": ["MI...
import json import os import re import pandas as pd import numpy as np from python_lib.errors import ExtensionError path_exp = "./results_server/results/210612_004737/" class CompilePheWAS_Results(): def __init__(self, path_exp): self.path_logs_stats = os.path.join(path_exp, "logs_...
{"hexsha": "24b27442d9f43d0229db0f3981f3c199a56fe6d6", "size": 13890, "ext": "py", "lang": "Python", "max_stars_repo_path": "compile_run_PheWAS.py", "max_stars_repo_name": "hms-dbmi/BDC_HarmonizedVars_PheWAS", "max_stars_repo_head_hexsha": "e5bf15cfbd7a9e329e5760d1427d3debc8290bc5", "max_stars_repo_licenses": ["Apache-...
import numpy as np import math import tensorflow as tf def tf_1d_to_ndarray(data, datatype=tf.float64): with tf.Session() as sess: data = sess.run(data) return data def tf_to_ndarray(data, datatype=tf.float32): data = tf.image.convert_image_dtype(data[0, ..., 0], dtype=datatype) with tf.Se...
{"hexsha": "5d29420169d1f35c21e9cc9558e9efafce6f66b7", "size": 2012, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/tensorflow_wavelets/utils/cast.py", "max_stars_repo_name": "simonsimon006/tensorflow-wavelets", "max_stars_repo_head_hexsha": "21a095bf0048ae2488ca5ae4961d2cbfe94263a9", "max_stars_repo_licens...
\documentclass[11pt, a4paper, oneside]{article} \pagenumbering{arabic} \usepackage{amssymb,amsmath} \usepackage[utf8]{inputenc} \usepackage[unicode=true]{hyperref} \usepackage{titling} % configure maketitle \usepackage{longtable,booktabs,lscape} \usepackage[margin=2.5cm]{geometry} \PassOptionsToPackage{usenames,dvipsn...
{"hexsha": "87c59f1717289b4f4ea2d5c9a9eb8967464e7246", "size": 5339, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "templates/chroma-titling.tex", "max_stars_repo_name": "cpmpercussion/chroma-template", "max_stars_repo_head_hexsha": "b8f00e934d15b0e1de0c6a52f12500b6df4f1ba1", "max_stars_repo_licenses": ["Unlicens...
\section*{Work Experience} \begin{entrylist} \entry {March 2021\\ Ongoing} {Software Developer} {Multimedia Srl} {Developed software for very large sanitary institutions, following all the needed security measures to make sure sensitive data stays protected. I had to work under pressure to quickly...
{"hexsha": "237a87513e9e7baf92cf1ec9a18d188d00187cbb", "size": 697, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "sections/experience.tex", "max_stars_repo_name": "LLoyderino/Curriculum-Vitae", "max_stars_repo_head_hexsha": "2f6c5159f1afa42f99265ab8c47fc048600fecca", "max_stars_repo_licenses": ["MIT"], "max_star...
import torch import torch.nn.functional as F import argparse import cv2 import numpy as np from glob import glob import matplotlib.pyplot as plt from collections import OrderedDict import os from copy import copy # embedding vector Z_dim = 128 # L1 reconstruction loss balance reconstruction_loss_lambda = 1. # to avo...
{"hexsha": "3fd81c41dc642dcb79554216d38a94fee743a460", "size": 16000, "ext": "py", "lang": "Python", "max_stars_repo_path": "Question_imageGenerate/answers/alphaGAN_cifar10_pytorch.py", "max_stars_repo_name": "OverHall27/DLMugenKnock", "max_stars_repo_head_hexsha": "f08553213028e90baff7b4de3c640b51485f4a15", "max_stars...
import numpy as np import torch import torch.nn.functional as F from torch.autograd import Variable def cross_entropy_2d(predict, target): """ Args: predict:(n, c, h, w) target:(n, h, w) """ assert not target.requires_grad assert predict.dim() == 4 assert target.dim() == 3 ...
{"hexsha": "fc4db4d8a9c7ab30f62a7c96bdf8313459193349", "size": 1307, "ext": "py", "lang": "Python", "max_stars_repo_path": "advent/utils/loss.py", "max_stars_repo_name": "MLIA/ESL", "max_stars_repo_head_hexsha": "86679fd25d03667880379d59bc73194e7d8d03e3", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 17...
import json #import lmdb import pickle import os from numpy import random from PIL import Image import sys # import torchwordemb def calc_f(tp,fp,fn): precision = tp/(tp*fp) recall = tp/(tp+fn) f = 2 * precision * recall / (precision + recall) print('presision = ', precision, '\nrecall = '...
{"hexsha": "a8a446c65ad190080de7c9aeb6f171c6f8e9818e", "size": 4040, "ext": "py", "lang": "Python", "max_stars_repo_path": "small_tools.py", "max_stars_repo_name": "paisuygoda/im2ingr", "max_stars_repo_head_hexsha": "b69de9a5a0a7fd42f64c091d681803bc501817eb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
/* * The MIT License (MIT) * * Copyright (c) <2015> <Stephan Gatzka> * * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * without limitation the rights t...
{"hexsha": "b93138b80fed61a60ece219d637954dbceb8c10e", "size": 2882, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tests/router_test.cpp", "max_stars_repo_name": "mloy/cjet", "max_stars_repo_head_hexsha": "6645cefebb21bad577ea3792cd3b5c77c61f408a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8.0, ...
from torch.utils.tensorboard import SummaryWriter import numpy as np import torch from tabulate import tabulate import torchvision.utils as tu c=[[i*j for i in range (20)] for j in range(10)] b=torch.rand(120,40,3)*255 a = SummaryWriter(log_dir= "tb_test") for i in range(10): a.add_text("tester",tabulate(c),i) ...
{"hexsha": "235d563c161bdb16df3ac3350fd7593036791625", "size": 411, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/tensorb.py", "max_stars_repo_name": "neelabh17/SegmenTron", "max_stars_repo_head_hexsha": "69a4d1da858aba9222994847000f9945be3f4cd5", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" Solvers for over-identified systems. @author : davidrpugh """ from scipy import optimize from . import solvers class LeastSquaresSolver(solvers.Solver): def solve(self, basis_kwargs, boundary_points, coefs_array, nodes, problem, **solver_options): """ Solve a boundary value p...
{"hexsha": "7a4a92f9a41e74925756fa6daa7d7b80c45b38c7", "size": 1495, "ext": "py", "lang": "Python", "max_stars_repo_path": "pycollocation/solvers/over_identified.py", "max_stars_repo_name": "davidrpugh/bvp-solver", "max_stars_repo_head_hexsha": "9376f3488a992dc416cfd2a4dbb396d094927569", "max_stars_repo_licenses": ["MI...
import numpy as np import os class _ADE_proto(object): def __init__(self): curr_path = os.path.dirname(os.path.abspath(__file__)) colors = np.load(os.path.join(curr_path, 'color150.npy')) self.palette = np.full((256, 3), 255, np.uint8) for i, c in enumerate(colors): self...
{"hexsha": "2130e4df1610faf4c5a5878b71a338199abd3088", "size": 379, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/utils/dataset_tools/ade.py", "max_stars_repo_name": "js-fan/MCIC", "max_stars_repo_head_hexsha": "a98927e2d88452d96f1fba99a5dc25a5f518caa8", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import Base: IteratorSize, HasLength, IsInfinite, length struct FinitePeriodTrigger <: AbstractFiniteTrigger td::Dates.Period n::Int end struct InfinitePeriodTrigger <: AbstractInfiniteTrigger td::Dates.Period end """ PeriodTrigger(t::Dates.Time[, n=number_of_times]) A trigger which should trigger ...
{"hexsha": "88ac040e9fc417d929fcf9a5ac8130deafeffff1", "size": 1130, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/triggers/period.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/ExtensibleScheduler.jl-6837a093-145e-5c9b-b5ad-3b557e31aa31", "max_stars_repo_head_hexsha": "6cf6ab918d8924154e110426...