text
stringlengths
0
27.1M
meta
dict
import tactic.basic import tactic.omega import .ch11_imp open imp /- Open Scope imp_scope. Fixpoint ceval_step2 (st : state) (c : com) (i : nat) : state := match i with | O ⇒ empty_st | S i' ⇒ match c with | SKIP ⇒ st | l ::= a1 ⇒ (l !-> aeval st a1 ; st) | c1 ;; c2 ⇒ ...
{ "alphanum_fraction": null, "author": "michens", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_dat...
/- Copyright (c) 2022 Damiano Testa. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Damiano Testa -/ import data.polynomial.algebra_map import ring_theory.localization.basic /-! # Laurent polynomials We introduce Laurent polynomials over a semiring `R`. Mathematic...
{ "alphanum_fraction": null, "author": "leanprover-community", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_...
from collections import OrderedDict from enum import Enum, unique import numpy as np from typing import Dict, Union, Iterator, Type, Tuple from meio.gsm.dag_gsm import GuaranteedServiceModelDAG from meio.gsm.tree_gsm import Stage, GuaranteedServiceModelTree, GuaranteedServiceModel def create_supply_chain_network_fro...
{ "alphanum_fraction": 0.6679357022, "author": null, "avg_line_length": 41.1130434783, "converted": null, "ext": "py", "file": null, "hexsha": "5bf5139bc1a0e62f24a0c6dbd55e68e2b46b69f6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma eventually_nhds_top: fixes P :: "'a :: {order_top,linorder_topology} \<Rightarrow> bool" and b :: 'a assumes "b < top" shows "eventually P (nhds top) \<longleftrightarrow> (\<exists>b<top. (\<forall>z. b < z \<longrightarrow> P z))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. eventuall...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 17, "llama_tokens": 1977, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime":...
import numpy as np import pytest from sklearn.utils._readonly_array_wrapper import ReadonlyArrayWrapper, _test_sum from sklearn.utils._testing import create_memmap_backed_data def _readonly_array_copy(x): """Return a copy of x with flag writeable set to False.""" y = x.copy() y.flags["WRITEABLE"] = Fals...
{ "alphanum_fraction": 0.7447916667, "author": null, "avg_line_length": 32, "converted": null, "ext": "py", "file": null, "hexsha": "38163cc2461ce878eb638401b74bea21507f701f", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
module Variables include("./constants.jl") using JuMP using .Constants export init_variables function init_variables(m) #Dimensions of box @variable(m, lob_length_of_box[i=1:length(boxes)] == boxes[i][1]) @variable(m, wob_width_of_box[i=1:length(boxes)] == boxes[i][2]) @variable(m, hob_height_of...
{ "alphanum_fraction": 0.7031188314, "author": null, "avg_line_length": 40.8548387097, "converted": null, "ext": "jl", "file": null, "hexsha": "132ea0ed52d08ad51cb24c10b5cd5b39232a5ed8", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
""" json 불러와서 캡션 붙이는 것 """ import json import pandas as pd path = './datasets/vqa/v2_OpenEnded_mscoco_train2014_questions.json' with open(path) as question: question = json.load(question) # question['questions'][0] # question['questions'][1] # question['questions'][2] df = pd.DataFrame(question['questions']) d...
{ "alphanum_fraction": 0.5889103804, "author": null, "avg_line_length": 26.7413793103, "converted": null, "ext": "py", "file": null, "hexsha": "8165627d6470d7c3af8974c3cff4f40b6476f57e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# script to convert the newly generated Relative Humidity def convert_to_hur( tas_arr, vap_arr ): import numpy as np with np.errstate( over='ignore' ): esa_arr = 6.112 * np.exp( 17.62 * tas_arr/ (243.12 + tas_arr) ) # esa_arr = 6.112 * np.exp( 22.46 * tas_arr / (272.62 + tas_arr) ) return vap_arr/esa_arr * 100...
{ "alphanum_fraction": 0.6729470316, "author": null, "avg_line_length": 32.7093023256, "converted": null, "ext": "py", "file": null, "hexsha": "80c61aacc21822c977f0758b8a90ad8a8e99498c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma closed_Union [continuous_intros, intro]: "finite S \<Longrightarrow> \<forall>T\<in>S. closed T \<Longrightarrow> closed (\<Union>S)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>finite S; \<forall>T\<in>S. closed T\<rbrakk> \<Longrightarrow> closed (\<Union> S) [PROOF STEP] by (induct s...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 119, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_datetime": n...
subroutine qqb_ttw_v(p,msqv) ************************************************************************ * Author: R. K. Ellis * * March, 2012. * * ...
{ "alphanum_fraction": 0.4778597786, "author": null, "avg_line_length": 29.2972972973, "converted": null, "ext": "f", "file": null, "hexsha": "c6115fb56877b523ecd6d242c190f5c189376213", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# coding: utf-8 from scipy import stats import numpy as np from itertools import chain from scipy.stats import chi2_contingency import jpegio as jio import collections img = jio.read('00576.jpg') g = img.coef_arrays[0] g = g.reshape(g.shape[0]*g.shape[1]) for ind in range(30): g1 = g[0.03*len(g)*i:0.03*len(g)*(...
{ "alphanum_fraction": 0.5054667788, "author": null, "avg_line_length": 19.8166666667, "converted": null, "ext": "py", "file": null, "hexsha": "a172f44e60ace4b62441e510d614e2772206cd77", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\documentclass{article} \usepackage{bm} \usepackage{amsmath} \usepackage{graphicx} \usepackage{mdwlist} \usepackage[colorlinks=true]{hyperref} \usepackage{geometry} \geometry{margin=1in} \geometry{headheight=2in} \geometry{top=1in} \usepackage{palatino} \usepackage{listings} \usepackage{color} \definecolor{codegreen}...
{ "alphanum_fraction": 0.79400017, "author": null, "avg_line_length": 98.8823529412, "converted": null, "ext": "tex", "file": null, "hexsha": "226754f4afb46db6040c6bc2fbb6ecca1c58abe5", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_c...
# -*- coding: utf-8 -*- # Copyright (c) 2018 The HERA Collaboration # Licensed under the MIT License from __future__ import print_function, division, absolute_import import numpy as np from six.moves import range from scipy.signal import windows from warnings import warn from scipy.optimize import leastsq, lsq_linear...
{ "alphanum_fraction": 0.598524137, "author": null, "avg_line_length": 54.1273701566, "converted": null, "ext": "py", "file": null, "hexsha": "7ba16ef166e7b8cd6ca09b8a2dd9c70c59b53a0d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import collections import itertools import numpy as np from operator import itemgetter from scipy.spatial import distance import re DEBUG = False """Vector stuff""" def v_same_orientation(v1, v2): return np.dot(v1, v2) > 0 """Division by zero problem!""" def v_angle(v1, v2): length_v1 = np.linalg.norm(v...
{ "alphanum_fraction": 0.6248890016, "author": null, "avg_line_length": 31.406374502, "converted": null, "ext": "py", "file": null, "hexsha": "b572b17106649afa59317c3864caf225a4581831", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
/*#ifndef MODEL_MARKET_H #define MODEL_MARKET_H #endif // MODEL_MARKET_H */ #pragma once #include <graphene/chain/protocol/operations.hpp> #include <graphene/db/generic_index.hpp> #include <boost/multi_index/composite_key.hpp> #include <vector> namespace graphene { namespace chain { using namespace s...
{ "alphanum_fraction": 0.5753660637, "author": null, "avg_line_length": 36.28125, "converted": null, "ext": "hpp", "file": null, "hexsha": "3e8ac6e06de49d1d03c74b858d5eb5adcc86f854", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
MODULE in_out_manager !!====================================================================== !! *** MODULE in_out_manager *** !! I/O manager utilities : Defines run parameters together with logical units !!===================================================================== ...
{ "alphanum_fraction": 0.4884915962, "author": null, "avg_line_length": 66.2482269504, "converted": null, "ext": "f90", "file": null, "hexsha": "e8d8e5b82716c5c586c6569fb0fd8902fb824385", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_f...
[STATEMENT] lemma R_therm_dyn: assumes "a > 0" and "0 \<le> \<tau>" and "0 < Tmin" and "Tmax < L" shows "rel_R \<lceil>\<lambda>s. I Tmin Tmax s \<and> s$2 = 0 \<and> s$3 = s$1\<rceil> \<lceil>I Tmin Tmax\<rceil> \<ge> (IF (\<lambda>s. s$4 = 0) THEN (x\<acute>= (\<lambda>t. f a 0) & G Tmin Tmax a 0 on (\<la...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Hybrid_Systems_VCs_KleeneAlgebraTests_HS_VC_KAT_Examples_rel", "hexsha": null, "include": null, "lang": null, "length": 4, "llama_tokens": 1393, "mathlib_filename": null, "max_forks_c...
import keras import numpy as np import os from keras.preprocessing.image import ImageDataGenerator , array_to_img, img_to_array, load_img from Tkinter import Tk from tkFileDialog import askdirectory import GetFilePathFromDir as getfdir Tk().withdraw() PathMana = getfdir.GetFileinDir() datagen = ImageDataGenerator(...
{ "alphanum_fraction": 0.7164048866, "author": null, "avg_line_length": 22.92, "converted": null, "ext": "py", "file": null, "hexsha": "6a6a0c63b09d51f883f72290b580ecb17a7fbf5a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
Require Import bedrock2.Syntax. Require Import bedrock2.NotationsCustomEntry. Require Import bedrock2.FE310CSemantics. Require Import coqutil.Z.Lia. From bedrock2 Require Import BasicC64Semantics ProgramLogic. From bedrock2 Require Import Array Scalars Separation. From coqutil Require Import Word.Interface Map.Interfa...
{ "alphanum_fraction": null, "author": "dderjoel", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_da...
import os import numpy as np import skimage.data from skimage.io import imsave, imread from skimage import transform from skimage.color import rgb2gray import matplotlib.pyplot as plt img_w = 128 img_h = 128 PATH_NEW_IMGS_FOLDER = 'Resized_images' def load_imgs(): CONDITIONS = lambda img_name: Fal...
{ "alphanum_fraction": 0.728024819, "author": null, "avg_line_length": 24.7948717949, "converted": null, "ext": "py", "file": null, "hexsha": "167446a2686f057ed148efd699ec630f61ecdb72", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np import os from scanorama import * from scipy.sparse import vstack from sklearn.preprocessing import LabelEncoder, scale from experiments import * from process import load_names from utils import * NAMESPACE = 'mono_macro' METHOD = 'svd' DIMRED = 100 data_names = [ 'data/macrophage/monocytes_1'...
{ "alphanum_fraction": 0.6035489143, "author": null, "avg_line_length": 34.264, "converted": null, "ext": "py", "file": null, "hexsha": "fe0bd4dd46af3144212d5c9bafba24a07f657346", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_coun...
"""------------------------------------------------------- Licensed under The MIT License [see LICENSE for details] Written by Kyungjun Lee -------------------------------------------------------""" import subprocess as sp import numpy as np # global variables ACCEPTABLE_AVAILABLE_MEMORY = 10000 # https://github.com/...
{ "alphanum_fraction": 0.6532634033, "author": null, "avg_line_length": 35.75, "converted": null, "ext": "py", "file": null, "hexsha": "d3e1ec5281558f540c8af6352141710864d8c709", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
include("1.jl") include("11.jl") include("14.jl") function mark_allzicper(r::Robot) angleofsquare1111(r::Robot) putmarker!(r) snake11per(r) if (isborder(r,Ost)) putmarkholeper(r,West) else putmarkholeper(r,inverse(West)) end end function snake11per(r::Robo...
{ "alphanum_fraction": 0.5260770975, "author": null, "avg_line_length": 22.05, "converted": null, "ext": "jl", "file": null, "hexsha": "aba4c82a42f953efc86415979f708e15b928c5a8", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
from .version import __version__ from .sr import ( pysr, PySRRegressor, best, best_tex, best_callable, best_row, ) from .julia_helpers import install from .feynman_problems import Problem, FeynmanProblem from .export_jax import sympy2jax from .export_torch import sympy2torch
{ "alphanum_fraction": 0.7633333333, "author": null, "avg_line_length": 21.4285714286, "converted": null, "ext": "py", "file": null, "hexsha": "e303becb2dddf32fd0d921f2d35a188568c65c49", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Hills Drive is located in West Davis and leads into the parking lot for the Western Center for Agricultural Equipment. It is a Davis Isnt Flat very confused street. Image(hills.jpg, thumbnail, 500, right)
{ "alphanum_fraction": 0.7922705314, "author": null, "avg_line_length": 69, "converted": null, "ext": "f", "file": null, "hexsha": "dd2b0e670dd3302eead3a3b64d137640842cd7f9", "include": null, "lang": "FORTRAN", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
using ZStd using Base.Test @testset "helpers" begin @test typeof(ZStd.MAX_COMPRESSION) == Int @test ZStd.MAX_COMPRESSION > 0 @test ZStd.check_zstd_error(UInt64(0)) == UInt64(0) @test_throws ZStd.ZStdError ZStd.check_zstd_error(typemax(UInt64)) let err = try ZStd.check_zstd_err...
{ "alphanum_fraction": 0.6427604871, "author": null, "avg_line_length": 26.3928571429, "converted": null, "ext": "jl", "file": null, "hexsha": "4fea09fb5024c3206f1278f9745d0730f27a2df2", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#include <boost/mpl/aux_/preprocessed/dmc/equal_to.hpp>
{ "alphanum_fraction": 0.8035714286, "author": null, "avg_line_length": 28, "converted": null, "ext": "hpp", "file": null, "hexsha": "43ed648f21ed0b9ef73d8970cd9a7bcf2c8d96c7", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": 4,...
#!/usr/bin/python import threading import time from Monsoon import HVPM import struct from datetime import datetime import time import math from Monsoon.calibrationData import calibrationData from Monsoon import Operations as ops from copy import deepcopy import numpy as np import signal import sys import usb import o...
{ "alphanum_fraction": 0.6107328526, "author": null, "avg_line_length": 43.5891812865, "converted": null, "ext": "py", "file": null, "hexsha": "ed36880f7cecc2cd7b4b9782ee538817bf3c1170", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
/* * Copyright 2016 The Cartographer Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law...
{ "alphanum_fraction": 0.6698697416, "author": null, "avg_line_length": 33.2127659574, "converted": null, "ext": "hpp", "file": null, "hexsha": "2743b1c2965fc356e2db5c413a6432a95c7538d7", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import numpy as np from scipy.optimize import minimize_scalar from astropy.modeling import models, fitting from astropy.io import fits from scipy.linalg import toeplitz, hankel def kronDecomp (P,*args): nargin = 1 + len(args) if (nargin < 2): print("Veuillez entrer le P et le Centre") if (nar...
{ "alphanum_fraction": 0.5500982318, "author": null, "avg_line_length": 22.1304347826, "converted": null, "ext": "py", "file": null, "hexsha": "769b70ab1787db2c5bf3b51a4bbd903fd745ad5e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import Playground.Data.BinaryTree.Basic import Playground.Data.List.Is_Sorted import Mathlib.Data.List.Perm import Mathlib.Init.Algebra.Order namespace Data.BinaryTree section variable {type} [LinearOrder type] inductive IsBST : BinaryTree type → Prop | nil : nil.IsBST | node {value left right} (left_IsB...
{ "alphanum_fraction": null, "author": "michelsol", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_d...
\documentclass{article} \title{Mystery Readme} \date{\today} \author{Paul Jones\\ Computer Architecture (01:198:211) \\ School of Arts and Sciences \\ Rutgers University} \begin{document} \maketitle \section{My Process} The way that I worked out what \texttt{mystery.s} does by first creating a \texttt{mystery.c} ...
{ "alphanum_fraction": 0.7887748944, "author": null, "avg_line_length": 42.4871794872, "converted": null, "ext": "tex", "file": null, "hexsha": "5b4d2d664d00447ea3f2fa0f82dfbdc3e2cff650", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
#coding:utf-8 import numpy as np from sklearn.discriminant_analysis import LinearDiscriminantAnalysis from sklearn.datasets import load_iris import matplotlib.pyplot as plt ''' author: heucoder email: 812860165@qq.com date: 2019.6.13 ''' def lda(data, target, n_dim): ''' :param data: (n_samples, n_features) ...
{ "alphanum_fraction": 0.611784141, "author": null, "avg_line_length": 25.2222222222, "converted": null, "ext": "py", "file": null, "hexsha": "b4ef81d1db0dc72090336114664cf1af538b7764", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np def get_src_indices_by_row(row_idxs, shape, flat=True): """ Provide the src_indices when connecting a vectorized variable from an output to an input. Indices are selected by choosing the first indices to be passed, corresponding to node index in Dymos. Parameters ---------...
{ "alphanum_fraction": 0.6621835443, "author": null, "avg_line_length": 35.1111111111, "converted": null, "ext": "py", "file": null, "hexsha": "9176a851c4dedb1b7b2e44a3db85bdd6b64f6aa7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
r""" ISGCI: Information System on Graph Classes and their Inclusions This module implements an interface to the `ISGCI <http://www.graphclasses.org/>`_ database in Sage. This database gathers information on graph classes and their inclusions in each other. It also contains information on the complexity of several com...
{ "alphanum_fraction": 0.5851443219, "author": null, "avg_line_length": 33.110701107, "converted": null, "ext": "py", "file": null, "hexsha": "916c8998891e5aa68734496beab032e3acc96ba9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import argparse import numpy as np import glob import os import json import sys from tqdm import tqdm from allennlp.commands.elmo import ElmoEmbedder from allennlp.common.util import lazy_groups_of from allennlp.data import vocabulary parser = argparse.ArgumentParser( formatter_class=argparse.ArgumentDefaultsHelp...
{ "alphanum_fraction": 0.6134817563, "author": null, "avg_line_length": 33.8638743455, "converted": null, "ext": "py", "file": null, "hexsha": "0b9530dbad6a712c242271f76e5b0d3691c83a72", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- """ Created on Fri May 10 12:57:47 2019 @Title: FrontierLab exchange program - DBPS source code (for Bayesian Logistic Regression) @Author: Chou I-Ping @Reference: C. Sherlock and A. H. Thiery, “A discrete bouncy particle sampler,” 2017. """ import time import numpy as np import copy def ess...
{ "alphanum_fraction": 0.5043537647, "author": null, "avg_line_length": 39.0466666667, "converted": null, "ext": "py", "file": null, "hexsha": "890723217adad4347dab799ef692495e34bf90c7", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\chapter{Reduction Recognition} Figures~\ref{Tutorial:exampleReductionRecognition} shows a translator which finds the first loop of a main function and recognizes reduction operations and variables within the loop. A reduction recognition algorithm (\lstinline{ReductionRecognition()}) is implemented in the SageInte...
{ "alphanum_fraction": 0.7711171662, "author": null, "avg_line_length": 29.5287356322, "converted": null, "ext": "tex", "file": null, "hexsha": "e72775f5b9d8249f7ef23aeba2c9f9d21b66bcc0", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# import Pkg; Pkg.add(["FiniteDifferences", "Plots"]) using Faust, FiniteDifferences, Plots process = compile(""" import("stdfaust.lib"); process = pm.ks(pm.f2l(ba.midikey2hz(60)), 0.1); """) function f(x) init!(process, block_size=size(x, 1)) process.inputs = x compute!(process) end x = randn(1024, 1) ...
{ "alphanum_fraction": 0.6524064171, "author": null, "avg_line_length": 19.6842105263, "converted": null, "ext": "jl", "file": null, "hexsha": "ee22e7dd675365210ba38d4dcda1a2527bddc971", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
''' This is the unittest for pinn module ''' import unittest import os import sys module_path = os.path.abspath(os.path.join('..')) if module_path not in sys.path: sys.path.append(module_path) import numpy as np import tensorflow as tf import prep_data import Logger import nn dataset = '../data/single_action_2_...
{ "alphanum_fraction": 0.6071019473, "author": null, "avg_line_length": 28.1612903226, "converted": null, "ext": "py", "file": null, "hexsha": "c5b544968d44551eff65fdf1c36e9c2d0b4697ef", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#include <appbase/application.hpp> #include "chain_state_types.hpp" #include "state_history.hpp" #include <abieos.h> #include <boost/beast/core/flat_buffer.hpp> using namespace appbase; using boost::beast::flat_buffer; namespace chronicle { // Channels published by receiver_plugin namespace channels { usin...
{ "alphanum_fraction": 0.6513994911, "author": null, "avg_line_length": 36.1656441718, "converted": null, "ext": "hpp", "file": null, "hexsha": "58357ffae2c109fdbc68e6fb1b987b35ccdbd06b", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# _ # | | # __ _ _ _ __ _ _ __ ___ ___ _ __ | |_ ___ _ __ # / _` | | | |/ _` | '_ ` _ \ / _ \ '_ \| __/ _ \ '__| # | (_| | |_| | (_| | | | | | | __/ | | | || __/ | # \__,_|\__,_|\__, |_| |_| |_|\___|_| |_|\__\___|_| # ...
{ "alphanum_fraction": 0.602147651, "author": null, "avg_line_length": 35.8173076923, "converted": null, "ext": "py", "file": null, "hexsha": "696c8dfb01a801a1c0d5b29bf4853680a42f5f1c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
#include <vsim/env/environment.hpp> #include <vsim/env/model.hpp> #include <vsim/env/geometry.hpp> #include <vsim/env/node.hpp> #include <vsim/env/pose.hpp> #include <vsim/env/drawable.hpp> #include <vsim/util/format.hpp> #include <vsim/util/filesystem.hpp> #include <vsim/util/strings.hpp> #include <pugixml/pugixml.h...
{ "alphanum_fraction": 0.5950406849, "author": null, "avg_line_length": 31.2421686747, "converted": null, "ext": "cpp", "file": null, "hexsha": "3bb87182b14ebce426591ca5be2884c3c3c5982b", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import os import cv2 import queue import random import threading import face_recognition import numpy as np from sklearn import svm import joblib q = queue.Queue() # 加载人脸图片并进行编码 def Encode(): print("Start Encoding") image_path = 'C:\\Users\\Administrator\\Desktop\\face_recognition-master\\examples\\knn_exam...
{ "alphanum_fraction": 0.5763819095, "author": null, "avg_line_length": 29.0510948905, "converted": null, "ext": "py", "file": null, "hexsha": "7a2215bce70345c5e86711c4ff1147b527f9287c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma FINITE_states: fixes X :: "'a set" shows "finite X \<Longrightarrow> finite {(s :: 'a state). fmdom' s = X}" [PROOF STATE] proof (prove) goal (1 subgoal): 1. finite X \<Longrightarrow> finite {s. fmdom' s = X} [PROOF STEP] proof (induction rule: finite.induct) [PROOF STATE] proof (state) goal (2...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Factored_Transition_System_Bounding_FactoredSystem", "hexsha": null, "include": null, "lang": null, "length": 34, "llama_tokens": 3052, "mathlib_filename": null, "max_forks_count": nu...
// // Copyright (c) 2017-2019 Native Instruments GmbH, Berlin // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, cop...
{ "alphanum_fraction": 0.6674113376, "author": null, "avg_line_length": 25.7625899281, "converted": null, "ext": "cpp", "file": null, "hexsha": "9cf9331328573a6eef537c627c9e9fdb2a6a7425", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
from collections import deque import os import cv2 from .wrapper_base import Wrapper, ObservationWrapper import gym import gym.spaces as spaces import numpy as np os.environ.setdefault("PATH", "") cv2.ocl.setUseOpenCL(False) class FrameStack(Wrapper): def __init__(self, env, k): """Stack k last frames."...
{ "alphanum_fraction": 0.6177364563, "author": null, "avg_line_length": 32.9, "converted": null, "ext": "py", "file": null, "hexsha": "fbdd3eaa7901ac9df91adb588889e7d2a7b1284d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count"...
import numpy as np import torch from torch import nn from torch.nn import functional as F import pandas as pd from matplotlib import pyplot as plt def training_plot(scores, folder_name, file_name): plt.figure(figsize=(15,5)) plt.plot(range(len(scores["train"])), scores["train"], label=f'train {file_name}') ...
{ "alphanum_fraction": 0.6214560728, "author": null, "avg_line_length": 35.9371069182, "converted": null, "ext": "py", "file": null, "hexsha": "2a175a546d410749dfe74479a572ab2e85e71e87", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
#%% import os import pickle import time from pathlib import Path import colorcet as cc import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from sklearn.decomposition import PCA from sklearn.feature_selection import VarianceThreshold from sklearn.model_selection import train_tes...
{ "alphanum_fraction": 0.6919393456, "author": null, "avg_line_length": 27.96875, "converted": null, "ext": "py", "file": null, "hexsha": "a173a18d4e44e17e1d75c777275678dddcd839eb", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_co...
# -*- coding: utf-8 -*- # # Author: Taylor Smith <taylor.smith@alkaline-ml.com> # # Provide numpy compatibility and common variables. Since this # is a relatively sparse script, I feel I must defend this design # choice. See the docstring in the __init__: "Each sub-module is specifically # designed not to make calls ou...
{ "alphanum_fraction": 0.7658536585, "author": null, "avg_line_length": 32.3684210526, "converted": null, "ext": "py", "file": null, "hexsha": "0b9fc611b50235c3a83c72b379df135f9c5893f8", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import matplotlib.pyplot as plt import time from xdesign_ming.material import XraylibMaterial, CustomMaterial from xdesign_ming.geometry import * from xdesign_ming.phantom import Phantom from xdesign_ming.propagation import * from xdesign_ming.plot import * from xdesign_ming.acquisition import Simul...
{ "alphanum_fraction": 0.5312232678, "author": null, "avg_line_length": 36.53125, "converted": null, "ext": "py", "file": null, "hexsha": "246269dca9a1d80749c299842f8a30c4f09f93c6", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_co...
""" This module contains tools to help in extracting training crops from images, where a "crop" is a relatively small rectangular ROI from within the bounds of an image. author: Stephen O'Hara created: April 14, 2016 """ import pyvision3 as pv3 import shapely.geometry as sg import shapely.ops as so import numpy as np ...
{ "alphanum_fraction": 0.6576230492, "author": null, "avg_line_length": 32.5390625, "converted": null, "ext": "py", "file": null, "hexsha": "913a7169f47ec472f043e9557c2894130f6c369e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
%---------------------------------------------------------------------------- % Magic tutorial number 7 %---------------------------------------------------------------------------- \NeedsTeXFormat{LaTeX2e}[1994/12/01] \documentclass[letterpaper,twoside,12pt]{article} \usepackage{epsfig,times} \setlength{\textwidth}{...
{ "alphanum_fraction": 0.7622744591, "author": null, "avg_line_length": 46.1138121547, "converted": null, "ext": "tex", "file": null, "hexsha": "108f4a3726371322061ff6be46c836abf9fbe503", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
\chapter{Soccer Simulation 2D}\label{chapter:ss2d} In this chapter we explain the architecture of the Simulator itself. It is divided in 5 sections: about RoboCup Soccer Simulation Server (rcssserver), \cite{rcssserver}, explanation of the formation tactics and the formation editor, a section about the two major agents...
{ "alphanum_fraction": 0.7660202902, "author": null, "avg_line_length": 91.6117647059, "converted": null, "ext": "tex", "file": null, "hexsha": "ca770db76b49ecb738b71abbdf7e7c251ed619a4", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
""" Classes for generating lists of detected events """ import numpy as np from yt.funcs import issue_deprecation_warning from pyxsim.utils import mylog from yt.units.yt_array import YTQuantity, YTArray, uconcatenate import astropy.io.fits as pyfits import astropy.wcs as pywcs import h5py from pyxsim.utils import force...
{ "alphanum_fraction": 0.5515009056, "author": null, "avg_line_length": 40.0478395062, "converted": null, "ext": "py", "file": null, "hexsha": "583fff1258a6bb039e1762a6e8ce9dac1b4ab0ef", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import numpy as np import cv2 import shutil debug = False numberToHandle = 500 def rotate(angle, center, landmark): rad = angle * np.pi / 180.0 alpha = np.cos(rad) beta = np.sin(rad) M = np.zeros((2,3), dtype=np.float32) M[0, 0] = alpha M[0, 1] = beta M[0, 2] = (1-alpha)*center[0...
{ "alphanum_fraction": 0.5580324245, "author": null, "avg_line_length": 36.6756756757, "converted": null, "ext": "py", "file": null, "hexsha": "268a318e0dec7dec2bccdab774109cebf71db0b2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
module PrimaryRecursive # Write your package code here. include("PRBase.jl") include("arithmetic.jl") export p1, p2, p3, PrimRec, succ, zro, Comb, Proj, add, mult, pred, cosub, dff, sgn, nsgn, const1, remainder, ge, ifel, square, floor_sqrt, traingle, pair, fib, fst, scd end
{ "alphanum_fraction": 0.7027972028, "author": null, "avg_line_length": 26, "converted": null, "ext": "jl", "file": null, "hexsha": "32625b235b9338ec1f0a1da81b93f58131d61d54", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": n...
/- Copyright (c) 2018 Kenny Lau. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kenny Lau, Yury Kudryashov -/ import algebra.algebra.tower /-! # The `restrict_scalars` type alias > THIS FILE IS SYNCHRONIZED WITH MATHLIB4. > Any changes to this file require a corresp...
{ "alphanum_fraction": null, "author": "leanprover-community", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_...
import numpy as np from future.cmorph import _dilate rows = 1024 cols = 1024 srows = 64 scols = 64 image = np.random.randint(0, 255, rows * cols, dtype=np.uint8).reshape( (rows, cols) ) selem = np.random.randint(0, 1, srows * scols, dtype=np.uint8).reshape( (srows, scols) ) out = np.zeros((rows, cols), dtype=...
{ "alphanum_fraction": 0.679245283, "author": null, "avg_line_length": 21.8235294118, "converted": null, "ext": "py", "file": null, "hexsha": "790d8aa3dd20e63992a5022c4c718a8f25bcdb4a", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import math import time import random import numpy as np from tqdm import tqdm, trange # 显示进度条 # 定义装饰器,监控运行时间 def timmer(func): def wrapper(*args, **kwargs): start_time = time.time() res = func(*args, **kwargs) stop_time = time.time() print('func %s, run time: %s' % (f...
{ "alphanum_fraction": 0.5439689511, "author": null, "avg_line_length": 30.7893081761, "converted": null, "ext": "py", "file": null, "hexsha": "f96d4e497d92ed21d32779d0342524157c513408", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# -*- coding: utf-8 -*- """Test for updater.ensemble module""" import numpy as np import datetime from stonesoup.models.measurement.linear import LinearGaussian from stonesoup.types.detection import Detection from stonesoup.types.hypothesis import SingleHypothesis from stonesoup.types.prediction import EnsembleStatePr...
{ "alphanum_fraction": 0.6912459135, "author": null, "avg_line_length": 41.7121212121, "converted": null, "ext": "py", "file": null, "hexsha": "dc84e5389fa187834bbfde5cf782068acaa06d45", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
[STATEMENT] lemma swing_pos_inv:"swing_pos w1 w2 \<Longrightarrow> (kauff_mat w1) = (kauff_mat w2)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. swing_pos w1 w2 \<Longrightarrow> kauff_mat w1 = kauff_mat w2 [PROOF STEP] unfolding swing_pos_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. w1 = r_over_braid \<a...
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Knot_Theory_Linkrel_Kauffman", "hexsha": null, "include": null, "lang": null, "length": 3, "llama_tokens": 280, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_fo...
# rng #random number generators #Computers are not capable of generating true random numbers #but can generate sequences with statistical randomness # 1 Julia's implemented solution rand(100) # LCP psuedo solutions function rng_Park_Miller1998(n;x1=3) x=zeros(n) x[1] = x1 u = zeros(n) ...
{ "alphanum_fraction": 0.527982327, "author": null, "avg_line_length": 17.8684210526, "converted": null, "ext": "jl", "file": null, "hexsha": "86ddef1e13ef8ff19bc72bf8ce82991f518d4ac3", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# import itertools import numpy as np import matplotlib.pyplot as plt from netCDF4 import Dataset from postladim import ParticleFile # --------------- # User settings # --------------- # Files particle_file = "station.nc" # particle_file = "/home/bjorn/ladim/examples/station/station.nc" grid_file = "../data/ocean_avg...
{ "alphanum_fraction": 0.6688632619, "author": null, "avg_line_length": 25.6478873239, "converted": null, "ext": "py", "file": null, "hexsha": "dc715bc12c12a83ed399bf8b2f8eb69b98741fe5", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
module PyCMA using PyCall const cma = PyNULL() function __init__() copy!(cma, pyimport("cma")) py""" import numpy as np """ end end # module
{ "alphanum_fraction": 0.6111111111, "author": null, "avg_line_length": 10.125, "converted": null, "ext": "jl", "file": null, "hexsha": "43a9b1836a065fd6ce9c13cb43d537378df68812", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
# # Copyright (c) 2014, Texas Water Development Board # All rights reserved. # # This code is open-source. See LICENSE file for details. # """ View definitions for controlling layout of survey line editor task Views are: *BigView: Example of use for overall layout with Controls on left and Plots on right. *P...
{ "alphanum_fraction": 0.5422647011, "author": null, "avg_line_length": 39.0696202532, "converted": null, "ext": "py", "file": null, "hexsha": "88ad22bdd8c2685baddae539e2e384c598954331", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
// Licensed under the Apache License, Version 2.0. // Author: Jin Qing (http://blog.csdn.net/jq0123) // Worker command shared ptr. #ifndef RPCZ_WORKER_CMD_PTR_HPP #define RPCZ_WORKER_CMD_PTR_HPP #include <boost/shared_ptr.hpp> namespace rpcz { namespace b2w { struct worker_cmd; struct handle_data_cmd; } // namespac...
{ "alphanum_fraction": 0.782778865, "author": null, "avg_line_length": 25.55, "converted": null, "ext": "hpp", "file": null, "hexsha": "5b6088d8a98bf20c1479bd66efcc9c3e21685e7c", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
""" grd2cpt(cmd0::String="", arg1=[], kwargs...) Make linear or histogram-equalized color palette table from grid Full option list at [`grd2cpt`](http://gmt.soest.hawaii.edu/doc/latest/grd2cpt.html) Parameters ---------- - **A** : **alpha** : **transparency** : -- Str -- Sets a constant level of transparency ...
{ "alphanum_fraction": 0.6155665025, "author": null, "avg_line_length": 44.5175438596, "converted": null, "ext": "jl", "file": null, "hexsha": "d66acf55d340f000eee524a651958ff3166fc9e7", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import numpy as np import torch import torch.nn.functional as F def cutmix(images, labels, alpha=1.0, beta=1.0, num_classes=10): """ Apply CutMix to a batch of images. Arguments: image (torch.FloatTensor): images. labels (torch.LongTensor): target labels. alpha (float): parameter ...
{ "alphanum_fraction": 0.6261160714, "author": null, "avg_line_length": 32.3855421687, "converted": null, "ext": "py", "file": null, "hexsha": "39ad754b3e6254fa6a1de83885da72bfd7b22a7c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
\chapter{Testing} \index{testing} Test jobs are generally contained in the source file of the package that they are testing and are extracted using a cradle composed of the package name appended by the letter T, e.g. {\bf hbookt]} for HBOOK. The tests for {\bf KERNGEN} are contained in a separate PAM file, KERNGENT. ...
{ "alphanum_fraction": 0.7223288548, "author": null, "avg_line_length": 16.4526315789, "converted": null, "ext": "tex", "file": null, "hexsha": "bc37a630ebf847215ec737a79697ac6247c99947", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# coding: utf-8 import numpy as np from scipy.sparse import diags from functools import singledispatch @singledispatch def mm(n_param : int, constraint="inc", dim=0): """Creates the mapping matrix for the constraint P-splines as in Fahrmeir, Regression p.436f, for the constraint. Paramters: --------...
{ "alphanum_fraction": 0.5950261273, "author": null, "avg_line_length": 38.2740740741, "converted": null, "ext": "py", "file": null, "hexsha": "1bb8ebd06dd3c1796617ab462ae17f41e2f4690d", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // This file was modified by Oracle on 2017. // Modifications copyright (c) 2017 Oracle and/or its affiliates. // Contributed and/or modified by Adam Wulkiewicz, on behalf of Oracle // Use, m...
{ "alphanum_fraction": 0.6309495897, "author": null, "avg_line_length": 27.8758169935, "converted": null, "ext": "hpp", "file": null, "hexsha": "4b0e9ed794a52b9baac5fbc21616e55663284943", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
''' 1. normalize by mean of each diagonal - args: mat: numpy.ndarray norm = normalizebydistance(mat) 2. calculate correlation between each column corr = correlation(norm, method='pearson', center=True) 3. perform eigenvalue decomposition - args: nc: number of eigenvectors returned pc = decomposition(corr, method='eig...
{ "alphanum_fraction": 0.5816811404, "author": null, "avg_line_length": 31.2974358974, "converted": null, "ext": "py", "file": null, "hexsha": "133960b0ef13c81e7a5410ddfd4810463c3d7693", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import numpy as np import pandas as pd from collections import defaultdict from tensorboard.backend.event_processing.event_accumulator import EventAccumulator def tabulate_events(dpath): summary_iterators = [EventAccumulator(os.path.join(dpath, dname)).Reload() for dname in os.listdir(dpath) if dname.sta...
{ "alphanum_fraction": 0.6419036564, "author": null, "avg_line_length": 38.2888888889, "converted": null, "ext": "py", "file": null, "hexsha": "e013fa846f3dab48cba955c8f84ab5aa0c7ee097", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
using MeshArrays, OceanStateEstimation, NetCDF p=dirname(pathof(MeshArrays)) include(joinpath(p,"../examples/Demos.jl")) """ random_flow_field(;np=12,nq=18) Set up a random flow field over a gridded domain of size np,nq ``` ϕ,u,v=random_flow_field() ``` """ function random_flow_field(;np=12,nq=18) Γ=simple_per...
{ "alphanum_fraction": 0.6327186365, "author": null, "avg_line_length": 25.3829787234, "converted": null, "ext": "jl", "file": null, "hexsha": "e9a15ac8d09950fa2715d62b3b1d718a6c885cc8", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import argparse import numpy as np import os import matplotlib.pyplot as plt import matplotlib as mpl import pandas mpl.use('Agg') """IMPORTANT""" # NOTE: this script assumes it is run in DReyeVR/Diagnostics/ assert("Diagnostics" in os.getcwd()) def plot_many_versus(data_x, data_ys, units="", name_x="X", name_y="Y",...
{ "alphanum_fraction": 0.616079989, "author": null, "avg_line_length": 34.4386792453, "converted": null, "ext": "py", "file": null, "hexsha": "e33a22f6b3c30bac47df09544cfbfed8406903df", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import os import numpy as np import subprocess import tempfile from hqca.tools import * from copy import deepcopy as copy def purify(rdm,quantstore): cdir = os.getcwd() rdm.save(name=cdir+'/_temp',spin=quantstore.spin_rdm) rdm.contract() path_to_maple = quantstore.path_to_maple print('Purifying 2-R...
{ "alphanum_fraction": 0.551897701, "author": null, "avg_line_length": 41.0670391061, "converted": null, "ext": "py", "file": null, "hexsha": "99fea6dd1b2882fea73adb35b6fa88d4245e3a24", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
% !TeX spellcheck = en_GB \documentclass[12pt]{beamer} \usetheme[sectionpage=none, subsectionpage=progressbar, progressbar=foot, numbering=fraction]{metropolis} \makeatletter \setlength{\metropolis@frametitle@padding}{1.6ex}% <- default 2.2 ex \setbeamertemplate{footline}{% \begin{beamercolorbox}[wd=\textwidth, se...
{ "alphanum_fraction": 0.6968052452, "author": null, "avg_line_length": 34.0493311037, "converted": null, "ext": "tex", "file": null, "hexsha": "f3272da705a15b0b4d68da331c1e72ce0e3917c1", "include": null, "lang": "TeX", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
import matplotlib.pyplot as plt import numpy as np import os def RAxisAngle(axis=[0, 1, 0], theta=0): """ Rotate an arbitrary point by an axis and an angle. """ cost = np.cos(theta) sint = np.sin(theta) return np.reshape( [ cost + axis[0] * axis[0] * (1 - cost), ...
{ "alphanum_fraction": 0.4495844441, "author": null, "avg_line_length": 28.2168141593, "converted": null, "ext": "py", "file": null, "hexsha": "04438c3c7b892a322f0d2303370f2006520a71e9", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np def KnuthSampling(total, m, left = -1): ''' :param total: total :param m: sample :return: ''' res = [] n = total for i in range(total): if i != left: if np.random.random() < m / n: res.append(i) m -= 1 n -= 1 ...
{ "alphanum_fraction": 0.4417910448, "author": null, "avg_line_length": 19.7058823529, "converted": null, "ext": "py", "file": null, "hexsha": "762d264a66ce0a0ff7a79f41bb9d510df8615799", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
Require Import Morphisms Coq.Floats.SpecFloat. From FloatCohorts Require Import Option Arith FloatPair Cohorts Tactics. Open Scope Z. Section natural_normalization. Fixpoint maximize_e' (m : positive) (e : Z) {struct m} : (positive * Z) := match m with | (m'~0)%positive => maximize_e' m' (e + 1) | _ ...
{ "alphanum_fraction": null, "author": "zoickx", "avg_line_length": null, "converted": null, "ext": null, "file": null, "hexsha": null, "include": null, "lang": null, "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_event_max_date...
from sentence_transformers import SentenceTransformer import numpy as np import re from sklearn.metrics.pairwise import cosine_similarity model = SentenceTransformer('roberta-large-nli-stsb-mean-tokens') def get_similarity(question, target, evall): question = re.sub('[\n\r]+', '', question) target = re.sub('...
{ "alphanum_fraction": 0.6729362591, "author": null, "avg_line_length": 35.4444444444, "converted": null, "ext": "py", "file": null, "hexsha": "a3f327ef31c78dd5e396a91a1eb099e67db5b006", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
module WaveformCommunications using QuadGK, Statistics export cosinepulse, halfsinepulse, rcpulse, srrcpulse, gaussianpulse, Constellation, pam, qam, psk, Pulse, pulseshaper, eyediag include("pulses.jl") include("constellations.jl") include("utils.jl") """ pulseshaper(c, pulse, nsyms = 20) Return...
{ "alphanum_fraction": 0.6816524909, "author": null, "avg_line_length": 25.71875, "converted": null, "ext": "jl", "file": null, "hexsha": "a66c17055c4b03bbb80d0da53b05c00948891297", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_cou...
import pickle import cv2 import numpy as np from src.utils.image import crop_person_img def load_gei(datapath, dim=None, crop_person=False, flatten=True): with open(datapath, 'rb') as f: data = pickle.load(f) X = [data[idx]['sample'].astype('float64') for idx in range(len(data))] if crop_perso...
{ "alphanum_fraction": 0.6291970803, "author": null, "avg_line_length": 23.6206896552, "converted": null, "ext": "py", "file": null, "hexsha": "d195c9d4b49a0663b3f6dba0492c5341b89ef587", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import re from typing import Dict, List, Optional, Tuple import numpy import pandas from nonbonded.library.models.datasets import DataSet, DataSetEntry from nonbonded.library.models.projects import Benchmark from nonbonded.library.models.results import BenchmarkResult, TargetResultType from nonbonded.library.models.t...
{ "alphanum_fraction": 0.6299645187, "author": null, "avg_line_length": 33.0946969697, "converted": null, "ext": "py", "file": null, "hexsha": "480a7dae887e35a7bee5b1ffd86752a8dc2c75da", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
from matplotlib import pyplot from ContrastBrightness import check import unittest import cv2 import sys sys.path.insert(0, '../login_signup') from detectors import age_model, gender_model, face_detect, crop from mtcnn.mtcnn import MTCNN import tensorflow as tf import numpy as np class Test(unittest.TestCase): de...
{ "alphanum_fraction": 0.6054421769, "author": null, "avg_line_length": 42, "converted": null, "ext": "py", "file": null, "hexsha": "9b256c64b0828d2a605695ca9ce62ad8f6244846", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count": ...
@testset "4.5.1.4 (d tan)^n (a+b sec)^m" begin (a, b, c, d, e, f, m, n, x, ) = @variables a b c d e f m n x #= ::Package:: =# #= ::Title:: =# #=Integrands*of*the*form*(d*tan(e+f*x))^n*(a+b*sec(e+f*x))^m=# #= ::Section::Closed:: =# #=Integrands*of*the*form*(d*tan(e+f*x))^n*(a+a*sec(e+f*x))^m=...
{ "alphanum_fraction": 0.429993517, "author": null, "avg_line_length": 241.0941176471, "converted": null, "ext": "jl", "file": null, "hexsha": "b8e466ca0c0eec9224cedf6379435594883af5ae", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
from pandex import * import pandas as pd import numpy as np import plotly_express as px import dash_core_components as dcc def rand_df(rows=5, cols=3, cumsum=True): if cumsum == 'False': return pd.DataFrame(np.random.randn(rows, cols)) return pd.DataFrame(np.random.randn(rows, cols)).cumsum() dbaor...
{ "alphanum_fraction": 0.6219879518, "author": null, "avg_line_length": 22.8965517241, "converted": null, "ext": "py", "file": null, "hexsha": "f140140047a98000954ef2431603e22e22876fb2", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import numpy as np import pandas as pd import scipy from sklearn import metrics from FPMax import FPMax from Apriori import Apriori from MASPC import MASPC import csv from scipy.cluster.hierarchy import fcluster from scipy.cluster.hierarchy import linkage from optbinning import ContinuousOptimalBinning # pd.set_option...
{ "alphanum_fraction": 0.6142380581, "author": null, "avg_line_length": 42.6939393939, "converted": null, "ext": "py", "file": null, "hexsha": "80a6384fe2a75d97fac98e4b46cb352f64286356", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
using Flux # ResidualBlock is used with `SkipConnection` # using Parallel, first extract features, then combine them together # separate filters struct ResidualBlock block end Flux.@functor ResidualBlock (b::ResidualBlock)(x) = x |> b.block .|> leakyrelu function basic_block() layer = Chain(Conv((3, 3, 3), 1...
{ "alphanum_fraction": 0.549870801, "author": null, "avg_line_length": 30.7142857143, "converted": null, "ext": "jl", "file": null, "hexsha": "0adce2470694137cb40bf498a20efb0767ac73a4", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
[STATEMENT] theorem exists_split: "(\<exists>x y. P x \<and> Q y) = ((\<exists>x. P x) \<and> (\<exists>y. Q y))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<exists>x y. P x \<and> Q y) = ((\<exists>x. P x) \<and> (\<exists>y. Q y)) [PROOF STEP] by simp
{ "alphanum_fraction": null, "author": null, "avg_line_length": null, "converted": null, "ext": null, "file": "Auto2_HOL_HOL_Logic_Thms", "hexsha": null, "include": null, "lang": null, "length": 1, "llama_tokens": 120, "mathlib_filename": null, "max_forks_count": null, "max_forks_repo_forks_...
//---------------------------------------------------------------------------- /// @file test_spinsort.cpp /// @brief test program of the spinsort algorithm /// /// @author Copyright (c) 2016 Francisco José Tapia (fjtapia@gmail.com )\n /// Distributed under the Boost Software License, Version 1.0.\n /// ...
{ "alphanum_fraction": 0.4604938272, "author": null, "avg_line_length": 31.3259668508, "converted": null, "ext": "cpp", "file": null, "hexsha": "a80d46697327effb6850bfef1aaa3329a26c7a0f", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks...
# coding:UTF-8 import numpy import talib import math from sklearn.preprocessing import scale from sklearn.preprocessing import minmax_scale class ChartFeature(object): def __init__(self, selector): self.selector = selector self.supported = { "ROCP", "MACD", "RSI", "VROCP",...
{ "alphanum_fraction": 0.5320156811, "author": null, "avg_line_length": 49.1069518717, "converted": null, "ext": "py", "file": null, "hexsha": "c74c54b1836f121ff5b61bf13739d1c5534d355e", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
### Introduction to Random Variables and Statistical Distributions ```python from scipy.stats import bernoulli, poisson, binom, norm, mvn import numpy as np from matplotlib import pyplot as plt import matplotlib %matplotlib inline ``` ```python headimg = plt.imread('../data/quarterheads.jpg') tailimg = plt.imread('...
{ "alphanum_fraction": 0.9273715483, "author": null, "avg_line_length": 448.5640495868, "converted": true, "ext": "ipynb", "file": null, "hexsha": "3c8a9235b0e8367140141fddd94589c87c619872", "include": null, "lang": "Jupyter Notebook", "length": null, "llama_tokens": null, "mathlib_filename": nu...
# This file is a part of Julia. License is MIT: https://julialang.org/license # –––––––– # Emphasis # –––––––– mutable struct Italic text end @trigger '*' -> function asterisk_italic(stream::IO, md::MD) result = parse_inline_wrapper(stream, "*") return result === nothing ? nothing : Italic(parseinline(re...
{ "alphanum_fraction": 0.6104205687, "author": null, "avg_line_length": 31.2393617021, "converted": null, "ext": "jl", "file": null, "hexsha": "0e9b0bfb2bbac37315326f717ca997f79ed850ca", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...
import ml_collections from jaxdl.rl.networks.actor_nets import create_normal_dist_policy_fn from jaxdl.rl.networks.critic_nets import create_double_critic_network_fn def get_config(): config = ml_collections.ConfigDict() config.algorithm = 'TD3' config.critic_net_fn = create_double_critic_network_fn( hidde...
{ "alphanum_fraction": 0.7860696517, "author": null, "avg_line_length": 30.15, "converted": null, "ext": "py", "file": null, "hexsha": "89bc2c8eda74828b7a2570dad3bed9621191ff6c", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_count...
#include <string> #include <sstream> #include <map> #include <memory> #include <vector> #include <gtest/gtest.h> #include <boost/graph/adjacency_list.hpp> #include "Alignment.hpp" #include "AlnGraphBoost.hpp" TEST(AlnGraphBoostTest, RawConsensus) { std::string backbone = "ATATTAGGC"; AlnGraphBoost ag(backbone)...
{ "alphanum_fraction": 0.600729927, "author": null, "avg_line_length": 23.6206896552, "converted": null, "ext": "cpp", "file": null, "hexsha": "7704ce947344bbeac8aba903326fbda4d3e8ba67", "include": null, "lang": "C++", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_forks_...
import numpy as np import pandas as pd import time import sys import emcee from sklearn.model_selection import GridSearchCV from sklearn.neighbors import KernelDensity def get_all_bandwidths(h5_file, thin_by=100, data_path = '', n_cores=8, ...
{ "alphanum_fraction": 0.5206861756, "author": null, "avg_line_length": 37.3962264151, "converted": null, "ext": "py", "file": null, "hexsha": "1fc36c11845b33cacda6c39e96940160a4b232a1", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
import os import numpy as np import tempfile import shutil import pickle import ntpath import nipype.pipeline.engine as pe import nipype.interfaces.utility as niu from nipype.interfaces.base import (TraitedSpec, File, traits, InputMultiPath, BaseInterface, OutputMultiPath, BaseInte...
{ "alphanum_fraction": 0.6592956593, "author": null, "avg_line_length": 47.8823529412, "converted": null, "ext": "py", "file": null, "hexsha": "49e7e62c1c9104cb314b453fc09eb61dbf4ee692", "include": true, "lang": "Python", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_for...
# This file was generated, do not modify it. # hide using DelimitedFiles using Plots img = readdlm("/tmp/benchC.txt",',',Int) M,N = img |> size p=heatmap(1:N, 1:M, img, aspect_ratio=1, size=(400,400)) savefig(p, joinpath(@OUTPUT, "mandC.png")) #hide
{ "alphanum_fraction": 0.6907630522, "author": null, "avg_line_length": 35.5714285714, "converted": null, "ext": "jl", "file": null, "hexsha": "b972c5be510a0745bd0a7ffc82bc8d8855eff801", "include": null, "lang": "Julia", "length": null, "llama_tokens": null, "mathlib_filename": null, "max_fork...