text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import os import cv2 import numpy as np class SolarPanelsDataset: """CamVid Dataset. Read images, apply augmentation and preprocessing transformations. Args: images_dir (str): path to images folder masks_dir (str): path to segmentation masks folder class_values (list): values of classe...
{"hexsha": "c5a1273f7578fe1fbd75cda723abab7da07e52d6", "size": 2367, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/models/segmentation/dataset.py", "max_stars_repo_name": "cedarsnow/Deep-Learning-for-Solar-Panel-Recognition", "max_stars_repo_head_hexsha": "eca5afcba4ebc1e3c6a590c7efbec484895efcd4", "max_st...
module TestTransformer using Test, MLJModels using Tables, CategoricalArrays, Random using ScientificTypes using StatsBase using Statistics using StableRNGs stable_rng = StableRNGs.StableRNG(123) using Dates: DateTime, Date, Time, Day, Hour import MLJBase #### FEATURE SELECTOR #### @testset "Feat Selector" begin ...
{"hexsha": "6aa143871dd14a2118d515f4fc0c1481b2e701da", "size": 19820, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/builtins/Transformers.jl", "max_stars_repo_name": "juliohm/MLJModels.jl", "max_stars_repo_head_hexsha": "67e775aace89be6af6ed3a17cf0c989c3d10c0ca", "max_stars_repo_licenses": ["MIT"], "max_st...
# Logistic Regression from matplotlib import use use('TkAgg') import matplotlib.pyplot as plt import numpy as np from scipy.optimize import minimize from costFunction import costFunction from gradientFunction import gradientFunction from sigmoid import sigmoid from predict import predict import sys sys.path.append('....
{"hexsha": "aea462b7aa12a964404019bb5aadb974c7793332", "size": 3573, "ext": "py", "lang": "Python", "max_stars_repo_path": "ex2/ex2.py", "max_stars_repo_name": "SkyAndCloud/Coursera-AndrewNG-ML-Python", "max_stars_repo_head_hexsha": "586edffdcc3e0811ac186a00b78897b0a75a07d0", "max_stars_repo_licenses": ["MIT"], "max_st...
# __________________________________________________________________________ # Layer converters # # Each of these converters takes three arguments: # - The H5 Group with the layer parameters # - The layer configuration # - The number of inputs (for error checking) # # Each returns two outputs: # - A dictionary of l...
{"hexsha": "0ccef0fb733f14f906997e942bf5201cad04997e", "size": 9336, "ext": "py", "lang": "Python", "max_stars_repo_path": "converters/keras_v1_layer_converters.py", "max_stars_repo_name": "ishine/lwtnn", "max_stars_repo_head_hexsha": "e12098bf0a012b4975804e3db4455a9a2ab3a719", "max_stars_repo_licenses": ["MIT"], "max_...
# order 2 h = [1//2, 1, 1, 1, 1, 1, 1] e = [1//1, 0, 0, 0, 0, 0, 0] d1 = [-3//2, 2, -1//2, 0, 0, 0, 0] d2 = [1//1, -2, 1, 0, 0, 0, 0] d3 = [-1//1, 3, -3, 1, 0, 0, 0] H = Diagonal(h) q1 = [0 1//2 0 0 0 0 0] q2 = [-1//2 0 1//2 0 0 0 0] q3 = [0 -1//2 0 1//2 0 0 0] q4 = [0 0 -1//2 0 1//2 0 0] q5 = [0 0 0 -1//2 0 1//2 0] q...
{"hexsha": "28de36d2cdb442d2bc8b5ffeaf5a493e6284a752", "size": 13122, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "dev/Mattsson2014_dev.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/SummationByPartsOperators.jl-9f78cca6-572e-554e-b819-917d2f1cf240", "max_stars_repo_head_hexsha": "9d665594279c4131...
C @(#)eordr2.f 20.3 2/13/96 subroutine eordr2(ktot, kdebug) include 'ipfinc/parametr.inc' include 'ipfinc/alpha.inc' c Global variables used: c km, kmlen, ikmu include 'ipfinc/blank.inc' c Global variables used: c nbslck include 'ipfinc/elim2.inc' c Global variables used: c next, l...
{"hexsha": "aec6188a111201704ebcd2ae9a883ae186dc61d5", "size": 2486, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "ipf/eordr2.f", "max_stars_repo_name": "mbheinen/bpa-ipf-tsp", "max_stars_repo_head_hexsha": "bf07dd456bb7d40046c37f06bcd36b7207fa6d90", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 14, "...
using PtFEM ProjDir = dirname(@__FILE__) # This example is identical to p.4.1.1.jl but re-uses the Cholesky # decomposed global stiffness matrix in the 2nd part by calling # p41(m, data) where the loaded_nodes values are doubled. l = 1.0 # Total length [m] N = 5 # Number of nodes els = N - 1 # Numbe...
{"hexsha": "6499dee814ed06e4c3b0652c6a2850cb88bbc207", "size": 1447, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/PtFEM/4 Static Equilibrium/Ex41.3.jl", "max_stars_repo_name": "UnofficialJuliaMirror/PtFEM.jl-9b64898b-da2a-5774-a656-fd6fb605642c", "max_stars_repo_head_hexsha": "35a9d7c796a92f5d44bd37a2...
context("DO functions") library("NSmetabolism") test_that("Computing input mass flux", { upDO <- c(10, 8) upQ <- c(15, 20) latQ <- 5 latDO <- 0 # input checking expect_error(computeInputDOFlux(-1 * upQ, upDO, latQ, latDO)) expect_error(computeInputDOFlux(upQ, -1 * upDO, latQ, latDO)) expect_error(computeInpu...
{"hexsha": "144e34cc3c036967fad8dd290f3fc12306e89828", "size": 5956, "ext": "r", "lang": "R", "max_stars_repo_path": "tests/testthat/test_do.r", "max_stars_repo_name": "mtalluto/NSmetabolism", "max_stars_repo_head_hexsha": "1b179726cd1968f9562236799a82104ed5957d81", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
\documentclass[12pt]{book} \usepackage[utf8]{inputenc} \usepackage[left=1.5in, right=1.5in, bottom=1in]{geometry} \usepackage{fancyhdr} \usepackage{titlesec} \usepackage{xcolor} \usepackage{graphicx} % Fancy headers \pagestyle{fancy} % Remove hrule underneath header \renewcommand{\headrulewidth}{0pt} % See Figure 3 ...
{"hexsha": "4491c2b698449fefc6d03fe69b505399d6597664", "size": 241388, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "exercises/assets/scarlet.tex", "max_stars_repo_name": "jwalton3141/sage_latex", "max_stars_repo_head_hexsha": "6aed684ad18d4d7b7ae19bb60f99f03b5d95006d", "max_stars_repo_licenses": ["MIT"], "max_s...
using Lora println(" Testing basic EmpiricalMCTuner constructors...") mctuners = [EmpiricalMCTuner(0.85), EmpiricalMCTuner(0.85, period=50), EmpiricalMCTuner(0.85, maxnsteps=100), EmpiricalMCTuner(0.85, targetlen=1.25), EmpiricalMCTuner(0.85, verbose=true)] println(" Testing that EmpiricalMCTuner tuner...
{"hexsha": "08a28284b87a5a4eee5f9b37784975f06a2f44da", "size": 678, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_empmctuner.jl", "max_stars_repo_name": "davidanthoff/Lora.jl", "max_stars_repo_head_hexsha": "84aabb1704cf9e09b2d8d932224cbc3ba88d6f0f", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import h5py import numpy as np import pandas as pd from sklearn.model_selection import train_test_split from sklearn.datasets import load_svmlight_file from sklearn.preprocessing import MinMaxScaler def rescale(X_train, X_test): scaler = MinMaxScaler() X_train = scaler.fit_transform(X_train) X_test = scal...
{"hexsha": "086826a00460302228da7aedc18cbcf56c6a1bdf", "size": 2396, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_loaders.py", "max_stars_repo_name": "apnkv/mondrian-forest", "max_stars_repo_head_hexsha": "17cb1cf68fcdef77dead37e15ce865c56a5bf82a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# Check excel and folders' names import os import pandas as pd import numpy as np import operator # params NUM_ROW = 1200; SAVE_FLAG = False; excel_path = './excel/5_H365_Foods_for_LARC_HPB_Updated_20180422.xls'; # read xls file # 4, 18, 22 cols df_i = pd.read_excel(excel_path, usecols=[1,4],sheet_name='Food_new', i...
{"hexsha": "2a20857888247855526d3570878ee6cfb1f719d9", "size": 4612, "ext": "py", "lang": "Python", "max_stars_repo_path": "generate_npy.py", "max_stars_repo_name": "billhhh/check_excel_txt", "max_stars_repo_head_hexsha": "f555d049ff2c2f1ee80744025cb4d71608f007af", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
'Test of DMA load and store' import numpy as np from videocore.assembler import qpu from videocore.driver import Driver #=================================== 32 bit =================================== @qpu def horizontal_32bit_load(asm): mov(ra0, uniform) ldi(rb0, 4*16*16) for i in range(4): setu...
{"hexsha": "c2fdd3c95f9bdbdae52ac6a9600bc9676ec9b4ba", "size": 6743, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_dma.py", "max_stars_repo_name": "long-long-float/py-videocore", "max_stars_repo_head_hexsha": "f2a0ef174a936f7a6e11a9e24f34fb555acb84c7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from clinical_trial_generation import generate_true_and_false_drug_histograms import numpy as np import json import time import sys def generate_training_data(one_or_two, num_placebo_arm_patients, num_drug_arm_patients, num_baseline_mont...
{"hexsha": "887febf15d67e32b5dec1e0e20267d53fa1263df", "size": 8477, "ext": "py", "lang": "Python", "max_stars_repo_path": "python_scripts/generate_keras_training_data.py", "max_stars_repo_name": "GoldenholzLab/LPC-RCT", "max_stars_repo_head_hexsha": "b14bc440ad3f8acfbf6f776ddd749475818af70d", "max_stars_repo_licenses"...
"""Capabilities for quantile-based sensitivity analysis. This module contains functions to calculate the global sensitivity measures based on quantiles of the output introduced by Kucherenko et al.(2019). Both the brute force and double loop reordering MC estimators are included. """ import chaospy as cp import numpy...
{"hexsha": "4c530837e9e9574e9ce74af4de1f54f2e9387e82", "size": 12113, "ext": "py", "lang": "Python", "max_stars_repo_path": "econsa/quantile_measures.py", "max_stars_repo_name": "OpenSourceEconomics/econsa", "max_stars_repo_head_hexsha": "bb591c1382c97f65d557513c5cfb3febff0e0821", "max_stars_repo_licenses": ["MIT"], "m...
[STATEMENT] lemma funny_set_falg_fmask_helper: "c2 \<subseteq> fmask2 \<Longrightarrow> (c1 = c2 \<and> fmask1 = fmask2) = (\<forall>pkt. (pkt \<inter> fmask1 = c1) = (pkt \<inter> fmask2 = c2))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. c2 \<subseteq> fmask2 \<Longrightarrow> (c1 = c2 \<and> fmask1 = fmask2) =...
{"llama_tokens": 6009, "file": "Iptables_Semantics_Primitive_Matchers_L4_Protocol_Flags", "length": 54}
# -*- coding: utf-8 -*- """ This module contains auxiliary functions for the creation of dataset for table using in the main notebook """ import pandas as pd import numpy as np from auxiliary.auxiliary_datasets import * from auxiliary.auxiliary_subdatasets import * from auxiliary.auxiliary_functions import * def data_...
{"hexsha": "2d638e03001374f7bd06502d064b4ba41f46050a", "size": 22477, "ext": "py", "lang": "Python", "max_stars_repo_path": "auxiliary/auxiliary_datasets.py", "max_stars_repo_name": "duongthu1012/Demo", "max_stars_repo_head_hexsha": "b04976c30138867581c0d9d70e7c065690a45ebb", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright (c) 2021 - present / Neuralmagic, Inc. 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 b...
{"hexsha": "cad405d5092e7e54b2b855fe11603914c2cdf4cd", "size": 3174, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/sparseml/tensorflow_v1/optim/test_sensitivity_ks.py", "max_stars_repo_name": "clementpoiret/sparseml", "max_stars_repo_head_hexsha": "8442a6ef8ba11fb02f5e51472dd68b72438539b9", "max_stars_re...
# main imports import logging import os import random import numpy as np import math # module imports from macop.solutions.continuous import ContinuousSolution from macop.evaluators.continuous.mono import ZdtEvaluator from macop.operators.continuous.mutators import PolynomialMutation from macop.operators.continuous.c...
{"hexsha": "32e6ea3169d15b73f6de1e86e7deee5714fc625e", "size": 2410, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/ZdtExample.py", "max_stars_repo_name": "prise-3d/macop", "max_stars_repo_head_hexsha": "6ca7b03c0d6650993cad974c5bde9c2a0d56f4a8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6...
From RecordUpdate Require Import RecordSet. From stdpp Require Export binders strings gmap pretty. From Perennial.program_logic Require Export language ectx_language ectxi_language. From Perennial.Helpers Require Import Integers. From Perennial.goose_lang Require Export locations lang notation. From Perennial.goose_lan...
{"author": "mit-pdos", "repo": "perennial", "sha": "76dafee3cd47e1c5e5a6d5436f87738a06f13ee0", "save_path": "github-repos/coq/mit-pdos-perennial", "path": "github-repos/coq/mit-pdos-perennial/perennial-76dafee3cd47e1c5e5a6d5436f87738a06f13ee0/src/goose_lang/interpreter/interpreter.v"}
import numpy as np from skimage import measure import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.gridspec as gridspec from mpl_toolkits.axes_grid1.inset_locator import inset_axes from mpl_toolkits.mplot3d import Axes3D import matplotlib.ticker as plticker from matplotlib.patches import FancyArr...
{"hexsha": "be46539e3453bd7afe3e6b40b1f7a0184430332f", "size": 44241, "ext": "py", "lang": "Python", "max_stars_repo_path": "tf1x/utils/jov_funcs.py", "max_stars_repo_name": "dpaiton/DeepSparseCoding", "max_stars_repo_head_hexsha": "5ea01fa8770794df5e13743aa3f2d85297c27eb1", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np cx = 320.-.5 cy = 240.-.5 DEFAULT_F = 535. def xyZ_to_XY(x,y,Z,f=DEFAULT_F): X = (x - cx)*(Z/f) Y = (y - cy)*(Z/f) return (X,Y) def XYZ_to_xy(X,Y,Z,f=DEFAULT_F): x = X*(f/Z) + cx y = Y*(f/Z) + cy return (x,y) def depth_to_xyz(depth,f=DEFAULT_F): x,y = np.meshgrid(np.ar...
{"hexsha": "4208b92f2666ee83f4d1a66b381b841ba09a0304", "size": 821, "ext": "py", "lang": "Python", "max_stars_repo_path": "lfd/tpsopt/clouds.py", "max_stars_repo_name": "def670/lfd", "max_stars_repo_head_hexsha": "9fef15f556cba49dd4b42c0c29505a4137f95fc5", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count":...
-- --------------------------------------------------------------------- -- Ejercicio 1. Realizar las siguientes acciones: -- 1. Importar la librería de los números reales. -- 2. Declarar x, y, a y b como variables sobre los reales. -- 3. Crear el espacio de nombres my_abs. -- ------------------------------------------...
{"author": "jaalonso", "repo": "Matematicas_en_Lean", "sha": "c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8", "save_path": "github-repos/lean/jaalonso-Matematicas_en_Lean", "path": "github-repos/lean/jaalonso-Matematicas_en_Lean/Matematicas_en_Lean-c44e23d87665cb4aa00c813c6bfb3c41ebc83aa8/src/Logica/Desigualdad_triangular_p...
[STATEMENT] lemma Field_oprod: "Field (r *o r') = Field r \<times> Field r'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Field (r *o r') = Field r \<times> Field r' [PROOF STEP] unfolding oprod_def Field_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. Domain {((x1, y1), x2, y2). (y1, y2) \<in> r' - Id \<and...
{"llama_tokens": 351, "file": null, "length": 2}
# Copyright 2020 The TensorStore Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
{"hexsha": "21685b9bc6826d2992bb61f7873e323265bd8898", "size": 3971, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/tensorstore/tests/spec_test.py", "max_stars_repo_name": "google/tensorstore", "max_stars_repo_head_hexsha": "8df16a67553debaec098698ceaa5404eaf79634a", "max_stars_repo_licenses": ["BSD-2-Cl...
import numpy as np import pandas as pd from sklearn.metrics import pairwise_distances from poincare_helper import * import matplotlib.pyplot as plt import timeit from sklearn.utils.graph_shortest_path import graph_shortest_path from scipy.sparse import csgraph from sklearn.neighbors import kneighbors_graph import tor...
{"hexsha": "dd3462302de58481f710963d8ae7014f4bc03b5a", "size": 3936, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/scDHMap_out_of_sample/embedding_quality_score.py", "max_stars_repo_name": "ttgump/scDHMap", "max_stars_repo_head_hexsha": "8bd3f320b2e9f3f49778e5f85dde58a6ead966ac", "max_stars_repo_licenses":...
#!/usr/bin/env python # # Author: Qiming Sun <osirpt.sun@gmail.com> # ''' Example for the value of FCI wave function on specific electrons coordinates ''' import numpy as np import pyscf from pyscf import fci mol = pyscf.M(atom='H 0 0 0; H 0 0 1.1', basis='6-31g', verbose=0) mf = mol.RHF().run() e1, ci1 = fci.FCI(mo...
{"hexsha": "dd0e9c2c96f46492a9c5ee1e8d56ebe62c164bee", "size": 846, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/fci/34-wavefunction_value_in_real_space.py", "max_stars_repo_name": "zc62/pyscf", "max_stars_repo_head_hexsha": "4ed05044d44d49c3ffd4d2e098e9031478fb39e7", "max_stars_repo_licenses": ["Apa...
#include<iostream> #include<vector> #include<list> #include<map> #include<sstream> #include<string> #include<fstream> #include<stdexcept> #include<cstdlib> #include<ctime> #include<cmath> #include<limits> #include <boost/math/special_functions/gamma.hpp> #include <sstream> #include"decs_1.h" // marked int main(int ar...
{"hexsha": "c1ea8ae6057e516869bb63a54750264a666ce03c", "size": 2785, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "HPC/WGS/scripts/homrec/source.cpp", "max_stars_repo_name": "Andronnix/pipeline", "max_stars_repo_head_hexsha": "b470eef5bde38691103a9215ee9ada55fb044e76", "max_stars_repo_licenses": ["Apache-2.0"], ...
''' Created on Jul 29, 2015 @author: xapharius ''' import numpy as np import operator class WBag(object): ''' Weighted Bag of Classifiers ''' def __init__(self, list_of_managers, list_of_weights=None): ''' Constructor @param list_of_weights: None if equal weighted '''...
{"hexsha": "5fff1a41bffab7806090c4e0f47f41a604fd8281", "size": 2943, "ext": "py", "lang": "Python", "max_stars_repo_path": "Engine/src/ensemble/classification/weighted_bag.py", "max_stars_repo_name": "xapharius/HadoopML", "max_stars_repo_head_hexsha": "c0129f298007ca89b538eb1a3800f991141ba361", "max_stars_repo_licenses...
From RL Require Export TraceThm. From Coq Require Import Arith Lia List. From ITree Require Import ITree ITreeFacts Traces. Import ListNotations. Import ITreeNotations. Import MonadNotation. Open Scope monad_scope. (* * Idea * *) (* An environment is an transition system over state spa...
{"author": "zhezhouzz", "repo": "rlitree", "sha": "726c71baa364929f9fe27f2f3dc91ff6b177cdd7", "save_path": "github-repos/coq/zhezhouzz-rlitree", "path": "github-repos/coq/zhezhouzz-rlitree/rlitree-726c71baa364929f9fe27f2f3dc91ff6b177cdd7/RoadExample.v"}
import tornado.ioloop import tornado.web import tornado.websocket import json import time from itertools import cycle import numpy as np class Game(object): def __init__(self): self.board = np.array([['']*3 for x in range(3)]) self.current_player_cycle = cycle(('x','o')) self.current_player...
{"hexsha": "b2527d00b22b2000d29f7e6836989c354acc9a42", "size": 7958, "ext": "py", "lang": "Python", "max_stars_repo_path": "tictactoe.py", "max_stars_repo_name": "fuzzyyeti/tictactoe", "max_stars_repo_head_hexsha": "ef072c13070cbac2750f90142ca04200ff6721f8", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count...
import numpy as np MOVE_STRS = [ "x", "x'", "x2", "y", "y'", "y2", "z", "z'", "z2", "L", "L'", "R", "R'", "U", "U'", "D", "D'", "F", "F'", "B", "B'", ] NO_MOVE_STR = "_" CLASS_STRS = [NO_MOVE_STR] + MOVE_STRS # _ denotes no movement NUM_CLASS = len(CLASS_STRS) CLASS_STR_TO_IDX ...
{"hexsha": "5910e9a465478b2a15e0047d27f438d07312446c", "size": 3611, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data_def.py", "max_stars_repo_name": "deep-cube/deep-cube", "max_stars_repo_head_hexsha": "de4623e94e569a2f09f3f0b1c332618bca753a77", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ...
import matplotlib.pylab as plt import numpy as np x=np.arange(-5,5,0.1) y=np.sin(x) y1=y*y plt.plot(x,y,'rs',x,y1,'b--') plt.ylim(-1.1, 1.1) plt.show()
{"hexsha": "9d9dcb3e0732f5127847973d9a6f9b9a94e44f6e", "size": 155, "ext": "py", "lang": "Python", "max_stars_repo_path": "ch03/matpl.py", "max_stars_repo_name": "sbb777/deep-learning-from-scratch", "max_stars_repo_head_hexsha": "ea8834952c5609d05fc4f4b4d918caff0b11379e", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import matplotlib.pyplot as plt from sklearn.metrics import roc_curve, auc import numpy as np def bar_charts(): plt.style.use('seaborn') labels = ['DSC', 'D2V', 'RASC'] same_means = [0.785, 0.710, 0.846] diff_lib_means = [0.762, 0.672, 0.819] diff_indv_means = [0.763, 0.674, 0.819] diff_tissue_...
{"hexsha": "35fecff7efb51b6be795c0607dbdb15bc82ee8b1", "size": 2176, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualizations/ch5-results/majiq_barcharts_cross_tissue.py", "max_stars_repo_name": "arnegebert/splicing", "max_stars_repo_head_hexsha": "3e19ce83a9f6d98bc6c2d8b653660d22e453ca77", "max_stars_repo...
from os import listdir, rename, mkdir from os.path import isfile, join, isdir, split from collections import OrderedDict from shutil import rmtree import cv2 import numpy as np from imutils import face_utils import dlib import imutils # Load the Haar cascades face_cascade = cv2.CascadeClassifier('./eyewash/haarcasca...
{"hexsha": "a6bc1609e8b4625d3e1fbd638248d1f99c91b894", "size": 12232, "ext": "py", "lang": "Python", "max_stars_repo_path": "eyewash/image_utils.py", "max_stars_repo_name": "dannyqnguyen/eyewash", "max_stars_repo_head_hexsha": "b9fccc5f7ab8eccfc36d46e95da7083b307ecaff", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
import matplotlib.pyplot as plt import numpy as np import pandas as pd from mpl_toolkits.mplot3d import Axes3D # need to keep this for 3D plot # from mpl_toolkits.mplot3d import Axes3D # need to keep this for 3D plot def get_data(fname='classification.txt'): """ given a file name, return a pandas data...
{"hexsha": "7e3d05b9a2fca2bf0371e3b87cb4bae1471f67de", "size": 4424, "ext": "py", "lang": "Python", "max_stars_repo_path": "4.2_linear_regression_and_logistic_regression/logistic_regression.py", "max_stars_repo_name": "AlexZhangji/ml_algorithm_practices", "max_stars_repo_head_hexsha": "b569ea52992d43193b399de4d268e7848...
from gc import collect import pandas as pd from pathlib import Path from tqdm import tqdm import time import numpy as np from sklearn.model_selection import StratifiedKFold from sklearn.metrics import mean_absolute_error as mae from sklearn.metrics import mean_squared_error as mse from sklearn.metrics import r2_score a...
{"hexsha": "481b48e12d251d850521b9f71270c72dd3f6b6b6", "size": 15748, "ext": "py", "lang": "Python", "max_stars_repo_path": "Utility/Codes/pipeline_utility.py", "max_stars_repo_name": "adailtonaraujo/classify_app_review", "max_stars_repo_head_hexsha": "b0d8d32273d5d4edc70184a3d36d3fc5420938cc", "max_stars_repo_licenses...
> module FastSimpleProb.Predicates > import FastSimpleProb.SimpleProb > import FastSimpleProb.MonadicOperations > import NonNegDouble.NonNegDouble > import NonNegDouble.Predicates > import Functor.Predicates > %default total > %access public export > %auto_implicits off > {- > ||| Monotonicity of |SimpleProb| measu...
{"hexsha": "f1e04f3855d8a5a74b1968678d79bafd411010cb", "size": 735, "ext": "lidr", "lang": "Idris", "max_stars_repo_path": "FastSimpleProb/Predicates.lidr", "max_stars_repo_name": "zenntenn/IdrisLibs", "max_stars_repo_head_hexsha": "a81c3674273a4658cd205e9bd1b6f95163cefc3e", "max_stars_repo_licenses": ["BSD-2-Clause"],...
-- Facts about products import analysis.calculus.fderiv import analysis.normed.field.basic import data.prod.basic import data.set.basic import topology.basic open function (uncurry curry) open metric (ball) open prod (swap) open_locale topological_space noncomputable theory variables {A B C : Type} variables {𝕜 : T...
{"author": "girving", "repo": "ray", "sha": "e0c501756e067711e2d3667d4b1d18045d83a313", "save_path": "github-repos/lean/girving-ray", "path": "github-repos/lean/girving-ray/ray-e0c501756e067711e2d3667d4b1d18045d83a313/src/prod.lean"}
import onnx import numpy as np ELEM_TYPE = onnx.TensorProto.FLOAT ELEM_TYPE_NP = np.float32
{"hexsha": "69924e2f4c4f31660cc13f626c02936523430b96", "size": 93, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/lbann/onnx/__init__.py", "max_stars_repo_name": "jonesholger/lbann", "max_stars_repo_head_hexsha": "3214f189a1438565d695542e076c4fa8e7332d34", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
# --- # title: 38. Count and Say # id: problem38 # author: Tian Jun # date: 2020-10-31 # difficulty: Easy # categories: String # link: <https://leetcode.com/problems/count-and-say/description/> # hidden: true # --- # # The **count-and-say** sequence is a sequence of digit strings defined by the # recursive formula: # ...
{"hexsha": "ad4aa4b7378ce089558a64567f50f66a5d1d4c2e", "size": 1655, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/unresolved/38.count-and-say.jl", "max_stars_repo_name": "jmmshn/LeetCode.jl", "max_stars_repo_head_hexsha": "dd2f34af8d253b071e8a36823d390e52ad07ab2e", "max_stars_repo_licenses": ["MIT"], "max_...
import os import csv import numpy as np from sklearn.model_selection import train_test_split from sklearn.utils import shuffle import cv2 from keras.models import Sequential from keras.layers import Flatten, Dense, Lambda, Conv2D, MaxPooling2D, Cropping2D, Dropout import pickle from keras.callbacks import TensorBoard, ...
{"hexsha": "3b3efbc4bb82b3fc1253d8394eab271994dcb637", "size": 3712, "ext": "py", "lang": "Python", "max_stars_repo_path": "training.py", "max_stars_repo_name": "jonad/Behavioral_Cloning", "max_stars_repo_head_hexsha": "358091b5c5d123c6abfa31eb434e9c95724170e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
r=0.37 https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d7601b/media/images/d7601b-018/svc:tesseract/full/full/0.37/default.jpg Accept:application/hocr+xml
{"hexsha": "793feeda7f2d615fc0009c581256d7fad4d6a0f9", "size": 195, "ext": "r", "lang": "R", "max_stars_repo_path": "tesseract/rotate/d7601b-018.r", "max_stars_repo_name": "ucd-library/wine-price-extraction", "max_stars_repo_head_hexsha": "c346e48b5cda8377335b66e4a1f57c013aa06f1f", "max_stars_repo_licenses": ["MIT"], "...
/- Copyright (c) 2021 OpenAI. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Kunhao Zheng, Stanislas Polu, David Renshaw, OpenAI GPT-f -/ import mathzoo.imports.miniF2F open_locale nat rat real big_operators topological_space theorem mathd_numbertheory_132 : 2004 %...
{"author": "leanprover-community", "repo": "mathzoo", "sha": "87e9b492daeb929838706942aaa2437621b34a0e", "save_path": "github-repos/lean/leanprover-community-mathzoo", "path": "github-repos/lean/leanprover-community-mathzoo/mathzoo-87e9b492daeb929838706942aaa2437621b34a0e/src/mathzoo/olympiads/mathd/numbertheory/p132.l...
using JuMP, EAGO m = Model() EAGO.register_eago_operators!(m) @variable(m, -1 <= x[i=1:2] <= 1) @variable(m, -6.103907844236108 <= q <= 8.378675476959124) add_NL_constraint(m, :(sigmoid(-0.8297607126794757 + -0...
{"hexsha": "34cb299cb798bd25e18e1acf309e2e0690c63d25", "size": 1482, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "solver_benchmarking/MINLPLib.jl/instances/ANN_Env/94_sigmoid_2_2_3.jl", "max_stars_repo_name": "PSORLab/RSActivationFunctions", "max_stars_repo_head_hexsha": "0bf8b4500b21144c076ea958ce93dbdd19a533...
import torch import torch.nn as nn import torch.nn.functional as F import numpy as np import sys import sys import datetime import time def print_now(cmd, file=None): time_now = datetime.datetime.now().strftime('%Y-%m-%d %H:%M:%S') if file is None: print('%s %s' % (time_now, cmd)) else: pr...
{"hexsha": "1ef337470b2d4d3cde9638020e834f80028779bd", "size": 2072, "ext": "py", "lang": "Python", "max_stars_repo_path": "training/loss.py", "max_stars_repo_name": "AIARTSJTU/ToyGAN_Zoo", "max_stars_repo_head_hexsha": "086f309d474674cdc0c859f467d49ec88399e943", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
from solver import Solver from task_scheduler import TaskScheduler from DAG_scheduler import DAGScheduler from data_loader import DataLoader import numpy as np import logging import time def DepthBasedBaseline(file_path="../ToyData.xlsx"): """ Depth Based Baseline, implemented by Yanjie Ze """ f = op...
{"hexsha": "767698e08d48425aafa1f30e6894a612b45a21ab", "size": 7054, "ext": "py", "lang": "Python", "max_stars_repo_path": "zyj_code/baseline.py", "max_stars_repo_name": "Purewhite2019/CS214-Project-1", "max_stars_repo_head_hexsha": "446ef99ba638d907afcf735266430a4c51197493", "max_stars_repo_licenses": ["MIT"], "max_st...
[STATEMENT] lemma sum_rsub_cong: assumes "\<forall>k. k \<le> length p - 1 \<and> issub (p!k) \<and> l = modifies (p!k) \<longrightarrow> f k = g k" shows "\<Sum>R- p l f = \<Sum>R- p l g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<Sum>R- p l f = \<Sum>R- p l g [PROOF STEP] unfolding sum_rsub.simps [PROOF...
{"llama_tokens": 282, "file": "DPRM_Theorem_Register_Machine_RegisterMachineSimulation", "length": 2}
MODULE MODWRFIO !!******************************************************************** !! Version "$Id: modwrfio.f90 4 2017-06-20 17:43:15Z coats $" !! Copyright (C) 2010-2013 Baron Advanced Meteorological Systems, and !! (C) 2015 UNC Institute for the Environment. !! Distributed und...
{"hexsha": "a7c98a9d12f99e054df126f2b666a50080517d63", "size": 92643, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "JPS_CITY_CHEM/citychem-1.3/preproc/bconcc2.2/ioapi3.2/ioapi/modwrfio.f90", "max_stars_repo_name": "mdhillmancmcl/TheWorldAvatar-CMCL-Fork", "max_stars_repo_head_hexsha": "011aee78c016b76762eaf5...
#!/usr/bin/env python import pybullet as pb import time import numpy as np import sys class GUI: def __init__(self, quadruped): time.sleep(0.5) self.cyaw = 0 self.cpitch = -7 self.cdist = 0.66 self.xId = pb.addUserDebugParameter("x", -0.10, 0.10, 0.) self.yId = ...
{"hexsha": "5855539b552e4c2b4bf6f768bc5d5a41af37194e", "size": 3557, "ext": "py", "lang": "Python", "max_stars_repo_path": "spotmicro/util/gui.py", "max_stars_repo_name": "sofya-pugach/spot_mini_mini", "max_stars_repo_head_hexsha": "42770145e91ed2625ccc7e4f4d7016ce14a61464", "max_stars_repo_licenses": ["MIT"], "max_sta...
// This file is a part of the OpenSurgSim project. // Copyright 2013-2016, SimQuest Solutions 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...
{"hexsha": "f9c1059625a594760feab36d1105fbdbc21be0f8", "size": 7188, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "SurgSim/Graphics/OsgProgram.cpp", "max_stars_repo_name": "dbungert/opensurgsim", "max_stars_repo_head_hexsha": "bd30629f2fd83f823632293959b7654275552fa9", "max_stars_repo_licenses": ["Apache-2.0"], ...
#define BOOST_TEST_DYN_LINK #define BOOST_TEST_MODULE "test_model_io" #include <boost/test/unit_test.hpp> #include "nanocv/nanocv.h" #include "nanocv/tester.h" #include "nanocv/logger.h" #include "nanocv/tasks/task_synthetic_shapes.h" #include <cstdio> BOOST_AUTO_TEST_CASE(test_model_io) { ncv::init(); ...
{"hexsha": "51a6a95029d200758d8703fdd1e5433a913ad83c", "size": 4328, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "test/test_model.cpp", "max_stars_repo_name": "0x0all/nanocv", "max_stars_repo_head_hexsha": "dc58dea6b4eb7be2089b168d39c2b02aa2730741", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
function compute_obs(O::Thermo, S::Array{Int, 3}, M::Model) L = M.dims[1] P = length(O.D.∂E[:α]) m = P + 1 E, Z, X, ZZ, mag = 0.0, 0.0, 0.0, 0.0, 0.0 for var in [:α, :β, :γ] O.D.tmp_∂E[var] .= zeros(P) end O.D.tmp_X_∂X .= zeros(P) for j in 1:L, i in 1:L if i < L && j < ...
{"hexsha": "35bb20a68c15fc9b7502451d60010720f188bf78", "size": 2660, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/update.jl", "max_stars_repo_name": "mbeach42/iQAOA_TFIM", "max_stars_repo_head_hexsha": "8951db9a80331a7fcb4b96915aa3ed4c6a4b05ba", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count":...
from collections import namedtuple import json import math import numpy as np import os import cartopy.crs from ..util import asarray, lon_avg identity = cartopy.crs.PlateCarree() root = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) _projections = { "EqualEarth": cartopy.crs.EqualEarth, "Lambe...
{"hexsha": "f1c160d69273badaabdf334c6a32d42d9595bd5e", "size": 5188, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyseas/maps/projection.py", "max_stars_repo_name": "GlobalFishingWatch/pyseas", "max_stars_repo_head_hexsha": "7559c4e07db3f7df8d42281029b793c8a30c552c", "max_stars_repo_licenses": ["Apache-2.0"],...
r""" Structure maps for number fields Provides isomorphisms between relative and absolute presentations, to and from vector spaces, name changing maps, etc. EXAMPLES:: sage: L.<cuberoot2, zeta3> = CyclotomicField(3).extension(x^3 - 2) sage: K = L.absolute_field('a') sage: from_K, to_K = K.structure() ...
{"hexsha": "d262818fedc4813c050819cd7bcfce29183ddf5a", "size": 24889, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/rings/number_field/maps.py", "max_stars_repo_name": "bopopescu/Sage-8", "max_stars_repo_head_hexsha": "71be00ad5f25ca95381fae7cce96421ffdd43425", "max_stars_repo_licenses": ["BSL-1.0"], ...
import tensorflow as tf print(tf.config.list_physical_devices()) # import matplotlib.pyplot as plt # import numpy as np # import tensorflow as tf # # points_n = 200 # clusters_n = 3 # iteration_n = 100 # # points = tf.constant(np.random.uniform(0, 10, (points_n, 2))) # centroids = tf.Variable(tf.slice(tf.random.shuff...
{"hexsha": "7cb9993a81a5d7f79507310f093d2f6a43fbee19", "size": 1508, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "TiffanyXQZ/tf26", "max_stars_repo_head_hexsha": "52e4779dee0a5f398da62d9ffbd3bdc55b3d463d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_star...
""" This library includes noise injection decorators and other utils that you can use. """ import numpy as np import pandas as pd #This gives you a decorator that you can use to corrupt data def inject(model, gt=False): def decorator(func): def function_helper(*args, **kwargs): clean = func(*ar...
{"hexsha": "5d8ffebe08cc345d79bad25ce548b8519b683ebf", "size": 1806, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cleaningbenchmark/Utils/Utils.py", "max_stars_repo_name": "sfme/RVAE_MixedTypes", "max_stars_repo_head_hexsha": "0555fc63b7f7cc5fa1910ffc19cd061b125dd54d", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma (in comm_monoid_cancel) properfactor_mult_rI [intro]: assumes ab: "properfactor G a b" and carr: "a \<in> carrier G" "c \<in> carrier G" shows "properfactor G (a \<otimes> c) (b \<otimes> c)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. properfactor G (a \<otimes> c) (b \<otimes> c) [PROO...
{"llama_tokens": 232, "file": null, "length": 2}
import sys,os,argparse import os,sys import pandas as pd import numpy as np import random from scipy import stats import itertools import math import sklearn from sklearn.metrics.cluster import normalized_mutual_info_score def warn(*args, **kwargs): pass import warnings warnings.warn = warn def main(): parser = argp...
{"hexsha": "1e7b73c14d0d43a4b51de25a203299c2bd7c0dd1", "size": 3372, "ext": "py", "lang": "Python", "max_stars_repo_path": "Coexpression_multiclass.py", "max_stars_repo_name": "ShiuLab/Pathway_gene_prediction_in_tomato", "max_stars_repo_head_hexsha": "a2488fdbc673df03b6065221e0a0a67c86f29230", "max_stars_repo_licenses"...
# -*- coding: utf-8 -*- from __future__ import absolute_import from packtml.recommendation import ItemItemRecommender from packtml.recommendation.data import get_completely_fabricated_ratings_data from packtml.metrics.ranking import mean_average_precision import numpy as np # ########################################...
{"hexsha": "7460c594a77c32f1ab4c70850adbea4594fe841a", "size": 1533, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/recommendation/example_item_item_recommender.py", "max_stars_repo_name": "cicorias/supv-ml-py", "max_stars_repo_head_hexsha": "f7e030206efe5bb2c49433ae18e115ca0fcfc5cb", "max_stars_repo_l...
""" 02. Creating a Major Merger (MM) catalogue to study AGN incidence due to galaxy mergers This python file contains the function of the corresponding notebook '02_AGN_incidence_from_Major_Mergers'. Script written by: Soumya Shreeram Project supervised by Johan Comparat Date created: 30th March 2021 """ # scipy mo...
{"hexsha": "13d991da9ac2cda252cb9fb247a7dfc5e7f62a8a", "size": 7170, "ext": "py", "lang": "Python", "max_stars_repo_path": "imported_files/Agn_incidence_from_Major_Mergers.py", "max_stars_repo_name": "SoumyaShreeram/Locating_AGN_in_DM_halos", "max_stars_repo_head_hexsha": "1cfbee69b2c000faee4ecb199d65c3235afbed42", "ma...
directions = [] function reverse(side) return HorizonSide((Int(side) + 2) % 4) end function goToAngle() while (!isborder(robot, Nord) || !isborder(robot, West)) while !isborder(robot, Nord) move!(robot, Nord) push!(directions, Nord) end while !isbord...
{"hexsha": "f83181511b07acc70442cfa5cc75ded0664bb396", "size": 781, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "18.jl", "max_stars_repo_name": "TheXlebushek/mirea-progs", "max_stars_repo_head_hexsha": "7cdc6d5015459f0f0e9cd626156cc9275c5b1c41", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_count": n...
/* This file is part of cpp-ethereum. cpp-ethereum is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. cpp-ethereum is distributed in the...
{"hexsha": "4fd67c49554e6c578cb8dbb8b68345a70fd03c5b", "size": 5905, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libdevcore/Log.cpp", "max_stars_repo_name": "0x1d00ffff/MVis-ethminer", "max_stars_repo_head_hexsha": "7b72569ee9a7bdeefef03233f1b9a6b67ebaf708", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
# author Giovambattista Vieri # (c) 2020 all rights reserverd # license: GPL V 2.0 # from git import Repo from os import listdir import csv import os import sys import shutil import argparse import numpy as np from beautifultable import BeautifulTable import time destdir="covid19" searchdir=destdir+"/csse_covi...
{"hexsha": "de11308d9ce78b62388c2f8ba30b09bbab0594ac", "size": 4374, "ext": "py", "lang": "Python", "max_stars_repo_path": "infectedCountries.py", "max_stars_repo_name": "gvieri/coviutil", "max_stars_repo_head_hexsha": "e2da721f1ea74d8fcbfd283824e2e40791ceae92", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
""" choose!(m::Model, n::Int, vars::VariableRef...; mode) Add constraint to select n elements from the list of variables. Options for mode are `:at_least`, `:at_most`, `:exactly`. """ function choose!(m::Model, n::Int, vars::VariableRef...; mode=:exactly) @assert length(vars) >= n "Not enough variables passed....
{"hexsha": "abba64ca05a32d04d28d7ece3079296aea26e1a9", "size": 9035, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/logic.jl", "max_stars_repo_name": "shivankj11/DisjunctiveProgramming.jl", "max_stars_repo_head_hexsha": "fcf3844092d59e31a0cbd2788014b411309fe1dd", "max_stars_repo_licenses": ["MIT"], "max_star...
'''This module provides data processing and preparation tools. - Scaling/centering data - Generating Test/Train splits - Generating Cross validation Folds (In Progress) - Generating Bootstrap resamples (In Progress) ''' import numpy as np from collections import namedtuple def scale_and_center(feat...
{"hexsha": "bca1a9ef27e6309c36e03f20e28a0600f0027b79", "size": 4461, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/helperfunctions/preprocessing.py", "max_stars_repo_name": "akprasadan/summer2021ML", "max_stars_repo_head_hexsha": "c75ea5dd8522236a7217c0c5239789686b5b9672", "max_stars_repo_licenses": ["MIT"...
import itertools import numpy as np import pandas as pd NUMPY_ENCODINGS = [ (np.integer, int), (np.floating, float), (np.ndarray, lambda obj: obj.tolist()), ] PANDAS_ENCODINGS = [ (pd.core.indexes.base.Index, lambda obj: obj.tolist()) ] ENCODERS = NUMPY_ENCODINGS + PANDAS_ENCODINGS
{"hexsha": "56ad2e3cb445090e2fca3d25f2dce29cd5b46633", "size": 303, "ext": "py", "lang": "Python", "max_stars_repo_path": "minotor/encoders/json_encoder_library.py", "max_stars_repo_name": "datarmada/minotor", "max_stars_repo_head_hexsha": "06079926d717f0cd882152319aaeaa7edc9ba087", "max_stars_repo_licenses": ["Apache-...
import numpy as np import cv2 # Identify pixels above the threshold # Threshold of RGB > 160 does a nice job of identifying ground pixels only def color_thresh(img, rgb_thresh=(160, 160, 160), rgb_thresh_max=(255, 255, 255)): # Create an array of zeros same xy size as img, but single channel color_select = np....
{"hexsha": "9988747a229ef13904440ba998bd37232c38dddc", "size": 8122, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/perception.py", "max_stars_repo_name": "fwmao/search-and-sample-return", "max_stars_repo_head_hexsha": "9ab9c5783d86daaf4c6bcad26119c37af2ae36c1", "max_stars_repo_licenses": ["MIT"], "max_sta...
# -*- coding: utf-8 -*- """ Created on Mon Sep 23 23:02:38 2019 @author: Sowmya Modified by Dijiang Huang 4/19/2020 """ import numpy as np import pandas as pd # Define variables # Data file Path DatasetPath='NSL-KDD/' # Data file name input_train = "KDDTrain+.txt" input_test = "KDDTest+.txt" file_exte...
{"hexsha": "c50b053072425c2fc20e342754507d4ec5155287", "size": 5243, "ext": "py", "lang": "Python", "max_stars_repo_path": "lab_4/lab-cs-ml-00301/dataExtractor.py", "max_stars_repo_name": "ChristopherBilg/cse-548-adv-comp-net-sec", "max_stars_repo_head_hexsha": "8d6256ace822e58cc662ef2fee476d1b1a3e60a4", "max_stars_rep...
from numpy.linalg import norm from qmeq.indexing import StateIndexing from qmeq.qdot import * EPS = 1e-13 class ParametersDoubleDotSpinful(object): def __init__(self): e1, e2, omega = 1, 2, 20 self.hsingle = {(0,0):e1, (2,2):e1, (1,1):e2, (3,3):e2, ...
{"hexsha": "0bcdf081d0cee2f79ff6814a9ed2f69e1cbdc581", "size": 18432, "ext": "py", "lang": "Python", "max_stars_repo_path": "qmeq/tests/test_qdot.py", "max_stars_repo_name": "gedaskir/test-deploy-qmeq", "max_stars_repo_head_hexsha": "47f1176df5341a0f251657c299a4a98aaac40833", "max_stars_repo_licenses": ["BSD-2-Clause"]...
! Copyright (C) 2012 The SPEED FOUNDATION ! Author: Ilario Mazzieri ! ! This file is part of SPEED. ! ! SPEED is free software; you can redistribute it and/or modify it ! under the terms of the GNU Affero General Public License as ! published by the Free Software Foundation, either version 3 of the ! ...
{"hexsha": "914d1c296a75401ae09caf3d44b9b190bb4f524a", "size": 3049, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "SRC/SPEED-MDOF190510/MAKE_GL_NW.f90", "max_stars_repo_name": "research-group-of-Xinzheng-Lu/SCI-effects-simulation", "max_stars_repo_head_hexsha": "6f91a4afce51303ac33d9dce005247290679b428", "ma...
""" 2.5D DC inversion of with Topography ==================================== This is an example for 2.5D DC Inversion. Earth includes a topography, and below the topography conductive and resistive cylinders are embedded. Sensitivity weighting is used for the inversion. Approximate depth of investigation is computed ...
{"hexsha": "382999fd684b48b8a5cbcf892f84b300b41e61a6", "size": 7696, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/06-dc/plot_dipoledipole_2_5Dinversion.py", "max_stars_repo_name": "rolandhill/simpeg", "max_stars_repo_head_hexsha": "92d220e55d3d280b44e4cbcbddc42d57a974ca94", "max_stars_repo_licenses":...
# -*- coding: utf-8 -*- """ Created on Tue Mar 22 19:03:09 2016 @author: Patxi """ import os import re from scipy.optimize import least_squares import numpy as np def func_unload(x,ht,P,E,): # ht and P must be equal length (and shape) np arrays return ht - x[0] - ((1-0.3**2)*3*P/4/E/(x[1]*1e3)**0.5)**(2....
{"hexsha": "2e12d716468ef77b717786a773d6ae8fa3b827b3", "size": 1873, "ext": "py", "lang": "Python", "max_stars_repo_path": "FE_scripting/postprocess.py", "max_stars_repo_name": "pfz3/Inverse-Spherical-Indentation", "max_stars_repo_head_hexsha": "6d607e416fc1834e18e9be5543334236add6a652", "max_stars_repo_licenses": ["MI...
// // Copyright 2010 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // This program is dis...
{"hexsha": "de4721be01fc48eb20661b8e3a09655680fbda53", "size": 2845, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "main/lib/UHD/include/uhd/transport/udp_zero_copy.hpp", "max_stars_repo_name": "cityscapesc/specobs", "max_stars_repo_head_hexsha": "ae2d978dc3cb5788f0f31adc72f20bc6f6b824b4", "max_stars_repo_license...
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import math import numpy as np import tensorflow as tf from cleverhansl2l.dataset import MNIST from tensorflow.contrib.learn.python.learn.datasets import mnist as mnist_dataset from keras.utils imp...
{"hexsha": "47cb32e5a9effc4097e2612d39f7a4fe8a58a7dc", "size": 7106, "ext": "py", "lang": "Python", "max_stars_repo_path": "l2l/datasets.py", "max_stars_repo_name": "NullConvergence/Learning2LearnAdv", "max_stars_repo_head_hexsha": "e9cf8be2da41febd4e1262d35d8f69b80b8af0c6", "max_stars_repo_licenses": ["MIT"], "max_sta...
# This is a bonus file to help convert to predictabilities. from scipy.optimize import fsolve import numpy as np from ProcessEntropy.SelfEntropy import * from ProcessEntropy.CrossEntropy import * def predictability(S,N, inital_guess = 0.5): """Finds the value of the predictability for a process with an entropy ...
{"hexsha": "115aa9e64b71742c9e185196375aad4570611e14", "size": 1250, "ext": "py", "lang": "Python", "max_stars_repo_path": "ProcessEntropy/Predictability.py", "max_stars_repo_name": "tobinsouth/ProcessEntropy", "max_stars_repo_head_hexsha": "dae82797085d4aa0cf81c2a4bc8c1cc08a191b25", "max_stars_repo_licenses": ["MIT"],...
theory Propositional_Formulas imports Abstract_Formula "~~/src/HOL/Library/Countable" "~~/src/HOL/Library/Infinite_Set" begin class infinite = assumes infinite_UNIV: "infinite (UNIV::'a set)" instance nat :: infinite by (intro_classes) simp instance prod :: (infinite, type) infinite by intro_classes (simp...
{"author": "nomeata", "repo": "isa-incredible", "sha": "10eb1d938879778196cc69bf86b1ed0d979512cc", "save_path": "github-repos/isabelle/nomeata-isa-incredible", "path": "github-repos/isabelle/nomeata-isa-incredible/isa-incredible-10eb1d938879778196cc69bf86b1ed0d979512cc/Propositional_Formulas.thy"}
[STATEMENT] lemma dur_Suc: "dur xs (Suc i) - dur xs i = elapsed (xs !! i) (xs !! Suc i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dur xs (Suc i) - dur xs i = elapsed (xs !! i) (xs !! Suc i) [PROOF STEP] apply (induction i arbitrary: xs) [PROOF STATE] proof (prove) goal (2 subgoals): 1. \<And>xs. dur xs (Suc...
{"llama_tokens": 2342, "file": "Probabilistic_Timed_Automata_PTA_Reachability", "length": 18}
####Please do not remove lines below#### from lmfit import Parameters import numpy as np import sys import os sys.path.append(os.path.abspath('.')) sys.path.append(os.path.abspath('./Functions')) sys.path.append(os.path.abspath('./Fortran_routines/')) from functools import lru_cache ####Please do not remove lines above...
{"hexsha": "a69f3ba45117e907edbe0121bae43f71d05b5d80", "size": 5783, "ext": "py", "lang": "Python", "max_stars_repo_path": "Functions/XRR/SphereAtInterface.py", "max_stars_repo_name": "nayanbera/SAXS_Drive", "max_stars_repo_head_hexsha": "1c5a83c6575fa888bfbcc3c34cedb38321bd5f92", "max_stars_repo_licenses": ["MIT"], "m...
SUBROUTINE DL7SQR(N, A, L) C C *** COMPUTE A = LOWER TRIANGLE OF L*(L**T), WITH BOTH C *** L AND A STORED COMPACTLY BY ROWS. (BOTH MAY OCCUPY THE C *** SAME STORAGE. C C *** PARAMETERS *** C INTEGER N DOUBLE PRECISION A(1), L(1) C DIMENSION A(N*(N+1)/2), L(N*(N+1)/2) C C *** LOCA...
{"hexsha": "f15e5f48ff7cab2f066e20472aea38252e60fac4", "size": 949, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/f2cl/packages/toms/717/dl7sqr.f", "max_stars_repo_name": "sbwhitecap/clocc-hg", "max_stars_repo_head_hexsha": "f6cf2591ceef8a3a80e04da9b414cdf60a25a90f", "max_stars_repo_licenses": ["MIT"], "ma...
import itertools from trajectory_planner.trajectoryData import StateTrajectory from trajectory_planner.environment import Environment import tensorflow as tf import numpy as np from collections import deque import random class DeepQLearning: """ Deep Q Learning Algorithm implementation """ def __init...
{"hexsha": "4ac40b93f18f29eeb8fc109c2f50c1ed9bada007", "size": 7297, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/trajectory_planner/deep_q_learning.py", "max_stars_repo_name": "phofmeier/2d_2Joint_robot", "max_stars_repo_head_hexsha": "7a3603e14d79bf16e0207bd0fd5072e263ccb053", "max_stars_repo_licenses":...
[STATEMENT] theorem step1_a [simp]: "DataRefinement ({.Loop''.} o Q3''_a) RR_a RR_a QQ3_a" [PROOF STATE] proof (prove) goal (1 subgoal): 1. DataRefinement ({. Loop'' .} \<circ> Q3''_a) RR_a RR_a QQ3_a [PROOF STEP] apply (simp add: data_refinement_hoare hoare_demonic angelic_def QQ3_a_def Q3''_a_def RR_a_def ...
{"llama_tokens": 1357, "file": "GraphMarkingIBP_DSWMark", "length": 7}
import cv2 import numpy as np def job_1(imagepath,y=10,x=20,h=40,w=60,step=4): img = cv2.imread(imagepath) new_img = img[y:y+h,x:x+w] cw = 0 pre_img = None for _w in range(0,w-step,step): for _h in range(0,h-step,step): pre_img = new_img[_h,_w] for i in range(st...
{"hexsha": "0e3dfcb52b32e268a95246f9629b5653e0dd202f", "size": 1346, "ext": "py", "lang": "Python", "max_stars_repo_path": "learn/C01/01/job.py", "max_stars_repo_name": "tomsnail/opencv_tf_py", "max_stars_repo_head_hexsha": "cf9aa7fa250546564cff56aa33b5a39991b0d8f1", "max_stars_repo_licenses": ["Apache-2.0"], "max_star...
# -*- coding: utf-8 -*- """ Created on Sat Sep 18 02:53:27 2021 @author: Mahfuz_Shazol """ import numpy as np import torch as th A=np.array([ [-1.,4], [2,-2] ]) A_th=th.as_tensor(A); eigons=th.eig(A_th,eigenvectors=True) print('lambdas',eigons) v_th=eigons.eigenvectors[:,0] lmbda=eigons.eigenvalues[0][...
{"hexsha": "d66b156aa73fe42b3c2dc62aab0ab35ade81fb57", "size": 430, "ext": "py", "lang": "Python", "max_stars_repo_path": "eigonvector_using_torch.py", "max_stars_repo_name": "6895mahfuzgit/Linear_Algebra_for_Machine_Learning", "max_stars_repo_head_hexsha": "3f266391491d9ab99e53a3547900c6b1bd657af1", "max_stars_repo_li...
SUBROUTINE renum2(adjnt,start,level,lpntn,npoin,ns) !*********************************************************************** !* !**** computes a set of posibles starting npoin !* !*********************************************************************** IMPLICIT none ! routine parameters IN...
{"hexsha": "02f2c09cd013c32d5c13775816139db603acdc94", "size": 1675, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/solve/renum2.f90", "max_stars_repo_name": "jerebenitez/IFE-simpact-openfoam", "max_stars_repo_head_hexsha": "2dbcbf3195b22fca1c80ad0da6b3822b6cad5cdf", "max_stars_repo_licenses": ["MIT"], "m...
import cv2 import numpy as np class ColorPiker: def __init__(self): self.cam_id = 0 self.frameWidth = 640 self.frameHeight = 480 self.cap = cv2.VideoCapture(self.cam_id, cv2.CAP_DSHOW) self.cap.set(3, self.frameWidth) self.cap.set(4, self.frameHeight) self....
{"hexsha": "5266b428a7ca0900a091f4b9fe9d95a58b72a350", "size": 2736, "ext": "py", "lang": "Python", "max_stars_repo_path": "Color_Detection/color_detection_vid.py", "max_stars_repo_name": "FatinShadab/opencv-projects-python", "max_stars_repo_head_hexsha": "d8a0b640409399ae94e5e8bdbc26730b57813bc4", "max_stars_repo_lice...
[STATEMENT] lemma i_f_join_i_shrink_iT_Plus_iT_Div_mod: " \<lbrakk> 0 < k; finite I; \<forall>x\<in>I. x mod k = 0 \<rbrakk> \<Longrightarrow> (f \<longmapsto>\<^sub>i k) \<Join>\<^bsub>i-f\<^esub> (I \<oplus> (k - 1))= f \<div>\<^sub>i k \<Join>\<^bsub>i-f\<^esub> (I \<oslash> k)" [PROOF STATE] proof (prove) goal ...
{"llama_tokens": 1322, "file": "AutoFocus-Stream_IL_AF_Stream", "length": 8}
# SPDX-License-Identifier: X11 # 2020-11-15 (Live) # Billiards (200pt) function main() Sx, Sy, Gx, Gy = parse.(Int, (split ∘ readline)()) println((Gx - Sx) / (Gy/Sy + 1) + Sx) end main()
{"hexsha": "b3e85d37c6072cd4f908b94bf2186e1d2aa3c9a8", "size": 193, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "AtCoder/ABC183/B.jl", "max_stars_repo_name": "jthvai/competitive-programming", "max_stars_repo_head_hexsha": "8253ba4a91d291173fb4184e8a6b517873d41260", "max_stars_repo_licenses": ["X11"], "max_star...
#!/usr/bin/env python # coding=utf-8 import regression from matplotlib import cm from mpl_toolkits.mplot3d import axes3d import matplotlib.pyplot as plt import matplotlib.ticker as mtick import numpy as np if __name__ == "__main__": srcX, y = regression.loadDataSet('yield.txt') m,n = srcX.shape srcX = n...
{"hexsha": "b629139fc7175584757e38e06bd6b06db2693739", "size": 1406, "ext": "py", "lang": "Python", "max_stars_repo_path": "LinearRegression/test_temperature_normal.py", "max_stars_repo_name": "YMTheory/MachineLearning", "max_stars_repo_head_hexsha": "af55ea162192225e194ffa3ec46b8311f0df1696", "max_stars_repo_licenses"...
""" The :mod:`sklearn.pls` module implements Partial Least Squares (PLS). """ # Author: Edouard Duchesnay <edouard.duchesnay@cea.fr> # License: BSD 3 clause import warnings from abc import ABCMeta, abstractmethod import numpy as np from scipy.linalg import pinv2, svd from scipy.sparse.linalg import svds from ..base...
{"hexsha": "86e56f264979ca03327bf9ce7331d276a88f4037", "size": 31919, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/output_perturbation/scikit-learn/sklearn/cross_decomposition/pls_.py", "max_stars_repo_name": "apaleyes/differential-privacy-bayesian-optimization", "max_stars_repo_head_hexsha": "252...
import numpy as np from collections import defaultdict from copy import deepcopy import torch word_idx_map, word_features, adj = [None] * 3 def monotonic(vec1, vec2, vec3, ret="bool"): # check if vec3 [inpterpolation] is monotonic w.r.t. vec1 [baseline] and vec2 [input] # i.e., vec3 should lie between vec1 ...
{"hexsha": "8a74c5a9b7fc6dc1a8c6dfe8f369bf75135a3f67", "size": 6375, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/monotonic_paths.py", "max_stars_repo_name": "Heyjuke58/integrated_gradients_baselines_for_text_classifications", "max_stars_repo_head_hexsha": "9a6a7c2fe6bf24d5c4dc28fb2dcc33030b1e0f03", "max_...
''' Visualization code for point clouds and 3D bounding boxes with mayavi. Modified by Charles R. Qi Date: September 2017 Ref: https://github.com/hengck23/didi-udacity-2017/blob/master/baseline-04/kitti_data/draw.py Modified by Haotian Tang Date: August 2020 ''' import argparse import numpy as np import mayavi.mlab...
{"hexsha": "f6314840c030c34f83029b8f96e4183d212bf651", "size": 7155, "ext": "py", "lang": "Python", "max_stars_repo_path": "spvnas/visualize.py", "max_stars_repo_name": "sandeepnmenon/e3d", "max_stars_repo_head_hexsha": "aaa534bd753b35df361bfb8826f84612ff7e5697", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import utils import copy import numpy as np def min_max(board, depth, player, maxim): if depth == 0 or utils.lastMove(board, player): return utils.score(board, player) valid = utils.get_moves(board, player) if maxim: bestValue = -99999 for move in valid: (tmp_board, tot) = utils.move(move, play...
{"hexsha": "dc50d9fad495b2c83f5744e3a21a054465046d7c", "size": 1683, "ext": "py", "lang": "Python", "max_stars_repo_path": "othello_player.py", "max_stars_repo_name": "alv16106/OthelloAI", "max_stars_repo_head_hexsha": "f8c00890c7c3c1a0d333cc4adb5e3677810ad022", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
""" call_tetgen(surfaces, refinement) Call Tetgen on surface geometry. A refinement is applied if `refinement < Inf`. """ function call_tetgen(surfaces, refinement) (; points, facets, facetmarkers, regions) = surfaces nregion = size(regions, 2) input = RawTetGenIO{Cdouble}() input.pointlist = poi...
{"hexsha": "85510015d2be4a7ebe1c5cf701b8f19977b2f910", "size": 945, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/geometry/call_tetgen.jl", "max_stars_repo_name": "fachra/SpinDoctor.jl", "max_stars_repo_head_hexsha": "25c633fb8020843728c1004c492a7c33b2fe2e4f", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from .net import ComparisonInputsLayer from .params import Params from .params_traj import ParamsTraj import tensorflow as tf import numpy as np from typing import List @tf.keras.utils.register_keras_serializable(package="physDBD") class ComparisonModel(tf.keras.Model): @classmethod def construct(cls, ...
{"hexsha": "982c9010f2d2dc7ff1ad05dfd4f59459acf5fa8c", "size": 9235, "ext": "py", "lang": "Python", "max_stars_repo_path": "physDBD/pca/comparison_model.py", "max_stars_repo_name": "smrfeld/phys_dbd", "max_stars_repo_head_hexsha": "38743d753a8a0fe9259453da6fce7260ec175364", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma Pn'_eq_\<T>: "measure_pmf (Pn' p s n) = distr (\<T> p s) (count_space UNIV) (\<lambda>t. t !! n)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. measure_pmf (Pn' p s n) = distr (\<T> p s) (count_space UNIV) (\<lambda>t. t !! n) [PROOF STEP] by (auto simp: \<T>_def Pn'_def Pn_eq_T)
{"llama_tokens": 143, "file": "MDP-Rewards_MDP_disc", "length": 1}
# -*- coding: utf-8 -*- import streamlit as st import numpy as np import pandas as pd import altair as alt from io import BytesIO def to_excel(df): output = BytesIO() writer = pd.ExcelWriter(output, engine='xlsxwriter') df.to_excel(writer, index=True, sheet_name='杜子期血常规数据统计') workbook = writer.book ...
{"hexsha": "6a79d1c81361c7024553237a6fb8222df649a8e6", "size": 6830, "ext": "py", "lang": "Python", "max_stars_repo_path": "seven.py", "max_stars_repo_name": "durd07/seven", "max_stars_repo_head_hexsha": "5df941c2d976ea6a25940a4fed48ff74fefbcc3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_...
// Boost.Geometry (aka GGL, Generic Geometry Library) // Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands. // Copyright (c) 2008-2012 Bruno Lalande, Paris, France. // Copyright (c) 2009-2012 Mateusz Loskot, London, UK. // Parts of Boost.Geometry are redesigned from Geodan's Geographic Library // (ge...
{"hexsha": "61afc913c651cadcf2678bd027531ea8d88a0615", "size": 2240, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/geometry/multi/geometries/concepts/check.hpp", "max_stars_repo_name": "ballisticwhisper/boost", "max_stars_repo_head_hexsha": "f72119ab640b564c4b983bd457457046b52af9ee", "max_stars_repo_licens...
#ifndef BOOST_UTILITY_NULL_DELETER_HPP #define BOOST_UTILITY_NULL_DELETER_HPP // The header file at this path is deprecated; // use boost/core/null_deleter.hpp instead. #include <boost/core/null_deleter.hpp> #endif
{"hexsha": "496f21d9cd23023d6a0cf4109ef9bf2674cc597c", "size": 218, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/boost/utility/null_deleter.hpp", "max_stars_repo_name": "awulkiew/core", "max_stars_repo_head_hexsha": "60c9a35d868a4affc997a6aae30255a24b001025", "max_stars_repo_licenses": ["BSL-1.0"], "max...
from os import path import pickle import cv2 import numpy as np import torch import torchvision import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torchvision.utils as vutils import torch.nn.parallel DATA_CACHE = {} def load_or_reload(data_path, image_size,...
{"hexsha": "95e435ca8f98e365c2f3570a92f8e22a9be4d9b8", "size": 8012, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/data_manual.py", "max_stars_repo_name": "khoadoan/adversarial-hashing", "max_stars_repo_head_hexsha": "eeeeb464b4fe7084efd38a6257499d674a9a7194", "max_stars_repo_licenses": ["Apache-2.0"], ...