text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from os import path as osp import numpy as np import pytest import habitat_sim from habitat_sim.sensors.noise_models i...
{"hexsha": "8f0257d6fe6e6c48357b5fa84b83e6ebf040b6d6", "size": 1555, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_noise_models.py", "max_stars_repo_name": "Jiayuan-Gu/habitat-sim", "max_stars_repo_head_hexsha": "ccbfa32e0af6d2bfb5a3131f28f69b72f184e638", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np arr = np.array([ [[255,255,255], [255,255,255], [0,0,0]], [[255,255,255], [0,0,0], [0,0,0]], [[0,0,0], [0,0,0], [0,0,0]] ]); # arr = np.array([0, 0, 0]) print(arr.flatten()) f = arr.flatten() if 255 in f: print("oh no!") else: print("oh yeah ;)") # t = np.where(arr == 255) # print(t)
{"hexsha": "769cd1aed205c76454414b427ae777feaae0a20a", "size": 320, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "halesyy/hsc-2019-major-work", "max_stars_repo_head_hexsha": "baeab9db0431b021fd5a19b63be6d5df8c6d0513", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "...
# GWR kernel function specifications __author__ = "STWR is XiangQue xiangq@uidaho.edu and GWR,MGWR is Taylor Oshan Tayoshan@gmail.com" import scipy from scipy.spatial.kdtree import KDTree import numpy as np from scipy.spatial.distance import cdist as cdist_scipy from math import radians, sin, cos, sqrt, asin,exp,atan...
{"hexsha": "83528d0e2395c62c7b6d5f92b8fda35e6c09ac53", "size": 34112, "ext": "py", "lang": "Python", "max_stars_repo_path": "stwr/kernels.py", "max_stars_repo_name": "quexiang/STWR", "max_stars_repo_head_hexsha": "e06bd4415f85de7f8543dfb7bef446f38b069349", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count":...
using Flux, Flux.Data.MNIST, Statistics, BSON, Random, StatsPlots; pyplot() using Flux: onehotbatch, onecold, crossentropy, @epochs epochs = 30 eta = 1e-3 batchSize = 200 trainRange, validateRange = 1:1000, 1001:5000 function minibatch(x, y, idxs) xBatch = Array{Float32}(undef, size(x[1])..., 1, length(idxs)) ...
{"hexsha": "1448c73bbb7b6ec8b68edaa8041ea81d5bb91ba3", "size": 1932, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "9_chapter/dropout.jl", "max_stars_repo_name": "Yoshinobu-Ishizaki/StatsWithJuliaBook", "max_stars_repo_head_hexsha": "4c704e96d87b91e680122a6b6fa2d2083c70ea88", "max_stars_repo_licenses": ["MIT"], ...
#!/usr/bin/env python3 # coding: utf-8 # -------- # # GPS Plot # # -------- # ### Modules # standard library import colorsys import time as tm import csv import calendar import xml.dom.minidom as mnd import urllib import urllib.request import io from os.path import join from math import radians, log, tan, cos, pi, a...
{"hexsha": "620f0b50fe5bfd99ee9386e340f4beba8c30869a", "size": 10655, "ext": "py", "lang": "Python", "max_stars_repo_path": "pupil_code/gps_plot.py", "max_stars_repo_name": "pignoniG/cognitive_analysis_tool", "max_stars_repo_head_hexsha": "90568fc83493a10b567c1f957a57b3ef3a1cf69f", "max_stars_repo_licenses": ["MIT"], "...
# Código desenvolvido pelo Pedro Piassa # Artigo http://www.uel.br/cce/dc/wp-content/uploads/PRELIMINAR-PEDRO-VITOR-PIASSA.pdf todos os direitos reservados. import os from math import * import pandas as pd import matplotlib.pyplot as plt import numpy as np import tensorflow as tf from tensorflow.keras.models import...
{"hexsha": "0ef02d4cfc1faf8314ad3d3f2641e5dc2eb22651", "size": 9230, "ext": "py", "lang": "Python", "max_stars_repo_path": "teste/lstm.py", "max_stars_repo_name": "joandesonandrade/nebulosa", "max_stars_repo_head_hexsha": "5bc157322ed0bdb81f6f00f6ed1ea7f7a5cadfe0", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
% %\documentclass[prb,preprint,showpacs,amsmath,amssymb ]{revtex4} % \documentclass[prb, showpacs,amsmath,amssymb,twocolumn]{revtex4} % % % Some other (several out of many) possibilities % %\documentclass[preprint,aps]{revtex4} % %\documentclass[preprint,aps,draft]{revtex4} % %\documentclass[prb...
{"hexsha": "75a7398d3b8ccd923b7f5120d36445859982e7c0", "size": 34293, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/Anderson_Localization_as_position-dependent_diffusion_in_disordered_waveguides__Phys_Rev_B/quasi1d_dofz_prb.tex", "max_stars_repo_name": "bhpayne/physics_phd_dissertation", "max_stars_repo...
## circulant_embedding.jl : Gaussian random field generator using fft; only for uniformly spaced GRFs """ CirculantEmbedding <: GaussianRandomFieldGenerator A [`GaussiandRandomFieldGenerator`](@ref) that uses FFT to compute samples of the Gaussian random field. Circulant embedding can only be applied if the points ar...
{"hexsha": "a6e23d080c9a92957a9f0370af961d9d2b14208f", "size": 8214, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/generators/circulant_embedding.jl", "max_stars_repo_name": "UnofficialJuliaMirror/GaussianRandomFields.jl-e4b2fa32-6e09-5554-b718-106ed5adafe9", "max_stars_repo_head_hexsha": "678c847826377e430...
from collections import namedtuple from datetime import datetime, timedelta from xml.etree.ElementTree import ElementTree import os import subprocess from matplotlib.path import Path import matplotlib.pyplot as plt import numpy as np class TTF: def __init__(self, ttx_path, px_step=200, font_height=4): wi...
{"hexsha": "ef173678c28b451646d0f5158c241c0c3f4c69c8", "size": 5645, "ext": "py", "lang": "Python", "max_stars_repo_path": "ghht/ghht.py", "max_stars_repo_name": "matiaslindgren/ghht", "max_stars_repo_head_hexsha": "1e310a3573730dd546551fa3003e2403f6fd71ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
SUBROUTINE TF01MY( N, M, P, NY, A, LDA, B, LDB, C, LDC, D, LDD, $ U, LDU, X, Y, LDY, DWORK, LDWORK, INFO ) C C SLICOT RELEASE 5.5. C C Copyright (c) 2002-2012 NICONET e.V. C C PURPOSE C C To compute the output sequence of a linear time-invariant C open-loop sys...
{"hexsha": "57b7052a985d587f4276c087c955a009ddcb6540", "size": 12231, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "External/SLICOT/TF01MY.f", "max_stars_repo_name": "bgin/MissileSimulation", "max_stars_repo_head_hexsha": "90adcbf1c049daafb939f3fe9f9dfe792f26d5df", "max_stars_repo_licenses": ["MIT"], "max_star...
using Pkg Pkg.activate(".") Pkg.instantiate() using ArgParse using CGT using CurrencyAmounts function parse_commandline() s = ArgParseSettings(description="Computes the capital gain tax (in Ireland)") @add_arg_table s begin "--verbose", "-v" help = "Show transactions" action = :store_true "file" help ...
{"hexsha": "3878bc702d8113461fb914dbca425825be104a4b", "size": 600, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "main.jl", "max_stars_repo_name": "ppanhoto78/CGT.jl", "max_stars_repo_head_hexsha": "c4c88bb8c665fba549a1353caea4bfa936357dc3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_stars_r...
""" Function:测试最后一跳激活函数 Author:lzb Date:2021.01.31 """ import numpy as np from activation.last_hop_activation import LastHopActivation, DichotomyLHA, SoftMaxLHA def test_last_hop_activation(): lha = DichotomyLHA() nn_y = np.asarray([[[0.496053], [0.142468], [0.692607]], [[-0.152569], [...
{"hexsha": "2e0893fddcd5ad86c9388521a0c81ed84ae8401b", "size": 766, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/activation/test_lha.py", "max_stars_repo_name": "1801573781/wind", "max_stars_repo_head_hexsha": "f7eaa84a9d98d081bf170f6ef6bff3c94a999c86", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
# %% ## Most part of the code taken from https://github.com/microsoft/onnxruntime/blob/master/onnxruntime/python/tools/transformers/notebooks/PyTorch_Bert-Squad_OnnxRuntime_CPU.ipynb import os import requests from transformers import BertConfig, BertForQuestionAnswering, BertTokenizer from transformers.data.proc...
{"hexsha": "e301612a559918174491b08498c275178d00627b", "size": 6832, "ext": "py", "lang": "Python", "max_stars_repo_path": "bert_onnx.py", "max_stars_repo_name": "MatRazor/ONNXRuntime_tutorial_collection", "max_stars_repo_head_hexsha": "9fe46311896391f769a51cc4d07814e6bfafd8ee", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python import sys import os import time import numpy as np import pysal as ps from fj_vect import fisher_jenks as vFisher from mpi4py import MPI #Override sys.execpthook _excepthook = sys.excepthook def excepthook(t, v, tb): _excepthook(t, v, tb) if (not MPI.Is_finalized() and MPI.Is_initiali...
{"hexsha": "3d510da4a88b536a997df2b3cfa0dc7565644334", "size": 5101, "ext": "py", "lang": "Python", "max_stars_repo_path": "ppysal/geoda_cluster/fisher_jenks/fj_mpi_integrated.py", "max_stars_repo_name": "ElsevierSoftwareX/SOFTX_2018_242", "max_stars_repo_head_hexsha": "9a7d7c02b2f1d7b6bfd1b08fbb2150c30ddd1046", "max_s...
from typing import Any, Dict, Union import pytorch_lightning as pl import torch import torch.nn as nn import numpy as np from nowcasting_utils.models.base import register_model from nowcasting_utils.models.loss import get_loss from satflow.models.layers.ConvLSTM import ConvLSTMCell import torchvision @register_mod...
{"hexsha": "1c30629c59327e19ebbf9c332c541f043500aef2", "size": 8776, "ext": "py", "lang": "Python", "max_stars_repo_path": "satflow/models/conv_lstm.py", "max_stars_repo_name": "mfrasco/satflow", "max_stars_repo_head_hexsha": "2e56b46dfd81a05670c6d2b1bda8c9eec38301a7", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
# @Author: yican, yelanlan # @Date: 2020-06-16 20:36:19 # @Last Modified by: yican.yc # @Last Modified time: 2020-06-16 20:36:19 # Standard libraries import os import gc from pathlib import Path from pydoc import classname from time import time, sleep import traceback from typing import Dict import numpy as np import...
{"hexsha": "8ffa850648d4aaa061f1695d9bc1f9f096b3dcf6", "size": 8403, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_multistage.py", "max_stars_repo_name": "LuletterSoul/cvpr2020-plant-pathology", "max_stars_repo_head_hexsha": "e26bcfaa860ea67aec3c6df815d276615cc190c1", "max_stars_repo_licenses": ["MIT"], ...
from scipy.integrate import odeint class SIS: sets = ['S', 'I', 'N'] params = ['beta', 'gamma'] equations = { 'S' : lambda S,I,N,_S,_I,_N,beta,gamma: f' -({beta} * {S} * {_I}) / ({_N}) + {gamma} * {I}', 'I' : lambda S,I,N,_S,_I,_N,beta,gamma: f' ({beta} * {S} * {_I}) / ({_N}) - {gamma} * {I}', 'N' : lambda S,...
{"hexsha": "c015fb6c345e59629024bc5e8570e51d2c74de45", "size": 647, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cmodel/repo/SIS.py", "max_stars_repo_name": "Maximiza-Atemoriza/meta-population-network-model", "max_stars_repo_head_hexsha": "7dfde8d92c50935a963c919227058c99fcd0c649", "max_stars_repo_license...
subroutine wrgrid(comfil ,lundia ,error ,mmax ,nmax , & & kmax ,nmaxus , & & xcor ,ycor ,guu ,gvv ,guv , & & gvu ,gsqs ,gsqd ,alfas ,thick , & & rbuff ,rbuffz ,sferic ...
{"hexsha": "bf0679aff85ea03c12727506c5c5fca1bdadd565", "size": 16580, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "docker/water/delft3d/tags/v6686/src/engines_gpl/flow2d3d/packages/io/src/output/wrgrid.f90", "max_stars_repo_name": "liujiamingustc/phd", "max_stars_repo_head_hexsha": "4f815a738abad43531d02ac6...
<div class="alert alert-block alert-info"> <u><h1>Introduction to respy</h1></u> </div> ### What is **respy**? **respy** is an open source framework written in Python for the simulation and estimation of some finite-horizon discrete choice dynamic programming models. The group of models which can be currentl...
{"hexsha": "32743538e453fd9cc4b4cd7b3d3ef4d7cac23aaa", "size": 398114, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "respy-showcase-short.ipynb", "max_stars_repo_name": "amageh/respy-tut", "max_stars_repo_head_hexsha": "115a8a3cf0069b03ee18c6eac70b0b9b1cba6857", "max_stars_repo_licenses": ["MIT"],...
from __future__ import print_function from datetime import datetime import numpy as np from baseline_algorithm import * from parameters import * import os import csv import json import wfdb ## Classifying arrhythmia alarms # Returns true if...
{"hexsha": "8a17b01a9406ef09e552fe00dad0e18eb17b1849", "size": 8816, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyfar/pipeline.py", "max_stars_repo_name": "vishwas1234567/false-alarm-reduction", "max_stars_repo_head_hexsha": "e67357004d26ba858bd55fab4913daa749f966cc", "max_stars_repo_licenses": ["MIT"], "ma...
[STATEMENT] lemma box_d_d_same: "|d(x)]d(x) = 1" [PROOF STATE] proof (prove) goal (1 subgoal): 1. | d x ] d x = (1::'a) [PROOF STEP] using box_x_d d_complement_zero [PROOF STATE] proof (prove) using this: | ?x ] d ?y = a (?x * a ?y) d ?x * a ?x = bot goal (1 subgoal): 1. | d x ] d x = (1::'a) [PROOF STEP] by auto
{"llama_tokens": 168, "file": "Correctness_Algebras_Relative_Modal", "length": 2}
[STATEMENT] lemma finprod_mono_neutral_cong: assumes [simp]: "finite B" "finite A" and *: "\<And>i. i \<in> B - A \<Longrightarrow> h i = \<one>" "\<And>i. i \<in> A - B \<Longrightarrow> g i = \<one>" and gh: "\<And>x. x \<in> A \<inter> B \<Longrightarrow> g x = h x" and g: "g \<in> A \<rightarrow> carr...
{"llama_tokens": 1001, "file": null, "length": 13}
[STATEMENT] lemma (in is_cat_pw_lKe) cat_pw_lKe_the_pw_cat_lKe_colimit_is_cat_colimit: assumes "\<KK> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<TT> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<AA>" and "c \<in>\<^sub>\<circ> \<CC>\<lparr>Obj\<rparr>" shows "the_pw_cat_...
{"llama_tokens": 5707, "file": "CZH_Universal_Constructions_czh_ucategories_CZH_UCAT_PWKan", "length": 22}
import open3d as o3d import numpy as np from open3d.pybind.core import Dtype from open3d.pybind.core import Device from open3d.pybind.core import DtypeUtil from open3d.pybind.core import cuda from open3d.pybind.core import NoneType from open3d.pybind.core import TensorList none = NoneType() def _numpy_dtype_to_dtyp...
{"hexsha": "c465d4d9a27ffa20f2ad03afcdd15436d6a59e10", "size": 22403, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/open3d/core.py", "max_stars_repo_name": "Matnay/Open3D", "max_stars_repo_head_hexsha": "781b735d8391353a0fd63524ca7ec460bf065a3a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); ...
{"hexsha": "4b363048bdc2ef5c6f1f84cb0628209a7c7d7367", "size": 2048, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "lib/cpp/test/TPipedTransportTest.cpp", "max_stars_repo_name": "shivam00/thrift", "max_stars_repo_head_hexsha": "d81e9e3d22c130ef5ddba7b06fb9802267d9d1d7", "max_stars_repo_licenses": ["Apache-2.0"], ...
%!TEX root = ../dissertation.tex \chapter{Background} \label{ch:background} In this chapter, we first introduce visual-textual grounding problem in Sec.~\ref{sec:visual-grounding}, distinguishing between visual grounding and referring expression grounding. In Sec.~\ref{sec:two-stage-vs-one-stage} we describe the two ...
{"hexsha": "e941a94c856ea7d82711228d5938d6033f8e6f6b", "size": 49562, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/background.tex", "max_stars_repo_name": "lparolari/master-thesis", "max_stars_repo_head_hexsha": "81c5cc5daec63426e51bdc470d4f9b532b06286b", "max_stars_repo_licenses": ["MIT"], "max_stars_...
// Copyright (c) 2012, Thomas Goyne <plorkyeran@aegisub.org> // // Permission to use, copy, modify, and distribute this software for any // purpose with or without fee is hereby granted, provided that the above // copyright notice and this permission notice appear in all copies. // // THE SOFTWARE IS PROVIDED "AS IS" A...
{"hexsha": "a68ca4359144675da13e81e745d9d5e612a0caa6", "size": 4917, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "aegisub/src/dialog_autosave.cpp", "max_stars_repo_name": "rcombs/Aegisub", "max_stars_repo_head_hexsha": "58f35cd31c7f0f5728e0a28e6a7a9fd6fce70c50", "max_stars_repo_licenses": ["ISC"], "max_stars_co...
import numpy as np from PIL import Image from heatmap_generator.abstract_heatmap_generator import AbstractHeatmapGenerator class AnisotropicLaplaceHeatmapGenerator(AbstractHeatmapGenerator): def __init__(self): super().__init__() def get_heatmap_image(self, landmark_point): x_axis_mtx, y_axi...
{"hexsha": "98091e76e039bfc88f0b4f9ab9956e8a2800168c", "size": 707, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/heatmap_generator/isotropic_laplace_heatmap_generator.py", "max_stars_repo_name": "k1101jh-univ/ISBI_2015_landmark_localization", "max_stars_repo_head_hexsha": "339cab46b4ea49b2322315d35435d1...
MODULE init IMPLICIT NONE PRIVATE PUBLIC :: line, lineorig, new_phreeqc_id, readinput, replacestring, cx, cy INTEGER(KIND=4) :: ID_IPHREEQC(2),thisid1, thisid2 CHARACTER(LEN=160), DIMENSION(120) :: line = "" CHARACTER(LEN=160), DIMENSION(120) :: lineorig = "" CHARACTER(LEN=32) :: cx, cy contains !*...
{"hexsha": "de5e735ef1904a142f8acadfb5418a0eb8b64aba", "size": 2904, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "IPhreeqcMMS/IPhreeqc/memory_leak_f/init.f90", "max_stars_repo_name": "usgs-coupled/webmod", "max_stars_repo_head_hexsha": "66419e3714f20a357a7db0abd84246d61c002b88", "max_stars_repo_licenses": [...
% Copyright (c) 2014 Adobe Systems Incorporated. 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 applic...
{"hexsha": "ed3b34d9c54f7f12b21219cfed15ec41bec06190", "size": 3615, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "as4wp/same.tex", "max_stars_repo_name": "adobe-research/ActionScript4", "max_stars_repo_head_hexsha": "7817de971559b37b47a110f7a5a4e62840b3d7b5", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
import sys sys.path.insert(1, "./lib") import cv2 import torch import argparse import numpy as np from pathlib import Path from tqdm import tqdm from torch.nn import functional as F from lib.models.ddrnet_23_slim import DualResNet, BasicBlock color_palette = [ (0, 0, 0), (150, 100, 100), (220, 20, 60), ...
{"hexsha": "69afaf5b5341c607f6bb871fb389a80d78db11e1", "size": 4176, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/predict_video.py", "max_stars_repo_name": "BuiKhoi/DDRNet.pytorch", "max_stars_repo_head_hexsha": "8460b0c5b6deb7637f5755230d22ec6e1dcf0619", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
\section{Power Reactor Terminology} \begin{labeling} \item [\underline{Coolant}:] Material used to remove heat from core, to heat water, to push a turbine, etc. \item [\underline{Steam or Coolant Loops}:] Number of heat transfer mechanisms. Must be at least 1. \item [\underline{Moderator}:] ...
{"hexsha": "285a536b09bcb88057093c823a8e69c650034dbd", "size": 3226, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "notes/n03.tex", "max_stars_repo_name": "scopatz/rxps", "max_stars_repo_head_hexsha": "bef0045f12215ebe0ac15f9e944047eaefb0ec36", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars_count": null, "m...
import cv2 import time import numpy as np import HandTrackingModule as htm import math from cvzone.SerialModule import SerialObject from time import sleep # arduino = SerialObject() arduino = SerialObject("COM7") ######################################### wCam, hCam = 640, 480 ###########################...
{"hexsha": "e602191c3c95506654c1cb0b6f3787221cec2a51", "size": 1983, "ext": "py", "lang": "Python", "max_stars_repo_path": "BrightnessHandControl.py", "max_stars_repo_name": "zubairatha/LED-control-via-Hand-Tracking", "max_stars_repo_head_hexsha": "6e0cf5503cee1b68f41b2c5757f82517d14dbea9", "max_stars_repo_licenses": [...
#! /usr/bin/python # -*- coding: utf-8 -*- """ Set of utility function in order to retrieve datas (news and stock data), build the newsletter template and send the email. """ import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText import datetime import...
{"hexsha": "14715a9a0f6c851e268565cc8e446130c2394633", "size": 8403, "ext": "py", "lang": "Python", "max_stars_repo_path": "source/newsletter.py", "max_stars_repo_name": "coupetmaxence/newsletter-dashboard", "max_stars_repo_head_hexsha": "14b83926734c3ebca476744ff0cfcce83a92b9db", "max_stars_repo_licenses": ["MIT"], "m...
import io import os import pathlib import warnings from collections import OrderedDict from copy import deepcopy import gym import numpy as np import pytest import torch as th from stable_baselines3 import A2C, DDPG, DQN, PPO, SAC, TD3 from stable_baselines3.common.base_class import BaseAlgorithm from stable_baseline...
{"hexsha": "bcc85b6570b3597e10f55205bb64a67913bf4d99", "size": 20517, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_save_load.py", "max_stars_repo_name": "lorepieri8/stable-baselines3", "max_stars_repo_head_hexsha": "f3e1dae4a8484b66e59daf092dc590add31f3152", "max_stars_repo_licenses": ["MIT"], "max...
""" Created on 2020. 9. 16. @author: Inwoo Chung (gutomitai@gmail.com) License: BSD 3 clause. """ import numpy as np import json from datetime import datetime import tensorflow as tf from tensorflow.keras.layers import Flatten, Dense from tensorflow.keras.models import Model from tensorflow.keras import optimizers f...
{"hexsha": "7de615c33693a25db131053ac33458bd89c5771d", "size": 4500, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/mnist_digit_classfication/nobody_convnet2d_mnist.py", "max_stars_repo_name": "tonandr/keras_unsupervised", "max_stars_repo_head_hexsha": "fd2a2494bca2eb745027178e220b42b5e5882f94", "max_s...
////////////////////////////////////////////////////////////////////////////// // // (C) Copyright Ion Gaztanaga 2009-2011. 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) // // See http://www.boost.org/libs/interpr...
{"hexsha": "7ebfb3081c9601d6c45f2cdd21750c0f16181f68", "size": 2285, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "Qt-GL-Simple-Scene-master/include/boost_1_5/include/boost/interprocess/detail/windows_intermodule_singleton.hpp", "max_stars_repo_name": "nacsa/Retopology", "max_stars_repo_head_hexsha": "03c009462d...
#pragma once #include <boost/array.hpp> #include <boost/asio.hpp> #include <flowmq/message.hpp> #include <flowmq/session.hpp> #include <functional> #include <iostream> #include <map> using boost::asio::ip::tcp; namespace flowmq { // Manages connections with other nodes in the cluster. // Mainly used in the ClusterN...
{"hexsha": "a6e0e880dcbf4d5e9d6029c510420b7108c51bc8", "size": 2160, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/flowmq/cluster_manager.hpp", "max_stars_repo_name": "rmh2009/flowmq", "max_stars_repo_head_hexsha": "33f59c6d14249426a28f36a857206b18f2ae9655", "max_stars_repo_licenses": ["Apache-2.0"], "max_st...
from typing import Tuple, Union, Sequence, Callable, List import pandas as pd import numpy as np import tensorflow as tf Adjacency = Union[pd.DataFrame, np.ndarray] Aggregate = Callable[[List[tf.Tensor]], tf.Tensor] StaticShape = Tuple[int, ...] RankStaticShape = Tuple[Union[int, tf.Tensor], ...] OptLayerNames = Uni...
{"hexsha": "a0a71712cb94de0cf0bb10a242f0d02efc087157", "size": 812, "ext": "py", "lang": "Python", "max_stars_repo_path": "degraph/types.py", "max_stars_repo_name": "aljabr0/degraph", "max_stars_repo_head_hexsha": "ac44a1c979da7605ed424853e7fef8ffa8790b27", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ...
/* LICENSE: Copyright (c) Members of the EGEE Collaboration. 2010. See http://www.eu-egee.org/partners/ for details on the copyright holders. 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 ...
{"hexsha": "fc46e6683b499b5199ab6721e8a918d1eb73641d", "size": 5078, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "ice/src/glite-wms-ice-safe.cpp", "max_stars_repo_name": "italiangrid/wms", "max_stars_repo_head_hexsha": "5b2adda72ba13cf2a85ec488894c2024e155a4b5", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
/*============================================================================= Copyright (c) 2006 Eric Niebler 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) ================================================...
{"hexsha": "815f2768c6d64a5d31a5134859eace3a753480fe", "size": 1320, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/boost_1_72_0/boost/fusion/support/is_segmented.hpp", "max_stars_repo_name": "henrywarhurst/matrix", "max_stars_repo_head_hexsha": "317a2a7c35c1c7e3730986668ad2270dc19809ef", "max_stars_repo_lic...
function [RSS, XYproj] = Residuals_ellipse(XY,ParG) % % Projecting a given set of points onto an ellipse % and computing the distances from the points to the ellipse % % This is a modified version of an iterative algorithm published by D. Eberly % Internet publication: "Distance from a point to an ellipse in ...
{"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/27708-distance-from-points-to-an-ellipse/Res...
# calculate the stoichiometry coefficients function stoich_coeff(species::Vector{T}, reaction::DiffEqBiological.ReactionStruct, e_order::Vector{Int}) where T <: AlgebraSet coeff = 1 for ind in eachindex(e_order) coeff *= DiffEqBiological.get_stoch_diff(reaction, Symbol(species[ind]))^e_order[ind] en...
{"hexsha": "466a915009866f5c0588819fd9249c4868c15652", "size": 3952, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/utils.jl", "max_stars_repo_name": "J-Revell/MomentExpansions.jl", "max_stars_repo_head_hexsha": "adbcac62399742ab402783da433077f1856c394c", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
using Compat, FastTransforms, LowRankApprox using Compat.Test import FastTransforms: Cnλ, Λ, lambertw, Cnαβ, Anαβ, pochhammer import FastTransforms: clenshawcurtisnodes, clenshawcurtisweights, fejernodes1, fejerweights1, fejernodes2, fejerweights2 import FastTransforms: chebyshevmoments1, chebyshevmoments2, chebyshevja...
{"hexsha": "c15d2ea7bbe9a37b00e790676265a243dfe4aa59", "size": 4279, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/basictests.jl", "max_stars_repo_name": "dlfivefifty/FastTransforms.jl", "max_stars_repo_head_hexsha": "e49710ae578dc14f25dcb49e4edec06373e37819", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Tests for miscellaneous (non-magic) ``np.ndarray``/``np.generic`` methods. More extensive tests are performed for the methods' function-based counterpart in `../from_numeric.py`. """ from __future__ import annotations import operator from typing import cast, Any import numpy as np class SubClass(np.ndarray): ...
{"hexsha": "62024603c9492ea2e99f598e962eea6160818d85", "size": 2716, "ext": "py", "lang": "Python", "max_stars_repo_path": "crabageprediction/venv/Lib/site-packages/numpy/typing/tests/data/pass/ndarray_misc.py", "max_stars_repo_name": "13rianlucero/CrabAgePrediction", "max_stars_repo_head_hexsha": "92bc7fbe1040f49e8204...
%------------------------------------------------------------------% % Cannabis Data Science Presentation 3/17/2021 % % FIXME: Bibliography % https://tex.stackexchange.com/questions/148893/package-biblatex-error-incompatible-package-ucs-begindocument?noredirect=1&lq=1 % https://tex.stackexchange.com/questions/261595/ho...
{"hexsha": "3092239da69cf4de18c6ce2003ab99c7e2a6e351", "size": 6482, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "2021-03-17/presentation/presentation.tex", "max_stars_repo_name": "cannlytics/cannabis-data-science", "max_stars_repo_head_hexsha": "8ff11330692d3c5a39e3a9f9843af917caf1a720", "max_stars_repo_licens...
[STATEMENT] lemma \<gamma>_inf_rep: "\<gamma>_rep(inf_rep p1 p2) = \<gamma>_rep p1 \<inter> \<gamma>_rep p2" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<gamma>_rep (inf_rep p1 p2) = \<gamma>_rep p1 \<inter> \<gamma>_rep p2 [PROOF STEP] by(auto simp:inf_rep_def \<gamma>_rep_cases split: prod.splits extended.spli...
{"llama_tokens": 140, "file": null, "length": 1}
import json import math import networkx as nx from ccxt import async as ccxt class ExchangeNotInCollectionsError(Exception): def __init__(self, market_ticker): super(ExchangeNotInCollectionsError, self).__init__("{} is either an invalid exchange or has a broken API." ...
{"hexsha": "cac60174cc5b8fdaca3d3e1e53424e5d68f7daec", "size": 3491, "ext": "py", "lang": "Python", "max_stars_repo_path": "peregrinearb/utils/general.py", "max_stars_repo_name": "lyn716/peregrine", "max_stars_repo_head_hexsha": "5b1f6a839bf4a86198ad85f527b04b9a34ea7ab9", "max_stars_repo_licenses": ["MIT"], "max_stars_...
%% Copyright (C) 2010, 2011, Gostai S.A.S. %% %% This software is provided "as is" without warranty of any kind, %% either expressed or implied, including but not limited to the %% implied warranties of fitness for a particular purpose. %% %% See the LICENSE file for more information. \section{UValueSerializable} Thi...
{"hexsha": "2c5446861faabf1931f8ebe17292dfd80370f55c", "size": 1733, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/specs/uvalue-serializable.tex", "max_stars_repo_name": "jcbaillie/urbi", "max_stars_repo_head_hexsha": "fb17359b2838cdf8d3c0858abb141e167a9d4bdb", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
/** * Copyright (C) 2016 Turi * All rights reserved. * * This software may be modified and distributed under the terms * of the BSD license. See the LICENSE file for details. */ #include <string> #include <regex> #include <vector> #include <map> #include <set> #include <parallel/mutex.hpp> #include <boost/algorit...
{"hexsha": "8b467f52a6bec2d0aa155e68f583bc63dac7aafa", "size": 42710, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "oss_src/sframe/parallel_csv_parser.cpp", "max_stars_repo_name": "venkattgg/venkey", "max_stars_repo_head_hexsha": "796b9bdfb2fa1b881d82080754643c7e68629cd2", "max_stars_repo_licenses": ["BSD-3-Clau...
#!/usr/bin/env python # coding: utf-8 # In[7]: import pandas as pd import urllib import numpy as np import json from tqdm.autonotebook import tqdm import re # %matplotlib inline tqdm.pandas() import jellyfish#88942 import dask.dataframe as dd from dask.multiprocessing import get from dask.diagnostics impor...
{"hexsha": "f2406621b8075a602febc1b06f421eb3dda9cbd0", "size": 50712, "ext": "py", "lang": "Python", "max_stars_repo_path": "AddressCleanserUtils.py", "max_stars_repo_name": "AlexanderV/NominatimWrapper", "max_stars_repo_head_hexsha": "dcb536dcff3919058d09883bd4d9c551daf5ac2d", "max_stars_repo_licenses": ["MIT"], "max_...
import math import numpy as np import tensorflow as tf from tensorflow.python.framework import ops from utils import * def deconv2d(input_, output_shape, k_h=5, k_w=5, d_h=2, d_w=2, stddev=0.02, name="deconv2d", with_w=False): """Helper function to construct a deconv "layer" with tf.nn.conv2d_trans...
{"hexsha": "426abce1d4a9eeee4a3a0ab36af637839a523b00", "size": 1811, "ext": "py", "lang": "Python", "max_stars_repo_path": "ops.py", "max_stars_repo_name": "briancylui/ALOCC_Keras", "max_stars_repo_head_hexsha": "2eaee9ed608f7ee4651e8088d83191eb9deca6c8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 40, "max_...
//================================================================================================== /*! @file @copyright 2016 NumScale SAS @copyright 2016 J.T. Lapreste Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) ...
{"hexsha": "6aa64bb5aa00a79b76de0e249a2959138e2b389c", "size": 1233, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/simd/function/compare_neq.hpp", "max_stars_repo_name": "yaeldarmon/boost.simd", "max_stars_repo_head_hexsha": "561316cc54bdc6353ca78f3b6d7e9120acd11144", "max_stars_repo_licenses": ["B...
from sklearn import metrics import numpy as np import time from scipy import stats from mlxtend.evaluate import permutation_test class DataSanitization(): def __init__(self, data): self.data = data def is_complete(self, column): return self.data[column].isnull().sum() == 0 def ha...
{"hexsha": "bc96ecf331ffa2b21b664a02176c2179ee9f18d2", "size": 7155, "ext": "py", "lang": "Python", "max_stars_repo_path": "drifter_ml/columnar_tests/columnar_tests.py", "max_stars_repo_name": "mc-robinson/drifter_ml", "max_stars_repo_head_hexsha": "fe9d0d71b57b9bfba7ad67968bb583dab7dc6212", "max_stars_repo_licenses": ...
[STATEMENT] lemma measure_count_space[simp]: "B \<subseteq> A \<Longrightarrow> finite B \<Longrightarrow> measure (count_space A) B = card B" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>B \<subseteq> A; finite B\<rbrakk> \<Longrightarrow> Sigma_Algebra.measure (count_space A) B = real (card B) [PROOF ...
{"llama_tokens": 209, "file": null, "length": 2}
# Load dependencies using NeuralQuantum, QuantumLattices using Logging, Printf, ValueHistories # Select the numerical precision T = Float64 # Select how many sites you want sites = [3, 3] Nsites = prod(sites) # Create the lattice as [Nx, Ny, Nz] lattice = SquareLattice(sites, PBC=true) # Create the hamiltonian ...
{"hexsha": "b93d73112473276d013a37cb4e69e1e0ffd91d9a", "size": 2978, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/spins_1d.jl", "max_stars_repo_name": "TheorieMPQ/NeuralQuantum.jl", "max_stars_repo_head_hexsha": "e78e2f44f83da2217965e6f4404eb29f1b87d321", "max_stars_repo_licenses": ["MIT"], "max_stars...
#include <boost/typeof/message.hpp>
{"hexsha": "1d508c830f0b07045b6c2045783519cd2f55f7b0", "size": 36, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_typeof_message.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1.0"], "ma...
SUBROUTINE read_reference_spectra ( pge_idx, n_max_rspec, pge_error_status ) USE OMSAO_precision_module USE OMSAO_indices_module, ONLY: & max_rs_idx, wvl_idx, spc_idx, pge_static_input_luns, & pge_o3_idx, o3_t1_idx, o3_t2_idx, o3_t3_idx, comm_idx USE OMSAO_parameters_module, ONLY: maxchlen, max_...
{"hexsha": "71a8fbb282933e5747d30ec37933793e26fbc7af", "size": 24839, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/read_reference_spectra.f90", "max_stars_repo_name": "ggonzalezabad/OMI_SAO_Shared_VOCs", "max_stars_repo_head_hexsha": "e6b894243d004dc45564dd23feef759d2e4fc3ec", "max_stars_repo_licenses":...
\begin{ManPage}{\label{man-condor-submit}\Condor{submit}}{1} {Queue jobs for execution under HTCondor} \index{HTCondor commands!condor\_submit} \index{condor\_submit command} \Synopsis \SynProg{\Condor{submit}} \oOpt{-verbose} \oOpt{-unused} \oOptArg{-name}{schedd\_name} \oOptArg{-remote}{schedd\_name} \oOptArg{-addr}...
{"hexsha": "668d6875bb2bc680452e24478c59fe8edf075fd9", "size": 17994, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/man-pages/condor_submit.tex", "max_stars_repo_name": "neurodebian/htcondor", "max_stars_repo_head_hexsha": "113a5c9921a4fce8a21e3ab96b2c1ba47441bf39", "max_stars_repo_licenses": ["Apache-2.0"],...
(***********************************************************************) (** * Connecting nominal and LN semantics *) (***********************************************************************) (** Our final goal is to show that the abstract nominal machine implements the same semantics as the LN substitution-base...
{"author": "plclub", "repo": "metalib", "sha": "4ea92d82286cf66e54b4119b2bb2b039827204ab", "save_path": "github-repos/coq/plclub-metalib", "path": "github-repos/coq/plclub-metalib/metalib-4ea92d82286cf66e54b4119b2bb2b039827204ab/Stlc/Connect.v"}
# -*- coding: utf-8 -*- import torch from torch import optim import numpy as np import logging import os import json from convlab2.policy.policy import Policy from convlab2.policy.rlmodule import MultiDiscretePolicy, Value from convlab2.util.train_util import init_logging_handler from convlab2.policy.vector.vector_mult...
{"hexsha": "76fa1619c9ab0efb3e08562520887a047274c2d6", "size": 12592, "ext": "py", "lang": "Python", "max_stars_repo_path": "convlab2/policy/gdpl/gdpl.py", "max_stars_repo_name": "sherlock1987/ConvLab-2", "max_stars_repo_head_hexsha": "9547cb09bfd7e297e2c609637c9e38f6c94fdbfb", "max_stars_repo_licenses": ["Apache-2.0"]...
import numpy as np from sklearn import metrics as sk_metrics def compute_moreful_scores(model, dataset, history_name, check_nan = False): prediction = (np.asarray(model.predict(dataset['test_img'])))[:,:,:,1].round().flatten() target = dataset['test_label'][:,:,:,1].flatten() if check_nan: if np.isnan(np.sum(pr...
{"hexsha": "8816e339740ea9d0b18fb7f54a62b0822a2e871b", "size": 1334, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "lottopotato/railroad_surface_defect_segmentation", "max_stars_repo_head_hexsha": "3c09192bb81825787e50184e416f93bdff7626ad", "max_stars_repo_licenses": ["Apache-...
import sys from mpmath import * from mpmath.calculus.quadrature import GaussLegendre dps = 300 mp.dps = dps prec = int(dps * 3.33333) mp.pretty = False print(""" inline std::vector<std::pair<double,double> > gauss_legendre_nodes(int num_nodes) { """) #Note: mpmath gives wrong results for degree==1! for degree in [...
{"hexsha": "0d66199ca703512017d2f13f09974d24dafa702c", "size": 847, "ext": "py", "lang": "Python", "max_stars_repo_path": "script/gauss_legendre.py", "max_stars_repo_name": "SpM-lab/irbasis", "max_stars_repo_head_hexsha": "5beb5cbe3c0ba0fb42c32e262f04d1f3359d6045", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from __future__ import absolute_import, division, print_function import collections import warnings import networkx from torch.autograd import Variable from pyro.distributions.util import scale_tensor from pyro.util import is_nan, is_inf def _warn_if_nan(name, value): if isinstance(value, Variable): va...
{"hexsha": "2571936efce9589c5fcb58d94f41d2bcf900cfe4", "size": 8417, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyro/poutine/trace.py", "max_stars_repo_name": "cnheider/pyro", "max_stars_repo_head_hexsha": "60bcab73ada30c2b3f05d525690c9664ff6fc22e", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
//============================================================================== // Copyright 2003 - 2011 LASMEA UMR 6602 CNRS/Univ. Clermont II // Copyright 2009 - 2011 LRI UMR 8623 CNRS/Univ Paris Sud XI // // Distributed under the Boost Software License, Version 1.0. // Se...
{"hexsha": "c4a024eacddf9927969a41d98108e6c5ff7f1cbf", "size": 1638, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "modules/boost/simd/bitwise/include/boost/simd/toolbox/bitwise/functions/simd/common/bitwise_notor.hpp", "max_stars_repo_name": "timblechmann/nt2", "max_stars_repo_head_hexsha": "6c71f7063ca4e5975c9c...
import os import sys import numpy as np import healpy as hp if len(sys.argv) == 3: mcstart = int(sys.argv[1]) mcstop = int(sys.argv[2]) else: mcstart = 800 mcstop = 900 mapdir_in = "/global/cscratch1/sd/keskital/npipe_maps/npipe6v20" mapdir_out = "fixmaps" fn_mask = "/global/cscratch1/sd/keskital/hf...
{"hexsha": "a5a47d4c60fe5e6f131ad8c154e69649ec8267d2", "size": 3311, "ext": "py", "lang": "Python", "max_stars_repo_path": "pipelines/make_fixmaps.py", "max_stars_repo_name": "planck-npipe/toast-npipe", "max_stars_repo_head_hexsha": "ca3e92ea3a81a6146e246ec1d0c5bdcaea3b49f2", "max_stars_repo_licenses": ["BSD-2-Clause"]...
import pytest import toolz import datetime import numpy as np import pandas as pd from pandahouse.http import execute from pandahouse.core import to_clickhouse, read_clickhouse from pandas.testing import assert_frame_equal @pytest.fixture(scope="module") def df(): df = pd.DataFrame(np.random.randint(0, 100, si...
{"hexsha": "21186cc5ed281b06b85e367a32a49c1453af6b6d", "size": 5415, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandahouse/tests/test_core.py", "max_stars_repo_name": "Intelecy/pandahouse", "max_stars_repo_head_hexsha": "62c495a87c5880b7bdbfa3ab4d09d4f507ab7ad0", "max_stars_repo_licenses": ["BSD-3-Clause"],...
# AUTOGENERATED! DO NOT EDIT! File to edit: 03_downsampler.ipynb (unless otherwise specified). __all__ = ['Downsampler', 'get_kernel'] # Cell import torch import torch.nn as nn import numpy as np # Cell class Downsampler(nn.Module): ''' http://www.realitypixels.com/turk/computergraphics/ResamplingFilters...
{"hexsha": "0a19dd93c777784fc123978aa8f8284768e7f1fb", "size": 4504, "ext": "py", "lang": "Python", "max_stars_repo_path": "inpaint_melanoma/downsampler.py", "max_stars_repo_name": "octaviomtz/inpaint_melanoma", "max_stars_repo_head_hexsha": "19cf85a0d51f04ad3e1e3ef68ddf1cc5e27a0b84", "max_stars_repo_licenses": ["Apach...
#!/usr/bin/env python3 """ uvotexpmap2.py: Script to create exposure maps, using the updated attitude file. """ import os import subprocess from argparse import ArgumentParser from typing import Optional, Sequence import numpy as np from astropy.io import fits from dresscode.utils import load_config try: impor...
{"hexsha": "2088ebef2e3c829cffe2694b21cde9998200d5c4", "size": 4996, "ext": "py", "lang": "Python", "max_stars_repo_path": "dresscode/uvotexpmap.py", "max_stars_repo_name": "spacetelescope/DRESSCode", "max_stars_repo_head_hexsha": "29e432363072560335583b2819cf8106d41f5b9a", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import os import tempfile from typing import Callable, Tuple import numpy as np import tensorflow as tf from absl.testing import absltest, parameterized from psutil import virtual_memory from test_efficientnet_v2.test_model import TEST_PARAMS from test_efficientnet_v2.utils import get_inference_function # Some conve...
{"hexsha": "aa3761692e5493d4f2d2dc8ffa037965e858a710", "size": 3460, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_efficientnet_v2/test_tflite_conversion.py", "max_stars_repo_name": "sebastian-sz/efficientnet-v2-keras", "max_stars_repo_head_hexsha": "b1d76b90a2a066ac5608aacb271af8ba67a09bca", "max_stars_r...
import copy import json import logging import math import os import pickle import random import numpy as np import nni import torch import torch.nn as nn import torch.optim as optim from scipy import stats from nni.nas.pytorch.utils import AverageMeterGroup from torch.utils.tensorboard import SummaryWriter from confi...
{"hexsha": "c3578d415fd2225dc1f14cbf057e232bfd63c233", "size": 3649, "ext": "py", "lang": "Python", "max_stars_repo_path": "tricks/nb101/train_split.py", "max_stars_repo_name": "matluster/anonymous-2102", "max_stars_repo_head_hexsha": "3825f0077cdbebc7c3b34a68e43a3affa22a3e60", "max_stars_repo_licenses": ["Apache-2.0"]...
# -------------- import pandas as pd from sklearn.model_selection import train_test_split #path - Path of file # Code starts here df = pd.read_csv(path) X = df.drop(['customerID', 'Churn'], axis = 1) y = df.iloc[:, -1] X_train,X_test,y_train,y_test = train_test_split(X, y, test_size = 0.3, random_state=0) # ------...
{"hexsha": "9c9b0ee21cb038a170f39c42e817761d4cbe108d", "size": 2564, "ext": "py", "lang": "Python", "max_stars_repo_path": "Telecom-Churn-Prediction-with-Boosting-/code.py", "max_stars_repo_name": "siddhirane/ga-learner-dsmp-repo", "max_stars_repo_head_hexsha": "d78f28c886a7b34040527aa2e08a656d15f80dbe", "max_stars_rep...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved. import unittest from io import BytesIO from itertools import cycle from unittest import mock import numpy as np import numpy.testing as npt import torch from parameterized.parameterized import parameterized from pytorch_lig...
{"hexsha": "60bd82cde50f3ec69e6c9339dc1f559f1d875511", "size": 15582, "ext": "py", "lang": "Python", "max_stars_repo_path": "reagent/test/mab/test_mab.py", "max_stars_repo_name": "dmitryvinn/ReAgent", "max_stars_repo_head_hexsha": "f98825b9d021ec353a1f9087840a05fea259bf42", "max_stars_repo_licenses": ["BSD-3-Clause"], ...
import numpy as np import pandas as pd from scattertext.distancemeasures.EuclideanDistance import EuclideanDistance from scattertext.semioticsquare.SemioticSquare import SemioticSquareBase class SemioticSquareFromAxes(SemioticSquareBase): def __init__(self, term_doc_matrix, axes...
{"hexsha": "d406feb8b815be63630e64fa5d1af166fb98fec8", "size": 3086, "ext": "py", "lang": "Python", "max_stars_repo_path": "scattertext/semioticsquare/SemioticSquareFromAxes.py", "max_stars_repo_name": "shettyprithvi/scattertext", "max_stars_repo_head_hexsha": "a15613b6feef3ddc56c03aadb8e1e629d28a427d", "max_stars_repo...
import numpy as np from numpy.core.defchararray import _center_dispatcher from numpy.lib.twodim_base import triu_indices_from import pytest from sdia_python.lab2.ball_window import BallWindow, UnitBallWindow from sdia_python.lab2.box_window import BoxWindow, UnitBoxWindow def test_raise_assertion_error_when_center_i...
{"hexsha": "97b07794838a70a0a7f4027046899a57489169fe", "size": 6588, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/lab2/test_ball_window.py", "max_stars_repo_name": "aurelienO/sdia-python-1", "max_stars_repo_head_hexsha": "ac51505ca3656c9fab111f7088b69ba53bd4579d", "max_stars_repo_licenses": ["MIT"], "ma...
Set Implicit Arguments. Require Import Bedrock.Platform.Cito.ADT. Module Make (Import E : ADT). Require Import Bedrock.Platform.Cito.Semantics. Module Import SemanticsMake := Make E. Section TopSection. Require Import Bedrock.Platform.Cito.GoodModule. Require Import Bedrock.Platform.Cito.GLabelMap. ...
{"author": "mit-plv", "repo": "bedrock", "sha": "e3ff3c2cba9976ac4351caaabb4bf7278bb0dcbd", "save_path": "github-repos/coq/mit-plv-bedrock", "path": "github-repos/coq/mit-plv-bedrock/bedrock-e3ff3c2cba9976ac4351caaabb4bf7278bb0dcbd/Bedrock/Platform/Cito/LinkFacts.v"}
import struct import matplotlib.pyplot as plt import numpy as np import serial import sys # use ggplot style for more sophisticated visuals plt.style.use('ggplot') def live_plotter(x_vec, y_data, lines, identifier='', pause_time=0.001): if lines[0] == []: # this is the call to matplotlib that allows dyn...
{"hexsha": "99f8f353792c4540eee657059aa3d6213ccc8642", "size": 3061, "ext": "py", "lang": "Python", "max_stars_repo_path": "SensorTest/python/live-plotter.py", "max_stars_repo_name": "bstarynk/Recovid-Controller", "max_stars_repo_head_hexsha": "4f292d693d949e43e84540e58c7e4fcf5a384eda", "max_stars_repo_licenses": ["MIT...
% Define document class & import showyourwork \documentclass[twocolumn]{aastex631} % Begin! \begin{document} % Title \title{An open source scientific article} % Author list \author{@rodluger} % Abstract \begin{abstract} This is a sample open source scientific article automatically generated using the \texttt{sh...
{"hexsha": "13c647f28db6f26728682bbe4691c5946cea9cd4", "size": 3210, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/ms.tex", "max_stars_repo_name": "gusbeane/fdbk_eos-temp", "max_stars_repo_head_hexsha": "0a5565f65ded922ca2ed67e2801f6f83d2ca942d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
% \chapter{Reproduction of GCN} \section{Graph Convolution Layer and GCN model} A neutral network based on graph convolution consists of layers of graph convolution and non-linear activation function. To reproduct the work of Kipf et al.\cite{DBLP:journals/corr/KipfW16}, a neutral network is modeled by the forward fu...
{"hexsha": "1919069f6d4b0472ab8531dff99bd773524de1d1", "size": 2609, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/chapters/chapter-2-reproduction-of-gcn.tex", "max_stars_repo_name": "primus2019/BDTA-Course-Project", "max_stars_repo_head_hexsha": "e455bb554d22319b4dbbcc2430970b890a67faaa", "max_stars_repo_li...
from itertools import chain from math import ceil, floor from nose.plugins.skip import SkipTest from nose_extra_tools import assert_almost_equal, assert_equal, assert_less_equal, assert_is, assert_raises #@UnresolvedImport import shutil from sympy import Abs import tempfile from beam_integrals import a, mu_m fr...
{"hexsha": "c7631add7d90f96fa62e355300779dd986c74180", "size": 8124, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/integrals/test_integration.py", "max_stars_repo_name": "petarmaric/beam_integrals", "max_stars_repo_head_hexsha": "211d55f365da0475d96d173ddc040096965eeeec", "max_stars_repo_licenses": ["BSD...
""" main_model.py: We define the class 'model_writer' for our main ILP model, which essentially is a collection of the main Pyomo model object and functions to create additional Constraint objects within the main model object if needed during the solution process. """ from pyomo.environ import * class model_writer(): ...
{"hexsha": "879ebed889ff6efe06981f509ad6d4e4f0548934", "size": 4535, "ext": "py", "lang": "Python", "max_stars_repo_path": "bayene/ilp_model/cussens/main_model.py", "max_stars_repo_name": "bwseoh/Bayene", "max_stars_repo_head_hexsha": "96763df02736ee2798d66d84cf99c217cd05ebbc", "max_stars_repo_licenses": ["BSD-3-Clause...
#!/usr/bin/env python3 # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. import megengine.data.transform as T import numpy as np import pytest from basecls.data.rand_erase import RandomErasing @pytest.mark.parametrize("prob", [0.25]) @pytest.mark.parametrize("ratio", [0.4, (0.4, 1.5)]) @pytest.mark.parametr...
{"hexsha": "c359c79f462b3a5332646ece9f62cf6b3a01709e", "size": 1181, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/unit/data/test_rand_erase.py", "max_stars_repo_name": "megvii-research/basecls", "max_stars_repo_head_hexsha": "6b395a0a888370b4523764afb78a5a7634a3f6cd", "max_stars_repo_licenses": ["Apache-...
## types for diffusionmap calculation struct Diffusionmap data::Matrix kernel::AbstractKernel laplace_type::AbstractLaplacian threshold::Int64 end Diffusionmap(data; kernel::AbstractKernel=InverseDistanceKernel(), laplace_type::AbstractLaplacian=RowNormalizedLaplacian(), threshold::Int64=size(data,1...
{"hexsha": "b53f3cff458d93472cbe47aa61226586342fb9af", "size": 823, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/diffusionTypes.jl", "max_stars_repo_name": "bastikusch/DiffusionMap.jl", "max_stars_repo_head_hexsha": "32935471b97d159dde3ec959ae5e098e6982948f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import lasagne import numpy as np from theano.tensor.signal.downsample import max_pool_2d WIDTH_INDEX = 3 HEIGHT_INDEX = 2 LAYER_INDEX = 1 class SpatialPoolingLayer(lasagne.layers.Layer): # I assume that all bins has square shape for simplicity # Maybe later I change this behaviour def __init__(self, inc...
{"hexsha": "131e6e55cc52bafa2c0e8247c95b2932a3468b0a", "size": 1047, "ext": "py", "lang": "Python", "max_stars_repo_path": "layers.py", "max_stars_repo_name": "dimmddr/roadSignsNN", "max_stars_repo_head_hexsha": "b45669b3967714a73c79f39e9c5c49b20c0234f4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
import numpy as np from keras.models import Sequential from keras.layers import Dense, Dropout from keras.layers import Embedding from keras.layers import LSTM from keras.preprocessing import sequence max_features = 1024 len_train = np.random.randint(20, size=(1000, 1)) x_train = np.array([np.random.randint(10, size=...
{"hexsha": "5bc2cb025a4c2c64a167ec34c13c051031cbb60e", "size": 1213, "ext": "py", "lang": "Python", "max_stars_repo_path": "turorials/KerasDoc/projects/01_01_04_LSTM/01_01_04_main.py", "max_stars_repo_name": "Ubpa/LearnTF", "max_stars_repo_head_hexsha": "2c9f5d790a9911a860da1e0db4c7bb56a9eee5cb", "max_stars_repo_licens...
import cv2 import numpy as np import face_recognition as fr import serial, time import os,fnmatch from datetime import date from gpiozero import LED from numpy import savetxt from numpy import loadtxt from datetime import datetime class SaGe: # 0 : null, 1 : ard, 2 : rPI def __init__(self, mode=0, port = "COM...
{"hexsha": "d3cf8999f57f3c82bbc70c3be8ae13835272a772", "size": 4153, "ext": "py", "lang": "Python", "max_stars_repo_path": "sage.py", "max_stars_repo_name": "MachLucid/SaGe", "max_stars_repo_head_hexsha": "25062988e0f19c79c40dc1009734202de6b646b0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_stars_re...
import numpy as np from numpy import random import math from math import sqrt, log, exp from matplotlib import pyplot as plt from scipy import spatial from .utils import random_unit_vector, set_random_cells, set_cell_sheet, generate_positions_array, \ random_forces, generate_axes class Monolayer: """Monolayer...
{"hexsha": "597b816622ccbcefe585d37c5b82f30f195087ba", "size": 20403, "ext": "py", "lang": "Python", "max_stars_repo_path": "OS_model/monolayer.py", "max_stars_repo_name": "codiewood/BSP_Project", "max_stars_repo_head_hexsha": "56eb3302c6940b89aca130412502fb9656fda0b2", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
@marginalrule Transition(:out_in) (m_out::Categorical, m_in::Categorical, q_a::MatrixDirichlet) = begin B = Diagonal(probvec(m_out)) * exp.(mean(log, q_a)) * Diagonal(probvec(m_in)) return Contingency(B ./ sum(B)) end
{"hexsha": "bcef6eacf38a4602588a5f22371e9be8b71178fd", "size": 226, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/rules/transition/marginals.jl", "max_stars_repo_name": "HoangMHNguyen/ReactiveMP.jl", "max_stars_repo_head_hexsha": "f3e848ab171e0786e3d8eb6a0843dbf6dacc7415", "max_stars_repo_licenses": ["MIT"]...
# -*- coding:utf-8 -*- import os import pickle import sys import time from collections import deque import numpy as np import torch import matplotlib.pyplot as plt import zlib current_path = os.path.dirname(os.path.realpath(__file__)) PROJECT_HOME = os.path.abspath(os.path.join(current_path, os.pardir, os.pardir)) if...
{"hexsha": "0f2b985c85473c68634f54c46ea01e42aebd3c87", "size": 14635, "ext": "py", "lang": "Python", "max_stars_repo_path": "temp/old/worker_fast_rl_rip_double_agents.py", "max_stars_repo_name": "linklab/link_rl", "max_stars_repo_head_hexsha": "e3d3196dcd49fd71b45941e07fc0d8a27d1d8c99", "max_stars_repo_licenses": ["MIT...
# -*- coding: utf-8 -*- """ Created on Wed Nov 25 12:14:03 2015 @author: ktritz """ from __future__ import print_function from builtins import str, range import inspect import types import numpy as np from collections import MutableMapping from .container import containerClassFactory class Shot(MutableMapping): # ...
{"hexsha": "73bfe0bcb965a6023ebfa6cd6c82c388a9d1ca1f", "size": 4623, "ext": "py", "lang": "Python", "max_stars_repo_path": "fdp/lib/shot.py", "max_stars_repo_name": "Fusion-Data-Platform/fdp", "max_stars_repo_head_hexsha": "d87a52207238f168ed69b9f96dc8f20f4481366d", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np import logging import sys import os import uuid import matplotlib.pyplot as plt from util import get_request, get_data_size import time class CDF(object): def __init__(self, proxyDict, urls): self.proxyDict = proxyDict self.urls = urls def run(self, numPoints): for url in self.urls: ...
{"hexsha": "d0621864f4c3cfb1dd60986c0e5f75eb888ae601", "size": 1840, "ext": "py", "lang": "Python", "max_stars_repo_path": "test-harness/cdf.py", "max_stars_repo_name": "jeguiguren/http-proxy", "max_stars_repo_head_hexsha": "760a29a02097128e1acd70552aba464cbcf39713", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
/*============================================================================== Copyright (c) 2017, 2018 Matt Calabrese 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) =============================================...
{"hexsha": "fe76c317962fcaa78cc1663efdde6c742b59488d", "size": 7154, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/argot/gen/concept_body/detail/node_kind.hpp", "max_stars_repo_name": "mattcalabrese/argot", "max_stars_repo_head_hexsha": "97349baaf27659c9dc4d67cf8963b2e871eaedae", "max_stars_repo_licenses...
""" Interpolation method based on Tables in NPSS. This was added to bridge the gap between some of the slower scipy implementations. """ from __future__ import division, print_function, absolute_import from six.moves import range import numpy as np from openmdao.components.structured_metamodel_util.grid_interp_base ...
{"hexsha": "f9eb327c853806480d32a3b5ab05d7379fd6e35b", "size": 35892, "ext": "py", "lang": "Python", "max_stars_repo_path": "openmdao/components/structured_metamodel_util/python_interp.py", "max_stars_repo_name": "toddrme2178/OpenMDAO", "max_stars_repo_head_hexsha": "379cc6216d13d380e11cb3a46f03960981de4660", "max_star...
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- # import common packages import sys import shutil import numpy as np # Fromt the Qiskit base package from qiskit import Aer from qiskit import QuantumRegister, QuantumCircuit # lib from Qiskit Aqua from qiskit.aqua import Operator, QuantumInstance from qiskit.aqua.alg...
{"hexsha": "6b5cc6a3e92e5947f5887a9750b5b3c1636e4138", "size": 9367, "ext": "py", "lang": "Python", "max_stars_repo_path": "ground_state_energy.py", "max_stars_repo_name": "MartenSkogh/QuantCompQuantChem", "max_stars_repo_head_hexsha": "9b6e3393c43630b5a9ddd4b466cca9213099d3f7", "max_stars_repo_licenses": ["MIT"], "max...
# -*- coding: utf-8 -*- #import os import pkg_resources import numpy as np import torch import warnings import time # define ANN architecture class Net(torch.nn.Module): def __init__(self, NUM_LAYER, NUM_UNIT): super(Net, self).__init__() self.input_layer = torch.nn.Sequential( torch.n...
{"hexsha": "804ee6ae82cee88a0a948295d694edf9fafa824c", "size": 3528, "ext": "py", "lang": "Python", "max_stars_repo_path": "micsann/main.py", "max_stars_repo_name": "yutaka-shoji/micsann", "max_stars_repo_head_hexsha": "1fb832e16d3667588ed23e90c2dceed2dc6806f0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#include <boost/log/trivial.hpp> #include <boost/assert.hpp> #include "main.h" using namespace std; using namespace boost::program_options; extern int h264_demo(const variables_map& vm); const char* name_usage = "please specify codec name: h264 or opus"; const char* input_usage = "please specify input file"; E...
{"hexsha": "80cc67e90956c5e7cbd3d09f127351bebaa471eb", "size": 2176, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "video/main.cpp", "max_stars_repo_name": "walterfan/webrtc_snippets", "max_stars_repo_head_hexsha": "6964560a91ad3338fe8c50a9a250d0a0978eb42a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
!========================================================================== ! BTBMEPNLIB2.f90 ! ! second set of routines for handling pn, ppn, and pnn ! intended specifically for parallel MPI applications ! when Lanczos vectors are fragmented ! ! initialized July 2014 by CWJ @ SDSU ! ! Basic idea: between fragments, id...
{"hexsha": "d1a94a983b68ff076e21337195893bc64243c4b1", "size": 2034, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/btbmepnlib2.f90", "max_stars_repo_name": "cwjsdsu/BigstickPublick", "max_stars_repo_head_hexsha": "b195fea5bd35438c9dd17858ce9d0a9726cda7ff", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
{"hexsha": "208c8be7b5ece1763a14f44112c67aff1f3c01aa", "size": 62892, "ext": "cc", "lang": "C++", "max_stars_repo_path": "ggeo/GMesh.cc", "max_stars_repo_name": "hanswenzel/opticks", "max_stars_repo_head_hexsha": "b75b5929b6cf36a5eedeffb3031af2920f75f9f0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1...
import chainer import chainer.functions as F import math import numpy as np from chainer import Chain class PositionalEncoding(Chain): """ Positional encoding, based on sin and cos functions as proposed in section 3.5 of the paper "Attention is all you need" """ def __init__(self, size, ...
{"hexsha": "dd89edc0fd85676272a72af5736a72dc78d121a4", "size": 1323, "ext": "py", "lang": "Python", "max_stars_repo_path": "transformer/transformer/positional_encoding.py", "max_stars_repo_name": "chainer/models", "max_stars_repo_head_hexsha": "33fd51dfef2ae50fd615bfa28a3d7e62e0b56c22", "max_stars_repo_licenses": ["MIT...
\input ../6001mac.tex \begin{document} \psetheader{Sample Programming Assignment}{The Game of Twenty-one} Louis Reasoner took a course on game theory and became interested in the card game Twenty-One (also called Blackjack). Louis was also treasurer of his living group. By the end of the semester, he had managed ...
{"hexsha": "6ecdffe41502830d03f73a5c54ace274db826be2", "size": 15092, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "problem_sets/ps2tw1/ps2tw1.tex", "max_stars_repo_name": "kruschk/sicp", "max_stars_repo_head_hexsha": "016b71cd14fc5630003852de18691268cb4c66b1", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...