text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
function [cl] = gal2cl(gal)
% Convert volume from US liquid gallons to centiliters.
% Chad Greene 2012
cl = gal*378.5411784; | {"author": "Sable", "repo": "mcbench-benchmarks", "sha": "ba13b2f0296ef49491b95e3f984c7c41fccdb6d8", "save_path": "github-repos/MATLAB/Sable-mcbench-benchmarks", "path": "github-repos/MATLAB/Sable-mcbench-benchmarks/mcbench-benchmarks-ba13b2f0296ef49491b95e3f984c7c41fccdb6d8/35258-unit-converters/unit_converters/gal2cl... |
\title{CS289 Initial Report: \\
Methods for handling missing and categorical data for classification with neural
networks
\vspace{15mm}}
\author{
Jason Poulos\thanks{\href{mailto:poulos@berkeley.edu}{\nolinkurl{poulos@berkeley.edu}}. SID: 24993379.}
\hspace{10mm}
Rafael Valle\thanks{\href{mailto:rafaelvall... | {"hexsha": "97b4b5b2b7af26eb0dcbc6d161d7a6ff67efedec", "size": 11856, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "initial-report/initial-report.tex", "max_stars_repo_name": "jvpoulos/cs289-project", "max_stars_repo_head_hexsha": "a3686de769c9709587a68731275a0b7065ba88f1", "max_stars_repo_licenses": ["MIT"], "m... |
# This script uses the convex penalties with cross-validated lambdas (as obtained in the excel sheet) on a test set
using JuMP, Mosek, MosekTools, LinearAlgebra, Suppressor, StatsBase, CSV, DataFrames, Compat, Random
include("convexpenalties.jl")
results_template = DataFrame(n=Int[],p=Int[], m=Int[], k=Int[], theSeed=... | {"hexsha": "19e616b2be0964468804c04ff4ab13aad93edc89", "size": 4070, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "Matrix Regression/createFigure1_xvalid.jl", "max_stars_repo_name": "ryancorywright/MatrixPerspectiveSoftware", "max_stars_repo_head_hexsha": "a65c57c317aaaf10298b8e059fcf366614451649", "max_stars_r... |
[STATEMENT]
lemma Pbij_inverseI:"(l1,l2):\<beta> \<Longrightarrow> (l2,l1):Pbij_inverse \<beta>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (l1, l2) \<in> \<beta> \<Longrightarrow> (l2, l1) \<in> Pbij_inverse \<beta>
[PROOF STEP]
by (simp add: Pbij_inverse_def) | {"llama_tokens": 121, "file": "SIFPL_PBIJ", "length": 1} |
#!/usr/bin/env python
__all__ = ['get_current_time_stamp', 'parse_meteo_page',
'parse_meteo_archive', 'concat_meteo_archive',
'generate_meteo_archive_urls']
from io import StringIO
from datetime import datetime, timedelta
from bs4 import BeautifulSoup
import numpy as np
import pandas as pd
d... | {"hexsha": "c1e4632dacd7fe38a0afa5203c2cb7aa9ab4974f", "size": 4636, "ext": "py", "lang": "Python", "max_stars_repo_path": "tugmeteo/helper.py", "max_stars_repo_name": "ookuyan/tugmeteo", "max_stars_repo_head_hexsha": "167877f8e79202bb691ebd75eff4485fbc480a99", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun... |
"""
University of Liege
ELEN0062 - Introduction to machine learning
Project 1 - Classification algorithms
"""
import numpy as np
import matplotlib.pyplot as plt
from sklearn.utils import check_random_state
from plot import make_cmaps
def make_dataset(n_points, class_prop=.5, std=1.6, random_state=None):
... | {"hexsha": "37f20f5bb50a81c1f8804ad305b284ad1c554d75", "size": 4327, "ext": "py", "lang": "Python", "max_stars_repo_path": "data.py", "max_stars_repo_name": "ionutfinta/ULG_ELEN0062_ML_Projects", "max_stars_repo_head_hexsha": "709e018e0b7976088aeff357eca74a09ba88be4f", "max_stars_repo_licenses": ["Unlicense"], "max_sta... |
Dict{String, Any}("mismatch1" => Dict{String, Any}("value" => "aaa'''bbb", "type" => "string"), "lit_two_space" => Dict{String, Any}("value" => " ''two quotes'' ", "type" => "string"), "lit_one_space" => Dict{String, Any}("value" => " 'one quote' ", "type" => "string"), "lit_one" => Dict{String, Any}("value" => "'one q... | {"hexsha": "0a7bab3fd72ba01dbbb68ac9702bff80a70046d7", "size": 840, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testfiles/valid/string/multiline-quotes.jl", "max_stars_repo_name": "KristofferC/TOML.jl", "max_stars_repo_head_hexsha": "057a427116b5874b2e4732485088a42d6ad15689", "max_stars_repo_licenses": [... |
#Install and load the kknn package
#install.packages("kknn")
library(kknn)
# assign data to df called "ccdata"
ccdata <- data
# split dataset into training, validation, and testing sets comprising 70%, 15%, and 15% of ccdata respectively
splitSample <- sample(1:3, size=nrow(ccdata), prob=c(0.70,0.15,0.15), re... | {"hexsha": "7eff91a780a9d1cebc7bca3f048aa65be3bbf6c8", "size": 3856, "ext": "r", "lang": "R", "max_stars_repo_path": "kknn.r", "max_stars_repo_name": "LizMGagne/Modeling-with-R", "max_stars_repo_head_hexsha": "475da952e359ea5671a0468838134d8e1fcd7ddb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_s... |
import torch
import numpy as np
import itertools
def batch_data(cfg, data, device="cuda", phase="train"):
if phase != "train":
return batch_data_test(cfg, data, device=device)
# batch training data
batch = {}
batch["roi_img"] = torch.stack([d["roi_img"] for d in data], dim=0).to(device, non_b... | {"hexsha": "7e81a9cd2457e7dc2ff18b38415a5c2591e69397", "size": 4625, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/gdrn_modeling/engine_utils.py", "max_stars_repo_name": "4PiR2/SO-Pose", "max_stars_repo_head_hexsha": "a3a61d2c97b1084a4754d6c12e45e16d85809729", "max_stars_repo_licenses": ["Apache-2.0"], "m... |
// -----------------------------------------------------------------------------
// Fern © Geoneric
//
// This file is part of Geoneric Fern which is available under the terms of
// the GNU General Public License (GPL), version 2. If you do not want to
// be bound by the terms of the GPL, you may purchase a proprietary... | {"hexsha": "8e497164e16ea3d92d9774682560ca88dbc3176f", "size": 1630, "ext": "cc", "lang": "C++", "max_stars_repo_path": "pcraster/pcraster-4.2.0/pcraster-4.2.0/source/fern/source/fern/algorithm/core/test/index_range_test.cc", "max_stars_repo_name": "quanpands/wflow", "max_stars_repo_head_hexsha": "b454a55e4a63556eaac3f... |
module Exports
###############################################################################
using ..MeshSteward: initbox, updatebox!, boundingbox, inflatebox!, inbox, boxesoverlap, intersectboxes
export initbox, updatebox!, boundingbox, inflatebox!, inbox, boxesoverlap, intersectboxes
#############################... | {"hexsha": "2cc589f820cec6a6b3236b325b75aef6e2759e8f", "size": 2561, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Exports.jl", "max_stars_repo_name": "PetrKryslUCSD/MeshSteward.jl", "max_stars_repo_head_hexsha": "c3a77c8f357d37c69687d1b2e6814e621e3d836f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
[STATEMENT]
lemma map_tailrec_is_listmap: "rev (map_tailrec f l accs) = (rev accs)@(List.map f l)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. rev (Efficient_Distinct.map_tailrec f l accs) = rev accs @ map f l
[PROOF STEP]
by (induction l accs rule: map_tailrec.induct) auto | {"llama_tokens": 118, "file": "Network_Security_Policy_Verification_Lib_Efficient_Distinct", "length": 1} |
#!../../anaconda2/bin/python
import re
import pickle
import reader
import RegExp
import spacy
import CRFfeature
from itertools import chain
import nltk
import sklearn
import scipy.stats
from sklearn.metrics import make_scorer
from sklearn.model_selection import cross_val_score
#from sklearn.cross_validation import c... | {"hexsha": "ecb71f54f103ad631a9bdca76c405a874bd1a20f", "size": 4637, "ext": "py", "lang": "Python", "max_stars_repo_path": "Training/CRFannot_crossVal.py", "max_stars_repo_name": "grace-mengke-hu/TRIANGULUM", "max_stars_repo_head_hexsha": "2c4c7c0e67f5fcbbd2cb0934839bb2784b80d47b", "max_stars_repo_licenses": ["MIT"], "... |
import numpy as np
import tensorflow as tf
from keras import backend as K
smooth =
stride_num =
num_s =
n_class =
def Logistic(x,theta,sigma):
return 1/(1+tf.exp(-theta*(x-sigma)))
#Sparse prediction
def Harmony_loss_S(y_true, y_pred):
y_pred = tf.nn.softmax(y_pred)
stride = np.linspace(start=... | {"hexsha": "5bcb47272c70c577f7a041eac24c24e1d853493b", "size": 2183, "ext": "py", "lang": "Python", "max_stars_repo_path": "harmony loss.py", "max_stars_repo_name": "fuyu-sdu/Harmony-Loss", "max_stars_repo_head_hexsha": "bec5056681daca71941c58d2ecf375cdaee7c0a3", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n... |
from os import path
import numpy as np
import glob
from . import mathhelper as mh
import copy
class Atom:
def __init__(self, kind, x, y, z):
self.x = x
self.y = y
self.z = z
self.kind = kind
class Vector:
def __init__(self, x, y, z):
self.vector = np.array... | {"hexsha": "ff9fdf75f57ec7dfcafa1625f0abfb8cd5d5f5a7", "size": 10377, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/parser.py", "max_stars_repo_name": "Snoeprol/AvogadroMoleculeAttacher", "max_stars_repo_head_hexsha": "ef862a2b7d1b6b87213f6abd927122270dafbe69", "max_stars_repo_licenses": ["MIT"], "max_star... |
# ***************************************************************
# Copyright (c) 2021 Jittor. All Rights Reserved.
# Maintainers: Dun Liang <randonlang@gmail.com>.
# This file is subject to the terms and conditions defined in
# file 'LICENSE.txt', which is part of this source code package.
# ************************... | {"hexsha": "a866c0dc67dc71da7a8a479d6bac533d127a4d67", "size": 5145, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/jittor/test/test_trace_var.py", "max_stars_repo_name": "maxint/jittor", "max_stars_repo_head_hexsha": "0b6a2e32f64acaeefcea63df1ea35fd0d729c604", "max_stars_repo_licenses": ["Apache-2.0"], ... |
// Copyright 2019-present MongoDB 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
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed t... | {"hexsha": "fb5359720bedff34d2e9144812747188dd8dd5a8", "size": 18935, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/metrics/include/metrics/metrics.hpp", "max_stars_repo_name": "vrachev/genny", "max_stars_repo_head_hexsha": "8a38c6abd8ca08bb34ebb2fb625a16a1bace2f3f", "max_stars_repo_licenses": ["Apache-2.0"]... |
import six
assert six.PY3, "Run me with python3"
import gzip
import sys
import json
import sklearn.neighbors
import sklearn.preprocessing
import numpy as np
import random
import pickle
import itertools
import scipy
ID,FORM,LEMMA,UPOS,XPOS,FEAT,HEAD,DEPREL,DEPS,MISC=range(10)
def read_conll(inp,maxsent,args):
""" ... | {"hexsha": "e516190a70b449879ada5ac7479f84dc23fb872a", "size": 11417, "ext": "py", "lang": "Python", "max_stars_repo_path": "sample.py", "max_stars_repo_name": "fginter/tree-sampler", "max_stars_repo_head_hexsha": "71f5b33f8acfa37e153e87ec096b269729e01364", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ... |
import unittest
import numpy as np
from algorithms.trainer import RunLogger
from tools import captured_output
class RunLoggerTests(unittest.TestCase):
def test_logger_legacy(self):
log_type = "legacy"
max_episodes = 100
logger = RunLogger(max_episodes, log_type)
num_... | {"hexsha": "720031d0501bf39e0ed9d1aa9b7f7e402229c0f8", "size": 2519, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_run_logger.py", "max_stars_repo_name": "Henry-Pulver/rl_for_automation", "max_stars_repo_head_hexsha": "f2cbc7e880b65b6ffe56b185086c9db2f01d34c1", "max_stars_repo_licenses": ["MIT"], "m... |
import numpy as np
from mosaic_ml.model_config.util import softmax, check_for_bool
class PassiveAggressive:
def __init__(self, C, fit_intercept, tol, loss, average, random_state=None):
self.C = C
self.fit_intercept = fit_intercept
self.average = average
self.tol = tol
sel... | {"hexsha": "1328955f1c412c402e428fdf1b7fa299770e933a", "size": 4564, "ext": "py", "lang": "Python", "max_stars_repo_path": "mosaic_ml/model_config/classification/passive_aggressive.py", "max_stars_repo_name": "herilalaina/mosaic_ml", "max_stars_repo_head_hexsha": "4eb6229006061d275ff0b80a1d31514d9d7d22f0", "max_stars_r... |
import tensorflow as tf
import numpy as np
import matplotlib;
matplotlib.use('Agg')
import matplotlib.pyplot as plt
filenames = [
'./train/o_1bbaunul1622676372861366335103583.jpg',
'./train/o_1b9l01k2537596423402853769643775.jpg',
'./train/o_1bf4tuqd41589335837444113004721092.jpg',
'./... | {"hexsha": "67172166b3b562db0cbc50e1a9a5251930fe1391", "size": 1093, "ext": "py", "lang": "Python", "max_stars_repo_path": "trash/xxx.py", "max_stars_repo_name": "xiusir/carc19", "max_stars_repo_head_hexsha": "e3d0ad1e7781a62f826c34696c344ce9356dc4cd", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 1, "m... |
#!/usr/bin/env python
# Bound guarantees
import numpy as np
import torch
def test_bounds(args, logger, model, device, test_loader):
with torch.no_grad():
result_list = []
epsilons = np.arange(args.epsilon_min, args.epsilon_max + 0.01, 0.05)
for epsilon in epsilons:
correct = ... | {"hexsha": "01bbb86cf827be175c7b8729ca99e786f8cdd6a8", "size": 1436, "ext": "py", "lang": "Python", "max_stars_repo_path": "test_bounds.py", "max_stars_repo_name": "rakshit-agrawal/mwd_nets", "max_stars_repo_head_hexsha": "777134adca5ced75de9f45674316e4f1b78eadfe", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star... |
subroutine jonew(p7,p3,p4,p1,za,zb,zab,jZ,jg)
implicit none
include 'constants.f'
include 'cmplxmass.f'
include 'masses.f'
include 'ewcharge.f'
include 'zprods_decl.f'
include 'sprods_com.f'
include 'zcouple.f'
include 'pid_pdg.f'
include 'zacouplejk.f'
... | {"hexsha": "0f0eced490fa7f87e0b05b5ab7f47f17952a6bdf", "size": 5946, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/src/WBFWW/jonew.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
# coding: utf-8
# In[1]:
import os
import sys
path = "../"
path = "C:/github/w_vattenstatus/ekostat_calculator"
sys.path.append(path)
#os.path.abspath("../")
print(os.path.abspath(path))
import pandas as pd
import numpy as np
import json
import timeit
import time
import core
import importlib
importlib.reload(cor... | {"hexsha": "32e48a24cb5434e95458d9ad499d31d5ac99fc60", "size": 11874, "ext": "py", "lang": "Python", "max_stars_repo_path": "notebooks/lv_calculate_status_fastrun.py", "max_stars_repo_name": "lvikt/ekostat_calculator", "max_stars_repo_head_hexsha": "499e3ad6c5c1ef757a854ab00b08a4a28d5866a8", "max_stars_repo_licenses": ... |
from torch.utils.data import Dataset
import os
import pandas as pd
import numpy as np
import torch
import random
import scipy.spatial
import scipy.io
def create_dataset(
dataset_folder,
dataset_name,
val_size,
gt,
horizon,
delim="\t",
train=True,
eval=False,
verbose=False,
):
p... | {"hexsha": "c6d2a2cfcec9f595ff69f5e4d627b450c5afb96d", "size": 11094, "ext": "py", "lang": "Python", "max_stars_repo_path": "baselineUtils.py", "max_stars_repo_name": "aalikadic/transformer-location-prediction", "max_stars_repo_head_hexsha": "6f15e0c68164955e4f57edd279385d3e9dff5c58", "max_stars_repo_licenses": ["MIT"]... |
print('__file__={0:<35} | __name__={1:<20} | __package__={2:<20}'.format(__file__,__name__,str(__package__)))
from .utils.stars_param import get_L1,ECNoise
#from .utils.surrogates import train_rbf
from .utils.misc import find_active, subspace_dist
from scipy.special import gamma
import numpy as np
import active_sub... | {"hexsha": "e5672512532454ca9a561a095908ae0c6eff94f1", "size": 22222, "ext": "py", "lang": "Python", "max_stars_repo_path": "astars/stars_sim.py", "max_stars_repo_name": "variscarey/ASTARS", "max_stars_repo_head_hexsha": "99da27bffe1f843804a85a206686a7f8ae29fa42", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
# @Time : 2018-9-10
# @Author : zxh
import numpy as np
class LoopQueue:
def __init__(self, size, mean_over):
self.data = np.zeros([size], dtype=np.float32)
self.mean_over = mean_over
self.index = 0
self.size = size
def set(self, n):
self.data[self.index] = n
s... | {"hexsha": "89abb7189bffeb2439aa17d8e3f2481898aba8d8", "size": 543, "ext": "py", "lang": "Python", "max_stars_repo_path": "trend/src/zutils/loop_queue.py", "max_stars_repo_name": "limingmax/WFCode", "max_stars_repo_head_hexsha": "f2e6d2fcf05ad9fdaac3a69603afee047ed37ca3", "max_stars_repo_licenses": ["Apache-2.0"], "max... |
Require Export Basic.
Require Export Labels.
(** * Joined syntax of terms for the 3 calculi we consider *)
(** ** Variables *)
Definition Var := nat.
Lemma eq_var_dec : forall (x1 x2 : Var), {x1=x2} + {x1<>x2}.
Proof.
intros x1 x2. destruct (eq_nat_decide x1 x2) as [H | H].
apply eq_nat_eq in H. left. apply H... | {"author": "mgree", "repo": "navdifc", "sha": "cde33f3ef7170b59653e252513ec6fc7ed78983a", "save_path": "github-repos/coq/mgree-navdifc", "path": "github-repos/coq/mgree-navdifc/navdifc-cde33f3ef7170b59653e252513ec6fc7ed78983a/Terms.v"} |
__author__ = 'JunSong<songjun@corp.netease.com>'
# Date: 2019/1/10
import argparse
import numpy as np
import pandas as pd
import os
import _pickle as pkl
import logging
from collections import Counter
def gen_dict_pkl():
data_dir = "G://Datasets//avazuCTR"
train_csv = os.path.join(data_dir, "train.csv")
... | {"hexsha": "043f64b9c0fa759f09db2c8b7e4a5739bd44c76c", "size": 3243, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow_example/DeepFM/prepare_data.py", "max_stars_repo_name": "songjun54cm/ExampleBank", "max_stars_repo_head_hexsha": "195154ae7aa7fdbee358019248bef77028b8e97e", "max_stars_repo_licenses": [... |
import numpy as np
from torch.utils.data import Dataset
halfcheetah_task_name = ['halfcheetah-random-v0',
'halfcheetah-medium-v0',
'halfcheetah-expert-v0',
'halfcheetah-medium-replay-v0',
'halfcheetah-medium-expert-v0']... | {"hexsha": "1b45f92ce04dd5c618ff87652dc7272b55105cb2", "size": 3795, "ext": "py", "lang": "Python", "max_stars_repo_path": "bear/uncertainty_modeling/rl_uncertainty/datasets.py", "max_stars_repo_name": "junmokane/AI602_Project", "max_stars_repo_head_hexsha": "59c132ae04751f9fb6cf6ebb491042cbf4de003d", "max_stars_repo_l... |
include("utils.jl")
using MAT
using PyPlot
using ADCMEKit
## Load inital state from outside simulation Scycle
meta = matopen("data-scycle.mat")
data = read(meta, "d")
time = data["time"]
tau = data["tauP"]
v = data["slipVel"]
psi = data["psi"]
bd_right = data["momBal"]["bcR"]
bd_left = data["momBal"]["bcL"]
nt = 601
n... | {"hexsha": "be0a0dead0130c0ff7333344c70ba9d30ebdb355", "size": 6573, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "AdFemResearch/earthquake/strikeslip/earthquake_main.jl", "max_stars_repo_name": "ADCMEMarket/ADCMEImages", "max_stars_repo_head_hexsha": "d89df7050f53e56f3c509ff737199068410dbbc2", "max_stars_repo_... |
\section{Code Quality \& Testing}
\begin{breakbox}
\boxtitle{Characteristics of quality software}
\begin{itemize}
\item \textbf{Reliability}: Probability of delivering the service
\item \textbf{Efficiency}: Service is delivered with adequate performance
\item \textbf{Security}: Absence of security breaches... | {"hexsha": "5c5cb0c1f550c56338d744215dfd5f61266ddce0", "size": 1223, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TSM_MobOp/Android/CodeQuality.tex", "max_stars_repo_name": "nortismo/mse-documentations", "max_stars_repo_head_hexsha": "cc67637785237d630f077a863edcd5f49aa52b59", "max_stars_repo_licenses": ["Beerw... |
mutable struct Transit_Struct{T}
# Structure to hold arrays and other quantities for computing transit:
r :: T # radius ratio
b :: T # impact parameter
u_n :: Array{T,1} # limb-darkening coefficients
n :: Int64 # number of limb-darkening coefficients
v_max ... | {"hexsha": "df712b6d05e2a8636d00dd0e628d4b92a6a71234", "size": 5531, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/transit_structure.jl", "max_stars_repo_name": "tagordon/limbdark", "max_stars_repo_head_hexsha": "275ba17a767c585461515ea0d25dd9546032f3b2", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
import chex
import jax
import jax.numpy as np
import numpy as onp
import objax
import pytest
from jax import random
from rbig_jax.transforms.logit import Logit
seed = 123
rng = onp.random.RandomState(123)
generator = objax.random.Generator(123)
# def test_hist_params_transform():
# X_u = rng.uniform(100)
# ... | {"hexsha": "541b3303cc54c77a56e2eb4d872e6b7a047e0e26", "size": 1631, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/transforms/test_logit.py", "max_stars_repo_name": "alexhepburn/rbig_jax", "max_stars_repo_head_hexsha": "706dd60d2049071be0fb3d311c83719121854678", "max_stars_repo_licenses": ["MIT"], "max_s... |
\documentclass[a4paper,11pt]{article}
\usepackage[english]{babel}
\usepackage{a4,fullpage} % small margins
\renewcommand{\familydefault}{\sfdefault} % sans serif font
\title{Knowledge Systems - Assignment 1: Classification}
\author{Laurens Bronwasser\\
1363956\\
lmbronwa@cs.vu.nl
\and
Martijn Vermaat\\
1362917\\
mv... | {"hexsha": "fe89395bde2a495abdd1b5e21de7a8be0c598766", "size": 8374, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "vu/knowledge-systems/assignment-1.tex", "max_stars_repo_name": "martijnvermaat/documents", "max_stars_repo_head_hexsha": "42483b7c4bf94ed708e2893c3ea961d025a10b5e", "max_stars_repo_licenses": ["CC-B... |
import numpy as np
from scipy import optimize
import pandas as pd
from tqdm import tqdm
from GPy.util.linalg import pdinv, dpotrs
from GPclust import OMGP
def breakpoint_linear(x, ts, k1, k2, c1):
'''Function representing a step-wise linear curve with one
breakpoint located at ts.
'''
return np.piecew... | {"hexsha": "ec9ea01a6b37edc0ad219a6e456fa6945a2fd75c", "size": 4508, "ext": "py", "lang": "Python", "max_stars_repo_path": "GPfates/gp_utils.py", "max_stars_repo_name": "jmp448/gp_fates", "max_stars_repo_head_hexsha": "0fb68e0dd899980e6f78606a9db3ba097c8c419f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 18,... |
# -*- coding: utf-8 -*-
"""Integration tests for the GUIs."""
#------------------------------------------------------------------------------
# Imports
#------------------------------------------------------------------------------
from itertools import cycle, islice
import logging
import os
from pathlib import Path... | {"hexsha": "5d71198f2104408713a7346386d67b31a0222530", "size": 16654, "ext": "py", "lang": "Python", "max_stars_repo_path": "phy/apps/tests/test_base.py", "max_stars_repo_name": "PaulMAnderson/phy", "max_stars_repo_head_hexsha": "134264e6c1ec586f797459633fa4e71352fafb4e", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from fipy import *
import numpy as np
import scipy.sparse as sp
import scipy.sparse.linalg as la
import scipy.linalg as lin
from matplotlib import pyplot as plt
import sys
import os
import time
import parameterFunctions.divisionRate as ad
import parameterFunctions.immuneRe... | {"hexsha": "ea4094a0a5922372a30f17272d79e172e4b96c08", "size": 27338, "ext": "py", "lang": "Python", "max_stars_repo_path": "codes/2DTumorEffAndProImmuneInteraction.py", "max_stars_repo_name": "atsoukevin93/tumorgrowth", "max_stars_repo_head_hexsha": "96bda28a6ae6455c53c3b573c05746b6d4f2e802", "max_stars_repo_licenses"... |
"""test over plots (with matplotlib)"""
from graphpype.utils_plot import (plot_cormat, plot_ranged_cormat,
plot_int_mat, plot_hist, plot_signals,
plot_sep_signals)
import os
import shutil
import numpy as np
import matplotlib
matplotlib.use('Agg')
t... | {"hexsha": "6b00e3bf1ea9b6ce3b42314059d946e7ebf5b610", "size": 2546, "ext": "py", "lang": "Python", "max_stars_repo_path": "graphpype/tests/test_utils_plot.py", "max_stars_repo_name": "davidmeunier79/graphpype", "max_stars_repo_head_hexsha": "800d1f8cbfdf3a18de77558c3b88eeb31735857e", "max_stars_repo_licenses": ["BSD-3... |
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import num... | {"hexsha": "86380451d3da77847ebb1487f9b8ccf0d11fbb04", "size": 7062, "ext": "py", "lang": "Python", "max_stars_repo_path": "skl2onnx/algebra/onnx_operator_mixin.py", "max_stars_repo_name": "m3at/sklearn-onnx", "max_stars_repo_head_hexsha": "080b6231cad09b8ada9e1901aa9262e44db0fb74", "max_stars_repo_licenses": ["MIT"], ... |
#Code to that compares each the observed-to-expected neoantigen ratios between samples marked as "selected" and "neutral" evolution using the subclonalSelection method
#Query at the top joins analysis.neoantigen_depletion table to analysis.subclonalselection table (and others)
#Comparisons are made for initial tumors a... | {"hexsha": "f6d3f2740d8c51757d394648ba9721245a572533", "size": 2131, "ext": "r", "lang": "R", "max_stars_repo_path": "R/neoantigens/analysis/neoantigen_depletion_subclonal_selection.r", "max_stars_repo_name": "Kcjohnson/SCGP", "max_stars_repo_head_hexsha": "e757b3b750ce8ccf15085cb4bc60f2dfd4d9a285", "max_stars_repo_lic... |
[STATEMENT]
lemma ValK_strict [intro, simp]:
"ValK_copy\<cdot>\<bottom> = \<bottom>"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. ValK_copy\<cdot>\<bottom> = \<bottom>
[PROOF STEP]
by (simp add: ValK_copy_fix) | {"llama_tokens": 90, "file": "PCF_Continuations", "length": 1} |
//
// Copyright Karl Meerbergen 2007
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef BOOST_NUMERIC_BINDINGS_LAPACK_STEQR_HPP
#define BOOST_NUMERIC_BINDINGS_LAPACK_STEQR_HPP
#include <boost/numer... | {"hexsha": "1c39387358ad39736c1ddb265ee8422981d185b2", "size": 3372, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/numeric/bindings/lapack/steqr.hpp", "max_stars_repo_name": "inducer/boost-numeric-bindings", "max_stars_repo_head_hexsha": "1f994e8a2e161cddb6577eacc76b7bc358701cbe", "max_stars_repo_licenses"... |
[STATEMENT]
lemma conforms_xconf: "\<lbrakk>(x, s)\<Colon>\<preceq>(G,L);
\<forall>a. x' = Some (Xcpt (Loc a)) \<longrightarrow> G,s\<turnstile>Addr a\<Colon>\<preceq> Class (SXcpt Throwable);
x' = Some (Jump Ret) \<longrightarrow> locals s Result \<noteq> None\<rbrakk> \<Longrightarrow>
(x',s)\<Colon>\<prec... | {"llama_tokens": 305, "file": null, "length": 1} |
# restart processes
if nprocs() > 1
rmprocs(workers()) # remove all worker processes
end
wpids = addprocs(2) # add processes
println("Spawned ", nprocs(), " processes, ", nworkers()," workers")
println("Proc IDs: ", procs())
# load LMDB on all processes
@everywhere using LMDB
# create a sample database
nsamples ... | {"hexsha": "aae1843a680c4cba71c90fa1d75cb9bc1f39cc52", "size": 2410, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "misc/ptest.jl", "max_stars_repo_name": "cc-nl/LMDB.jl", "max_stars_repo_head_hexsha": "c498a3ecfe0ebb44ea761cd02a53e96e93480bf1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 35, "max_sta... |
import numpy as np
import pygame.time
from threading import Thread
from utils import *
class Preview:
def __init__(self, rect, timeline):
self.rect = rect
self.run = False
self.fps = 1
self.timeline = timeline
self.current_frame_index = 0
self.frame_rect = pygame.R... | {"hexsha": "143cd3060e440e22936c0d904537357ff5e594ba", "size": 4604, "ext": "py", "lang": "Python", "max_stars_repo_path": "GUIAnimationTool/elements/preview.py", "max_stars_repo_name": "tobyrcod/PiPet", "max_stars_repo_head_hexsha": "9dd0663e507ea5d940d0daaed17f34cfd9e00ca5", "max_stars_repo_licenses": ["MIT"], "max_s... |
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | {"hexsha": "50baa044cd2cbb07afb3d13397d22c8eb6605981", "size": 8995, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/transformers/roberta/test_modeling.py", "max_stars_repo_name": "mukaiu/PaddleNLP", "max_stars_repo_head_hexsha": "0315365dbafa6e3b1c7147121ba85e05884125a5", "max_stars_repo_licenses": ["Apac... |
using CorpusLoaders
using Test
using Base.Iterators
using MultiResolutionIterators
using InternedStrings
if haskey(ENV, "CI") && ENV["CI"] == "true"
@warn "WikiCorpus tests disabled on CI"
else
# Do the tests
@testset "basic use" begin
wk_gen = load(WikiCorpus())
docs = collect(take(wk_gen,... | {"hexsha": "95ecac4708b2648135308fc99600d9096f3f210f", "size": 1307, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_wikicorpus.jl", "max_stars_repo_name": "rssdev10/CorpusLoaders.jl", "max_stars_repo_head_hexsha": "5f9a3c5237bf6eaab061662993eb75654f387aba", "max_stars_repo_licenses": ["MIT"], "max_star... |
"""Computes features for each reaction."""
import json
import re
from collections import defaultdict
from typing import Dict, Tuple
import numpy
from pymatgen.core import Composition as C
from pymatgen.core.composition import CompositionError
from s4.cascade.analysis import compute_cascade
from s4.data import open_da... | {"hexsha": "2606f127cb831769bc940335d49b9f7e1cd38cfa", "size": 13232, "ext": "py", "lang": "Python", "max_stars_repo_path": "s4/ml/features.py", "max_stars_repo_name": "zhugeyicixin/s4", "max_stars_repo_head_hexsha": "d6398caedd310515165d1c4421f9e09390a80f11", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 7, "... |
[STATEMENT]
lemma red_external_non_speculative_read:
assumes hrt: "heap_read_typeable hconf P"
and vs: "vs_conf P (shr s) vs"
and red: "P,t \<turnstile> \<langle>a\<bullet>M(vs'), shr s\<rangle> -ta\<rightarrow>ext \<langle>va,h'\<rangle>"
and aok: "final_thread.actions_ok final s t ta"
and hconf: "hconf (shr... | {"llama_tokens": 13954, "file": "JinjaThreads_MM_JMM_Common", "length": 8} |
// Author(s): Jeroen Keiren
// Copyright: see the accompanying file COPYING or copy at
// https://svn.win.tue.nl/trac/MCRL2/browser/trunk/COPYING
//
// 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)
//
/// \file li... | {"hexsha": "661ee895e8cd48da2920c816fa7d97be12287302", "size": 2177, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libraries/data/test/list_test.cpp", "max_stars_repo_name": "wiegerw/mcrl3", "max_stars_repo_head_hexsha": "15260c92ab35930398d6dfb34d31351b05101ca9", "max_stars_repo_licenses": ["BSL-1.0"], "max_sta... |
import gym
import numpy as np
def create_trajectory(env: gym.Env, max_horizon: int):
env.reset()
rewards = np.empty([max_horizon, 1])
obs = np.empty((max_horizon, env.observation_space.shape[0]))
act_dim = env.action_space.shape[0] if len(env.action_space.shape) > 0 else 1
actions = np.empty((max_... | {"hexsha": "e661393ef2fe34095deb8af09ce00721950fb482", "size": 1562, "ext": "py", "lang": "Python", "max_stars_repo_path": "sds_bayesian_numpy/ext/create_gym_data.py", "max_stars_repo_name": "thlautenschlaeger/sds", "max_stars_repo_head_hexsha": "710e7c6b1b15afd0476b6f0f60c03415571bebeb", "max_stars_repo_licenses": ["M... |
"""
This module defines negative log-likelihood loss.
"""
# standard libraries
import logging
# third party libraries
from theano.tensor import (mean, log as Tlog, arange)
# internal references
from opendeep.optimization.loss import Loss
log = logging.getLogger(__name__)
class Neg_LL(Loss):
"""
Defines the m... | {"hexsha": "207e4369a3775079bacc325d29fee312145af2ba", "size": 2677, "ext": "py", "lang": "Python", "max_stars_repo_path": "opendeep/optimization/loss/neg_LL.py", "max_stars_repo_name": "vitruvianscience/OpenDeep", "max_stars_repo_head_hexsha": "e96efc449101094354b615cf15afe6d03644fc36", "max_stars_repo_licenses": ["Ap... |
#ifndef __NETWORK_IO_HPP__
#define __NETWORK_IO_HPP__
#include <boost/asio.hpp>
#include "duration_generator.hpp"
#include "log.hpp"
#include "utility.hpp"
namespace nio {
using boost::asio::ip::udp;
typedef std::function<void(const boost::system::error_code &, const std::size_t &)> completion_cb;
/* receive obje... | {"hexsha": "39c135e02eaabe5c2bbae170f379730342e93d2a", "size": 2678, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/network_io.hpp", "max_stars_repo_name": "VikashChandola/cpptftp", "max_stars_repo_head_hexsha": "4ef14c680633100f36c9dbe343b222a4c54a2485", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import argparse
import time
import numpy as np
from .latch_streamer import LatchStreamer
from .ls_utils import StatusPrinter, stream_loop
from ..gateware.apu_calc import calculate_advanced
parser = argparse.ArgumentParser(
formatter_class=argparse.RawDescriptionHelpFormatter,
description='Play back a TAS usi... | {"hexsha": "d38b8e5cdca7835995727bda0a500d3629990376", "size": 5166, "ext": "py", "lang": "Python", "max_stars_repo_path": "tasha/host/play.py", "max_stars_repo_name": "tpwrules/tasha_and_friends", "max_stars_repo_head_hexsha": "9994f6e147febf671503882e545baae9b0bca80b", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma... |
#include <test/test-models/good/variational/gradient_warn.hpp>
#include <stan/variational/advi.hpp>
#include <stan/callbacks/stream_writer.hpp>
#include <stan/callbacks/stream_logger.hpp>
#include <gtest/gtest.h>
#include <test/unit/util.hpp>
#include <vector>
#include <string>
#include <iostream>
#include <bo... | {"hexsha": "4114b9d8c0df6202d4ff3dc137a7a26d84ce1b92", "size": 2956, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "archive/stan/src/test/unit/variational/gradient_warn_test.cpp", "max_stars_repo_name": "alashworth/stan-monorepo", "max_stars_repo_head_hexsha": "75596bc1f860ededd7b3e9ae9002aea97ee1cd46", "max_star... |
a = Vec4f0(0)
b = Vec2f0(2)
c = Vec4f0(b..., 1,2)
d = Vec{4, Int}(b..., 1,2)
d = Vec{4, UInt}(b..., 1,2)
m = rand(Mat{4,3,Float32})
m2 = rand(Mat{3,3,Float32})
gluniform(Int32(1), a)
gluniform(Int32(1), [a,a])
gluniform(Int32(1), m)
gluniform(Int32(1), [m, m])
| {"hexsha": "2266b0e454ddfdb7cd5f610e6c4a6d70a11642c0", "size": 266, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/uniforms.jl", "max_stars_repo_name": "Tuebel/GLAbstraction.jl", "max_stars_repo_head_hexsha": "5dd969f1d1313d4ff3fc423de90feaa532d5f608", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
from autoPyTorch.pipeline.base.pipeline_node import PipelineNode
from autoPyTorch.utils.benchmarking.visualization_pipeline.plot_trajectories import plot, label_rename, process_trajectory
from autoPyTorch.utils.config.config_option import ConfigOption, to_bool
import os
import logging
import numpy as np
import random
i... | {"hexsha": "8eb7e6f2d4a85f025d9bc392f1e120ee88274498", "size": 10715, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoPyTorch/utils/benchmarking/visualization_pipeline/plot_summary.py", "max_stars_repo_name": "mens-artis/Auto-PyTorch", "max_stars_repo_head_hexsha": "da8528d5cb1d5ac6a9050eaa84a332a5a11ee6d5",... |
[STATEMENT]
lemma measurable_Diff_null_set:
assumes "B \<in> null_sets M"
shows "(A - B) \<in> fmeasurable M \<and> A \<in> sets M \<longleftrightarrow> A \<in> fmeasurable M"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (A - B \<in> fmeasurable M \<and> A \<in> sets M) = (A \<in> fmeasurable M)
[PROOF STEP]
u... | {"llama_tokens": 258, "file": null, "length": 2} |
# Copyright 2022 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | {"hexsha": "3f0327969d43fd387634ecebcd4d0d343e4a818d", "size": 4378, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/st/ops/gpu/test_matrix_determinant_op.py", "max_stars_repo_name": "httpsgithu/mindspore", "max_stars_repo_head_hexsha": "c29d6bb764e233b427319cb89ba79e420f1e2c64", "max_stars_repo_licenses":... |
#include <boost/test/unit_test.hpp>
#include "unbounded_ordered/node/unbounded_ordered_node.hpp"
#include <utility>
struct NodeTraversalTest {
typedef unbounded_ordered::node<int> nodeint;
nodeint* node;
typedef nodeint::NodeLastMovement node_last_movement;
const int count_nodes = 9;
const int count_leaves... | {"hexsha": "ee903199e9d02a453f7fa2b6a317f1f60cfdc448", "size": 8787, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tst/node/node_traversal_test.cpp", "max_stars_repo_name": "lejeuneretif/unbounded-ordered-tree", "max_stars_repo_head_hexsha": "0e4a431ee0b1228295c651858449005eb3e5c813", "max_stars_repo_licenses": ... |
# SimHistory
# maintained by @zsunberg
abstract type AbstractSimHistory{NT} <: AbstractVector{NT} end
nt_type(::Type{H}) where H<:AbstractSimHistory{NT} where NT = NT
nt_type(h::AbstractSimHistory) = nt_type(typeof(h))
"""
SimHistory
An (PO)MDP simulation history returned by `simulate(::HistoryRecorder, ::Union... | {"hexsha": "4c7f53e9f6b5241fe7d0df6a606aa0033b178e7b", "size": 5012, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/history.jl", "max_stars_repo_name": "UnofficialJuliaMirror/POMDPSimulators.jl-e0d0a172-29c6-5d4e-96d0-f262df5d01fd", "max_stars_repo_head_hexsha": "a464babda6c77ec9922ac061f23d68f29508d000", "m... |
\chapter{Interpreting a Logistic Regression Model \label{chapter:logreg}}
This chapter is similar to Chapter~\ref{chapter:linreg} but focuses on logistic regression models. As we saw in Chapter~\ref{chapter:linreg}, linear regression models are used in situations where the outcome of a supervised learning problem, $y$... | {"hexsha": "cd7a660f69b6ba841dcc04b19a2d220e83c703a6", "size": 11764, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex/mcds-logistic-regression.tex", "max_stars_repo_name": "blpercha/mcds-notes", "max_stars_repo_head_hexsha": "33531a443afb154b5c415299276a2ad215463896", "max_stars_repo_licenses": ["CC0-1.0"], "m... |
"""Process the histograms of MR (brain) images
Author: Jacob Reinhold <jcreinhold@gmail.com>
Created on: 01 Jun 2021
"""
__all__ = [
"get_first_tissue_mode",
"get_largest_tissue_mode",
"get_last_tissue_mode",
"get_tissue_mode",
"smooth_histogram",
]
import builtins
import numpy as np
import scipy... | {"hexsha": "76a8803316a7e84c4282bbce0b5cd5e7caceefea", "size": 4255, "ext": "py", "lang": "Python", "max_stars_repo_path": "intensity_normalization/util/histogram_tools.py", "max_stars_repo_name": "AlaSummer/intensity-normalization", "max_stars_repo_head_hexsha": "4481b52c35041eb564bd3e7c7d1b89c1604410c6", "max_stars_r... |
c subroutine solout(en, fl, agi, api, kap, rmt,
c 1 jri, max0, ic3, vm, iwkb)
subroutine solout(en, fl, agi, api, kap,
1 jri, max0, ic3, vm, iwkb)
c resolution of the dirac equation
c p' - kap*p/r = - ( en/cl-v )*g - eg/r
c ... | {"hexsha": "a1bb47d46bb8a6c64cab29b98d4f4385a94c0cb7", "size": 5375, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/FOVRG/solout.f", "max_stars_repo_name": "xraypy/feff85exafs", "max_stars_repo_head_hexsha": "ec8dcb07ca8ee034d0fa7431782074f0f65357a5", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_... |
import unittest
import os
import tempfile
import numpy as np
import healsparse
import supreme
from supreme.utils import op_str_to_code
import supreme_test_base
class TractConsolidateTestCase(supreme_test_base.SupremeTestBase):
"""
Tests for consolidating tracts, with HSC RC2 config file.
"""
def tes... | {"hexsha": "1a6a309d9200f620357ca7740d18c37f141782a9", "size": 7464, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_tract_consolidator_rc2.py", "max_stars_repo_name": "LSSTDESC/supreme", "max_stars_repo_head_hexsha": "48bb3b3aa3bcd7d050fd1205873a83c5140be226", "max_stars_repo_licenses": ["BSD-3-Claus... |
# Copyright 2020 The PyMC Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | {"hexsha": "918e37a710964b4fb38f5d7c275a23f753ce03b8", "size": 8128, "ext": "py", "lang": "Python", "max_stars_repo_path": "pymc/tests/test_initial_point.py", "max_stars_repo_name": "michaelosthege/pymc", "max_stars_repo_head_hexsha": "598dd9de2b818a58480071720a9f3da63177be89", "max_stars_repo_licenses": ["Apache-2.0"]... |
from pprint import pprint
import numpy as np
import random, itertools, pdb, scipy, copy, sklearn
from sklearn.metrics import accuracy_score
from ..common.math import softmax
from ..common.math import softmax_cross_entropy_loss
'''
Only support two layer neural networks. Deeper networks should be using
Tensorflow. Only... | {"hexsha": "3ad66d4818d7cacbe3571a7c133b711ac8b05060", "size": 5069, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn/nn.py", "max_stars_repo_name": "luanjunyi/simple-ml", "max_stars_repo_head_hexsha": "1fbb11b476305559b1ab006964e72cf05a2d598c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max... |
# -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2018, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | {"hexsha": "041bf4d55dc2c545392273ed2695906967facf69", "size": 4337, "ext": "py", "lang": "Python", "max_stars_repo_path": "qiskit/providers/aer/pulse/qutip_lite/tensor.py", "max_stars_repo_name": "Matt-Stypulkoski/qiskit-aer", "max_stars_repo_head_hexsha": "d2ccea906245b9bdfeacab29ff7fcfacb9b35b3d", "max_stars_repo_li... |
[STATEMENT]
lemma no_back_backarc_app2: "\<lbrakk>no_back xs; i < j; (xs@ys)!j \<rightarrow>\<^bsub>T\<^esub> (xs@ys)!i\<rbrakk> \<Longrightarrow> j \<ge> length xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. \<lbrakk>no_back xs; i < j; (xs @ ys) ! j \<rightarrow>\<^bsub>T\<^esub> (xs @ ys) ! i\<rbrakk> \<Longri... | {"llama_tokens": 177, "file": "Query_Optimization_IKKBZ_Optimality", "length": 1} |
# Copyright 2021, Crepaldi Michele.
#
# Developed as a thesis project at the TORSEC research group of the Polytechnic of Turin (Italy) under the supervision
# of professor Antonio Lioy and engineer Andrea Atzeni and with the support of engineer Andrea Marcelli.
#
# Licensed under the Apache License, Version 2.0 (the "L... | {"hexsha": "877c6b467be957d77117a75d57fbd3a0c84c59a0", "size": 23650, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Model/train.py", "max_stars_repo_name": "cmikke97/AMSG", "max_stars_repo_head_hexsha": "ddcfeb6262124e793fcee385405365417e57f91f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"... |
@info "Hello, World!"
@info ARGS
| {"hexsha": "a6b29c6b5ff17a55350ef0ccf4a10b1076ee2512", "size": 33, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bin/test.jl", "max_stars_repo_name": "kescobo/ArgParseLite.jl", "max_stars_repo_head_hexsha": "99b5d4073e90bb712d33120c65dbdf4a4f0cf5f2", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
import tomopy
import argparse
import numpy as np
import afnumpy as afnp
import arrayfire as af
from gnufft import tvd_update,add_hessian
from XT_ForwardModel import forward_project, init_nufft_params, back_project
def gpuGridrec(tomo,angles,center,input_params):
"""
Gridrec reconstruction using GPU ba... | {"hexsha": "3a1fa4c0cff57796729bc51e70ddef949b409ac4", "size": 11633, "ext": "py", "lang": "Python", "max_stars_repo_path": "xicam/plugins/tomography/tomocam/tomoCam.py", "max_stars_repo_name": "ronpandolfi/Xi-cam", "max_stars_repo_head_hexsha": "f6388c7c44b202403194a04ca2b4d8bcca41cc74", "max_stars_repo_licenses": ["B... |
# -*- coding: utf-8 -*-
from numpy import *
import EScheme as es
import matplotlib.pyplot as plt
path = """./res/"""
m = es.Mesh(file=path + "microstrip2.msh", verbose=True)
bound = {1: 0.0, 2: 0.0, 9: 0.0, 10: 0.0, 5: 5.0}
c = True
vc, ic, bc = m.run(cuda=False, coloring=c, boundary=bound, errmin=1E-4, kmax=10000)
... | {"hexsha": "be1e55a2d49241e4d8fd50bb6676329065c58a94", "size": 612, "ext": "py", "lang": "Python", "max_stars_repo_path": "EScheme.Microstrip.py", "max_stars_repo_name": "kewitz/master", "max_stars_repo_head_hexsha": "fd07c7ec40bc72e8870b2bdff770390487977a2f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "... |
#### General Assumptions of these TNEP Models ####
#
#
export run_tnep
""
function run_tnep(file, model_constructor, solver; kwargs...)
return run_generic_model(file, model_constructor, solver, post_tnep; solution_builder = get_tnep_solution, kwargs...)
end
"the general form of the tnep optimization m... | {"hexsha": "76162af5f599f29a9341bd7ed9d0b7f4404d35ff", "size": 1744, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/prob/tnep.jl", "max_stars_repo_name": "jac0320/PowerModels.jl", "max_stars_repo_head_hexsha": "c638030e9d6a8e269cd1fe6e38a5d5bf5611156c", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars... |
/* ----header---- */
/* common header */
#include "ros/ros.h"
#include "std_msgs/Header.h"
#include <std_msgs/Float64.h>
#include <ros/callback_queue.h>
#include <boost/circular_buffer.hpp>
#include <vector>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/stat.h>
#include <s... | {"hexsha": "c8f2f35e39fbb3be8b3be3d2874a5007687c5c8f", "size": 7699, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "utilities/sync/include/impl/single_sync_impl.hpp", "max_stars_repo_name": "alanjclark/autoware.ai", "max_stars_repo_head_hexsha": "ba97edbbffb6f22e78912bf96400a59ef6a13daf", "max_stars_repo_licenses... |
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torchvision import datasets, transforms
from torch.utils.data import Dataset
from torch.utils.data import TensorDataset, DataLoader
import sys
import csv
import time
import numpy as np
import pandas as pd
from PIL import... | {"hexsha": "c64b86ead7597986941aa37388e6473554b1a270", "size": 5755, "ext": "py", "lang": "Python", "max_stars_repo_path": "cnn.py", "max_stars_repo_name": "TobyChen0106/DeepQ_Final_B05901170", "max_stars_repo_head_hexsha": "808a224c01272726a051eb7b7bb9e1b28887716e", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
import pandas as pd
import numpy as np
pd.options.mode.chained_assignment = None # default='warn'
import matplotlib.pyplot as plt
import matplotlib.image as mpimg
from sklearn.model_selection import train_test_split
from sklearn import model_selection
from sklearn import svm
from random import choice
import seaborn as... | {"hexsha": "68a94ec6b3928be7380592dc720154d29d206e80", "size": 3124, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/Machine Learning/ScikitClassifiers/Classifiers/SVM_digits.py", "max_stars_repo_name": "sindresf/The-Playground", "max_stars_repo_head_hexsha": "438577487e02d0ff7986d72cb7a5ab995c2f96ab", "m... |
module mesh_types_mod
use constants_mod
use mesh_const_mod
use morton_mod, only: MORTON_MAXLEVEL
use types_mod, only: payload_t
use types_mod, only: auxiliary_t
use iso_c_binding, only: c_ptr, c_int, c_size_t, c_int64_t
type :: quadptr_t
type(quad_t), pointer :: p
end type
type :: sideptr_t
type(side_t)... | {"hexsha": "93ed9475afa18d36043e9ad33d974113a42c6a2d", "size": 5029, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "source/mesh/mesh_types_mod.f90", "max_stars_repo_name": "jmark/nemo", "max_stars_repo_head_hexsha": "cf8a6a8bed5c54626f5e300c701b9c278fd5e0cd", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
# Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | {"hexsha": "360478d3abf427bdb64462efb378cee324cb5872", "size": 301407, "ext": "py", "lang": "Python", "max_stars_repo_path": "tensorflow/python/feature_column/feature_column_v2.py", "max_stars_repo_name": "ShaunHeNJU/DeepRec-1", "max_stars_repo_head_hexsha": "e280fb19de179f03dc05e1d8e3f4f7459796d96e", "max_stars_repo_l... |
/*
The MIT License (MIT)
Copyright (c) [2016] [BTC.COM]
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, copy, modify, me... | {"hexsha": "d520907ae01382239ad7e08e65cf481ba2bf670e", "size": 22336, "ext": "cc", "lang": "C++", "max_stars_repo_path": "src/bitcoin/StratumBitcoin.cc", "max_stars_repo_name": "Timopheym/btcpool", "max_stars_repo_head_hexsha": "b9fb89de66dc5573de0de764643b2b67443ace9a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
## Python3 Interface to Bittrex API
import requests, json
import os, time, calendar
from pathlib import Path
import numpy as np
import phone
import cutils as cu
s = requests.Session()
# Set of Functions to Retrieve, Modify, and Store Bittrex Data
def get_active_markets(base_currency ='btc', base_currencies = ('BTC'... | {"hexsha": "e05f035e8b71f7982db6ff1527f29bd204253841", "size": 8699, "ext": "py", "lang": "Python", "max_stars_repo_path": "lib/bittrex.py", "max_stars_repo_name": "levshaket/trading", "max_stars_repo_head_hexsha": "21de94d28dc321651f0e73094dbfde710f7cc2bd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, ... |
"""
Basic linear algebra operations as defined on the parameter sets of entire models.
We can think of these list as a single vectors consisting of all the individual
parameter values. The functions in this module implement basic linear algebra
operations on such lists.
The operations defined in the module follow the... | {"hexsha": "92beb0cf173b5e40e1ab74a1cee6cf36c224e95c", "size": 13484, "ext": "py", "lang": "Python", "max_stars_repo_path": "loss_landscapes/model_interface/model_parameters.py", "max_stars_repo_name": "alpha358/loss-landscapes", "max_stars_repo_head_hexsha": "806e9170b34fffa8a37a580947639ad3d3508079", "max_stars_repo_... |
import seaborn as sns
import pandas as pd
import json
import glob, os, sys, subprocess
from scipy.cluster.hierarchy import dendrogram, linkage, fcluster
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from sklearn.datasets import load_iris, load_digits
from sklearn.model_sel... | {"hexsha": "8e05c176f351d4b451f66ef8d69fb1529bc6fc5b", "size": 2974, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/doubletiny_umap_visualize.py", "max_stars_repo_name": "langmead-lab/reference_flow-experiments", "max_stars_repo_head_hexsha": "8838c56c5fff36a8aff708e24c72d9537e47ff9b", "max_stars_repo_l... |
# coding: utf-8
# # Estimating the biomass of plants
# In order to estimate the biomass of plants, we rely on data generated by **Erb et al.**, which generated seven different estimates of the global biomass of plants. The seven estimates are:
# In[1]:
import pandas as pd
import numpy as np
from scipy.stats import ... | {"hexsha": "48c3af1efd247ca3c2dc1f49fb993f4937d5e638", "size": 1932, "ext": "py", "lang": "Python", "max_stars_repo_path": "plants/plants.py", "max_stars_repo_name": "yinonbaron/biomass_distribution", "max_stars_repo_head_hexsha": "783a8d2f59754bde9b0ea802512b131abbe7d8a0", "max_stars_repo_licenses": ["MIT"], "max_star... |
open import Agda.Builtin.Unit
open import Agda.Builtin.Sigma
open import Agda.Builtin.List
open import Agda.Builtin.Equality
open import Agda.Builtin.Reflection renaming (bindTC to infixl 4 _>>=_)
macro
quoteDef : Name → Term → TC ⊤
quoteDef f hole = (getDefinition f >>= quoteTC) >>= unify hole
postulate
A : S... | {"hexsha": "ef10eaca1ab6b97dab3cdb5fb1296c8e74cac119", "size": 689, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Succeed/Issue5128.agda", "max_stars_repo_name": "guilhermehas/agda", "max_stars_repo_head_hexsha": "cb645fcad38f76a9bf37507583867595b5ce87a1", "max_stars_repo_licenses": ["BSD-3-Clause"], "max... |
"""
OneSeries is an extended variant of pandas.Seres, which also inherits all the pandas.Series
features and ready to use. It contains many useful methods for a better experience on data analysis.
WARNING: Because this module is still pre-alpha, so many features are unstable.
"""
import pandas as pd
from pandas impor... | {"hexsha": "455e333759442d428e7a67fec2c5edddfd142886", "size": 8454, "ext": "py", "lang": "Python", "max_stars_repo_path": "oneline/core/oneseries.py", "max_stars_repo_name": "clarenceehsu/oneLine", "max_stars_repo_head_hexsha": "a0f1c908efc39e3a2d36477ce50ee1d6974d699e", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
function apply_boundary_conditions_on_z_axis!( rbpot::AbstractArray{T, 4}, rbi::Int, ax::DiscreteAxis{T, :infinite, :fixed}, int::Interval{:closed, :closed, T},
grid_boundary_factors::NTuple{2, T})::Nothing where {T}
rbpot[:, :, 1, rbi] .= grid_boundary_factors[1] .*... | {"hexsha": "d31ba45579efa15740d7817a2c89178f09ec930b", "size": 12101, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/PotentialCalculation/PotentialCalculationSetup/BoundaryConditions/BoundaryConditionsCartesian.jl", "max_stars_repo_name": "SebastianRuffert/SolidStateDetectors.jl", "max_stars_repo_head_hexsha... |
import numpy as np
from utils.transform_utils import invert_review_chance
def get_alpha():
# Alpha for 1 and 2 standard-deviations
alpha = [0.05, 0.32]
return alpha
def get_alpha_index():
# Arbitrarily chosen so that alpha = 0.32. cf. get_alpha()
alpha_index_to_display = 1
return alpha_inde... | {"hexsha": "0926492a2f6bf80ac631570b2a43b116967dc7c9", "size": 1560, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/mapie_utils.py", "max_stars_repo_name": "woctezuma/steam-reviews-to-sales", "max_stars_repo_head_hexsha": "51ca279d07a2a1cf26d099a5cfe51566760298cd", "max_stars_repo_licenses": ["MIT"], "max... |
import os
import argparse
import numpy as np
import pandas as pd
from tqdm import tqdm
from pathlib import Path
from joblib import Parallel, delayed
from audio import extract_feature, num_mels, num_mfcc, num_freq
# SETS = ['train-clean-100', 'train-clean-360', 'train-other-500', 'dev-clean',
# 'dev-other', 't... | {"hexsha": "b1254e2deff95b50537f2f3b35a7340aee8602bc", "size": 4524, "ext": "py", "lang": "Python", "max_stars_repo_path": "preprocess/preprocess_any.py", "max_stars_repo_name": "Ydkwim/CTAL", "max_stars_repo_head_hexsha": "066630cb640f08434a7fc90e6a06fcb9af34238c", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
# Copyright 2019 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | {"hexsha": "2a765895506fb433def6418b94dd5f4a7871e94f", "size": 9025, "ext": "py", "lang": "Python", "max_stars_repo_path": "research/delf/delf/python/detect_to_retrieve/extract_aggregation.py", "max_stars_repo_name": "baranshad/models", "max_stars_repo_head_hexsha": "aaf008855e9764f32d974e86f8e1f9cfddfafd9a", "max_star... |
\documentclass[11pt,]{article}
\usepackage{lmodern}
\usepackage{amssymb,amsmath}
\usepackage{ifxetex,ifluatex}
\usepackage{fixltx2e} % provides \textsubscript
\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\else % if luatex or xelatex
\ifxetex
\usepackag... | {"hexsha": "2411d1766aa43d5c973be51b2ac5b9d935b8857d", "size": 27332, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "analyses/stats/linear-discriminant-analysis.tex", "max_stars_repo_name": "ffzg-erudito/inter-testing-feedback-2018", "max_stars_repo_head_hexsha": "368f3fb8960535dd0d99213a360491b1edde8b39", "max_s... |
import torch
import matplotlib.pyplot as plt
from torch.utils.data import Dataset
import torchvision.transforms as trans
from tqdm import tqdm
import numpy as np
from os import walk, path, mkdir,listdir
from skimage import io, color
from PIL import Image
class REcolorDataset(Dataset):
def __init__(self,loc = "./va... | {"hexsha": "fe3a7ecedf31c26aa2ce29e299ebc6b3b36e2032", "size": 1747, "ext": "py", "lang": "Python", "max_stars_repo_path": "PyTorch/Data_things.py", "max_stars_repo_name": "Data-Science-Community-SRM/Image-Recolorization", "max_stars_repo_head_hexsha": "57b1b3b3d33743bc9ed781c6c3808edc50316022", "max_stars_repo_license... |
"""
Computer Vision Module
"""
import cv2, cv
from datetime import datetime
import numpy as np
class RowFinder:
def __init__(self, cams=1, verbose=True, width=640, height=480, depth=1.0, fov=0.7, date_format="%Y-%m-%d %H:%M:%S"):
self.DATE_FORMAT = date_format
self.VERBOSE = verbose
self.... | {"hexsha": "7b27df7d3aa8bf4774ca88e363845d8c68df4075", "size": 5751, "ext": "py", "lang": "Python", "max_stars_repo_path": "base/cvm.py", "max_stars_repo_name": "trevstanhope/cv-drive", "max_stars_repo_head_hexsha": "03a59a3debee7b9d3df45b5277cb621bed291554", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "m... |
import cv2 # Import the OpenCV library to enable computer vision
import numpy as np # Import the NumPy scientific computing library
import utils as edge # Handles the detection of lane lines
import matplotlib.pyplot as plt
# Author: Addison Sears-Collins
# https://automaticaddison.com
# Description: Implementation of ... | {"hexsha": "8ada1b9642589c789b41647825eaecbfd531ff0e", "size": 30723, "ext": "py", "lang": "Python", "max_stars_repo_path": "perceptor/lane.py", "max_stars_repo_name": "isbobby/CS4278-5478-Project-Materials", "max_stars_repo_head_hexsha": "31d8619f33d79cbf9eb8e8d1ae1d60395679ae25", "max_stars_repo_licenses": ["MIT"], "... |
#!/usr/bin/env python
#
# This script is for deducing the the effect of single mutations from multiple mutations
#
class muts:
def __init__(self,mutfile):
"""Decompose mutation effects"""
data=self.read_muts(mutfile)
print data.keys()
backup=data.copy()
#
# find sing... | {"hexsha": "b48d7b21ad4eab86408524dfd1f0a10a64fd2c76", "size": 5630, "ext": "py", "lang": "Python", "max_stars_repo_path": "pKaTool/stab_fit/Decode_muts.py", "max_stars_repo_name": "shambo001/peat", "max_stars_repo_head_hexsha": "7a26e896aa9914b084a9064df09ed15df4047cf3", "max_stars_repo_licenses": ["MIT"], "max_stars_... |
# Solving regression problems with python
### First we are gonna to create a synthetic data, suposse we have a historic record of house prices according to their size.
```python
import numpy as np
import matplotlib.pyplot as plt
X = np.linspace(0,20,100)
# Just create a ficticial relationship and ignore that we ... | {"hexsha": "477105c6a5e2089890e26e24e400c88ebe980a29", "size": 40686, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Regression-Python-Medellin/Regression problems with Python.ipynb", "max_stars_repo_name": "williamegomez/Python-Talks", "max_stars_repo_head_hexsha": "138949fc6c75b516d0bf74b5e5fbe75... |
import heatsim2
import numpy as np
numpy=np
import pylab as pl
# 1/8" steel on foam with a small insulating delamination gap
# Create x,y,z voxel center coords
nx=48
ny=40
nz=80
measx=5e-3
measy=5e-3
meas2x=50e-3
meas2y=45e-3
#t0=-0.001
t0=0
dt=0.01
nt=1000 # was 100000
tvec=t0+numpy.arange(nt,dtype='d')*dt
(dz... | {"hexsha": "52d47b2ce62a13a7e1b5ccf4774994cc761d2a26", "size": 3874, "ext": "py", "lang": "Python", "max_stars_repo_path": "demos/steelonfoam.py", "max_stars_repo_name": "isuthermography/heatsim2", "max_stars_repo_head_hexsha": "c260d5d683138a900ebc9195766b01e4f73aa46f", "max_stars_repo_licenses": ["Unlicense"], "max_s... |
import scipy.stats as stats
class GeneralMethod(object):
def __init__(self, conf):
self.conf = conf
self.gamma = self.conf['gamma']
self.CR = self.conf['CR']
self.scale = self.conf['scale']
self.a = self.conf['a']
self.b = self.conf['b']
self.best = self.con... | {"hexsha": "c715f570ddb70c8b31794029ddec0ca01ba5561e", "size": 903, "ext": "py", "lang": "Python", "max_stars_repo_path": "algorithms/general_method.py", "max_stars_repo_name": "jmtomczak/popi", "max_stars_repo_head_hexsha": "a10c03abe1c58560f3226b161981f5350a1500f4", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
using Test, DiffEqOperators
# Set up coefficient functions to test with
vec_fcn = Vector{Function}(undef,0)
f1(x::Float64) = sin(x)
f2(x::Vector{Float64}) = sin.(x)
push!(vec_fcn, f1)
push!(vec_fcn, f2)
@testset "Test coefficient functions when current_coeffs exists" begin
vec_fcn_ans = Vector{Vector{Float64}}(u... | {"hexsha": "e246eac3adfa3fff011dc666c29041d8dcdbdb6d", "size": 3885, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/coefficient_functions.jl", "max_stars_repo_name": "scheidan/DiffEqOperators.jl", "max_stars_repo_head_hexsha": "bb78889283f64882aef77f89c83a145d533976ee", "max_stars_repo_licenses": ["MIT"], "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.