text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# -*- coding: utf-8 -*- """ Created on Sat Aug 25 16:02:21 2018 @author: hecc """ import numpy as np from itertools import combinations, permutations def get_distance_matrix(pos): n = np.shape(pos)[0] d = np.zeros((n, n)) for ii in range(n): for jj in range(ii + 1, n): d[ii, jj] = np....
{"hexsha": "6a47d5156a40b4de6d411aadbf840fd14e3ee74c", "size": 2950, "ext": "py", "lang": "Python", "max_stars_repo_path": "sagar/molecule/symmetry.py", "max_stars_repo_name": "unkcpz/sagar", "max_stars_repo_head_hexsha": "097a9e77200d79e40c45c2741c9c1e61a1013b22", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
""" .. module:: instrument :platform: Unix :synopsis: functions describing behaviour of instrument spectra. .. moduleauthor: Ben Thorne <ben.thorne@physics.ox.ac.uk> """ import numpy as np from .foreground import fg_res_sys, dust_cl, synch_cl def N_ell(ell, beam, sens): """Gaussian white-noise spectrum for ...
{"hexsha": "5697ed0bb1b7a96c03acb7c887b01ab78928b304", "size": 4384, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyranha/instrument.py", "max_stars_repo_name": "bthorne93/pyranha", "max_stars_repo_head_hexsha": "3803b2e87129906c018e20876ba25c0e097d6c25", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import numpy as np import pytest from dnnv.nn import OperationGraph, operations from dnnv.nn.transformers.slicers import DropPrefix, Slicer @pytest.fixture def op_graph(): input_op = operations.Input(np.array([1, 5]), np.dtype(np.float32)) mul_op = operations.Mul(input_op, np.float32(1)) div_op = operati...
{"hexsha": "eee621b8bea122d16150087c883a0c7482c89e98", "size": 2345, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/unit_tests/test_nn/test_transformers/test_slicers.py", "max_stars_repo_name": "samysweb/dnnv", "max_stars_repo_head_hexsha": "58fb95b7300914d9da28eed86c39eca473b1aaef", "max_stars_repo_licen...
import numpy as np import conect import os import sys import operator from time import time """ Este programilla se encarga de analizar el accuracy, precision, recall y F1 Score sobre los resultados generados en el entrenamiento con corte 1 año previo a la BBDD actual. Consideramos el estado de un predicció...
{"hexsha": "2c51b714c803fb6b1ac7a2bf2a1bea152681e5a8", "size": 6083, "ext": "py", "lang": "Python", "max_stars_repo_path": "recomendador1v2_training/otrosEjecutables/analizador.py", "max_stars_repo_name": "alfonsoelmas/recomendadores", "max_stars_repo_head_hexsha": "b7bf79be99253a8ffe34c98e661a5e0e64cd0795", "max_stars...
#! /usr/bin/env python import cv2 import numpy as np import scipy.spatial as spatial import logging ## 3D Transform def bilinear_interpolate(img, coords): """ Interpolates over every image channel http://en.wikipedia.org/wiki/Bilinear_interpolation :param img: max 3 channel image :param coords: 2 x _m...
{"hexsha": "0d008f51f4c62166761bca36fb15829c69aba748", "size": 6220, "ext": "py", "lang": "Python", "max_stars_repo_path": "2DwithLandmarkFaceSwap/face_swap.py", "max_stars_repo_name": "ForrestPi/faceSwapProjects", "max_stars_repo_head_hexsha": "daf2649a2791a25aa541c4d6d3b7e1d6552be5d7", "max_stars_repo_licenses": ["MI...
''' Code from GroudSeg.py implementation found at the github repository: https://github.com/mitkina/EnvironmentPrediction For the implementation of Random Markov Field ground segmentation described in: G. Postica, A. Romanoni, and M. Matteucci. Robust moving objects detection in LiDAR data exploiting vis...
{"hexsha": "1b56fb3e9fb65b1f5a10009604ee98712a48aa19", "size": 3843, "ext": "py", "lang": "Python", "max_stars_repo_path": "CODES_data_generation/ground_segmentation.py", "max_stars_repo_name": "sisl/Double-Prong-Occupancy", "max_stars_repo_head_hexsha": "8698b1c732c240fccaac7971b06de241af000229", "max_stars_repo_licen...
module PSDMatrices import Base: \, /, size, inv, copy, copy!, ==, show, similar, Matrix using LinearAlgebra import LinearAlgebra: det, logabsdet, diag struct PSDMatrix{T,FactorType} <: AbstractMatrix{T} R::FactorType PSDMatrix(R::AbstractMatrix{T}) where {T} = new{T,typeof(R)}(R) end # Base overloads Matrix...
{"hexsha": "9c68c4056fe9bcec8647b2a2ebc51debde0bd2a6", "size": 2779, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PSDMatrices.jl", "max_stars_repo_name": "nathanaelbosch/PSDMats.jl", "max_stars_repo_head_hexsha": "d12423020f0f06fb0263f07430bace01a864063c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
PROGRAM FITHIST C REAL HIST(14,4,100),HIST1(100),XAX(101) CHARACTER*120 JUNK INTEGER*4 NFHIST(14) REAL*8 SCETSTS,SCETEND C OPEN(UNIT=89,FILE='FOR089.DAT',STATUS='OLD',READONLY) read (89,*) SCETSTS,SCETEND READ (89,*) NFHIST,NHISTST C 189 FORMAT(A) irxlim = 4 irxlim = 2 do irx = 1,irxlim do ifr = 1,14 ...
{"hexsha": "7697a0474783e56b009a2abffdbc656adad92e95", "size": 3164, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "WAVES_VMS_Fortran/PJK_Fortran/wind_dir/fithist_47.for", "max_stars_repo_name": "lynnbwilsoniii/Wind_Decom_Code", "max_stars_repo_head_hexsha": "ef596644fe0ed3df5ff3b462602e7550a04323e2", "max_st...
[STATEMENT] lemma cycle_root_end_empty_var: assumes "terminating_path_root_end r x e" and "x \<noteq> 0" shows "\<not> many_strongly_connected x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<not> many_strongly_connected x [PROOF STEP] using assms cycle_root_end_empty [PROOF STATE] proof (prove) using...
{"llama_tokens": 224, "file": "Relational_Paths_Rooted_Paths", "length": 2}
/- Copyright (c) 2022 Rémi Bottinelli. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Rémi Bottinelli -/ import category_theory.category.basic import category_theory.functor.basic import category_theory.groupoid import tactic.nth_rewrite import category_theory.path_cat...
{"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/category_theory/groupoid/free_groupoid.lean...
[STATEMENT] lemma imply_append: \<open>ps @ qs \<leadsto> r = ps \<leadsto> qs \<leadsto> r\<close> [PROOF STATE] proof (prove) goal (1 subgoal): 1. ps @ qs \<leadsto> r = ps \<leadsto> qs \<leadsto> r [PROOF STEP] by (induct ps) simp_all
{"llama_tokens": 108, "file": "Implicational_Logic_Implicational_Logic_Appendix", "length": 1}
#!/usr/bin/env python # plot the geometric factor K vs. the dipole separation of a dipole-dipole # configuration import crtomo.configManager as CRc import numpy as np # from crtomo.mpl_setup import * import crtomo.mpl plt, mpl = crtomo.mpl.setup() from reda.utils.geometric_factors import compute_K_analytical config = ...
{"hexsha": "edbaf1d8d3983c07ec0e33959b86c502e251b06b", "size": 1364, "ext": "py", "lang": "Python", "max_stars_repo_path": "doc/pyplots/plot_K_vs_dipol_sep.py", "max_stars_repo_name": "niklasj-h/crtomo_tools", "max_stars_repo_head_hexsha": "57a577ff2925c137fcc387ad49e3c9fe30025831", "max_stars_repo_licenses": ["MIT"], ...
import unittest import os import numpy as np import tensorflow as tf import nnutil as nn class Image_Rasterize(unittest.TestCase): def test_image_rasterize_1(self): tf.set_random_seed(42) with tf.Session() as sess: coord = tf.constant([[0.1, 0.1], [0.8, 0.1]], dtype=tf.float32) ...
{"hexsha": "4afc8543931de1355636b167bb003d0c7767b865", "size": 2691, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/image_rasterize.py", "max_stars_repo_name": "aroig/nnutil", "max_stars_repo_head_hexsha": "88df41ee89f592a28c1661ee8837dd8e8ca42cf3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
import torch import numpy as np def gd_step(f, x, alpha): y = f(x) y.backward() g = x.grad with torch.no_grad(): return x - alpha * g, y def nesterov_step(f, x, alpha, beta): val = f(x) val.backward() g = x.grad with torch.no_grad(): x1 = x - alpha * g return ...
{"hexsha": "548d9f19cecb3cd801b1aa6f76ca6bdc6f4d6b17", "size": 4167, "ext": "py", "lang": "Python", "max_stars_repo_path": "logistic_regression.py", "max_stars_repo_name": "JaworWr/MLAcceleration", "max_stars_repo_head_hexsha": "ef0e0661389782b0caeec9137b3d4ddd84643d2c", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#' isSymmetric #' #' Test if a float matrix is symmetric. #' #' @param object #' A float vector/matrix. #' @param ... #' Ignored. #' #' @return #' A logical value. #' #' @examples #' library(float) #' #' s = flrunif(10, 3) #' isSymmetric(s) #' #' cp = crossprod(s) #' isSymmetric(s) #' #' @useDynLib float R_isSym...
{"hexsha": "60c214a6e302f178c8b770535afac7312834e2c1", "size": 584, "ext": "r", "lang": "R", "max_stars_repo_path": "R/isSymmetric.r", "max_stars_repo_name": "david-cortes/float", "max_stars_repo_head_hexsha": "df58b4040a352f006c299233c2c920e11b0dcae3", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 35...
# -*- coding: utf-8 -*- """ Deep Human Pose Estimation Project by Walid Benbihi MSc Individual Project Imperial College Created on Wed Jul 12 15:53:44 2017 @author: Walid Benbihi @mail : w.benbihi(at)gmail.com @github : https://github.com/wbenbihi/hourglasstensorlfow/ Abstract: This python code creates a ...
{"hexsha": "b98c85838b799d94002303314ba5fa4bdfe5861e", "size": 20190, "ext": "py", "lang": "Python", "max_stars_repo_path": "datagen.py", "max_stars_repo_name": "mohaEs/Train-Predict-Landmarks-by-MCAM", "max_stars_repo_head_hexsha": "e06179fc91b33a7bc73e44df47a4cf53f36b0a2f", "max_stars_repo_licenses": ["MIT"], "max_st...
import random import pandas as pd import numpy as np from fuzzywuzzy.process import extractOne from sklearn.linear_model import LogisticRegression from sklearn.multiclass import OneVsRestClassifier from sklearn.metrics import confusion_matrix,classification_report from sklearn.feature_extraction.text import CountVec...
{"hexsha": "9fceae1eb8ff74278222645684b8729acbaa389d", "size": 8449, "ext": "py", "lang": "Python", "max_stars_repo_path": "tokens2labels/NLPAlgorithms.py", "max_stars_repo_name": "mayaepps/Exercise-Logs", "max_stars_repo_head_hexsha": "59e37d351b97c3e34fe677e001e70abe16bb5133", "max_stars_repo_licenses": ["MIT"], "max...
""" Data access functions --------------------- """ from __future__ import absolute_import from os.path import join as pjoin, basename, dirname import subprocess import tempfile import logging import numpy as np import h5py import rasterio from rasterio.crs import CRS from rasterio.warp import reproject from rasterio...
{"hexsha": "1c2e869b0603b84c2ae7af7ba218f65b9f92ec56", "size": 17754, "ext": "py", "lang": "Python", "max_stars_repo_path": "wagl/data.py", "max_stars_repo_name": "ASVincent/wagl", "max_stars_repo_head_hexsha": "cf3a72e53e53f3a7b2f2b5308068069b1b714f2a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": nul...
#coding=utf-8 """ """ import sys import math import numpy as np import numpy.linalg as la import file import collections def clamping_acos(cos): """ Calculate arccos with its argument clamped to [-1, 1] """ if cos > 1: return 0 if cos < -1: return math.pi/2 return math.acos(co...
{"hexsha": "74145d1673940b9e9dc23420a7a28f47b57183a2", "size": 8436, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/core/bonds.py", "max_stars_repo_name": "sciapp/pyMolDyn", "max_stars_repo_head_hexsha": "fba6ea91cb185f916b930cd25b4b1d28a22fb4c5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 11, "...
{"mathlib_filename": "Mathlib.Topology.Instances.RealVectorSpace", "llama_tokens": 0}
from .match_base import Matcher import numpy as np from .tester import Tester from gensim.models import Word2Vec class Word2Vec_Matcher(Matcher, Tester): """ Create a classifier based on the word2ved natural language model. In order to make this work we treat every incoming column as a corpus. The columns are...
{"hexsha": "6c8a504cf2afc249aceed7c9e21dd29f70232619", "size": 4102, "ext": "py", "lang": "Python", "max_stars_repo_path": "schema_matching/column_classifiers/match_word2vec.py", "max_stars_repo_name": "JordyBottelier/arpsas", "max_stars_repo_head_hexsha": "1d10f18d082b71ad2931852b8d88ad963add8fbe", "max_stars_repo_lic...
"""Test tile classificaiton speed. Use tensorflow to divide tiles, construct graph, and run inference. Served as the onboard scripts to run on Jetson. """ from __future__ import absolute_import, division, print_function import argparse import glob import numpy as np import time import os import tensorflow as tf from...
{"hexsha": "a5496aee376d4f338339077a9a0158e59ee0aa66", "size": 6663, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/tile_inference_speed/test_classification_speed.py", "max_stars_repo_name": "cmusatyalab/dronesearch", "max_stars_repo_head_hexsha": "9849637555185efa0a484f49bef43ad734964e8a", "max_sta...
import sys import typing import numba as nb import numpy as np @nb.njit( (nb.i8, ), cache=True, ) def fw_build(n: int) -> np.ndarray: return np.full(n + 1, 0, np.int64) @nb.njit( (nb.i8[:], ), cache=True, ) def fw_build_from_array( a: np.ndarray, ) -> np.ndarray: fw = a.copy() ...
{"hexsha": "7fd30ea6b7403d4d78c5ac573e9d4e004fc1049a", "size": 1642, "ext": "py", "lang": "Python", "max_stars_repo_path": "jp.atcoder/abc185/abc185_f/25707777.py", "max_stars_repo_name": "kagemeka/atcoder-submissions", "max_stars_repo_head_hexsha": "91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e", "max_stars_repo_licenses":...
# -------------------------------------------------------- # Ke Yan, # Imaging Biomarkers and Computer-Aided Diagnosis Laboratory (CADLab) # National Institutes of Health Clinical Center, # Apr 2019. # This file contains some default configuration values, # which will be overwritten by values in config.yml and de...
{"hexsha": "84d91e59f9e808b22b6db95fd45e74204cb35af1", "size": 2703, "ext": "py", "lang": "Python", "max_stars_repo_path": "config.py", "max_stars_repo_name": "haehn/dicompute", "max_stars_repo_head_hexsha": "ee4364aaa1258a370bd62bbaf6e577936bf463b3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
import argparse import os import numpy as np import scanpy as sc from scipy import sparse import trvae if not os.getcwd().endswith("tests"): os.chdir("./tests") DATASETS = { "CelebA": {"name": 'celeba', "gender": "Male", 'attribute': "Smiling", "width": 64, 'height': 64, "n_channels": 3}, ...
{"hexsha": "fd308e21b50381d5ad12ddd55fb03b57fe19ec16", "size": 6248, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_facenet.py", "max_stars_repo_name": "gokceneraslan/trVAE", "max_stars_repo_head_hexsha": "596127b02f4a86ed6a91d5a3f666d6b5d97aff0c", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from cartographer.filterers import KernelDensityFilterer from sklearn.datasets.samples_generator import make_blobs from sklearn.utils.testing import assert_true, assert_raises import numpy as np def test_kde_one_dimension(): X, true_labels = make_blobs(n_samples=1000, n_features=1) kde_filterer = KernelDensi...
{"hexsha": "8a03c9fdf7b01109b56530ad11a3beb6d493a777", "size": 738, "ext": "py", "lang": "Python", "max_stars_repo_path": "cartographer/tests/test_filterers.py", "max_stars_repo_name": "pablodecm/cartographer", "max_stars_repo_head_hexsha": "50c56af9962cc896697ba8f88885d9da7eb50148", "max_stars_repo_licenses": ["MIT"],...
(* * Copyright 2019, NTU * * This software may be distributed and modified according to the terms of * the BSD 2-Clause license. Note that NO WARRANTY is provided. * See "LICENSE_BSD2.txt" for details. * * Author: Albert Rizaldi, NTU Singapore *) theory Signed_Mult_Typed imports VHDL_Hoare_Typed Bits_Int_Au...
{"author": "rizaldialbert", "repo": "vhdl-semantics", "sha": "352f89c9ccdfe830c054757dfd86caeadbd67159", "save_path": "github-repos/isabelle/rizaldialbert-vhdl-semantics", "path": "github-repos/isabelle/rizaldialbert-vhdl-semantics/vhdl-semantics-352f89c9ccdfe830c054757dfd86caeadbd67159/Signed_Mult_Typed.thy"}
import numpy as np file = np.loadtxt("num.csv",delimiter= ',') print(file) file = np.loadtxt("num.csv",delimiter= ',', skiprows=1) print(file) file = np.loadtxt("num.csv",delimiter= ',', usecols=[2,4]) print(file) file = np.loadtxt("num.csv",delimiter= ',', usecols=[2,4], dtype=str) print(file)
{"hexsha": "81f0fce1fc24b1c6e6aa2bb5c4c3943924a92c17", "size": 298, "ext": "py", "lang": "Python", "max_stars_repo_path": "Slides/10_numpy_loadcsv.py", "max_stars_repo_name": "sobil-dalal/Database-Analytical-Programming", "max_stars_repo_head_hexsha": "b9231e4fec11fd59955935639f308ca0417e6caa", "max_stars_repo_licenses...
% ========================================================================================== % ========================================================================================== % ========================================================================================== \documentclass[10pt]{beamer} \mode<prese...
{"hexsha": "c856f7daf4f1c2f243772e01676dde8fbb0a38ba", "size": 5447, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "slides.tex", "max_stars_repo_name": "terhorstj/beamer", "max_stars_repo_head_hexsha": "8b715d460bea505f82df731395452ddf743a8c26", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_st...
# -*- coding: utf-8 -*- """ Created on Sun Mar 8 10:36:17 2020 @author: created by Sowmya Myneni and updated by Dijiang Huang """ import numpy as np import pandas as pd from keras.utils import np_utils from sklearn.preprocessing import OneHotEncoder from sklearn.compose import ColumnTransformer def get_p...
{"hexsha": "ce5bd73bc2b392fd0b9453e60a9b7bd0be30f989", "size": 2385, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab_4/lab-cs-ml-00301/data_preprocessor.py", "max_stars_repo_name": "ChristopherBilg/cse-548-adv-comp-net-sec", "max_stars_repo_head_hexsha": "8d6256ace822e58cc662ef2fee476d1b1a3e60a4", "max_stars...
# Copyright (C) 2019 Project AGI # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
{"hexsha": "070d0152223c9070d46ba4152f076f7c8deea87e", "size": 33182, "ext": "py", "lang": "Python", "max_stars_repo_path": "aha/components/episodic_component.py", "max_stars_repo_name": "ProjectAGI/aha", "max_stars_repo_head_hexsha": "53a98ea42526dca56517dc97fffad874772f10f2", "max_stars_repo_licenses": ["Apache-2.0"]...
# -------------- import pandas as pd import os import numpy as np import warnings warnings.filterwarnings("ignore") # path_train : location of test file # Code starts here ##Loading the CSV data onto a Pandas dataframe df = pd.read_csv(path_train) ##Defining a function to check every row for a category m...
{"hexsha": "346cb63a597e4816f3ba5401150039387861e463", "size": 6845, "ext": "py", "lang": "Python", "max_stars_repo_path": "code.py", "max_stars_repo_name": "Vishal-Bhatia/domain-classification-text", "max_stars_repo_head_hexsha": "de016540c1c5a3eb94a8f9a88145f490dd8f2c10", "max_stars_repo_licenses": ["MIT"], "max_star...
try: import pickle as pickle except ImportError: import pickle from bisect import bisect_right from collections import defaultdict from copy import deepcopy from functools import partial from itertools import chain from operator import eq def identity(obj): """Returns directly the argument *obj*. "...
{"hexsha": "53a7bce0061dd6c27ef0f311089bf8e07727da23", "size": 26585, "ext": "py", "lang": "Python", "max_stars_repo_path": "env/Lib/site-packages/deap/tools/support.py", "max_stars_repo_name": "richooms/healthcare_automl", "max_stars_repo_head_hexsha": "73fc27ee8f57c717dc82a7841680ba64d6b4c34b", "max_stars_repo_licens...
"""Variational Auto Encoders as intrinsic rewards """ from abc import ABC, abstractmethod import copy import enum from typing import Callable, List, NamedTuple, Optional, Sequence, Tuple import numpy as np import torch from torch.distributions import Normal from torch.nn import functional as F from torch import Tenso...
{"hexsha": "7a15857efc7b2201f8a9c3d2d5b69627f7ad04cc", "size": 10805, "ext": "py", "lang": "Python", "max_stars_repo_path": "int_rew/vae.py", "max_stars_repo_name": "kngwyu/intrinsic-rewards", "max_stars_repo_head_hexsha": "c2a8f98c0fd9292dc90f8857fa5ddb763ba8b994", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "fbd06a5a78eab5a8c30df80f7130461b68f9643c", "size": 9036, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/data/experimental/benchmarks/map_and_batch_benchmark.py", "max_stars_repo_name": "aeverall/tensorflow", "max_stars_repo_head_hexsha": "7992bf97711919f56f80bff9e5510cead4ab2095", ...
C####################################################################### C NAME OF ROUTINE C GENTHIS C C PURPOSE C THIS IS THE STANDARD MAIN PROGRAM USED FOR TAE/VICAR PROGRAMS. C THIS MODULE CALLS SUBROUTINE MAIN44 TO ENTER INTO THE BODY OF THE C PROGRAM. C GENTHIS generates small exactly-de...
{"hexsha": "932aaf2edd8e0c5fb646b53e5ef54395c46b997a", "size": 3696, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "vos/p3/prog/genthis/genthis.f", "max_stars_repo_name": "NASA-AMMOS/VICAR", "max_stars_repo_head_hexsha": "4504c1f558855d9c6eaef89f4460217aa4909f8e", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import flashalgorithm as fc import numpy as np import pickle import pdb comp_list = ('water', 'methane', 'ethane', 'propane') phase_list = ('aqueous', 'vapor', 'lhc', 's1', 's2') P = 80 # bar T = 273.15 + 12 # Kelvin flash_full = fc.FlashController(components=comp_list...
{"hexsha": "40d21805678c1bbc73f1c812751e70c826875fca", "size": 3418, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_test.py", "max_stars_repo_name": "kdarnell/injection-sim-python", "max_stars_repo_head_hexsha": "fa018de562989a207590c2628443b878bd0ed753", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
from abc import ABC, abstractmethod import torch from torch_ac.format import default_preprocess_obss from torch_ac.utils import DictList, ParallelEnv import numpy as np from copy import deepcopy class MultiQAlgo(ABC): """The base class for RL algorithms.""" def __init__(self, envs, model, device=None, num_...
{"hexsha": "489ddcedd7591da587384f844c0655e8b834604a", "size": 16527, "ext": "py", "lang": "Python", "max_stars_repo_path": "torch_ac/algos/multiQ.py", "max_stars_repo_name": "mcavolowsky/torch-ac", "max_stars_repo_head_hexsha": "4c69d0260c0776554c8a4e5c9623b03181273504", "max_stars_repo_licenses": ["MIT"], "max_stars_...
This is originally a collaborative project with Isky on an implementation of the Hartree-Fock method, a way of approximating the wave function and thus energy of bonds in a quantum molecular system. However, despite a week of research, the complexity of the problem forces us to cease the plan, and instead resort to a m...
{"hexsha": "ba65e5d80240a5d5fda5e292e68dce96511f96bf", "size": 14145, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Orbital - Hydrogen-like.ipynb", "max_stars_repo_name": "dylux/Chemistry-Project", "max_stars_repo_head_hexsha": "76d714858909dc7e8c44074fc93108dcb193641f", "max_stars_repo_licenses":...
% +-======-+ % Copyright (c) 2003-2007 United States Government as represented by % the Admistrator of the National Aeronautics and Space Administration. % All Rights Reserved. % % THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, % REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDIS...
{"hexsha": "780ecd6acf154fe8528f305b5b67da1cfb4e30d1", "size": 2616, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "ESMF/src/addon/MAPL/GMAO_mpeu/doc/PackageOverview.tex", "max_stars_repo_name": "joeylamcy/gchp", "max_stars_repo_head_hexsha": "0e1676300fc91000ecb43539cabf1f342d718fb3", "max_stars_repo_licenses": ...
#!/usr/bin/env python # -*- coding: utf-8 -* """A generator of graphs written in Python and LaTeX. https://github.com/jariazavalverde/graphs """ import numpy as np # FORMATS def format_c(adjacency): """Returns a string representation of the given graph in C format.""" size = adjacency.shape[0] string = "int...
{"hexsha": "42fe14a4324a1bd734decb10e5721dbb699b9a1a", "size": 1837, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/formats.py", "max_stars_repo_name": "jariazavalverde/graph-families", "max_stars_repo_head_hexsha": "845b8bf6e1990964d0a8322f4a91e85bcb6da512", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
import numpy as np Fs = 32e3 Ts = 1.0 / Fs frequencies = (1 + np.arange(8)) * 1e3 carrier_index = 0 Fc = frequencies[carrier_index] Tc = 1.0 / Fc symbols = np.array([complex(x, y) for x in np.linspace(-1, 1, 8) for y in np.linspace(-1, 1, 8)]) / np.sqrt(2) Tsym = 1e-3 Nsym = in...
{"hexsha": "1391b76951c6e6b106509f081e810d670288ecd5", "size": 352, "ext": "py", "lang": "Python", "max_stars_repo_path": "config.py", "max_stars_repo_name": "RagnarDanneskjold/amodem", "max_stars_repo_head_hexsha": "5d2bcd5004035fcd34369927a243e611ce7e2700", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
export intmat2binmat """ function intmat2binmat(M;p=maximum(M)) Converts a general integer matrix {1,2,...,p}^{m x n} to a binary matrix of size (m*(p-1),n). Ones are converted to false vectors of length p-1. Two is converted to [true;false;...;false] and p is converted to [false;...;false;true]. Input: M - Int...
{"hexsha": "c97ab443db7d3ee477d57558d9c81dcfd38f00b6", "size": 1268, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/intmat2binmat.jl", "max_stars_repo_name": "lruthotto/StrainRecon.jl", "max_stars_repo_head_hexsha": "ba1c5392994e80bb0f7e6b94f90b404f25c40958", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import numpy as np def test_base_transform(image, mean): x = image.astype(np.float32) x -= mean x = x.astype(np.float32) return x class TestBaseTransform: def __init__(self, mean): self.mean = np.array(mean, dtype=np.float32) def __call__(self, image): return test_base_trans...
{"hexsha": "f050417d7688c5661a215038738a65529b13db18", "size": 1428, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/config.py", "max_stars_repo_name": "juanmed/FaceDetection-DSFD", "max_stars_repo_head_hexsha": "23650ca492444f9f052ca9b8db8b068a9be5bc68", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
""" Anne Urai, CSHL, 2020-05-17 """ import pandas as pd import numpy as np import matplotlib as mpl from matplotlib import pyplot as plt import seaborn as sns from patsy import dmatrices from datetime import datetime import statsmodels.api as sm # layout sns.set(style="ticks", context="paper") sns.despine(trim=True) ...
{"hexsha": "6265ffdf63640712ebd8d8386652937c8820323e", "size": 6850, "ext": "py", "lang": "Python", "max_stars_repo_path": "largescale_recordings.py", "max_stars_repo_name": "anne-urai/largescale_recordings", "max_stars_repo_head_hexsha": "987f803d211c19e6ff217f16785dad768467ba97", "max_stars_repo_licenses": ["CC-BY-4....
module Language.LSP.BrowseNamespace import Core.Context import Core.Core import Core.Env import Core.Metadata import Core.Name import Data.List import Idris.Doc.String import Idris.REPL.Opts import Idris.Resugar import Idris.Syntax import Language.LSP.Definition import Language.LSP.Message import Libraries.Data.NameMa...
{"hexsha": "2d9563dbcd54aaab809dcdbd51ad503487bff526", "size": 2783, "ext": "idr", "lang": "Idris", "max_stars_repo_path": "src/Language/LSP/BrowseNamespace.idr", "max_stars_repo_name": "Z-snails/idris2-lsp", "max_stars_repo_head_hexsha": "3a949818ef0180baabc5a88f3533c3154f49c3ce", "max_stars_repo_licenses": ["BSD-3-Cl...
""" """ import argparse import numpy as np import time from typing import List, Optional from . import cli from . import logging from . import nn from . import properties from . import utils from .verifiers.common import VerifierError, VerifierTranslatorError, SAT def main(args: argparse.Namespace, extra_args: Opti...
{"hexsha": "6511427db43af28d646ff090348985ad3ee31670", "size": 2650, "ext": "py", "lang": "Python", "max_stars_repo_path": "dnnv/__main__.py", "max_stars_repo_name": "nathzi1505/DNNV", "max_stars_repo_head_hexsha": "16c6e6ecb681ce66196f9274d4a43eede8686319", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 33, "m...
// Copyright (c) 2020 Andrey Semashev // // 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) #ifndef BOOST_ATOMIC_TEST_IPC_WAIT_TEST_HELPERS_HPP_INCLUDED_ #define BOOST_ATOMIC_TEST_IPC_WAIT_TEST_HELPERS_HPP_INCLU...
{"hexsha": "2970061e4ad4f4dc42fa0196749dbea47df21e1a", "size": 10398, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "libs/atomic/test/ipc_wait_test_helpers.hpp", "max_stars_repo_name": "anarthal/boost-unix-mirror", "max_stars_repo_head_hexsha": "8c34eb2fe471d6c3113c680c1fbef29e7a8063a0", "max_stars_repo_licenses"...
# Purpose: This script develops a list of suspect parcels to investigate and exclude, based on having # null values for key indicators. This usually arises for study region edge cases with poor # connectivity to network; implication is that these are not adequate representations of # reside...
{"hexsha": "f6de0543f78452d2cff3b6f7102cce09515a8ecf", "size": 3538, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/33_exclude_parcels.py", "max_stars_repo_name": "carlhiggs/urban_liveability_index", "max_stars_repo_head_hexsha": "61decb632e0b0db28c181fe62c548f2b338cc47c", "max_stars_repo_licenses": ["MIT"...
""" Quick script to filter all bulk data to just save job ids which we used in our skill data sample. """ from tqdm import tqdm import json import os from collections import defaultdict import numpy as np import pandas as pd import boto3 from skills_taxonomy_v2.getters.s3_data import load_s3_data, save_to_s3 from sk...
{"hexsha": "9abbfc33d60d38fd5c210a922e204852f11a9154", "size": 2784, "ext": "py", "lang": "Python", "max_stars_repo_path": "skills_taxonomy_v2/pipeline/tk_data_analysis/filter_bulk_data.py", "max_stars_repo_name": "nestauk/skills-taxonomy-v2", "max_stars_repo_head_hexsha": "ce0f9943a038c4539f04a9a58022fc7eb1909376", "m...
from typing import Any, Dict, Hashable, Optional, Sequence, Tuple, Union import dask.array as da import numpy as np import xarray as xr from dask.array import Array from numpy import ndarray from xarray import Dataset from ..typing import ArrayLike from ..utils import split_array_chunks from .utils import ( asser...
{"hexsha": "4018c1fe2f251f68258998886ee648655ebfcd8c", "size": 33923, "ext": "py", "lang": "Python", "max_stars_repo_path": "sgkit/stats/regenie.py", "max_stars_repo_name": "jerowe/sgkit", "max_stars_repo_head_hexsha": "ff5a0a01ec6ae41d262ece14cc06a0b8c73ca342", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
''' This module contains an implementation of the network repair methodology introduced in Campbell and Albert (2014), BMC Syst. Biol. The code should be straightforward to apply (see network_repair_tutorial.py). I will be happy to respond to questions and/or comments. Colin Campbell Contact: colin.campbel...
{"hexsha": "b2880d425c6230640eb3eed59a9ed9c6dc97077d", "size": 48276, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/network_repair_functions.py", "max_stars_repo_name": "AbrahmAB/booleannet", "max_stars_repo_head_hexsha": "a07124047d18a5b7265e050a234969ac58970c7a", "max_stars_repo_licenses": ["MIT"], "...
function (x, y, z, μ) begin (SymbolicUtils.Code.create_array)(Array, nothing, Val{2}(), Val{(3, 3)}(), (+)((+)(1, (*)((*)(-3//2, (^)((inv)((sqrt)((+)((^)(y, 2), (^)(z, 2), (^)((+)(x, μ), 2)))), 5), (+)((*)(-1//1, x), (*)(-1//1, μ)), (+)((*)(2, x), (*)(2, μ))), (*)((+)(1, (*)(-1, μ)))), (*)(-1//1, μ, (^)((in...
{"hexsha": "610bff27faf1a5edfd4f69960181988add0f6b66", "size": 3039, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "deprecated/GeneralAstrodynamics_v0.9/Propagators/CR3BP/PotentialEnergyHessian.jl", "max_stars_repo_name": "pbouffard/GeneralAstrodynamics.jl", "max_stars_repo_head_hexsha": "80f175a5b3c6dac2140e645...
import sys import json import gc import h5py import numpy as np from timeit import default_timer as timer import torch from torch.autograd import Variable import options import visdial.metrics as metrics from utils import utilities as utils from dataloader import VisDialDataset from torch.utils.data import DataLoader...
{"hexsha": "cf306db1fbe069041f7f73a671ae248e6073c5c2", "size": 6733, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval_utils/dialog_generate.py", "max_stars_repo_name": "Zach-Ziyi-Liu/Answerer-in-Questioner-s-Mind-Information-Theoretic-Approach-to-Goal-Oriented-Visual-Dialog", "max_stars_repo_head_hexsha": "2...
import numpy as np import torch import threading import os from torch.nn import functional as F import queue from continual_rl.policies.impala.torchbeast.monobeast import Monobeast, Buffers from continual_rl.utils.utils import Utils class ClearMonobeast(Monobeast): """ An implementation of Experience Replay f...
{"hexsha": "61a977f027eb3f410a91d4464b099ea0b122bd49", "size": 12336, "ext": "py", "lang": "Python", "max_stars_repo_path": "continual_rl/policies/clear/clear_monobeast.py", "max_stars_repo_name": "AGI-Labs/continual_rl", "max_stars_repo_head_hexsha": "bcf17d879e8a983340be233ff8f740c424d0f303", "max_stars_repo_licenses...
"""A Morse code keyer. A Morse "key" is a device with a button used to encode the carrier wave with a Morse signal. Morse operators use these to produce the familiar "dits" and "dahs" of Morse code. The Keyer class converts dots and dashes into an encoded carrier waveform and plays it audibly. """ import numpy as np i...
{"hexsha": "fc95127277adeae7949b3c6dc2309478721de238", "size": 3321, "ext": "py", "lang": "Python", "max_stars_repo_path": "enigma/keyer.py", "max_stars_repo_name": "jonmaddock/enigma", "max_stars_repo_head_hexsha": "e9e3ca95cc397bbdfb7b5f43c043dd52997f0d65", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
# -*- coding: utf-8 -*- """ Created on Thu Sep 18 19:27:57 2014 @author: joser """ import pygame, ode, random, Buttons from math import atan2, acos, asin, sin, cos import matplotlib.pyplot as plt from pygame.locals import * from numpy import * from Point import * from Buttons import * class gameSimulator( object ...
{"hexsha": "ac8c48ff26b52acfaee5ecfe8a47d80d1eb3b192", "size": 6837, "ext": "py", "lang": "Python", "max_stars_repo_path": "gameSimulator.py", "max_stars_repo_name": "jrcapriles/gameSimulator", "max_stars_repo_head_hexsha": "e4633d2a6ad7fbcc60cd77ed853c9e4e33290319", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import mpi4py import numpy as np import pytest import unittest from chainermn.communicators._communication_utility import chunked_bcast_obj # NOQA from chainermn.communicators._communication_utility import INT_MAX # NOQA from chainermn.communicators.naive_communicator import NaiveCommunicator class TestCommunicati...
{"hexsha": "51aea8fb96a8a990de397387debf0b72ebf5099a", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/chainermn_tests/communicator_tests/test_communication_utility.py", "max_stars_repo_name": "zaltoprofen/chainer", "max_stars_repo_head_hexsha": "3b03f9afc80fd67f65d5e0395ef199e9506b6ee1", "ma...
import numpy as np import pandas as pd from scipy.io import arff import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from tqdm import tqdm from collections import Counter, defaultdict class DimensionValueError(ValueError): pass class TypeError(ValueError): pass class IterErr...
{"hexsha": "13e945c355136825ef105a714665aaf4dbc8ad7f", "size": 3683, "ext": "py", "lang": "Python", "max_stars_repo_path": "Naive Bayes.py", "max_stars_repo_name": "K-ona/--------", "max_stars_repo_head_hexsha": "1bae093758c61e4863ca0b150195286e189af591", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1,...
# -*- coding: utf-8 -*- """NumPy UltraQuick Tutorial Automatically generated by Colaboratory. Original file is located at https://colab.research.google.com/github/google/eng-edu/blob/master/ml/cc/exercises/numpy_ultraquick_tutorial.ipynb """ #@title Copyright 2020 Google LLC. Double-click here for license inform...
{"hexsha": "09001cc0c74f0b427b1eb5206ce32b4e99eab5b0", "size": 6689, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf-ml-crashcourse/numpy_ultraquick_tutorial.py", "max_stars_repo_name": "blu3crab/DeepPlay2020", "max_stars_repo_head_hexsha": "9f62375f0d69d446764eb988ed66638f3fd57c5d", "max_stars_repo_licenses"...
\subsubsection{Usability} \input{usability.tex} \subsubsection{User Experience} \input{user-experience.tex}
{"hexsha": "544c2a5b2d7703845fe8f0ef046a7f96027a065b", "size": 107, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Design and Evaluation of User Interfaces- Reference/evaluation.tex", "max_stars_repo_name": "simwir/notes", "max_stars_repo_head_hexsha": "5079b3fc34610094ca00dea13c5128664609f113", "max_stars_repo_l...
from operator import index from pandas._config.config import options import Cleaner import textract as tx import pandas as pd import numpy import os import tf_idf user = os.getcwd() print(user) resume_dir = user+"/media/Resume/" job_desc_dir = user+"/media/JobDesc/" resume_names = os.listdir(resume_dir) job_descript...
{"hexsha": "1c9e43c62e32159c83bcf267bed08e2773aff582", "size": 2164, "ext": "py", "lang": "Python", "max_stars_repo_path": "Resume_Matcher/fileReader.py", "max_stars_repo_name": "r00tDada/Mini_Project_Semester_7", "max_stars_repo_head_hexsha": "fd84be13d91c9ffca8288c7787a0330a5aee7950", "max_stars_repo_licenses": ["MIT...
(* Standard library imports *) Require Import Coq.Strings.String. Require Import Coq.Strings.Ascii. Require Import Coq.Lists.List. Require Import Coq.Arith.Arith. Require Import Coq.Arith.EqNat. Require Import Coq.Arith.PeanoNat. Require Import Coq.Bool.Bool. Require Import Coq.omega.Omega. Require Import Coq.Program.E...
{"author": "ps-tuebingen", "repo": "decomposition-diversity", "sha": "28ab18c34f0a192c9b3d58caa709dee3e9129068", "save_path": "github-repos/coq/ps-tuebingen-decomposition-diversity", "path": "github-repos/coq/ps-tuebingen-decomposition-diversity/decomposition-diversity-28ab18c34f0a192c9b3d58caa709dee3e9129068/Formaliza...
# Simulating readout noise on the Rigetti Quantum Virtual Machine © Copyright 2018, Rigetti Computing. $$ \newcommand{ket}[1]{\left|{#1}\right\rangle} \newcommand{bra}[1]{\left\langle {#1}\right|} \newcommand{tr}[1]{\mathrm{Tr}\,\left[ {#1}\right]} \newcommand{expect}[1]{\left\langle {#1} \right \rangle} $$ ## Theore...
{"hexsha": "31c8b2fb968b03a65e249bdbd9eb6d0b8b289698", "size": 19758, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "examples/ReadoutNoise.ipynb", "max_stars_repo_name": "oliverdutton/pyquil", "max_stars_repo_head_hexsha": "027a3f6aecbd8206baf39189a0183ad0f85c262b", "max_stars_repo_licenses": ["Apa...
theory Co_Snapshot imports Snapshot Ordered_Resolution_Prover.Lazy_List_Chain begin section \<open>Extension to infinite traces\<close> text \<open>The computation locale assumes that there already exists a known final configuration $c'$ to the given initial $c$ and trace $t$. However, we can show that the ...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Chandy_Lampor...
#!/usr/bin/env python from __future__ import print_function import argparse import os import time import numpy as np import yaml import pickle from collections import OrderedDict # torch import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from tqdm import tqdm import shuti...
{"hexsha": "60dcb00f5f5bfc4a3d31840682957a07cf46810e", "size": 21631, "ext": "py", "lang": "Python", "max_stars_repo_path": "SL-GCN/main.py", "max_stars_repo_name": "SnorlaxSE/CVPR21Chal-SLR", "max_stars_repo_head_hexsha": "680f911131ca03559fb06d578f38d006f87aa478", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_co...
[STATEMENT] lemma (in weak_lower_semilattice) weak_meet_assoc: assumes L: "x \<in> carrier L" "y \<in> carrier L" "z \<in> carrier L" shows "(x \<sqinter> y) \<sqinter> z .= x \<sqinter> (y \<sqinter> z)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x \<sqinter> y \<sqinter> z .= x \<sqinter> (y \<sqinter> z...
{"llama_tokens": 1760, "file": null, "length": 19}
[STATEMENT] lemma wfT_e_eq: fixes ce::ce assumes "\<Theta> ; \<B> ; \<Gamma> \<turnstile>\<^sub>w\<^sub>f ce : b" and "atom z \<sharp> \<Gamma>" shows "\<Theta>; \<B>; \<Gamma> \<turnstile>\<^sub>w\<^sub>f \<lbrace> z : b | CE_val (V_var z) == ce \<rbrace>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Th...
{"llama_tokens": 4222, "file": "MiniSail_WellformedL", "length": 11}
import oneflow as flow import numpy as np import time import argparse import torch import string from models.rnn_model_pytorch import RNN_PYTORCH from models.rnn_model import RNN # shared hyperparameters n_hidden = 5000 all_letters = string.ascii_letters + " .,;'" n_letters = len(all_letters) n_categories = 25600 le...
{"hexsha": "16f16f773c569cccbbd912aac7068cdcf18bbf16", "size": 4009, "ext": "py", "lang": "Python", "max_stars_repo_path": "rnn/compare_oneflow_and_pytorch_rnn_speed.py", "max_stars_repo_name": "ClimBin/models", "max_stars_repo_head_hexsha": "10989b361732ee5b93f5595f672fd7d0c18e8f93", "max_stars_repo_licenses": ["Apach...
import numpy as np # Physical constants in cgs units c = 3e10 G = 7e-8 # Calculate period given semimajor axis and total mass def find_period(a, M, use_earth_units=False): if use_earth_units: return np.sqrt(a**3 / M) else: return np.sqrt(4 * np.pi**2 * a**3 / (G * M)) # Calculate total mass g...
{"hexsha": "af19ff7bc39ed2a66638b5e84518d2b9503e6e60", "size": 1015, "ext": "py", "lang": "Python", "max_stars_repo_path": "initial_scripts/kepler.py", "max_stars_repo_name": "bbrzycki/argparse-tutorial", "max_stars_repo_head_hexsha": "84e7dc28df2a64ca7d859bd331dc5471d3600351", "max_stars_repo_licenses": ["MIT"], "max_...
import math from scipy import stats import numpy as np listy=[1.58,1.57,1.54,1.51,1.51,1.51,1.5099,1.5,1.48,1.44,1.44,1.43,1.44,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.46,1.455,1.445,1.44,1.44,1.43,1.46,1.46,1.46,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.45,1.44,1.44,1.44,...
{"hexsha": "794141e9fea50d267c030e401fcf94d7135ebe0d", "size": 3004, "ext": "py", "lang": "Python", "max_stars_repo_path": "money.py", "max_stars_repo_name": "Dannyaffleck/stock", "max_stars_repo_head_hexsha": "9c6c62b798e4e3306a7bf4a185a0b4fca37cdd33", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null...
#include "soar.hpp" #include <Eigen/Dense> #include <fmt/format.h> #include <vector> using namespace Eigen; Soar::Soar(const Ref<const MatrixXd> &matA, const Ref<const MatrixXd> &matB) : ndim_(matA.rows()), matA_(matA), matB_(matB), u_(VectorXd::Random(ndim_)) {} MatrixXd Soar::compute(int n) { VectorXd...
{"hexsha": "d418f4ee71b27ba91ff4031efdb4f621e6ac9cb4", "size": 3286, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/soar.cc", "max_stars_repo_name": "pan3rock/QuadEigsSOAR", "max_stars_repo_head_hexsha": "6b4a2e939c8987773cd7990f665e9ebf57ecdbde", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
#include "image.h" #include "debug.h" #include <boost/static_assert.hpp> #include <png.h> using namespace std; BOOST_STATIC_ASSERT(sizeof(unsigned long) == 4); Image imageFromPng(const string &fname) { png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); CHECK(png_ptr); p...
{"hexsha": "9886bfb7aa9f9ef3d46e75224d14b0935a872d37", "size": 1695, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "image.cpp", "max_stars_repo_name": "zorbathut/d-net", "max_stars_repo_head_hexsha": "61f610ca71270c6a95cf57dc3acaeab8559a234b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1.0, "max_stars...
import base64 import datetime from io import BytesIO import pandas as pd import numpy as np import quandl import matplotlib.pyplot as plt from dateutil import tz from matplotlib import animation import mpl_toolkits.mplot3d.axes3d as p3 from pandas.plotting import register_matplotlib_converters from mpl_toolkits.mplot3d...
{"hexsha": "ca63116563b501252b64598a4175e0324ce7aa88", "size": 14472, "ext": "py", "lang": "Python", "max_stars_repo_path": "Flask/Flask_Template/flask_goldanalysis_template.py", "max_stars_repo_name": "YizheZhang-Ervin/EZDjango", "max_stars_repo_head_hexsha": "ae140d9743ab03e59fc1b385cbbfcd5a6941426d", "max_stars_repo...
import argparse import os import numpy as np import torch as t from torch.optim import Adam from utils.batch_loader import BatchLoader from utils.parameters import Parameters from model.rvae_dilated import RVAE_dilated if __name__ == "__main__": if not os.path.exists('data/word_embeddings.npy'): raise F...
{"hexsha": "8d674696dd76c785063201449e47a27ba8ab46bb", "size": 3863, "ext": "py", "lang": "Python", "max_stars_repo_path": "train.py", "max_stars_repo_name": "kefirski/contiguous-succotash", "max_stars_repo_head_hexsha": "7497efd1392693248ed98805dcdbbf5dc125afc2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
# 09.Picrust2_Songbird.r # # Figure 6, Table S13, Table S14, Table S15 # Ref for PICRUSt2: Douglas, G. M. et al. PICRUSt2 for prediction of metagenome functions. Nat. Biotechnol. 38, 685–688 (2020). # Ref for Songbird: Morton, J. T. et al. Establishing microbial composition measurement standards with reference frames....
{"hexsha": "52f15046dd73bef284950c4ec3640be70770d7d8", "size": 17182, "ext": "r", "lang": "R", "max_stars_repo_path": "09.Picrust2_Songbird.r", "max_stars_repo_name": "LLNL/2022_PondB_microbiome", "max_stars_repo_head_hexsha": "d9aaade01033eea9f220e96521099fd881971c82", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
#!/usr/bin/env python3 """ Keras implementation of CapsNet in Hinton's paper Dynamic Routing Between Capsules. The current version maybe only works for TensorFlow backend. Actually it will be straightforward to re-write to TF code. Adopting to other backends should be easy, but I have not tested this. Usage: p...
{"hexsha": "473532accaf50208fa41e4a133bbd812bb170610", "size": 6538, "ext": "py", "lang": "Python", "max_stars_repo_path": "test.py", "max_stars_repo_name": "baudm/VIGNet", "max_stars_repo_head_hexsha": "10a9a70878556de1c97c4212091bb15a7f8977f5", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_r...
""" Everything related to the individual rationality constraints. """ __all__ = ['IndividualRationality'] import theano import theano.tensor as T import scipy.optimize as opt import numpy as np from sepdesign._types import AgentType from sepdesign._transfer_functions import TransferFunction class IndividualRatio...
{"hexsha": "d8647d8d8a55ff24b18e3bce0c0cd8becd13fb58", "size": 7115, "ext": "py", "lang": "Python", "max_stars_repo_path": "sepdesign/_individual_rationality.py", "max_stars_repo_name": "salarsk1/principal-agent-bilevel-programming", "max_stars_repo_head_hexsha": "e09b9456dff1e5d253b57bd4bc60f87fd36a749b", "max_stars_r...
program da_vp_bilin !---------------------------------------------------------------------- ! Purpose: Regridding from low to high resolution in control variable space ! by using bilinear interpolation ! ! where n is the grid number in x or y ! ns is the refinement ratio between two resulo...
{"hexsha": "3855e0f95f9ebd15432b55d51cc598de59ebae41", "size": 12084, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "var/mri4dvar/da_vp_bilin.f90", "max_stars_repo_name": "matzegoebel/WRF-fluxavg", "max_stars_repo_head_hexsha": "686ae53053bf7cb55d6f078916d0de50f819fc62", "max_stars_repo_licenses": ["BSD-2-Cla...
import os, sys sys.path.append(os.getcwd()) try: # This only matters on Ishaan's computer import experiment_tools experiment_tools.wait_for_gpu() except ImportError: pass import lasagne import lib import lib.lsun_downsampled import lib.ops.gru import lib.ops.linear import lib.ops.lstm import numpy as np i...
{"hexsha": "150a56d74c1903931da26334bde0370a695e3578", "size": 6301, "ext": "py", "lang": "Python", "max_stars_repo_path": "py3/nn/experiments/wgan/sin_lstm.py", "max_stars_repo_name": "fr42k/gap-wgan-gp", "max_stars_repo_head_hexsha": "4e373c43d606a1b83f76893d93f9cf8be8cd460d", "max_stars_repo_licenses": ["MIT"], "max...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: HttpRequestManager.hpp * Author: ubuntu * * Created on February 15, 2018, 10:05 AM */ #ifndef HTTP_SERVER_REQUESTM...
{"hexsha": "e32e2864990c3c358ad6474e656b9a625e2faeda", "size": 1602, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/libs/http_server_session/include/keto/server_session/HttpRequestManager.hpp", "max_stars_repo_name": "burntjam/keto", "max_stars_repo_head_hexsha": "dbe32916a3bbc92fa0bbcb97d9de493d7ed63fd8", "m...
import random import numpy as np import torch from args_fusion import args import cv2 from torchvision import datasets, transforms import matplotlib.pyplot as plt import os import torch from torch.autograd import Variable from osgeo import gdal_array,gdal import time ''' @brief:对一个大的图片进行分块 @params:block_x,block_y x轴 y...
{"hexsha": "e49340b5ae5d208bf2ea511ccc38c2a4dce085ae", "size": 6255, "ext": "py", "lang": "Python", "max_stars_repo_path": "ImageFusion_DL/utils.py", "max_stars_repo_name": "xiaoqi25478/Project", "max_stars_repo_head_hexsha": "04813495c21faf9892777c111b7284928f70727e", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
% NOTES: % - 1000 words or less for RNAAS! % - Add an appendix or some words to get >=3 pages for arxiv posting % STYLE: % - New line after each sentence (makes Git diff's readable) % TODO: % - Run: texcount -v3 -merge -incbib -dir -sub=none -utf8 -sum paper.tex \documentclass[RNAAS]{aastex63} % Load common package...
{"hexsha": "e0a5556b84c0e48ea87d593ffacba478d302b09b", "size": 3171, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "rnaas/paper.tex", "max_stars_repo_name": "adrn/slegs", "max_stars_repo_head_hexsha": "18819b8f4c878f99f1007637a0525c56600ef32a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
import h5py import matplotlib.pyplot as plt import numpy as np import os import time def detrending_verify(filename,save_folder_detrending,save_folder_masked,plane_ind=10): f_str=os.path.split(filename)[-1] mask_f_str=f_str.replace('aligned.h5','masked.h5') detr_f_str=f_str.replace('aligned.h5','detrended....
{"hexsha": "54fbf462a2ccb02e94d2dae037d2f032e96dce51", "size": 1432, "ext": "py", "lang": "Python", "max_stars_repo_path": "Visualization/detrending_viz.py", "max_stars_repo_name": "mariakesa/ZebraFishRegistrationPipeline", "max_stars_repo_head_hexsha": "4955044eb69dc04c579f59ccb24e02e4451aebcc", "max_stars_repo_licens...
import numpy as np # linear algebra import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv) from keras.layers import Dense, Embedding, LSTM, SpatialDropout1D from keras.models import Sequential #from sklearn.feature_extraction.text import CountVectorizer from keras.preprocessing.text import Tokenizer fr...
{"hexsha": "1fbd63e73a2b55a1fa183b5d4368a23471650119", "size": 7083, "ext": "py", "lang": "Python", "max_stars_repo_path": "textclassification/nn_lstm.py", "max_stars_repo_name": "sshekhar10/mymllearnings", "max_stars_repo_head_hexsha": "5f7b075c56af28467985282e8021658fed6b1134", "max_stars_repo_licenses": ["MIT"], "ma...
from outputs_fromDrone import InitializeConnectDrone, ReturnDroneAngle from input_forDrone import droneArm, droneTakeOff, condition_yaw, send_global_velocity, send_ned_velocity_heading, goto_position_target_local_ned from drone_variousMovements import fixDistanceToBlade,moveToNewLocation, moveDroneInLocalCoord, moveTo...
{"hexsha": "3a37d84cc8ea60c76823e736849d79892dea8a2b", "size": 5651, "ext": "py", "lang": "Python", "max_stars_repo_path": "Main_velocities_testScript.py", "max_stars_repo_name": "IvanNik17/Dronekit-Python-Functions", "max_stars_repo_head_hexsha": "6451f6fbd63ba1186a161b40c8f4ee64d86ca386", "max_stars_repo_licenses": [...
from __future__ import print_function import ConfigParser import collections import h5py, sys import numpy as np import torch from torch.autograd import Variable import gzip import os import math from torch.optim import Optimizer try: import cPickle as pickle except: import pickle def mkdir(paths): if no...
{"hexsha": "bcfd26d82fb78e65aa541f3b0d4037ace8f9c6c6", "size": 6571, "ext": "py", "lang": "Python", "max_stars_repo_path": "NN_solution/delta_spectrogram_simplenet/src/utils.py", "max_stars_repo_name": "JavierAntoran/moby_dick_whale_detection", "max_stars_repo_head_hexsha": "bbd78c78b53d0d095cd36f37c925618844c8cde9", "...
#ifdef __GNUC__ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wdeprecated-declarations" #endif #include <boost/locale/encoding.hpp> #include <boost/locale/util.hpp> #ifdef __GNUC__ #pragma GCC diagnostic pop #endif #include "pkzip_io.h" using namespace std; using boost::locale::conv::from_utf; using b...
{"hexsha": "c87b1407ed120c781a4d387df51764ca6760e3d1", "size": 9231, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/pkzip_io.cc", "max_stars_repo_name": "andantissimo/0z", "max_stars_repo_head_hexsha": "b427da84a34df839c9011dea815d6180735f5a9e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": 1...
[STATEMENT] lemma WHILEIT_rule: assumes WF: "wf R" assumes I0: "I s" assumes IS: "\<And>s. \<lbrakk> I s; b s \<rbrakk> \<Longrightarrow> f s \<le> SPEC (\<lambda>s'. I s' \<and> (s',s)\<in>R)" assumes PHI: "\<And>s. \<lbrakk> I s; \<not> b s \<rbrakk> \<Longrightarrow> \<Phi> s" shows "WHILEIT I b f s \<le> ...
{"llama_tokens": 2864, "file": "Refine_Monadic_Generic_RefineG_While", "length": 13}
"""Placeholder.""" import histomicstk.utils as utils from . import _linalg as linalg from .complement_stain_matrix import complement_stain_matrix import numpy def separate_stains_macenko_pca( im_sda, minimum_magnitude=16, min_angle_percentile=0.01, max_angle_percentile=0.99, mask_out=None): """Co...
{"hexsha": "d99f89486d90c76999e9d0778342c412f4b62db2", "size": 4467, "ext": "py", "lang": "Python", "max_stars_repo_path": "histomicstk/preprocessing/color_deconvolution/separate_stains_macenko_pca.py", "max_stars_repo_name": "basanto/HistomicsTK", "max_stars_repo_head_hexsha": "f3dbd93a7f31c7825574f9ccf0b86e09e9fee360...
import numpy as np import pandas as pd import pytest from pandas.testing import assert_frame_equal @pytest.fixture def df_checks(): """fixture dataframe""" return pd.DataFrame( { "famid": [1, 1, 1, 2, 2, 2, 3, 3, 3], "birth": [1, 2, 3, 1, 2, 3, 1, 2, 3], "ht1": [2....
{"hexsha": "d2c8ffa684d03ae0242304c1499725b0be5d7404", "size": 32582, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/functions/test_pivot_longer.py", "max_stars_repo_name": "aliavni/pyjanitor", "max_stars_repo_head_hexsha": "245012443d01247a591fd0e931b154c7a12a9753", "max_stars_repo_licenses": ["MIT"], "m...
from lib.math.linalg.vector import * import numpy as np
{"hexsha": "570420d5137a7d4bd52fe07c5eca36d4602aad41", "size": 56, "ext": "py", "lang": "Python", "max_stars_repo_path": "quest/lib/math/linalg/__init__.py", "max_stars_repo_name": "Fluorescence-Tools/quest", "max_stars_repo_head_hexsha": "e17e5682f7686d1acc1fd8a22bdae33963bc16d6", "max_stars_repo_licenses": ["MIT"], "...
""" DoesNotExist() This differential indicates that the derivative Does Not Exist (D.N.E). This is not the cast that it is not implemented, but rather that it mathematically is not defined. """ struct DoesNotExist <: AbstractDifferential end function extern(x::DoesNotExist) throw(ArgumentError("Derivative doe...
{"hexsha": "f0dc5fe09c6ecdc6a5f91adfafdfb5cde1b58ac9", "size": 541, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/differentials/does_not_exist.jl", "max_stars_repo_name": "YingboMa/ChainRulesCore.jl", "max_stars_repo_head_hexsha": "0ad05d0f61f1fed90d1b5c0084abc00b703ba67f", "max_stars_repo_licenses": ["MIT"...
import unittest import numpy as np from ..stat import * from .. import stat class TestLedoitWolfCov(unittest.TestCase): def setUp(self): np.random.seed(0) p, n = 40, 50 self.A = A = np.random.randn(p, p) self.Sigma = np.dot(A, A.T) X = np.random.randn(p, n) X -= np.a...
{"hexsha": "9af53fc68cd79c04848b8c1f33045e27b4e0db55", "size": 9137, "ext": "py", "lang": "Python", "max_stars_repo_path": "psychic/tests/teststat.py", "max_stars_repo_name": "wmvanvliet/psychic", "max_stars_repo_head_hexsha": "4ab75fb655795df0272c1bb0eb0dfeb232ffe143", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
#!/usr/bin/env python # encoding: utf-8 """ CombinatoricalMediaSimulations.py Simulates all possible minimal media compositions consisting of unique carbon, nitrogen, sulfate, phosphate sources. If a single compound provides multiple elemental sources it serves a the solely source for them. # TODO: Reformulate this K...
{"hexsha": "509104233515e1ac6373707a9d322a7cee676fdb", "size": 13720, "ext": "py", "lang": "Python", "max_stars_repo_path": "ifba/bins/CombintoricalMediaSimulations.py", "max_stars_repo_name": "phantomas1234/fbaproject", "max_stars_repo_head_hexsha": "6aa2a9b547b8326d928f42566de632265016e729", "max_stars_repo_licenses"...
import numpy as np from baselines.template.util import store_args, logger from baselines.template.policy import Policy def dims_to_shapes(input_dims): return {key: tuple([val]) if val > 0 else tuple() for key, val in input_dims.items()} class RandomPolicy(Policy): @store_args def __init__(self, input_dim...
{"hexsha": "36def1d8d234fe9b0a5d837e5c8438c1e21b6895", "size": 1206, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselines/example_algorithm/random_policy.py", "max_stars_repo_name": "knowledgetechnologyuhh/goal_conditioned_RL_baselines", "max_stars_repo_head_hexsha": "915fc875fd8cc75accd0804d99373916756f726...
import cv2 import numpy as np from visualize_cv2 import model, display_instances, class_names capture = cv2.VideoCapture('videofile.mp4') size = ( int(capture.get(cv2.CAP_PROP_FRAME_WIDTH)), int(capture.get(cv2.CAP_PROP_FRAME_HEIGHT)) ) codec = cv2.VideoWriter_fourcc(*'DIVX') fps = capture.get(cv2.CAP_PROP_FPS...
{"hexsha": "e48220eec9ef50bdc1b3924d47127e149383ec5a", "size": 1222, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_video.py", "max_stars_repo_name": "romellfudi/dataset_currency", "max_stars_repo_head_hexsha": "19a950e88fa724171cf93c47369b6fc61a57477f", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import yaml import os import json import numpy as np import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import LSTM, Dense from tensorflow.keras.utils import to_categorical data = yaml.safe_load(open('nlu\\train.yml').read()) # read data inputs, outputs = [], [] for com...
{"hexsha": "b981148b5131505365ab665b428ab946d84b4216", "size": 2312, "ext": "py", "lang": "Python", "max_stars_repo_path": "nlu/model.py", "max_stars_repo_name": "Haisonvt21/Siri", "max_stars_repo_head_hexsha": "82c6432e8097821a866b4d182b0a00507835caa7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "max_st...
import numpy as np import tensorflow as tf import tensorflow.keras.backend as K from RetinaNet.utils import xywh_convert_xyxy def compute_iou(boxes1, boxes2): """计算交并比(此计算方式仅作为原理展示, 时间复杂度和空间复杂度都过高, 请不要直接使用). Args: boxes1, boxes2: tf.Tensor, 边界框[x, y, width, height]. Returns: 边界框的交并比. ...
{"hexsha": "4450dda4d07d0dcfe256417819a27691e2eda99e", "size": 10020, "ext": "py", "lang": "Python", "max_stars_repo_path": "RetinaNet/preprocessing/label_ops.py", "max_stars_repo_name": "sun1638650145/RetinaNet", "max_stars_repo_head_hexsha": "357edda03cdc1f976764b6ed4fcad6e639646142", "max_stars_repo_licenses": ["Apa...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! EVB-QMDFF - RPMD molecular dynamics and rate constant calculations on ! black-box generated potential energy surfaces ! ! Copyright (c) 2021 by Julien Steffen (steffen@pctc.uni-kiel.de) ! Stefa...
{"hexsha": "955512a2f20befc03976e9ef7752a99dc62f5f9c", "size": 4555, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/stints.f90", "max_stars_repo_name": "Trebonius91/EVB-QMDFF", "max_stars_repo_head_hexsha": "8d03e1ad073becb0161b0377b630d7b65fe3c290", "max_stars_repo_licenses": ["MIT", "Unlicense"], "max_s...