text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
include("inputs_struct.jl") include("constraints/constraints.jl") include("neighbourhood_struct.jl") include("output_struct.jl") include("models/models.jl")
{"hexsha": "ce2417ab2a2335be40761a649673a3a47371d874", "size": 157, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structs/structs.jl", "max_stars_repo_name": "giadasp/ATA.jl", "max_stars_repo_head_hexsha": "8ec4227c418784521e8d14623626e072a348fc79", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, ...
# This file was generated, do not modify it. # hide searchtime = @elapsed sknns, sdists = searchbatch(G, db, k; parallel=true) nothing # hide
{"hexsha": "7fae59bfd18733d158b9ee1cc8b17160aac4ce33", "size": 141, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/assets/tutorial/allknn/code/ex5.jl", "max_stars_repo_name": "sadit/SimilaritySearchDemos", "max_stars_repo_head_hexsha": "0924a140ea3d8efee1f9ccecfe514d17a891160c", "max_stars_repo_licenses": [...
import cv2 import math import numpy def psnr(target, ref): # assume RGB image target_data = numpy.array(target, dtype=float) ref_data = numpy.array(ref, dtype=float) diff = ref_data - target_data diff = diff.flatten('C') rmse = math.sqrt(numpy.mean(diff ** 2.)) return 20 * math.log10(25...
{"hexsha": "f863b53c97be17d1eb2292939409056b65b1a735", "size": 984, "ext": "py", "lang": "Python", "max_stars_repo_path": "Super-Resolution-CNN-for-Image-Restoration-master/SRCNN-keras-master/psnr.py", "max_stars_repo_name": "AhsanulIslam/Thesis_Computer_Vision", "max_stars_repo_head_hexsha": "c308cce15146a33a3e474790b...
import numpy as np class Loads(): ''' This Class calculates the load to be applied on the structure ''' def __init__(self, main_load_dict): self.main_load_dict = main_load_dict self.static_draft = main_load_dict['static_draft'] self.poly_third = main_load_dict['poly_third'] ...
{"hexsha": "df71329bf45c140a8c765672bf3ed2288b101440", "size": 16758, "ext": "py", "lang": "Python", "max_stars_repo_path": "testdata/calc_loads.py", "max_stars_repo_name": "Konstantin8105/py4go", "max_stars_repo_head_hexsha": "7c9f3cf0d939ad94d13abe109d15c885ca849cda", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import streamlit as st import pandas as pd from math import sqrt import numpy as np import seaborn as sns import matplotlib.pyplot as plt from sklearn.preprocessing import StandardScaler, MinMaxScaler from sklearn.model_selection import train_test_split from sklearn.linear_model import LinearRegression from sklearn....
{"hexsha": "49897a130341f5644b3b853c32831418abb383cd", "size": 19229, "ext": "py", "lang": "Python", "max_stars_repo_path": "gap.py", "max_stars_repo_name": "ayanbag/Graduate_Admission_Prediction", "max_stars_repo_head_hexsha": "f7fc8a1ee9b8e23977e3b3909363352d04b9dd07", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
module airfoil_m #ifdef dnad use dnadmod #define real type(dual) #endif use dataset_m implicit none type airfoil_t character(100) :: name character(20) :: properties_type integer :: has_data_file integer :: has_geom_file real :: aL0 ...
{"hexsha": "c0c523e78e2fdbcf9cc5d84654f2bd33a35439ea", "size": 3662, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "common/airfoil.f90", "max_stars_repo_name": "antzor10/MachUp", "max_stars_repo_head_hexsha": "dcc484d8aa1ddd74a55fc8fb767bc7e6ff56f8a0", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
/*************************************************************************** * Copyright 1998-2020 by authors (see AUTHORS.txt) * * * * This file is part of LuxCoreRender. * * ...
{"hexsha": "06655688c3dda959ab4f964a51a184764cd4ed07", "size": 88459, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/slg/engines/pathoclbase/compiletextures.cpp", "max_stars_repo_name": "Silverlan/LuxCore", "max_stars_repo_head_hexsha": "00c4eee95625a05290da0b3e3ae738fce2fdfdb5", "max_stars_repo_licenses": ["...
'''Test two-stage segmentation''' from pathlib import Path import shutil import tempfile import torch import numpy as np from PIL import Image from albumentations.augmentations.functional import center_crop from torchvision.transforms.functional import to_tensor from road_roughness_prediction.segmentation.datasets im...
{"hexsha": "9486c1c42342580b1b3f8914db9ec02560b976ba", "size": 2398, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/segmentation/test_segmentation_two_stage.py", "max_stars_repo_name": "mknz/dsr-road-roughness-prediction", "max_stars_repo_head_hexsha": "5f56b6ba5da70a09f2c967b7f32c740072e20ed1", "max_star...
[STATEMENT] lemma f_join_drop: "xs \<up> n \<Join>\<^sub>f I = xs \<Join>\<^sub>f (I \<oplus> n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. xs \<up> n \<Join>\<^sub> I = xs \<Join>\<^sub> (I \<oplus> n) [PROOF STEP] apply (case_tac "length xs \<le> n") [PROOF STATE] proof (prove) goal (2 subgoals): 1. length x...
{"llama_tokens": 1283, "file": "AutoFocus-Stream_IL_AF_Stream", "length": 13}
#!/usr/bin/env python3 import pandas as pd import socket import stars import numpy as np from angle import angle_between HOST = "myspace.satellitesabove.me" PORT = 5016 TICKET = 'ticket{golf97715papa:___a bunch of unguessable stuff___}' # Known from previous tries. # The output of this script is deliberately unstabl...
{"hexsha": "d88f82761bd40c0d59240ac1c8b5e09db263c47d", "size": 3814, "ext": "py", "lang": "Python", "max_stars_repo_path": "Astronomy Astrophysics Astrometry Astrodynamics AAAA/My 0x20/myspace.py", "max_stars_repo_name": "errir503/ADDVulcan", "max_stars_repo_head_hexsha": "df5d818cb9eb7b4165d1d21533c689bedc5941ff", "ma...
[STATEMENT] lemma cancellative: assumes "Some a = b \<oplus> x" and "Some a = b \<oplus> y" and "|x| = |y|" shows "x = y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. x = y [PROOF STEP] by (metis add_masks_cancellative assms(1) assms(2) assms(3) core_defined(1) plus_charact(1) state_ext)
{"llama_tokens": 136, "file": "Combinable_Wands_PartialHeapSA", "length": 1}
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright 2015-2016 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at #...
{"hexsha": "3be70f0cf9da350cb09c031c22a90f4a8d0deb80", "size": 3199, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/conv_autoencoder.py", "max_stars_repo_name": "theGreenJedi/neon", "max_stars_repo_head_hexsha": "b85ba0fbbb0458d8a8599e5ead335959b10318c1", "max_stars_repo_licenses": ["Apache-2.0"], "max...
[STATEMENT] lemma C_def: "Fr_1 \<F> \<Longrightarrow> Fr_2 \<F> \<Longrightarrow> Fr_4 \<F> \<Longrightarrow> \<forall>A p. (\<C> A p) \<longleftrightarrow> (\<forall>E. (nbhd E p) \<longrightarrow> \<not>(Disj E A))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>Fr_1 \<F>; Fr_2 \<F>; Fr_4 \<F>\<rbrakk> \<...
{"llama_tokens": 554, "file": "Topological_Semantics_topo_frontier_algebra", "length": 2}
from typing import Any import numpy as np import xarray as xr from xarray import Dataset from sgkit.stats.aggregation import count_call_alleles, count_variant_alleles from sgkit.testing import simulate_genotype_call_dataset from sgkit.typing import ArrayLike def get_dataset(calls: ArrayLike, **kwargs: Any) -> Datas...
{"hexsha": "291b81aca7563424aa72f6ad3e0c5b73d34d05f2", "size": 6344, "ext": "py", "lang": "Python", "max_stars_repo_path": "sgkit/tests/test_aggregation.py", "max_stars_repo_name": "jerowe/sgkit", "max_stars_repo_head_hexsha": "ff5a0a01ec6ae41d262ece14cc06a0b8c73ca342", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
# Introduction and Background By definition, a **decorator** is a function that takes another function and extends the behavior of the latter function without explicitly modifying it. Decorators provide a simple syntax for calling [higher-order functions](https://en.wikipedia.org/wiki/Higher-order_function). ## Funct...
{"hexsha": "736604cc1b66dd84a7c27099840849f94894b690", "size": 48467, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Python/decorator.ipynb", "max_stars_repo_name": "bingrao/notebook", "max_stars_repo_head_hexsha": "4bd74a09ffe86164e4bd318b25480c9ca0c6a462", "max_stars_repo_licenses": ["MIT"], "max...
KDRT DJs include or have included: Former KDRT DJs
{"hexsha": "33664cd362fb878ed1abb8c75d4d2a9845102184", "size": 57, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/KDRT_DJs.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ day_response.py a bar plot for day log response http://matplotlib.org/examples/api/barchart_demo.html Copyright (c) 2016年 li3huo.com All rights reserved. """ import argparse import numpy as np import matplotlib.pyplot as plt # labels = (u'0点', u'1点', u'2点', u'3点', u...
{"hexsha": "94b6f31206f43ee1f1ba1c3eacd8cc14b77cd2f9", "size": 5043, "ext": "py", "lang": "Python", "max_stars_repo_path": "log_to_graphs/day_response.py", "max_stars_repo_name": "twotwo/tools-python", "max_stars_repo_head_hexsha": "b9e7a97e58fb0a3f3fb5e8b674e64a997669c2c4", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma mset_set_set_mset_subseteq: "mset_set (set_mset M) \<subseteq># M" [PROOF STATE] proof (prove) goal (1 subgoal): 1. mset_set (set_mset M) \<subseteq># M [PROOF STEP] proof (induct M) [PROOF STATE] proof (state) goal (2 subgoals): 1. mset_set (set_mset {#}) \<subseteq># {#} 2. \<And>x M. mset_set ...
{"llama_tokens": 2833, "file": "Card_Multisets_Card_Multisets", "length": 27}
[STATEMENT] lemma rerename_subst_noop: "freshenLC from ` V \<inter> subst_lconsts s = {} \<Longrightarrow> subst_renameLCs (rerename V from to f) s = subst_renameLCs f s" [PROOF STATE] proof (prove) goal (1 subgoal): 1. freshenLC from ` V \<inter> subst_lconsts s = {} \<Longrightarrow> subst_renameLCs (rerenam...
{"llama_tokens": 162, "file": "Incredible_Proof_Machine_Abstract_Formula", "length": 1}
# -*- coding: utf-8 -*- """ Created on Mon Sep 6 13:53:55 2021 @author: jpeacock """ import numpy as np from xml.etree import cElementTree as et class TransferFunction: """ Deal with the complex XML format """ def __init__(self): self.index_dict = {"hx": 0, "hy": 1, "ex": 0, "ey": 1, "hz": ...
{"hexsha": "c3714d0af0b490cef92b73d3c3368ea8fdae6666", "size": 6468, "ext": "py", "lang": "Python", "max_stars_repo_path": "mt_metadata/transfer_functions/emtf_xml/data.py", "max_stars_repo_name": "kujaku11/mt_metadata", "max_stars_repo_head_hexsha": "92081e77550b737619f6c40c4ecb56e2e4d4d870", "max_stars_repo_licenses"...
from typing import Union, Optional, Any, List import numpy as np import eagerpy as ep from ..devutils import atleast_kd from ..models import Model from ..distances import Distance from ..criteria import Criterion from .base import FlexibleDistanceMinimizationAttack from .base import T from .base import get_criteri...
{"hexsha": "9903df4e6067cb418e56fa6d2ec6cf557618fc6a", "size": 3201, "ext": "py", "lang": "Python", "max_stars_repo_path": "foolbox/attacks/dataset_attack.py", "max_stars_repo_name": "SamplingAndEnsemblingSolvers/foolbox", "max_stars_repo_head_hexsha": "788ea92b314cd974b39047000ed692a48c7e5bf1", "max_stars_repo_license...
(** Generated by coq-of-ocaml *) Require Import OCaml.OCaml. Local Set Primitive Projections. Local Open Scope string_scope. Local Open Scope Z_scope. Local Open Scope type_scope. Import ListNotations. Unset Positivity Checking. Unset Guard Checking. Inductive nat : Set := | O : nat | S : nat -> nat. Inductive natu...
{"author": "yalhessi", "repo": "lemmaranker", "sha": "53bc2ad63ad7faba0d7fc9af4e1e34216173574a", "save_path": "github-repos/coq/yalhessi-lemmaranker", "path": "github-repos/coq/yalhessi-lemmaranker/lemmaranker-53bc2ad63ad7faba0d7fc9af4e1e34216173574a/benchmark/clam/_lfind_clam_lf_goal33_mult_commut_91_mult_succ/goal33c...
""" ModelNet10(;kwargs...) Returns ModelNet10 dataset. ### Optional Key Arguments: * `root::String=default_root` - Root directory of dataset * `train::Bool=true` - Specifies the trainset * `transform=nothing` - Transform to be applied to data point. * `categories::Vector{Str...
{"hexsha": "e3dd84547868c9c80befd19683f443863adaa8fb", "size": 892, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/datasets/modelnet/mn10.jl", "max_stars_repo_name": "kool7d/Flux3D.jl", "max_stars_repo_head_hexsha": "cbb6e64344ed5767b79cae36556957f1233cd84e", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Thu Dec 6 11:24:49 2018 @author: rhou """ import warnings warnings.filterwarnings("ignore") import argparse import pandas as pd import os, sys, glob from scipy import io def CalCords(savefolder, em, visMethod): cordFile = os.path.join(savefolder, 'co...
{"hexsha": "55d93fa6ffab41676755b7037f2db739f2f90e47", "size": 7320, "ext": "py", "lang": "Python", "max_stars_repo_path": "visAnnos.py", "max_stars_repo_name": "kant/scMatch", "max_stars_repo_head_hexsha": "bc116c867ec2d1e635245dbc975078d6b641012a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_sta...
def neuronal_network(X,y,num_labels,hidden_size,learning_rate,max_iter): import numpy as np from sklearn.preprocessing import OneHotEncoder X = np.matrix(X) y = np.matrix(y) encoder = OneHotEncoder(sparse=False) y_2D=y.reshape(-1,1) y_onehot = encoder.fit_transfo...
{"hexsha": "c7c0b53c4e627c73a3155b70a8404d2800df2671", "size": 5277, "ext": "py", "lang": "Python", "max_stars_repo_path": "NeuronalNetwork2.py", "max_stars_repo_name": "Joseph-Garzon/MachineLearningGUI", "max_stars_repo_head_hexsha": "12ee5a2f7f8309de0b5b6a17ad6d6731da70de70", "max_stars_repo_licenses": ["MIT"], "max_...
using OrderedCollections, Test using OrderedCollections: FrozenLittleDict, UnfrozenLittleDict @testset "LittleDict" begin @testset "Type Aliases" begin FF1 = LittleDict{Int,Int, NTuple{10, Int}, NTuple{10, Int}} @test FF1 <: FrozenLittleDict{<:Any, <:Any} @test FF1 <: FrozenLittleDict ...
{"hexsha": "46d54a05de4cea5dcb89c9b8fa8acf4c2617f712", "size": 16076, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_little_dict.jl", "max_stars_repo_name": "mcognetta/OrderedCollections.jl", "max_stars_repo_head_hexsha": "342792ccb4d14bf7c49b0812b0375981a1448b9f", "max_stars_repo_licenses": ["MIT"], "...
import numpy as np import time import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import torchvision import torchvision.models as models import torchvision.transforms as transforms import matplotlib.pyplot as plt from PIL import Image from google.cloud import storage def ge...
{"hexsha": "aaa468f645aca2900bf27891018f4fa147e9e746", "size": 7501, "ext": "py", "lang": "Python", "max_stars_repo_path": "Training/regression_training.py", "max_stars_repo_name": "hammad-mohi/FacialAgeEstimator", "max_stars_repo_head_hexsha": "1372e4a72afb94b5ae32394109fae9e9982c8b0b", "max_stars_repo_licenses": ["MI...
#! /usr/bin/env julia write(STDOUT, "I'm writing some stuff to STDOUT\n") f = open("stream_test.txt", "w") write(f, "I'm writing some stuff to a file\n") close(f) write(STDOUT, "I should have just wrote to a file.\n")
{"hexsha": "abf158b157e1f6ea45235be2471de44d2da6d64a", "size": 223, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "attic/streams/stream_writing.jl", "max_stars_repo_name": "sjkelly/JuliaPlayground", "max_stars_repo_head_hexsha": "7636a33d6f24c0bd56041a69822a7982b88c5b71", "max_stars_repo_licenses": ["MIT"], "max...
#!/usr/bin/env python """ fit a binomial distribution with several parameterizations """ import sys,os import numpy as np import matplotlib.pyplot as plt import scipy.stats as scs plt.style.use('bmh') ## declare variables font_size = 11 font_name = 'sans-serif' n = 10000 fig = plt.figure(figsize=(10,6),dpi=300) splo...
{"hexsha": "27be479f372e5824e730ba9e386fdecfa8e0c7ce", "size": 1089, "ext": "py", "lang": "Python", "max_stars_repo_path": "binomial-distn.py", "max_stars_repo_name": "jackbenn/probabilistic-programming-intro", "max_stars_repo_head_hexsha": "b68f141481052dd53ebd5a2675b053740d745239", "max_stars_repo_licenses": ["BSD-3-...
# Copyright 2019-present NAVER Corp. # CC BY-NC-SA 3.0 # Available only for non-commercial use import os, pdb import numpy as np from PIL import Image from .dataset import Dataset, CatDataset from tools.transforms import instanciate_transformation from tools.transforms_tools import persp_apply class PairDataset (Da...
{"hexsha": "aeed98b6700e0ba108bb44abccc20351d16f3295", "size": 10058, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyslam/thirdparty/r2d2/datasets/pair_dataset.py", "max_stars_repo_name": "dysdsyd/VO_benchmark", "max_stars_repo_head_hexsha": "a7602edab934419c1ec73618ee655e18026f834f", "max_stars_repo_licenses...
from pyroad import * from road.road_builder import RoadBuilder import numpy as np import collections import random class Road(PyRoad): def get_description(self): return 'A square region with random intersecting trajectories' def get_asciiart(self): return \ ''' |----A----| ...
{"hexsha": "113082c1233f61c60e31b445751ae773fefb238f", "size": 2762, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_roads/random-conflict-square.py", "max_stars_repo_name": "jadnohra/daisy", "max_stars_repo_head_hexsha": "105c0f37c6adbe85ce830375c5e2fc89cbcc6cc9", "max_stars_repo_licenses": ["MIT"], "max_sta...
import h5py import os #import sys from glob import glob from tqdm import tqdm import numpy as np import resampy from metrics import read_wav_scipy_float64, get_mfcc_pw, eval_nn_mcd #from metrics import get_f0_pw_sptk, eval_rmse_f0 from metrics import eval_pesq_8k from metrics import eval_pesq #filename=sys.argv[1] #ou...
{"hexsha": "60b19d932e0f3b207b602a38906cce67606b5603", "size": 8309, "ext": "py", "lang": "Python", "max_stars_repo_path": "cmp_all_wave.py", "max_stars_repo_name": "deciding/speech_metrics", "max_stars_repo_head_hexsha": "87ef769a81efd060f4505bb4b3c09357ac53432e", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
@testset "lasing" begin # Create a system. Ngrid = [3,3,3] N = 3prod(Ngrid) ind_in = 5:7 εc = ones(ComplexF64, N) εc[ind_in] .= 12+0.1im m = 1 ωₘ = 100.0 ωₐ = 1.0 γ˔ = 1.0 D₀ = fill(0.01, N) D₀[ind_in] .= 1.0 gp = GainProfile(gen_gain_2lv(ωₐ,γ˔), D₀) # Create a solution. M = 3 ω = rand(M) ω[m] = ωₘ a² = rand(M) abs2g...
{"hexsha": "d4a33d6ab4bad756d0492f513f1a1287badbe799", "size": 1385, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/lasing.jl", "max_stars_repo_name": "wsshin/SALTBase.jl", "max_stars_repo_head_hexsha": "7e649196ebe80045e17a3227280011fb3fab1cb3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "ma...
import numpy as np import gym class NormalizeObservWrapper(gym.Wrapper): """ Wrapper to normalize the observation space. :param env: (gym.Env) Gym environment that will be wrapped """ def __init__(self, env): # Retrieve the observation space observation_space = env.observation_spa...
{"hexsha": "3d9f4e05536a22f08781c35599ceb98a2fe7e341", "size": 1977, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/frobs_rl/wrappers/NormalizeObservWrapper.py", "max_stars_repo_name": "jmfajardod/gym_gazebo_sb3", "max_stars_repo_head_hexsha": "72afcd4943c2c145e7e01bfce842f2d09b5b7978", "max_stars_repo_lice...
from datetime import datetime import time import os import sys import random import tensorflow as tf import numpy as np import pickle import data_utils import utils import scorer import logging import copy from scheduler import ReduceLROnPlateau import sprnn_model as model tf.app.flags.DEFINE_string('data_dir', '../d...
{"hexsha": "f8e6e608ce2e03031909c6d4626abf66402323f8", "size": 18657, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselines/sdp-lstm/dependency-kbp/train-greedy.py", "max_stars_repo_name": "Milozms/feedforward-RE", "max_stars_repo_head_hexsha": "a0415b6b835287d7257936c7cbb03abb467a17a8", "max_stars_repo_lice...
% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \chapter{Theoretical background}\label{chap:1} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Introduction}\lab...
{"hexsha": "c1d7328520defc8495a62d32ab3baf19f34565db", "size": 101883, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "report_computational/chapters/chapter_1.tex", "max_stars_repo_name": "nikikilbertus/report_sky-moca", "max_stars_repo_head_hexsha": "e7f4cbb06e2df01192f571d5d62d7539d0fb256e", "max_stars_repo_lice...
import os import sys curr_path = os.path.abspath(os.path.dirname(__file__)) sys.path.append(os.path.join(curr_path, "..")) import argparse from glob import glob from matplotlib import pyplot as plt import numpy as np import mxnet as mx from mxnet.gluon.data import DataLoader, ArrayDataset from mxnet.gluon.data.vision...
{"hexsha": "0f9c58a7add1a0ec6a176c4f4026b7ccf49e9bf5", "size": 3302, "ext": "py", "lang": "Python", "max_stars_repo_path": "data/show_record.py", "max_stars_repo_name": "haleuh/ArcFace-MXNet-Gluon", "max_stars_repo_head_hexsha": "503cf49c84fed51fc035e5d91031ac7733bb43fa", "max_stars_repo_licenses": ["MIT"], "max_stars_...
#!/usr/bin/python import numpy as np from scipy.spatial.distance import pdist, squareform # three points points = np.array([[-1, 1], [1, 0], [2, 0]]) # distance between all points d = squareform(pdist(points, 'euclidean')) print(d)
{"hexsha": "6bcb0cbbbe3c4063b05534c46775d16e49866111", "size": 235, "ext": "py", "lang": "Python", "max_stars_repo_path": "datascience/numpy/points_distance.py", "max_stars_repo_name": "janbodnar/Python-Course", "max_stars_repo_head_hexsha": "51705ab5a2adef52bcdb99a800e94c0d67144a38", "max_stars_repo_licenses": ["BSD-2...
#!/usr/bin/env python3 import logging # import numpy as np import pystella.model.sn_eve as sneve import pystella.rf.light_curve_plot as lcp from pystella import phys try: import matplotlib.pyplot as plt import matplotlib.lines as mlines mpl_logger = logging.getLogger('matplotlib') mpl_logger.setLeve...
{"hexsha": "d1022694d40323e123fa022f334cf1ca7fa932d5", "size": 16632, "ext": "py", "lang": "Python", "max_stars_repo_path": "eve.py", "max_stars_repo_name": "baklanovp/pystella", "max_stars_repo_head_hexsha": "47a8b9c3dcd343bf80fba80c8468b803f0f842ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s...
// ----------------------------------------------------------------------- // pion-common: a collection of common libraries used by the Pion Platform // ----------------------------------------------------------------------- // Copyright (C) 2007-2008 Atomic Labs, Inc. (http://www.atomiclabs.com) // // Distributed und...
{"hexsha": "b49290cc5d95cbb54d2bae621a192124bc84ae84", "size": 9949, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "common/include/pion/PionLockedQueue.hpp", "max_stars_repo_name": "marshallmcmullen/pion", "max_stars_repo_head_hexsha": "7dcbe769e7076f5cc983bb4a5b5d2bc83cadb3a2", "max_stars_repo_licenses": ["BSL-1...
import spikeextractors as si import os import time import numpy as np from os.path import join from subprocess import Popen, PIPE import shlex def spyking_circus( recording, output_folder=None, # Temporary working directory probe_file=None, file_name=None, detect_sign=-1, # -...
{"hexsha": "f7d90a2613bcc48c1cb0713310e58e5b50dd7836", "size": 5237, "ext": "py", "lang": "Python", "max_stars_repo_path": "spikeforest_batch_run/sorters/spyking_circus/spyking_circus.py", "max_stars_repo_name": "magland/spikeforest_batch_run", "max_stars_repo_head_hexsha": "7b6bbf6e3a108c1e83ed69ccc4540f3285da8bc5", "...
import os import collections import numpy as np import json from deephyper.search import util from deephyper.search.nas import NeuralArchitectureSearch from deephyper.core.parser import add_arguments_from_signature from deephyper.core.logs.logging import JsonMessage as jm from deephyper.evaluator.evaluate import Encod...
{"hexsha": "402950e84d51e905d487ca11ab754649fbe97e75", "size": 6680, "ext": "py", "lang": "Python", "max_stars_repo_path": "deephyper/search/nas/regevo.py", "max_stars_repo_name": "bigwater/deephyper", "max_stars_repo_head_hexsha": "4427e30c7b76b6f87cc417d0871768efe078f850", "max_stars_repo_licenses": ["BSD-3-Clause"],...
import numpy as np from scipy.spatial.distance import pdist, squareform def scalar_dpp_diversity(x, max_distance=1.): x = np.array(x)[:,None] K = max_distance - squareform(pdist(x)) K /= max_distance return np.linalg.det(K) def scalar_mean_pdist_diversity(x): x = np.array(x)[:,None] return n...
{"hexsha": "80782c0d496ea3484416bd2e855bfb6ba8e8bb5e", "size": 427, "ext": "py", "lang": "Python", "max_stars_repo_path": "suggestion/diversity.py", "max_stars_repo_name": "kcarnold/sentiment-slant-gi18", "max_stars_repo_head_hexsha": "6028b42627e3eec14a1f27986f8925d8b1e6ad9c", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sun Jan 22 13:05:03 2017 @author: dionisis """ file='example' from numpy import zeros, ones def read_input(): from numpy import zeros f = open('input_files/'+ file + '.in','r') line = f.readline() noOfIngredients = 2 fline = l...
{"hexsha": "5b925a2cde87f7e814c0f5b0d718c81e5ea6e168", "size": 3353, "ext": "py", "lang": "Python", "max_stars_repo_path": "hashcode/pizza/CORE.py", "max_stars_repo_name": "nonsensedwarf/mcube", "max_stars_repo_head_hexsha": "1aadbd41c93de516af38c7313a1578327c4c850d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
from brl_gym.envs.crosswalk_vel import CrossWalkVelEnv import numpy as np env = CrossWalkVelEnv() env.reset() goals = env.goals peds = env.pedestrians pose = env.pose ped_speeds = env.pedestrian_speeds print("Car 37, 38, 35") print("Peds :\n", np.around(peds,1)) print("Ped speeds:\n", np.around(ped_speeds,2)) pr...
{"hexsha": "a9c7a1bb7d4cb52e8276db48814c90777f6661e9", "size": 772, "ext": "py", "lang": "Python", "max_stars_repo_path": "brl_gym/scripts/crosswalk_vel/generate_initial_conditions.py", "max_stars_repo_name": "gilwoolee/brl_gym", "max_stars_repo_head_hexsha": "9c0784e9928f12d2ee0528c79a533202d3afb640", "max_stars_repo_...
subroutine enddet(cnpart,ielmt,i) c c + + + PURPOSE + + + c c SR ENDDET determines the point where detachment ends. c c Called from: SR CASE34 c Author(s): Ascough II, R. van der Zweep, V. Lopes c Reference in User Guide: c c Version: c Date recoded: c Recoded by: Jim Ascough II c ...
{"hexsha": "88b25b4a5a8bf3054ff261435add60cfac1b9314", "size": 2697, "ext": "for", "lang": "FORTRAN", "max_stars_repo_path": "src/wepp2012-src/enddet.for", "max_stars_repo_name": "jarad/dep", "max_stars_repo_head_hexsha": "fe73982f4c70039e1a31b9e8e2d9aac31502f803", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import tensorflow as tf from bvlc_alexnet_fc7 import AlexNet import fine_tune_nt import numpy as np import os import time import cv2 import image_io # the dimension of the final layer = feature dim NN_DIM = 100 LABEL_DIM = 3 TRAIN_TXT = 'file_list_fine_tune_train.txt' # TEST_TXT = 'file_list_test.txt' TRAIN = True S...
{"hexsha": "533345bfd4a1b64b10707e7e90709e587fee76ea", "size": 5198, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn/fine_tune_nn.py", "max_stars_repo_name": "polltooh/FineGrainedAction", "max_stars_repo_head_hexsha": "4582b4179e643119448c7c20ab06044fb211163e", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
using LinearAlgebra # positions x⃗ = [-1, 0, 1] .* 1.0 # position operator x̂ = Diagonal(x⃗) # construct differentiation matrix / position operator X⃗ = [x⃗[i]^(j-1) for i in eachindex(x⃗), j in eachindex(x⃗)] dX⃗ = [(j-1) * x⃗[i]^(j-2) for i in eachindex(x⃗), j in eachindex(x⃗)] dX⃗[:,1] .= 0.0 # get rid of NaNs # ...
{"hexsha": "f321f9a41516ea957b9fef66c7d9cf582c770173", "size": 560, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "quantum_mechanics.jl", "max_stars_repo_name": "sandreza/HeldSuarezVisualizationScripts", "max_stars_repo_head_hexsha": "904ce7f44e965618b0ba6f5fa89015ba02aaf44a", "max_stars_repo_licenses": ["MIT"],...
from __future__ import absolute_import, division, print_function import csv import logging import os import sys from io import open import json from nltk.tokenize import sent_tokenize import numpy as np from proof_utils import get_proof_graph, get_proof_graph_with_fail logger = logging.getLogger(__name__) class I...
{"hexsha": "0b603806eb9cd32a14e1a0e0a755104c9f361b9b", "size": 31097, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils_iterative_mprover.py", "max_stars_repo_name": "swarnaHub/multiPRover", "max_stars_repo_head_hexsha": "ac2f1094bab8390f47aeb8bad7dcde9b4b19240b", "max_stars_repo_licenses": ["MIT"], "max_sta...
#!/usr/bin/env python # vim: set fileencoding=utf-8 : # @author: Manuel Guenther <Manuel.Guenther@idiap.ch> # @date: Thu May 24 10:41:42 CEST 2012 # # Copyright (C) 2011-2012 Idiap Research Institute, Martigny, Switzerland # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
{"hexsha": "2f205baf90b06ea62ce2611516a6fcb5747bd45a", "size": 6467, "ext": "py", "lang": "Python", "max_stars_repo_path": "bob/bio/face/test/test_extractors.py", "max_stars_repo_name": "bioidiap/bob.bio.face", "max_stars_repo_head_hexsha": "2341e6423ca5a412ebe23fa18acacd69ea1ef914", "max_stars_repo_licenses": ["BSD-3-...
# Deprecated! import csv import os import numpy as np from constants import PROJECT_HOME, INDEX_RETURN_INDICATOR_NUMBER from data.combine_data import COMBINATION_COLUMN_RANGE_KEY_FUND_RETURN, \ COMBINATION_COLUMN_RANGE_KEY_FUND_BENCHMARK_RETURN, COMBINATION_COLUMN_RANGE_KEY_INDEX_RETURN, \ combination_column...
{"hexsha": "aee9d0ffdd31315c72f44d87f248f977fe9b65d0", "size": 2767, "ext": "py", "lang": "Python", "max_stars_repo_path": "program/predict_and_save_result__without_generator.py", "max_stars_repo_name": "donyori/2018ccf_bdci_inter_fund_correlation_prediction", "max_stars_repo_head_hexsha": "6e06a3e192e05ae1e9822111cf32...
import argparse parser = argparse.ArgumentParser(description="control voa and take megadata") parser.add_argument("--power", default=5, type=float, help="On voltage of VOA") parser.add_argument("--delay", default=10, type=float, help="Delay between starting megadaq and turning on voa (in ms)") parser.add_argument(...
{"hexsha": "1304534d80b2dff7e32c9acf5d7838faeb29410b", "size": 3700, "ext": "py", "lang": "Python", "max_stars_repo_path": "voa_and_megadata.py", "max_stars_repo_name": "cdoolin/labtools", "max_stars_repo_head_hexsha": "867a2726f5a707a8f5e698bf4a6bb4de40cfbe27", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
#include <boost/interprocess/sync/named_sharable_mutex.hpp>
{"hexsha": "4c90a666bdab6e0ae6252d8b0f7e5ac720ead1cc", "size": 60, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_interprocess_sync_named_sharable_mutex.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_lic...
C Copyright (c) 2014, Sandia Corporation. C Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, C the U.S. Government retains certain rights in this software. C C Redistribution and use in source and binary forms, with or without C modification, are permitted provided that the foll...
{"hexsha": "6c3c1ea58fe89224be7cf0b48c3adf797166f70f", "size": 4926, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "packages/seacas/applications/fastq/skinit.f", "max_stars_repo_name": "milljm/seacas", "max_stars_repo_head_hexsha": "4990651554b336901e260304067ff91c7284531f", "max_stars_repo_licenses": ["NetCDF"...
#ifndef BOOST_GEOMETRY_PROJECTIONS_GSTMERC_HPP #define BOOST_GEOMETRY_PROJECTIONS_GSTMERC_HPP // Boost.Geometry - extensions-gis-projections (based on PROJ4) // This file is automatically generated. DO NOT EDIT. // Copyright (c) 2008-2015 Barend Gehrels, Amsterdam, the Netherlands. // Use, modification and distribut...
{"hexsha": "b73ef80a226e862cdc32ba4d3c58746ad08e1ebd", "size": 9230, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "3party/boost/boost/geometry/extensions/gis/projections/proj/gstmerc.hpp", "max_stars_repo_name": "bowlofstew/omim", "max_stars_repo_head_hexsha": "8045157c95244aa8f862d47324df42a19b87e335", "max_sta...
import csv import os import pandas as pd import torch import numpy as np # WARNING: TAKES A LONG TIME TO RUN, HAS EVERY POSSIBLE CONNECTION BETWEEN AIRPORTS, EVEN ONES WITHOUT FLIGHTS # ALSO: THIS FILE MIGHT BE USELESS. WHATEVER FILE USES THE MATRIX CAN JUST CHECK IF A SPECIFIC ENTRY EXISTS IN IT # IF THE ENTR...
{"hexsha": "6e8aaf33867e8c49916865f05f325392e5a7e95d", "size": 2471, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/FullMatrix.py", "max_stars_repo_name": "BrenoPin/AirTrafficSTGCN", "max_stars_repo_head_hexsha": "ba7e7421a15f56d96c62ee85dbd29b63205053e7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import torch import numpy as np eps = np.finfo(np.float32).eps PI = 3.141592 chrom0 = torch.tensor([[1.0], [1.0], [1.0]]) chrom0 /= torch.norm(chrom0, p=2) temp = torch.tensor([[0.0], [0.0], [1.0]]) chrom1 = torch.cross(chrom0, temp) chrom1 /= torch.norm(chrom1, p=2) chrom2 = torch.cross(chrom0, chrom1) chrom2 /= to...
{"hexsha": "9954254e825e31066be1f76613b7d383d63472ac", "size": 3773, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "kakumarabhishek/Illumination-based-Transformations-Skin-Lesion-Segmentation", "max_stars_repo_head_hexsha": "26e3ddf3b5ff4c994e3cf77bdd84f3a4fc66a25b", "max_star...
from __future__ import print_function # COMPARE STRINGS WHICH MIGHT CONTAIN UNICODES ############################################################################ def insensitive(string): """Given a string, returns its lower/upper case insensitive string""" if getattr(str,'casefold',None) is not None: i...
{"hexsha": "675fafde8f969dd1c162202327ae998b915177c4", "size": 4954, "ext": "py", "lang": "Python", "max_stars_repo_path": "Florence/Utils/Utils.py", "max_stars_repo_name": "jdlaubrie/florence", "max_stars_repo_head_hexsha": "830dca4a34be00d6e53cbec3007c10d438b27f57", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
[STATEMENT] lemma cos_one_sin_zero: fixes x :: "'a::{real_normed_field,banach}" assumes "cos x = 1" shows "sin x = 0" [PROOF STATE] proof (prove) goal (1 subgoal): 1. sin x = (0::'a) [PROOF STEP] using sin_cos_squared_add [of x, unfolded assms] [PROOF STATE] proof (prove) using this: (sin x)\<^sup>2 + (1::'a)\<^...
{"llama_tokens": 191, "file": null, "length": 2}
[GOAL] α : Type u β : Type v δ : Type w s : Stream' α i : ℕ ⊢ (head s :: tail s) i = s i [PROOFSTEP] cases i [GOAL] case zero α : Type u β : Type v δ : Type w s : Stream' α ⊢ (head s :: tail s) zero = s zero [PROOFSTEP] rfl [GOAL] case succ α : Type u β : Type v δ : Type w s : Stream' α n✝ : ℕ ⊢ (head s :: tail s) (suc...
{"mathlib_filename": "Mathlib.Data.Stream.Init", "llama_tokens": 20635}
// Copyright (c) 2007-2015 Hartmut Kaiser // Copyright (c) 2016 Thomas Heller // Copyright (c) 2011 Bryce Adelstein-Lelbach // // 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 HPX_LCOS_DETAIL_...
{"hexsha": "881081bcac09ddbcdfbdc54af9e508227246844b", "size": 12050, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "hpx/lcos/detail/promise_base.hpp", "max_stars_repo_name": "atrantan/hpx", "max_stars_repo_head_hexsha": "6c214b2f3e3fc58648513c9f1cfef37fde59333c", "max_stars_repo_licenses": ["BSL-1.0"], "max_star...
# from classifier.feed_forward_neural_network import FeedForwardNeuralNetwork from classifier.feed_forward_neural_network import FeedForwardNeuralNetwork import pandas as pd from sklearn.preprocessing import LabelEncoder import numpy as np from sklearn import datasets data_tennis = pd.read_csv("tennis.csv", dtype="c...
{"hexsha": "73843ac928820d6c6c5ab8df3b6347c1c4a7a894", "size": 1637, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "reeechart/raklassifier", "max_stars_repo_head_hexsha": "f2bdc8dd12350b52ecfa3084f4346284b419bbf8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
#!/usr/bin/env python import numpy as np from pycrazyswarm import * Z = 1.0 if __name__ == "__main__": swarm = Crazyswarm() timeHelper = swarm.timeHelper allcfs = swarm.allcfs pos0s = [cf.position() for cf in allcfs.crazyflies] allcfs.takeoff(targetHeight=Z, duration=1.0+Z) timeHelper.s...
{"hexsha": "c7c5b1b0d43e9cb9fa9eebb5f32e482b41666031", "size": 655, "ext": "py", "lang": "Python", "max_stars_repo_path": "ros_ws/src/crazyswarm/scripts/niceHover.py", "max_stars_repo_name": "dasc-lab/crazyswarm", "max_stars_repo_head_hexsha": "f768c80bbfc25a757897030300d567c683623aaa", "max_stars_repo_licenses": ["MIT...
[STATEMENT] lemma Max_union_Max_out: assumes "finite Y" and "\<forall>y \<in> Y. finite (f y)" and "\<forall>y \<in> Y. f y \<noteq> {}" and "Y \<noteq> {}" shows "Max (\<Union>y\<in>Y. {Max (f y)}) = Max (\<Union>y\<in>Y. f y)" (is "?M1=_") [PROOF STATE] proof (prove) goal (1 subgoal): 1. Max (\<Union>y\<in>Y. {M...
{"llama_tokens": 3103, "file": "Query_Optimization_Dtree", "length": 27}
import unittest import pytest try: import scipy.sparse scipy_available = True except ImportError: scipy_available = False from cupy import testing from cupyx.scipy import sparse if scipy_available: class DummySparseCPU(scipy.sparse.spmatrix): def __init__(self, maxprint=50, shape=None, nnz=...
{"hexsha": "1cece0ea471052c8da91f34a934b1bd4fc10e2de", "size": 2174, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/cupyx_tests/scipy_tests/sparse_tests/test_base.py", "max_stars_repo_name": "prkhrsrvstv1/cupy", "max_stars_repo_head_hexsha": "ea86c8225b575af9d2855fb77a306cf86fd098ea", "max_stars_repo_lice...
import pyclesperanto_prototype as cle import numpy as np def test_maximum_sphere_1(): test = cle.push(np.asarray([ [1, 1, 1], [1, 2, 1], [1, 1, 1] ])) test2 = cle.create(test) cle.maximum_sphere(test, test2, 1, 1, 1) a = cle.pull(test2) assert (np.min(a) == 1) asse...
{"hexsha": "063d0fa7712d527884ac622a994264e5a236717f", "size": 831, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_maximum_sphere.py", "max_stars_repo_name": "elsandal/pyclesperanto_prototype", "max_stars_repo_head_hexsha": "7bda828813b86b44b63d73d5e8f466d9769cded1", "max_stars_repo_licenses": ["BSD-...
""" --- Returns the vector of allocated subcarriers associated to Long Term evolution frequency mapping. In LTE, depending on FFT size, only few subcarriers are allocated (45-55%). This function takes a FFT size as input and returns an array of size nbSubcarriers # --- Syntax allocatedSubcarrier = getLTEAlloc(nFF...
{"hexsha": "2633d5dc4cd96f433d2186d8e23a68a1c88839fd", "size": 1209, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Waveforms/getLTEAlloc.jl", "max_stars_repo_name": "JuliaTelecom/DigitalComm.jl", "max_stars_repo_head_hexsha": "13c854b9c4a8864787075e06e0e3ef5a1d30beae", "max_stars_repo_licenses": ["MIT"], "m...
#Fit dirlichet models to all functional and phylogenetic groups at once. #No hierarchy required, as everything is observed at the site level. Each observation is a unique site. #Missing data are allowed. #clear environment rm(list = ls()) library(data.table) library(doParallel) source('paths.r') source('NEFI_functions/...
{"hexsha": "2787aa1a32607030b9d3c7055b2e35133973d2e8", "size": 2351, "ext": "r", "lang": "R", "max_stars_repo_path": "ITS/analysis/spatial_prior_analysis/ddirch_fit/1._prior_ddirch_fit_ted2014.r", "max_stars_repo_name": "colinaverill/NEFI_microbe", "max_stars_repo_head_hexsha": "e59ddef4aafcefdf0aff61765a8684859daad6e0...
""" inspired from https://github.com/lcswillems/torch-rl """ import numpy as np import torch import torch.nn.functional as F import os import torch import torch.nn as nn import torch.nn.functional as F import torch_rl from argparse import Namespace from copy import deepcopy from agents.two_v_base_general import T...
{"hexsha": "106a581964fe617cfa657c9e7306a021939717a1", "size": 62486, "ext": "py", "lang": "Python", "max_stars_repo_path": "agents/ppo_worlds.py", "max_stars_repo_name": "DanIulian/minigrid_rl", "max_stars_repo_head_hexsha": "d7b59fd1d1e62fc99d5134c89f59c6ad16246cfa", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
/- Copyright (c) 2019 Johannes Hölzl. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Johannes Hölzl -/ import algebra.direct_sum.module import data.finsupp.to_dfinsupp /-! # Results on direct sums and finitely supported functions. > THIS FILE IS SYNCHRONIZED WITH MAT...
{"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/algebra/direct_sum/finsupp.lean"}
import astropy.units as u from astropy.io import fits import numpy as np from numpy import ma import logging from .world import Position, VelWave class DataND: # maybe this will help with sorting the 1D conditions? _is_spectral = False _is_spatial = False def __init__(self, filename=None, data=None...
{"hexsha": "53ef0460c034f355584b4bab174711a87bcb2345", "size": 12228, "ext": "py", "lang": "Python", "max_stars_repo_path": "telassar/data.py", "max_stars_repo_name": "amiller361/telassar", "max_stars_repo_head_hexsha": "8497d9ecee3dcd6509e7c870981b67978eb278b7", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
''' Author: Junbong Jang Creation Date: 9/21/2020 Helper blocks for deep_neural_net.py ''' import tensorflow as tf from tensorflow.keras.models import Model from tensorflow.keras.layers import Layer, Activation, Input, concatenate, Conv2D, MaxPooling2D, UpSampling2D, Cropping2D, Conv2DTranspose,BatchNormal...
{"hexsha": "d5a22b5eecc3c0d071692870c3b971ce004a62e8", "size": 20567, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/deep_neural_net_blocks.py", "max_stars_repo_name": "norton-chris/MARS-Net", "max_stars_repo_head_hexsha": "6f671837d0629422680c78adf9b643894debae70", "max_stars_repo_licenses": ["MIT"], "m...
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License" # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
{"hexsha": "eae118fdae874ce1a83b6df296f65c923c105f53", "size": 2371, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/text_classification/rnn/utils.py", "max_stars_repo_name": "zzz2010/PaddleNLP", "max_stars_repo_head_hexsha": "fba0b29601b0e8286a9ab860bf69c9acca4481f4", "max_stars_repo_licenses": ["Apach...
# copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve. # # 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": "2899e3f76567cee638b07c86174896a19f51bd2f", "size": 14353, "ext": "py", "lang": "Python", "max_stars_repo_path": "dygraph/models/architectures/mobilenetv3.py", "max_stars_repo_name": "MRXLT/PaddleSeg", "max_stars_repo_head_hexsha": "52ef0ee505a00ed8c81f95759887e56062f0941b", "max_stars_repo_licenses": ["Apac...
/*********************************************************************** Copyright (c) 2015, Carnegie Mellon University All rights reserved. Authors: Michael Koval <mkoval@cs.cmu.edu> Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions...
{"hexsha": "c80b1eb5bb5586f064a3309d30dce031c0244f8f", "size": 25658, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/InteractiveMarkerViewer.cpp", "max_stars_repo_name": "personalrobotics/or_interactivemarker", "max_stars_repo_head_hexsha": "742d3d0ac5e606e35a1717a1e8b2a5f69e8efb8e", "max_stars_repo_licenses"...
from abc import ABCMeta, abstractmethod import numpy as np from cutils import likelihood class BaseScorer(metaclass=ABCMeta): """ Base class for scoring topics model. """ @staticmethod @abstractmethod def score(term_doc_matrix, model): """ Returns a score of topics model that. Argum...
{"hexsha": "311cd8929a9c293b7826c1b5ad08464139d435e3", "size": 2995, "ext": "py", "lang": "Python", "max_stars_repo_path": "scorers.py", "max_stars_repo_name": "Bellator95/topic_modeling", "max_stars_repo_head_hexsha": "0eeb7ddb2ff1959741c45b76ab301d54e204be6c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
import numpy as np ## For Linear Algebra ## For visualizations I'll be using plotly package, this creates interesting and interective visualizations. import plotly.express as px import plotly.graph_objects as go from plotly.subplots import make_subplots from datetime import datetime ## Time Series analysis....
{"hexsha": "6ac11c1e4cf0e109ee074689f719b0d966177242", "size": 2760, "ext": "py", "lang": "Python", "max_stars_repo_path": "temperature.py", "max_stars_repo_name": "Sarah-Victor/Weather_Prediction_MLProject", "max_stars_repo_head_hexsha": "581a088da7a24222a28403c1ece24c5e96e74023", "max_stars_repo_licenses": ["MIT"], "...
% \begin{meta-comment} % % $Id: mdwtools.tex,v 1.4 1996/11/19 20:55:55 mdw Exp $ % % Common declarations for mdwtools.dtx files % % (c) 1996 Mark Wooding % %----- Revision history ----------------------------------------------------- % % $Log: mdwtools.tex,v $ % Revision 1.4 1996/11/19 20:55:55 mdw % Entered into RCS...
{"hexsha": "63abfc4acf47750ac3c43a510941864562ca3860", "size": 35056, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "mdwtools/mdwtools.tex", "max_stars_repo_name": "christopher-henderson/Declarative-Search-Construct-in-Imperative-Procedural-Programming-Languages", "max_stars_repo_head_hexsha": "cdb623fae8382acec2...
import MittagLefflerFunctions.asymptotic_start using PyPlot β = 1.0 m = 201 α = range(0, 1, length=m) tol = 1e-15 min_x = 35 x = Vector{Float64}(undef, m) N = Vector{Int64}(undef, m) for k = 1:m x[k], N[k] = asymptotic_start(α[k], β, tol, min_x) end figure(1) subplot(2, 1, 1) plot(α, x, "o", markersize=2) ylabel...
{"hexsha": "4a3fe42c8b58db9a21b9ddf295eafc7329999c0a", "size": 433, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_asymptotic_start.jl", "max_stars_repo_name": "billmclean/MittagLefflerFunctions.jl", "max_stars_repo_head_hexsha": "5244e7fce7efeee160edfc76eb7cab5e7624ae8e", "max_stars_repo_licenses": ["...
import Bio.PDB.Superimposer from Bio.PDB.Atom import Atom as BioPDBAtom import numpy as np import warnings from Bio.PDB.Atom import PDBConstructionWarning from classes.PDB import PDB from classes.Atom import Atom warnings.simplefilter('ignore', PDBConstructionWarning) def biopdb_aligned_chain(pdb_fixed, chain_id_fixe...
{"hexsha": "86f77ae0a498454a6105c94539b07b8fde877538", "size": 3494, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/BioPDBUtils.py", "max_stars_repo_name": "nanohedra/nanohedra", "max_stars_repo_head_hexsha": "3921b7f5ce10e0e3393c3b675bb97ccbecb96663", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# -*- coding: utf-8 -*- # --- # jupyter: # jupytext: # text_representation: # extension: .py # format_name: light # format_version: '1.4' # jupytext_version: 1.2.4 # kernelspec: # display_name: Python 3 # language: python # name: python3 # --- # <div style='background-image:...
{"hexsha": "c2d01573b0090962383721cc3bff66f333519d96", "size": 8811, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/Computational Seismology/The Pseudospectral Method/ps_fourier_acoustic_1d.py", "max_stars_repo_name": "krischer/seismo_live_build", "max_stars_repo_head_hexsha": "e4e8e59d9bf1b020e13ac91...
""" @Project : DuReader @Module : pca.py @Author : Deco [deco@cubee.com] @Created : 5/24/18 1:16 PM @Desc : In Depth: Principal Component Analysis https://jakevdp.github.io/PythonDataScienceHandbook/05.09-principal-component-analysis.html PCA and proportion of variance explained: https://stats.stackexc...
{"hexsha": "11c3d7a564d81d453b590fac9e35b6264a105f79", "size": 4091, "ext": "py", "lang": "Python", "max_stars_repo_path": "wiki-word2vec/pca.py", "max_stars_repo_name": "arfu2016/DuReader", "max_stars_repo_head_hexsha": "66934852c508bff5540596aa71d5ce40c828b37d", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_c...
[STATEMENT] lemma cf_comma_proj_left_is_functor'[cat_comma_cs_intros]: assumes "\<GG> : \<AA> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<HH> : \<BB> \<mapsto>\<mapsto>\<^sub>C\<^bsub>\<alpha>\<^esub> \<CC>" and "\<AA>' = \<GG> \<^sub>C\<^sub>F\<down>\<^sub>C\<^sub>F \<HH>" shows "\<GG>...
{"llama_tokens": 580, "file": "CZH_Elementary_Categories_czh_ecategories_CZH_ECAT_Comma", "length": 3}
import numpy as np def generate_batches(data_path, char_threshold, sequence_length): """ Inputs: data_path: File path to simple txt file. char_threshold: If count of any character is below char_threshold it is ignored and replaced with null token: ^' sequence_length: Sequence length...
{"hexsha": "623a6056224a8f6d3e52ae2b4ba4969600d6e247", "size": 1398, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dataloader/batches_from_txt.py", "max_stars_repo_name": "kirbiyik/generate-any-text", "max_stars_repo_head_hexsha": "7f9d78e439e23f99be34681268c052f7f6df9fdb", "max_stars_repo_licenses": ["MIT...
/* * ElevationMap.hpp * * Created on: Dec 22, 2019 * Author: Peter XU * Institute: ZJU, CSC 104 */ #pragma once // Grid Map #include <grid_map_ros/grid_map_ros.hpp> // OpenCV #include <opencv2/highgui/highgui.hpp> #include <opencv2/core/core.hpp> #include <cv_bridge/cv_bridge.h> // Eigen #include <Eige...
{"hexsha": "ad1a23a1a3d32af84657245fd33a8ac070eaf691", "size": 5412, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "elevation_mapping/elevation_mapping/include/elevation_mapping/ElevationMap.hpp", "max_stars_repo_name": "mcx/GEM", "max_stars_repo_head_hexsha": "e1245a59f44213edcc8c105f1e9aaa092ea97169", "max_star...
#!/usr/bin/python # -*- coding: utf-8 -*- ################################################################################ # # CoCoPy - A python toolkit for rotational spectroscopy # # Copyright (c) 2016 by David Schmitz (david.schmitz@chasquiwan.de). # # Permission is hereby granted, free of charge, to any person obt...
{"hexsha": "c39255e0451772769ffea9a3c4af1a046958658f", "size": 41877, "ext": "py", "lang": "Python", "max_stars_repo_path": "modules/analysis/spec.py", "max_stars_repo_name": "CoCoMol/CoCoPy", "max_stars_repo_head_hexsha": "66bd4deda4b80eca65ceb0660f940214e4b457fb", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np # points = 100 # number of points per class # D = 2 # dimensionality # classes = 3 # number of classes def create_data(points, classes): X = np.zeros((points*classes, 2)) # data matrix (each row = single example) y = np.zeros(points*classes, dtype='uint8') # class labels for class_numbe...
{"hexsha": "dc62c32c27b34f5288354589dd5b59a89541a1ab", "size": 798, "ext": "py", "lang": "Python", "max_stars_repo_path": "_oldmodels/Model_3/dataset.py", "max_stars_repo_name": "caelanhadley/NNFSIP", "max_stars_repo_head_hexsha": "da048af5ded549db7464b206b255104900b40ab8", "max_stars_repo_licenses": ["MIT"], "max_star...
# SVM Regression #---------------------------------- # # This function shows how to use TensorFlow to # solve support vector regression. We are going # to find the line that has the maximum margin # which INCLUDES as many points as possible # # We will use the iris data, specifically: # y = Sepal Length # x = Pedal W...
{"hexsha": "6f6ba9385202885e1775fb296e8a933310e33db0", "size": 3849, "ext": "py", "lang": "Python", "max_stars_repo_path": "04_Support_Vector_Machines/03_Reduction_to_Linear_Regression/03_support_vector_regression.py", "max_stars_repo_name": "rajat19/tensorflow_cookbook", "max_stars_repo_head_hexsha": "2ba60b94b81b0f2f...
import numpy as np from matplotlib import pyplot as plt import imageio # --------------- Model Class ----------------------------------- def logistic_func(x): return 1/(1 + np.exp(-x)) class TestMS: def __init__(self, number_of_bacteria: int, TMG_amount: float=0, GLU_amount: float=0, TMG_rate: float=0, G...
{"hexsha": "6b90e29c4c11dc77a49b45f5c6346c39d5141220", "size": 4068, "ext": "py", "lang": "Python", "max_stars_repo_path": "model.py", "max_stars_repo_name": "Nemo20k/lactose_multistability_model", "max_stars_repo_head_hexsha": "e50d68bb508e243d0a775d1d562bd8e8b88b3b30", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#!/usr/bin/env python """ Command-line tool to control the concavity constraining tools Mudd et al., 2018 So far mostly testing purposes B.G. """ import matplotlib;matplotlib.use("Agg") from lsdtopytools import LSDDEM # I am telling python I will need this module to run. from lsdtopytools import argparser_debug as AGPD...
{"hexsha": "611742d2312d9ddaac3edd390e850a0118e73cda", "size": 4662, "ext": "py", "lang": "Python", "max_stars_repo_path": "lsdtopytools/scripts_for_lsdtopytools/lsdtt_chi_ksn_knickoint_tools.py", "max_stars_repo_name": "LSDtopotools/lsdtopytools", "max_stars_repo_head_hexsha": "9809cbd368fe46b5e483085fa55f3206e4d85183...
theory invariant imports kernel_spec "HOL-Eisbach.Eisbach_Tools" begin section \<open>invariants\<close> subsection \<open>defs of invariants\<close> text\<open> we consider multi-threaded execution on mono-core. A thread is the currently executing thread iff it is in RUNNING state. \<close> definition inv_cur :: "...
{"author": "SunHuan321", "repo": "uc-OS-verification", "sha": "760e159857c4015d6a9e3ccbe9f8247e4518862a", "save_path": "github-repos/isabelle/SunHuan321-uc-OS-verification", "path": "github-repos/isabelle/SunHuan321-uc-OS-verification/uc-OS-verification-760e159857c4015d6a9e3ccbe9f8247e4518862a/ucOS_mem_mailbox/invarian...
"""Class for creating a table to index characters""" import numpy as np class CharacterTable(object): """Given a set of characters: + Encode them to a one hot integer representation + Decode the one hot integer representation to their character output + Decode a vector of probabilities to their charac...
{"hexsha": "e67c2b0798d073c86d0c2f8b1809ea5ca86adf6a", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/character_table.py", "max_stars_repo_name": "JohanvandenHeuvel/keras", "max_stars_repo_head_hexsha": "2b5a44e0315d05b0b8c61920f4b527ad1383ef4e", "max_stars_repo_licenses": ["MIT"], "max_s...
function _precompile_() Base.precompile(Tuple{typeof(Vcov.ranktest!),Array{Float64,2},Array{Float64,2},Array{Float64,2},Vcov.SimpleCovariance,Int64,Int64}) Base.precompile(Tuple{typeof(Vcov.ranktest!),Array{Float64,2},Array{Float64,2},Array{Float64,2},Vcov.RobustCovariance,Int64,Int64}) Base.precompile(Tupl...
{"hexsha": "ae4e765bf2e3701d3ef310705b22e446268ac830", "size": 437, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/precompile.jl", "max_stars_repo_name": "eloualiche/Vcov.jl", "max_stars_repo_head_hexsha": "ce4fe6f6aae84efcdf5738c43ca84a1a19a3a73a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "...
import logging import numpy as np from arekit.contrib.networks.embeddings.base import Embedding logger = logging.getLogger(__name__) def create_term_embedding(term, embedding, check, word_separator=' '): """ Embedding algorithm based on parts (trigrams originally) """ assert(isinstance(term, str)) ...
{"hexsha": "4dd57e8d994936c6367e0b2a755b2282125e281d", "size": 2936, "ext": "py", "lang": "Python", "max_stars_repo_path": "arekit/contrib/networks/core/input/embedding/custom.py", "max_stars_repo_name": "nicolay-r/AREk", "max_stars_repo_head_hexsha": "19c39ec0dc9a17464cade03b9c4da0c6d1d21191", "max_stars_repo_licenses...
/**************************************************************************** * hipipe library * Copyright (c) 2017, Cognexa Solutions s.r.o. * Copyright (c) 2018, Iterait a.s. * Author(s) Filip Matzner * * This file is distributed under the MIT License. * See the accompanying file LICENSE.txt for the comp...
{"hexsha": "6d6d7b3221f2b0b73ae630779e021c49b4877e35", "size": 3260, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/core/thread.cpp", "max_stars_repo_name": "iterait/hipipe", "max_stars_repo_head_hexsha": "c2a6cc13857dce93e5ae3f76a86e8f029ca3f921", "max_stars_repo_licenses": ["BSL-1.0", "MIT"], "max_stars_co...
import unittest import numpy as np from gpuparallel import GPUParallel, BatchGPUParallel, delayed, log_to_stderr log_to_stderr(log_level='INFO') def task_return_identity(value, **kwargs): return value def task_return_all_kwargs(value, **kwargs): return value, kwargs class TestBatchGPUParallel(unittest.Te...
{"hexsha": "36d38682e76708932211ea21bb1d5b26e184ea07", "size": 3708, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/tests_batch.py", "max_stars_repo_name": "vlivashkin/GPUParallel", "max_stars_repo_head_hexsha": "23dbabecaa421b535babc3ed19407ce8d2e55d63", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import numpy as np import pandas as pd import random import math #Assign people to universes random.seed(0) ppl = ["A","B","C","D","E","F","G","NPC"] random.shuffle(ppl) universeAppl=ppl[0:4] universeBppl=ppl[4:8] print(ppl) print(universeAppl, universeBppl) #Set up bids, set up budgets, add NPC random.seed(0) ...
{"hexsha": "509f8de8cbe884cb193434e237b1bdc0642c8e19", "size": 1976, "ext": "py", "lang": "Python", "max_stars_repo_path": "eval.py", "max_stars_repo_name": "H-B-P/a-d-and-d-sci-may", "max_stars_repo_head_hexsha": "c21867fb08be996545cbaf3dd19b57ceae3f9526", "max_stars_repo_licenses": ["Unlicense"], "max_stars_count": 1...
#!/usr/bin/python3 # Main.py # Ashish D'Souza # December 5th, 2018 import Data import OutlierDetection import DeepLearning import tensorflow as tf import numpy as np from datetime import datetime import os parameters = ["Temp", "NO2", "NOX", "NOY", "RH", "Wind Speed V", "SO2 Trace Level", "Ozone"] soda = Data.SODA(...
{"hexsha": "f1aa4e18f5468ece472b69a2fbdfc95a934f3b1d", "size": 4685, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/python/Main.py", "max_stars_repo_name": "computer-geek64/mtd", "max_stars_repo_head_hexsha": "0b2103b60a7a9401b0dea3a0a3ddc1f96a966251", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import pytest import os import numpy as np import pandas as pd import taxcrunch.multi_cruncher as mcr CURRENT_PATH = os.path.abspath(os.path.dirname(__file__)) def test_a18_validation(): taxcrunch_in = os.path.join(CURRENT_PATH, "taxsim_validation/taxcrunch_in_a18.csv") crunch = mcr.Batch(taxcrunch_in) t...
{"hexsha": "a00b4841ff5b81cd025097c7cec760356326a325", "size": 1494, "ext": "py", "lang": "Python", "max_stars_repo_path": "taxcrunch/tests/test_taxsim.py", "max_stars_repo_name": "hdoupe/Tax-Cruncher-ARP", "max_stars_repo_head_hexsha": "c8c960c085d0883915f99ac2ea4630c928af4c16", "max_stars_repo_licenses": ["MIT"], "ma...
(* Helper functions for dealing with maps and decidable equality *) Require Import Merges.Tactics. Require Import Coq.Program.Equality. Require Import Coq.Logic.FunctionalExtensionality. Section Map. Variable K : Type. Variable V : Type. Definition EqDec := forall (n m : K), { n = m } + { n <> m }. Hint Unfold E...
{"author": "amosr", "repo": "merges", "sha": "bf8cb7bca2d859977d6fb8bf4a9d07ac780b7edd", "save_path": "github-repos/coq/amosr-merges", "path": "github-repos/coq/amosr-merges/merges-bf8cb7bca2d859977d6fb8bf4a9d07ac780b7edd/proof/Merges/Map.v"}