text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
import numpy as np from matplotlib import pyplot as plt from numpy import mean, min, max, median, quantile from scipy.stats import binom, norm, t as student, expon, poisson, chi2 from math import sqrt, pow, floor, ceil, exp, log, sin, pi from statsmodels.api import qqplot from pandas import read_csv data = 'HW3/data' ...
{"hexsha": "cbf8b8b4963bc15dbcdcb33042ca213639e674aa", "size": 4274, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW3/ex3.py", "max_stars_repo_name": "andreamatt/Simulation-homeworks", "max_stars_repo_head_hexsha": "d6e987a99498c0a30bfd8d3d9deeb3c0382a27be", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
theory Desargues_3D imports Main Higher_Projective_Space_Rank_Axioms Matroid_Rank_Properties begin (* Author: Anthony Bordg, University of Cambridge, apdb3@cam.ac.uk .*) text \<open> Contents: \<^item> We prove Desargues's theorem: if two triangles ABC and A'B'C' are perspective from a point P (ie. the lines AA', ...
{"author": "isabelle-prover", "repo": "mirror-afp-devel", "sha": "c84055551f07621736c3eb6a1ef4fb7e8cc57dd1", "save_path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel", "path": "github-repos/isabelle/isabelle-prover-mirror-afp-devel/mirror-afp-devel-c84055551f07621736c3eb6a1ef4fb7e8cc57dd1/thys/Projective_Ge...
# This file is a part of Julia. License is MIT: https://julialang.org/license # Generate encode table. const BASE64_ENCODE = [UInt8(x) for x in ['A':'Z'; 'a':'z'; '0':'9'; '+'; '/']] # '-' and '_' instead of '+' and '/' const BASE64URL_ENCODE = [UInt8(x) for x in ['A':'Z'; 'a':'z'; '0':'9'; '-'; '_']] encode_base64(...
{"hexsha": "6e5e1d6c5617a1e0633020eaebdcefd2ff8e3c7b", "size": 5051, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/base64url/encode.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/JSONWebTokens.jl-9b8beb19-0777-58c6-920b-28f749fee4d3", "max_stars_repo_head_hexsha": "703b32b2115ea9fab96f488624052...
/* * Copyright (c) 2019 Opticks Team. All Rights Reserved. * * This file is part of Opticks * (see https://bitbucket.org/simoncblyth/opticks). * * 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 ...
{"hexsha": "61482141e9dd73a1fb4f251c9e4b5164bd16229e", "size": 3967, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "numpyserver/net_manager.hpp", "max_stars_repo_name": "hanswenzel/opticks", "max_stars_repo_head_hexsha": "b75b5929b6cf36a5eedeffb3031af2920f75f9f0", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
[STATEMENT] lemma item_rhs_finished_item[simp]: "item_rhs (finished_item \<alpha>) = \<alpha>" [PROOF STATE] proof (prove) goal (1 subgoal): 1. item_rhs (finished_item \<alpha>) = \<alpha> [PROOF STEP] by (simp add: finished_item_def)
{"llama_tokens": 95, "file": "LocalLexing_MainTheorems", "length": 1}
Require Export XR_R. Require Export XR_Rle. Require Export XR_total_order_T. Implicit Type r : R. Local Open Scope R_scope. Lemma Rle_lt_dec : forall r1 r2, {r1 <= r2} + {r2 < r1}. Proof. intros x y. destruct (total_order_T x y) as [ [ hxy | heq ] | hyx ]. { left. unfold "<=". left. exact hxy. ...
{"author": "xavierdpt", "repo": "research", "sha": "de47f996cbb40312e21057fa343ed8346f8cb39f", "save_path": "github-repos/coq/xavierdpt-research", "path": "github-repos/coq/xavierdpt-research/research-de47f996cbb40312e21057fa343ed8346f8cb39f/coq/XReals/XR_Rlt_lt_dec.v"}
[STATEMENT] lemma validE: "valid tr \<Longrightarrow> P" [PROOF STATE] proof (prove) goal (1 subgoal): 1. valid tr \<Longrightarrow> P [PROOF STEP] by (induction rule: valid.induct) (auto elim: nValidTransE)
{"llama_tokens": 76, "file": "BD_Security_Compositional_Composing_Security_Network", "length": 1}
\documentclass{article} \usepackage[ascii]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{amsmath} \usepackage{amssymb,amsfonts,textcomp} \usepackage{color} \usepackage{array} \usepackage{supertabular} \usepackage{hhline} \usepackage[normalem]{ulem} \usepackage{hyperref} \usepackage{textcomp...
{"hexsha": "cb65f628117391acc1ee1397f1dba131accc6bf8", "size": 12853, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "TalksPublications/MidcurveNN_CADConf2021/Main_CADConf21_MidcurveNN_ExtendedAbstract.tex", "max_stars_repo_name": "yogeshhk/MidcurveNN", "max_stars_repo_head_hexsha": "98e11abdac1c6ab5c76e59dcbdd9ce...
import unittest import numpy as np from sklearn.metrics import f1_score import ccgowl.models.grab.GRAB as grab from ccgowl.data.make_synthetic_data import generate_theta_star_gowl, standardize, Block, generate_synthetic_data from ccgowl.evaluation.cluster_metrics import spectral_clustering from ccgowl.evaluation.fit_...
{"hexsha": "25a7f92e6515e7427684f5919e524a26cb52bd4e", "size": 11408, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_gowl_vs_grab.py", "max_stars_repo_name": "cmazzaanthony/ccgowl", "max_stars_repo_head_hexsha": "31e12579449c296d7581c2838b5d7d7873361b48", "max_stars_repo_licenses": ["MIT"], "max_star...
import pickle import pylab as plt import numpy as np import pathlib from matplotlib import cm path = pathlib.Path.cwd() if path.stem == 'ATGC2': cwd = path else: cwd = list(path.parents)[::-1][path.parts.index('ATGC2')] with open(cwd / 'figures' / 'msi' / 'results' / 'for_mantis_plot.pkl', 'rb') as f: pred...
{"hexsha": "fa7b45bfe6e1a943d65a2f6bfb905cf5b8844295", "size": 3060, "ext": "py", "lang": "Python", "max_stars_repo_path": "figures/msi/mantis_figure.py", "max_stars_repo_name": "OmnesRes/ATGC2", "max_stars_repo_head_hexsha": "53ee01e60fc6f180b590f5acc5f083155581c96c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
\documentclass[12pt]{article} \usepackage{graphicx} % images \graphicspath{ {../../img/} } \begin{document} \section{Input file} \input{Primer05Input} \include{Primer05Include} \end{document}
{"hexsha": "f2415542087dc3bad3d13ef28813dbaed8af0e48", "size": 205, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "SPO/Primeri/Primer05/Primer05.tex", "max_stars_repo_name": "RokKos/FRI_Programiranje", "max_stars_repo_head_hexsha": "d1b0c73585af049be9283447039f5f3e3fa4bdd9", "max_stars_repo_licenses": ["MIT"], "m...
using Test using NQCDynamics atoms = Atoms([:H]) model = Harmonic() sim = Simulation{Langevin}(atoms, model; temperature=1, γ=1) z = DynamicsVariables(sim, randn(1,1), randn(1,1)) solution = run_trajectory(z, (0.0, 500.0), sim; dt=1)
{"hexsha": "5f5f2a96a898728a7419edc708afe65a75869650", "size": 238, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Dynamics/langevin.jl", "max_stars_repo_name": "NQCD/NQCDynamics.jl", "max_stars_repo_head_hexsha": "bf7f0ac5105aab72972cce4cd1f313e63878f474", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
''' Usage: main [options] [COUNTER] ... Arguments: COUNTER Optional counters Options: -d,--debug Enable debug mode [default: False] -l,--list=<clist> List of counters (dhkmwM) to retrieve from config.json -r,--resume Resume file instead of generating from star...
{"hexsha": "f388e5b18c57f5f678bf1979c180ce895144ccc9", "size": 17211, "ext": "py", "lang": "Python", "max_stars_repo_path": "scrapers/investingcom/scrapeInvestingCom.py", "max_stars_repo_name": "hwase0ng/klseScrappers", "max_stars_repo_head_hexsha": "367ac86b603fad35c4983b04f9e72d4694d4bc31", "max_stars_repo_licenses":...
# In this tutorial, we will learn # - How to solve a simple PDE with a DG method # - How to compute jumps and averages of quantities on the mesh skeleton # - How to implement the method of manufactured solutions # - How to integrate error norms # - How to generate Cartesian meshes in arbitrary dimensions # # # #...
{"hexsha": "0220a230a11a5b3af514ce2a2a0ef6793a87f8ea", "size": 16702, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/dg_discretization.jl", "max_stars_repo_name": "andre-massing/Tutorials", "max_stars_repo_head_hexsha": "ee4e354f311d6423916127d4b94f5242404d07eb", "max_stars_repo_licenses": ["MIT"], "max_star...
import numpy as np def read_data(filename): # Read Data lasers = [] odoms = [] with open(filename) as f: for line in f: tokens = line.split(" ") if tokens[0] == "FLASER": num_readings = int(tokens[1]) scans = np.array(tokens[2 : 2 + num_r...
{"hexsha": "abe54492cd4704aaadc45b4088681d6f473a8e11", "size": 1018, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pygraphslam/read_data.py", "max_stars_repo_name": "miquelmassot/pygraphslam", "max_stars_repo_head_hexsha": "67dadcc8bce4af3d12edb3e04c001e973f89396c", "max_stars_repo_licenses": ["BSD-3-Claus...
/** * Copyright (C) Omar Thor <omarthoro@gmail.com> - All Rights Reserved * Unauthorized copying of this file, via any medium is strictly prohibited * Proprietary and confidential * * Written by Omar Thor <omarthoro@gmail.com>, 2017 */ #ifndef SP_UTIL_RAND_HPP #define SP_UTIL_RAND_HPP #include <random> #include...
{"hexsha": "28600d8a0019a8cf7b8e32ac52176c0f44638be3", "size": 2978, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/sp/util/rand.hpp", "max_stars_repo_name": "thorigin/sp", "max_stars_repo_head_hexsha": "a837b4fcb5b7184591585082012942bbdb8f11f9", "max_stars_repo_licenses": ["FSFAP"], "max_stars_count": nu...
import numpy as np class Fitness: pass
{"hexsha": "2aa9d2e28cfe36535cb8747dc6f629c1b17b3fb5", "size": 43, "ext": "py", "lang": "Python", "max_stars_repo_path": "solution/Survivor.py", "max_stars_repo_name": "killdary/genetic_algorithm_route_calculation", "max_stars_repo_head_hexsha": "f7d9c114d8780bad6124ee61214b7dce0557d312", "max_stars_repo_licenses": ["M...
#!/usr/bin/env python """ 1. Lookup table for Argon (gamma=5/3) with: Mach number M Mach angle mu in degrees Prandtl-Meyer function neu in degrees from 1 <= M <= 3 2. Method of Characteristics table which produces geometry for minimum length 2D symmetric nozzle using 4 characteristics Autho...
{"hexsha": "0636ce00497ac207179a8ba5953c860aece97660", "size": 6317, "ext": "py", "lang": "Python", "max_stars_repo_path": "MoC.py", "max_stars_repo_name": "MNahad/soton-nozzle", "max_stars_repo_head_hexsha": "20f5cf4f4b30e0e0c8bc933222c3260eedf36edd", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "max_star...
import numpy as np import os from visual_mpc.agent.benchmarking_agent import BenchmarkAgent from visual_mpc.envs.robot_envs.autograsp_env import AutograspEnv from visual_mpc.policy.cem_controllers.pixel_cost_controller import PixelCostController from visual_mpc.envs.robot_envs.util.topic_utils import IMTopic env_para...
{"hexsha": "bc3c1c72a76f8b7f7dd5661d950dac5b6a59add1", "size": 1697, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/robonet/robotiq/fine_tune_start_sawyer.py", "max_stars_repo_name": "thomasweng15/visual_foresight", "max_stars_repo_head_hexsha": "0f00ffcfc05e9ce47d76d440d91c298a35d8f7b1", "max_stars...
[STATEMENT] lemma (in group) subgroup_auto: "subgroup (auto G) (BijGroup (carrier G))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subgroup (auto G) (BijGroup (carrier G)) [PROOF STEP] proof (rule subgroup.intro) [PROOF STATE] proof (state) goal (4 subgoals): 1. auto G \<subseteq> carrier (BijGroup (carrie...
{"llama_tokens": 2055, "file": null, "length": 17}
#include <verilog_parser.hpp> #include <boost/config/warning_disable.hpp> #include <boost/spirit/home/x3.hpp> #include <iostream> #include <fstream> #include <string> #include <string.h> #include <vector> #include <boost/spirit/include/support_istream_iterator.hpp> #include <stdio.h> #include <map> using namespace ver...
{"hexsha": "c66c2462d9e6116baa73b1231318c8703f368abd", "size": 2785, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "test/test_parser_1.cxx", "max_stars_repo_name": "RafaelONascimento/iccad2016uffs", "max_stars_repo_head_hexsha": "ece416e9139cdfa20ccd27536965e4e03ca474b2", "max_stars_repo_licenses": ["BSD-3-Clause...
import numpy from stl.mesh import Mesh from stl.base import BaseMesh from stl.base import RemoveDuplicates from . import utils def test_units_1d(): data = numpy.zeros(1, dtype=Mesh.dtype) data['vectors'][0] = numpy.array([[0, 0, 0], [1, 0, 0], ...
{"hexsha": "d272126aad4dc281d0104ddb43563d6ca1141624", "size": 8043, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_mesh.py", "max_stars_repo_name": "gyetis/numpy-stl", "max_stars_repo_head_hexsha": "4c6f1ba65ebfbe4160a4d671a5b318bb825aa3dc", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_co...
import segment import logging import string class openWorker(): def __init__(self,fname): self.fname = fname self.parameters={} self.info={} self.segments=[] def parseConfigLine(self,cline,newline='\r\n'): line = cline[2:-len(newline)] # columns: vDeflection str...
{"hexsha": "1c458b871efd7083878ac19fd4aba0ef100e5f65", "size": 12721, "ext": "py", "lang": "Python", "max_stars_repo_path": "libs/curveLib/open_all.py", "max_stars_repo_name": "ledummy/CoMPlEx", "max_stars_repo_head_hexsha": "f315df7a1b13cfcbdafd9879ff93a974f2e2c38b", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import numpy as np import pandas as pd import random from psi.data.sinks.api import TableStore def test_table_create_append(): store = TableStore(name='event_log') store.prepare() rows = [ { 'channel': 'A', 'fs': 100e3, 'result': 5, 'valid': True, ...
{"hexsha": "56a2d7136bc081a8e829f926f6b81d166ab8dc4c", "size": 701, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/data/test_table_store.py", "max_stars_repo_name": "NCRAR/psiexperiment", "max_stars_repo_head_hexsha": "c3f8580b2b155ce42ebb936019d862c4343b545c", "max_stars_repo_licenses": ["MIT"], "max_sta...
import cv2 import imutils from imutils import perspective import numpy as np from scipy.optimize import fsolve from time import sleep def polyFit(xAxis, yAxis, degree): equation = list() if degree is 1: equation.append(np.polyfit(xAxis, yAxis, 1)[0]) equation.append(np.polyfit(xAxis, yAxis, 1)[...
{"hexsha": "b553942140c361b682c3ffcbc59e1e22a19a5ba8", "size": 4596, "ext": "py", "lang": "Python", "max_stars_repo_path": "MainCodes/LineTracking/yasarLineCodes/main_image.py", "max_stars_repo_name": "HisarCS/OpenZekaFolders", "max_stars_repo_head_hexsha": "9ef8e0d398870b5e6a1a7d99f11270d4eb665046", "max_stars_repo_li...
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt import sys import seaborn as sns sns.set(style="whitegrid") sys.path.append(os.path.abspath(".")) import config from src.features import fe from src.utli import utli # read data df_main = fe.mergred_store_and_user() # check missing rate...
{"hexsha": "536fd7bd8be5c854c61d42f2542a45e1028fb34d", "size": 8183, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/visualization/visualize.py", "max_stars_repo_name": "power80203/restaurant_DS", "max_stars_repo_head_hexsha": "6955f5a1593bb322d88beec2d27e32241222f13b", "max_stars_repo_licenses": ["BSD-3-Cla...
/** * Copyright (C) 2017 MongoDB Inc. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License, version 3, * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITH...
{"hexsha": "61ffe3e64413d5351c93da0ad16808af3be270f7", "size": 6465, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/mongo/s/client/rs_local_client.cpp", "max_stars_repo_name": "gaboull/mongodb-legacy", "max_stars_repo_head_hexsha": "3a7474c102ede496175400c0d916736ac8f8d4d2", "max_stars_repo_licenses": ["Apach...
Subroutine Readpara(libmod,scptname) use Aero2DCOM implicit none character(1) ch character(*) libmod,scptname if(libmod=='S') then open(unit=10,file=scptname,status='old') read(10,*) ch read(10,*) filename(1) read(10,*) ch read(10,*) Pntctrl read(10,*) ch read(10,*) Proctrl read(10,*) ch read(10,*) Ene...
{"hexsha": "265b866f19a20d737a72467edbc4e35b4601dd84", "size": 5223, "ext": "f03", "lang": "FORTRAN", "max_stars_repo_path": "lib/Readpara.f03", "max_stars_repo_name": "sdhzhs/ransfoil", "max_stars_repo_head_hexsha": "035afd15ab1f8a18619fc35237716476833a298a", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
! ! ---------------------------------------------------------------- ! ---------------------------------------------------------------- ! module parameters_module ! ! ! -----Description: sets of the run parameters for the r3 body runs ! ! ! ! --------------------------------------------------------...
{"hexsha": "feee97a03476ad12fbda293b586b8d0375a72bcf", "size": 8379, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "fortran/parameters_module.f90", "max_stars_repo_name": "jfwallin/JSPAM", "max_stars_repo_head_hexsha": "d6a61dbacc884e140b97eb4b191446bb4239a00f", "max_stars_repo_licenses": ["AFL-3.0"], "max_st...
import os import cv2 import time import threading from imutils.video import VideoStream from tensorflow.keras.utils import get_file from akida import Model as AkidaModel from akida_models import yolo_voc_pretrained, yolo_base from akida_models.detection.processing import ( decode_output, parse_voc_annotations, ...
{"hexsha": "06b4085189305a4a8bc179dbaf4952d901adbb57", "size": 6295, "ext": "py", "lang": "Python", "max_stars_repo_path": "akida_yolo.py", "max_stars_repo_name": "stdp/akida-yolo", "max_stars_repo_head_hexsha": "0a24367a10ed22ba2fe2f42fbea2a9b1aa9f02f7", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": 5,...
# Licensed under the BSD 3-Clause License # Copyright (C) 2021 GeospaceLab (geospacelab) # Author: Lei Cai, Space Physics and Astronomy, University of Oulu import numpy as np import datetime import geospacelab.datahub as datahub from geospacelab.datahub import DatabaseModel, FacilityModel, InstrumentModel, ProductMod...
{"hexsha": "b079490df0918041efc9f2a3d390e1d80899eb42", "size": 10128, "ext": "py", "lang": "Python", "max_stars_repo_path": "geospacelab/datahub/sources/esa_eo/swarm/advanced/efi_tct/__init__.py", "max_stars_repo_name": "JouleCai/GeoSpaceLab", "max_stars_repo_head_hexsha": "6cc498d3c32501e946931de596a840c73e83edb3", "m...
import numpy as np arr = np.array([1,2,3,4,5,4,4]) newArr = np.where(arr == 4) print("Printing the index no. of 4 in array.") print(newArr) arr_2 = np.array([1,2,3,4,5,6,7,8,9]) print("Printing The Even Number from the array") newArr_2 = np.where(arr_2%2 == 0) print(newArr_2) print("Printing The Odd Number from the ...
{"hexsha": "25665f0675de03a16199cfcc53db59b110b86d0c", "size": 508, "ext": "py", "lang": "Python", "max_stars_repo_path": "numpy/searching.py", "max_stars_repo_name": "abhayanigam/Learn_Python_Programming", "max_stars_repo_head_hexsha": "801e3fff2b1fe35e4c93f4ced649516c519eb8f9", "max_stars_repo_licenses": ["MIT"], "ma...
using Test, Images, Colors, FixedPointNumbers, ColorTypes, TestImages # why use 3 chars when many will do? eye(m,n) = Matrix{Float64}(I,m,n) @testset "Exposure" begin oneunits(::Type{C}, dims...) where C = fill(oneunit(C), dims) @testset "Histogram" begin # Many of these test integer values, but of...
{"hexsha": "33895a5fe32e328ea815cc87193558f456fa9b96", "size": 30395, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/exposure.jl", "max_stars_repo_name": "IanButterworth/Images.jl", "max_stars_repo_head_hexsha": "2685cff0da716226184ed42abb97a1b49ce7a7cc", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
"""Tests for the Zernike submodule.""" import pytest import numpy as np from prysm.coordinates import cart_to_polar from prysm import zernike import matplotlib matplotlib.use('TkAgg') SAMPLES = 32 X, Y = np.linspace(-1, 1, SAMPLES), np.linspace(-1, 1, SAMPLES) @pytest.fixture def rho(): rho, phi = cart_to_po...
{"hexsha": "bceec4175133780b08c1834560fc51205f70ff9c", "size": 3252, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_zernike.py", "max_stars_repo_name": "samkberry/prysm", "max_stars_repo_head_hexsha": "3c17cb7b6049a36a1f8b6a0035c216ca1078aee1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
[STATEMENT] lemma (in su_rel_fun) repr1: "(A,f A)\<in>F" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (A, f A) \<in> F [PROOF STEP] proof (unfold f_def) [PROOF STATE] proof (state) goal (1 subgoal): 1. (A, THE B. (A, B) \<in> F) \<in> F [PROOF STEP] obtain B where "(A,B)\<in>F" [PROOF STATE] proof (prove) goal (1...
{"llama_tokens": 582, "file": "Program-Conflict-Analysis_Misc", "length": 7}
\chapter{INTRODUCTION} \label{chap:introduction} %Layout the major questions. Then address the answers. Finally, construct the logical flow of necessary statements. Each sentence should be defend-able and contain well defined or cited jargon. % \section{these are the questions I want to address} % \begin{itemize} % ...
{"hexsha": "166e6ae8d1507d3e53c84e49f1d5b98bd35189b2", "size": 40379, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/introduction_draft3.tex", "max_stars_repo_name": "bhpayne/physics_phd_dissertation", "max_stars_repo_head_hexsha": "646123088fdd226e8677e6f3edb8d109be96994e", "max_stars_repo_licenses": ["...
# Authors: Alexandre Gramfort <gramfort@nmr.mgh.harvard.edu> # Matti Hamalainen <msh@nmr.mgh.harvard.edu> # # License: BSD (3-clause) from math import sqrt import numpy as np from scipy import linalg from .tree import dir_tree_find from .constants import FIFF from .tag import find_tag from .bunch import Bunc...
{"hexsha": "b3b768575b18c63d84f573b32e6a9a47c18e2bbb", "size": 8143, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/fiff/proj.py", "max_stars_repo_name": "arokem/mne-python", "max_stars_repo_head_hexsha": "588aba1a35fb448978872f179d479839448352fd", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_cou...
""" Copyright (c) 2014 Eric Vallee <eric_vallee2003@yahoo.ca> 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, mer...
{"hexsha": "d54f89684089f815dac1b1c6d279ac586b2564bd", "size": 2311, "ext": "py", "lang": "Python", "max_stars_repo_path": "SciDice/CustomDistributions.py", "max_stars_repo_name": "Magnitus-/SciDice", "max_stars_repo_head_hexsha": "0204a3105faa65dd293842ec577de8a2cb19a543", "max_stars_repo_licenses": ["MIT"], "max_star...
[STATEMENT] lemma at_disj_dist:"\<Turnstile>(\<^bold>@c (\<phi> \<^bold>\<or> \<psi>)) \<^bold>\<leftrightarrow> ((\<^bold>@c \<phi> ) \<^bold>\<or> ( \<^bold>@c \<psi> ))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>ts v. (\<forall>v'. v = c > v' \<longrightarrow> \<phi> ts v' \<or> \<psi> ts v') = ((\...
{"llama_tokens": 345, "file": "Hybrid_Multi_Lane_Spatial_Logic_HMLSL", "length": 2}
/- Copyright (c) 2021 Oliver Nash. All rights reserved. Released under Apache 2.0 license as described in the file LICENSE. Authors: Oliver Nash -/ import algebra.lie.submodule /-! # Ideal operations for Lie algebras Given a Lie module `M` over a Lie algebra `L`, there is a natural action of the Lie ideals of `L` on ...
{"author": "JLimperg", "repo": "aesop3", "sha": "a4a116f650cc7403428e72bd2e2c4cda300fe03f", "save_path": "github-repos/lean/JLimperg-aesop3", "path": "github-repos/lean/JLimperg-aesop3/aesop3-a4a116f650cc7403428e72bd2e2c4cda300fe03f/src/algebra/lie/ideal_operations.lean"}
[STATEMENT] lemma preserves_hcomp: assumes "C.hseq \<mu> \<nu>" shows "F (\<mu> \<star>\<^sub>C \<nu>) = \<Phi> (C.cod \<mu>, C.cod \<nu>) \<cdot>\<^sub>D (F \<mu> \<star>\<^sub>D F \<nu>) \<cdot>\<^sub>D D.inv (\<Phi> (C.dom \<mu>, C.dom \<nu>))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. F (...
{"llama_tokens": 1530, "file": "Bicategory_Pseudofunctor", "length": 7}
from sklearn.base import BaseEstimator import numpy as np class Random(BaseEstimator): """ Wrapper for the random embedding baseline """ def __init__(self, dim=128): self.dim = dim def fit(self, **kwargs): pass def predict(self, coords): embeddings = np.random.rand(len...
{"hexsha": "1f6d36dbd454e2f7f553f5c9157ba35d908ed9d8", "size": 366, "ext": "py", "lang": "Python", "max_stars_repo_path": "coord2vec/models/baselines/random.py", "max_stars_repo_name": "jonzarecki/coord2vec", "max_stars_repo_head_hexsha": "4f267fdd87af7b3d3558ca834b88e9ab7c309c18", "max_stars_repo_licenses": ["Apache-2...
theory outFM imports bundle.SB begin typedef outFM = "{cout}" by auto definition "FMout \<equiv> Abs_outFM cout" instantiation outFM::"{somechan,finite}" begin definition "Rep = Rep_outFM" instance apply(standard) apply(auto simp add: Rep_outFM_def cEmpty_def) apply(auto simp add: ctype_empty_iff) usin...
{"author": "yyisgladiator", "repo": "demo", "sha": "2a57300dfa7268721c78c233ee6b0a5454acce1f", "save_path": "github-repos/isabelle/yyisgladiator-demo", "path": "github-repos/isabelle/yyisgladiator-demo/demo-2a57300dfa7268721c78c233ee6b0a5454acce1f/src/demo/fairmerge/outFM.thy"}
# -*- coding: utf-8 -*- """ Created on Fri Aug 31 00:45:46 2018 @author: wangdi """ import tensorflow as tf import numpy as np def generate_data(): num = 5 label = np.asarray(range(0, num)) print('generate_data:'+str(label)) images = np.random.random([num, 5, 5, 3]) print('label size :{}, im...
{"hexsha": "0dcd9acb88ee77172e162456bc58a246505617cc", "size": 1386, "ext": "py", "lang": "Python", "max_stars_repo_path": "testbatch.py", "max_stars_repo_name": "deechean/Using-Tensorflow-to-create-your-own-neural-network-samples", "max_stars_repo_head_hexsha": "2b279866d7eb4c517ff014e43dede84d41330e06", "max_stars_re...
! { dg-do compile } program fc011 ! Tests fix for PR20779 and PR20891. ! Submitted by Walt Brainerd, The Fortran Company ! and by Joost VandeVondele <jv244@cam.ac.uk> ! This program violates requirements of 6.3.1 of the F95 standard. ! An allocate-object, or a subobject of an allocate-object, shall not appear ! in ...
{"hexsha": "477643855a2bd8763c1d7f08924c09d6967739f8", "size": 1092, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "llvm-gcc-4.2-2.9/gcc/testsuite/gfortran.dg/alloc_alloc_expr_1.f90", "max_stars_repo_name": "vidkidz/crossbridge", "max_stars_repo_head_hexsha": "ba0bf94aee0ce6cf7eb5be882382e52bc57ba396", "max_s...
using Atom # calling Atom's serve() # using Pkg # Pkg.add("Atom") # Pkg.activate("..") # Atom.handle("ping") do # "pong" # end Atom.serve(5601) # This should connect to the elisp side server # Atom.connect(5602) # using MacroTools # @destruct [word, path || nothing] = [Dict("word"=>"hello"), Dict("path"=>nothi...
{"hexsha": "e7a9e9f9b7c6c4d9b6889870941986b1a70634b2", "size": 327, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/AtomServer.jl", "max_stars_repo_name": "lihebi/julia-repl", "max_stars_repo_head_hexsha": "fd2ce79d9bdaccb0b69673d5cf7069e8de561bb7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
using Test, LinearMaps, LinearAlgebra, BenchmarkTools @testset "identity/scaling map" begin @test_throws ArgumentError LinearMaps.UniformScalingMap(true, -1) A = 2 * rand(ComplexF64, (10, 10)) .- 1 B = rand(size(A)...) M = @inferred 1 * LinearMap(A) N = @inferred LinearMap(B) LC = @inferred M +...
{"hexsha": "530b8f97e3ee8932353d045c089f95019245093d", "size": 2157, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/uniformscalingmap.jl", "max_stars_repo_name": "tknopp/LinearMaps.jl", "max_stars_repo_head_hexsha": "73631702b8efa7b2291c99f91d64d7f67018c0d1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import unittest import numpy as np from ai4water.postprocessing.SeqMetrics import ClassificationMetrics predictions = np.array([[0.25, 0.25, 0.25, 0.25], [0.01, 0.01, 0.01, 0.96]]) targets = np.array([[0, 0, 0, 1], [0, 0, 0, 1]]) class TestClassificationMetrics(unittes...
{"hexsha": "b172c1e8f0dd97d938dd52f9a862ecd6d392bb07", "size": 1454, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_postprocessing/test_SeqMetrics/test_classification.py", "max_stars_repo_name": "moonson619/AI4Water-1", "max_stars_repo_head_hexsha": "285d46824502b6a787e42570b72432f4f6acf45e", "max_st...
import unittest from .. import TEST_DTYPES import torch import numpy as np from pytorch_metric_learning.losses import ArcFaceLoss from pytorch_metric_learning.utils import common_functions as c_f class TestArcFaceLoss(unittest.TestCase): @classmethod def setUpClass(self): self.device = torch.device('c...
{"hexsha": "cd32fed740aa5cfcac776a539b80fa58d73eba76", "size": 1480, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/losses/test_arcface_loss.py", "max_stars_repo_name": "wconnell/pytorch-metric-learning", "max_stars_repo_head_hexsha": "1affee7c77bb5d6d4ee559bad62b910a21b39d48", "max_stars_repo_licenses": ...
import logging from collections import defaultdict from collections import deque from typing import Any from typing import Callable from typing import Dict from typing import Sequence from typing import Union import numpy as np import pandas as pd # from scipy.stats import kurtosis from .base import BaseTransformer...
{"hexsha": "0fa3224f05e1890b394e90649d51f63f8fce9820", "size": 9961, "ext": "py", "lang": "Python", "max_stars_repo_path": "automllib/table_join.py", "max_stars_repo_name": "Y-oHr-N/autodl19", "max_stars_repo_head_hexsha": "c83b9cae08e1cee69df362a13794632380cbe0ac", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import os os.environ["CUDA_DEVICE_ORDER"]="PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"]="0" import cv2 import numpy as np import tensorflow as tf import tensorflow.keras as K import matplotlib.pyplot as plt import shutil from glob import glob from tqdm import tqdm from time import sleep from tabulate import tabulat...
{"hexsha": "e6cedb28e2c2bb90f03480d7915aa760329023dc", "size": 17998, "ext": "py", "lang": "Python", "max_stars_repo_path": "evaluate.py", "max_stars_repo_name": "chisyliu/RADDet", "max_stars_repo_head_hexsha": "5c0020dc24024f5b87e864554769f5926b73593a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_st...
import numpy as np; import pickle; import os; import sys; from sklearn import metrics #import matplotlib.pyplot as plt from shutil import copyfile; import glob; def copy_fn(in_dir, model_prefix, img_root_dir, img_root_dir_rect, img_out_dir, threshold, types): #def copy_fn(in_dir, model_prefix, img_root_dir,...
{"hexsha": "a17005cefe12c2bb55146459c419d00538bfd5cf", "size": 38210, "ext": "py", "lang": "Python", "max_stars_repo_path": "process_results/process_results_patches.py", "max_stars_repo_name": "ShahiraAbousamra/til_classification", "max_stars_repo_head_hexsha": "cede5453cb46b9c168a1f50f76ded43f8ca3fcbe", "max_stars_rep...
import numpy as np import cv2 from tensorflow_wavelets.utils.mse import mse import pywt img = cv2.imread("../input/LennaGrey.png", 0) # print(threshold) coeffs2 = pywt.dwt2(img, 'db2') sigma = np.median(np.abs(coeffs2[1][2])) / 0.67448975 threshold = sigma**2 / np.sqrt(max(coeffs2[1][2].var()**2 - sigma**2, 0)) ...
{"hexsha": "93c53bbfad45fe81d2e5965c084aa767a261e789", "size": 660, "ext": "py", "lang": "Python", "max_stars_repo_path": "Development/Scripts/thresholding.py", "max_stars_repo_name": "simonsimon006/tensorflow-wavelets", "max_stars_repo_head_hexsha": "21a095bf0048ae2488ca5ae4961d2cbfe94263a9", "max_stars_repo_licenses"...
import pygame.midi from midiutil.MidiFile import MIDIFile import pygame from midi2audio import FluidSynth from collections.abc import Iterable from tensorflow.keras.models import load_model import sys # import IPython.display import os import pandas as pd import numpy as np import librosa import librosa.display import...
{"hexsha": "153ff3376134734337b02412b83961ae35b4951a", "size": 6575, "ext": "py", "lang": "Python", "max_stars_repo_path": "music/music.py", "max_stars_repo_name": "maemenaver/kokoro-server", "max_stars_repo_head_hexsha": "8ad1fcc9475da90804809dc870a4f9b801813333", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
import data_loading import data_preprocessing import data_ingestion import numpy as np import tensorflow as tf import metrics import math def test_model(appliance_name, main_path, appliance_path, model_path, window_size, batch_size, rescaling=None, appliance_min_power=0.0, appliance_max...
{"hexsha": "b87a3dccdf1bc38466db250232a3c0159443fec9", "size": 4895, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_testing.py", "max_stars_repo_name": "redefik/ConvNILM", "max_stars_repo_head_hexsha": "8a1a23fed5b9c1e39687fb3c2e7c018ec8ac656a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "m...
import category_theory.category.default import category_theory.functor import category_theory.isomorphism universes v₁ v₂ u₁ u₂ -- The order in this declaration matters: v often needs to be explicitly specified while u often can be omitted namespace category_theory variables (C : Type u₁) [category.{v₁} C] variabl...
{"author": "agusakov", "repo": "category-theory-game", "sha": "652dd7e90ae706643b2a597e2c938403653e167d", "save_path": "github-repos/lean/agusakov-category-theory-game", "path": "github-repos/lean/agusakov-category-theory-game/category-theory-game-652dd7e90ae706643b2a597e2c938403653e167d/src/game/world4/level1.lean"}
#include "Target.h" #include "detail/log.h" #include "detail/names.h" #include "utility.h" #include <boost/uuid/uuid_io.hpp> namespace Simulator { std::optional<Second> Target::getNextEventTime() { if (_health <= HealthPoints(0)) { _upcomingEvents.clear(); return std::nullopt; } std::vector<...
{"hexsha": "b03bccf86ed00ad75d7c1b317774ecba515d3781", "size": 11820, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "Simulator/SimulatorBase/Target.cpp", "max_stars_repo_name": "tomcool420/SimulatorSWTOR", "max_stars_repo_head_hexsha": "4d2866f997fc3f75b69a97dd5fc474227185de81", "max_stars_repo_licenses": ["MIT"]...
r""" h5diag """ import os import sys from argparse import ArgumentParser import h5py from astropy.coordinates import Angle from blimpy.io.hdf_reader import examine_h5 def oops(msg): print("\n*** h5diag: {}\n".format(msg)) sys.exit(86) def read_header(h5): """ Read header and return a Python dictionary ...
{"hexsha": "92fb170c5df7f28fab5925e00a667b00848bbc7a", "size": 1703, "ext": "py", "lang": "Python", "max_stars_repo_path": "blimpy/h5diag.py", "max_stars_repo_name": "Biswajit1999/blimpy", "max_stars_repo_head_hexsha": "ae252399f5edcd69e997117085cd0b7b94bf7fb6", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
import twitter from dotenv import load_dotenv import os import csv from datetime import datetime import numpy as np ''' Populates csv with latest data from Twitter ''' load_dotenv() api = twitter.Api(consumer_key = os.getenv("CONSUMER_KEY"), consumer_secret = os.getenv("CONSUMER_SECRET"), ...
{"hexsha": "980d3914ca50519a8baaaa25992e2f3cd2574704", "size": 3247, "ext": "py", "lang": "Python", "max_stars_repo_path": "_code/twitter-primary/generate_data.py", "max_stars_repo_name": "jeffreyshen19/blog", "max_stars_repo_head_hexsha": "5d81db5457275a767ef568923ca995288d8dda49", "max_stars_repo_licenses": ["MIT"], ...
import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D matplotlib.style.use('ggplot') # Look Pretty def drawLine(model, X_test, y_test, title, R2): # This convenience method will take care of plotting your # test observations, comparing th...
{"hexsha": "53902d19c34fbf984c19dff50dc675384e4a11a7", "size": 9295, "ext": "py", "lang": "Python", "max_stars_repo_path": "Module5/assignment9.py", "max_stars_repo_name": "galinams/Programming-with-Python-for-Data-Science", "max_stars_repo_head_hexsha": "9f37a6698b58becbfccc8ef44df73104c3f8e858", "max_stars_repo_licen...
# -*- coding: utf-8 -*- """ Created on Tue Oct 5 17:20:43 2021 @author: Sat Patel """ # Libraries to Use import cv2 as cv import scipy.fft as spfft import numpy as np import matplotlib.pyplot as plotty # Functions to be used # 1. 2D Discrete Cosine Transform def dct2D(a): return spfft.dct(spfft.dct(a.T, ...
{"hexsha": "7736e4a5a5e57b2c38daffb3fc785292e6c579c6", "size": 2031, "ext": "py", "lang": "Python", "max_stars_repo_path": "DCT/DCT-final/Watermark Extraction.py", "max_stars_repo_name": "Satjpatel/Digital-Image-Watermarking-and-Its-FPGA-Implementation", "max_stars_repo_head_hexsha": "4733dc9b7f57d501804f75d135e0095f2f...
import os import numpy as np import scipy.sparse as sp from lightfm.datasets import _common def fetch_stackexchange( dataset, test_set_fraction=0.2, min_training_interactions=1, data_home=None, indicator_features=True, tag_features=False, download_if_missing=True, ): """ Fetch a...
{"hexsha": "652187a9d88d21049ac4e875227997ffc071b891", "size": 5637, "ext": "py", "lang": "Python", "max_stars_repo_path": "lightfm/datasets/stackexchange.py", "max_stars_repo_name": "mkurovski/lightfm", "max_stars_repo_head_hexsha": "0415c6ee5f56ee81f7e917cf961dce756f1d9461", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma inv_end5_Bk_tail_via_4[elim]: "\<lbrakk>0 < x; inv_end4 x (b, Bk # list); b \<noteq> []\<rbrakk> \<Longrightarrow> inv_end5 x (tl b, hd b # Bk # list)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>0 < x; inv_end4 x (b, Bk # list); b \<noteq> []\<rbrakk> \<Longrightarrow> inv_end5 x (t...
{"llama_tokens": 341, "file": "Universal_Turing_Machine_WeakCopyTM", "length": 3}
#!/bin/env python # -*- coding: utf-8 -*- # # Created on 15.01.21 # # Created for py_bacy # # @author: Tobias Sebastian Finn, tobias.sebastian.finn@uni-hamburg.de # # Copyright (C) {2021} {Tobias Sebastian Finn} # System modules from typing import List, Union from shutil import copyfile # External modules import...
{"hexsha": "d2ed99232875ea284d1d9366438d2d9829ba96f3", "size": 5870, "ext": "py", "lang": "Python", "max_stars_repo_path": "py_bacy/tasks/io.py", "max_stars_repo_name": "tobifinn/py_bacy", "max_stars_repo_head_hexsha": "f550876fe0303eb1711866268871f6fd478ef1c1", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
#ifndef INFERENCEPARSERBASE_HXX_ #define INFERENCEPARSERBASE_HXX_ #include <string> #include <vector> #include <iomanip> #include <boost/variant.hpp> #include "Argument.hxx" #include "helper/helper.hxx" namespace opengm { namespace interface { template <class IOType, class ModelType, class Accumulation> class Infe...
{"hexsha": "74316ee3bea31e4debf989c2f18ff3df0a985741", "size": 3026, "ext": "hxx", "lang": "C++", "max_stars_repo_path": "src/interfaces/common/obsolete/InferenceParserBase.hxx", "max_stars_repo_name": "burcin/opengm", "max_stars_repo_head_hexsha": "a1b21eecb93c6c5a7b11ab312d26b1c98c55ff41", "max_stars_repo_licenses": ...
import sys, os import time import argparse import pandas as pd import numpy as np import crypto def get_transactions_scenarios(market_prices,clients_fees,clients_dict,cols_list) : # Get possible transactions with more than x% gain mininmum_gain = 5 # print(market_prices[(market_prices['delta'] > mininmum_gain)][c...
{"hexsha": "abe73572fa67ed4b7f3f831554c6c49799c98c8b", "size": 3478, "ext": "py", "lang": "Python", "max_stars_repo_path": "arbitrator.py", "max_stars_repo_name": "iero/Crypto", "max_stars_repo_head_hexsha": "1bdd9017d35100822db8f4048b313014d1ab1187", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": null, ...
import numpy as np from mayavi import mlab gridsize = 64 loaddir = "/net/dataserver1/data/users/pbos/cubep3m/test1/output/" # z = 0 snapshot # header ifdef PPINT: # np_local, a, t, tau, nts, dt_f_acc, dt_pp_acc, dt_c_acc, cur_checkpoint, cur_projection, cur_halofind, mass_p # header ifndef PPINT: # np_local, a, t, ta...
{"hexsha": "507b54ef517f3314f767a8bf5112980df57672c1", "size": 1238, "ext": "py", "lang": "Python", "max_stars_repo_path": "testing/cubep3m/loadz0.py", "max_stars_repo_name": "egpbos/egp", "max_stars_repo_head_hexsha": "5e82c2de9e6884795b4ee89f2b15ed5dde70388f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
import pickle import numpy as np def load_pickle(pickle_file): try: with open(pickle_file, 'rb') as f: pickle_data = pickle.load(f) except UnicodeDecodeError as e: with open(pickle_file, 'rb') as f: pickle_data = pickle.load(f, encoding='latin1') except Exception as...
{"hexsha": "3e43f3b31de86c0d9d2760817174a6a455c75e79", "size": 2026, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "DarkstartsUp/Graph-ConvRNN.PyTorch", "max_stars_repo_head_hexsha": "678526ae074a5050211f7f36f0a62a5f30560135", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#! /usr/bin/python from numpy import * # Parameters nox=3 # order of gathering noz=3 l4symtry=False l_particles_weight=True final_loop_lin=2 filename="depose_jxjyjz_esirkepov_"+str(nox)+"_"+str(noz)+".F90" subroutine_deposej="depose_jxjyjz_esirkepov2d_lin_"+str(nox)+"_"+str(noz) indent_cont_1=" ...
{"hexsha": "6901773007597a5b0831fcf6a3dd76808c8bf6eb", "size": 15316, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/subroutine_generators/write_current_dep_esirkepov_2d.py", "max_stars_repo_name": "LukeMcCulloch/PICSAR", "max_stars_repo_head_hexsha": "4c29ad7f923d158137296c6776f01011049075f0", "max_stars...
import numpy as np from mushroom_rl.core import Environment, MDPInfo from mushroom_rl.utils.spaces import Box, Discrete from mushroom_rl.utils.viewer import Viewer class RoomToyEnv(Environment): def __init__(self, size=5., goal=[2.5, 2.5], goal_radius=0.6): # Save important environment information ...
{"hexsha": "cfc85a86b0fc6ceeb45e5e094bf159cc71f9a57c", "size": 5601, "ext": "py", "lang": "Python", "max_stars_repo_path": "docs/source/tutorials/code/room_env.py", "max_stars_repo_name": "PuzeLiu/mushroom-rl", "max_stars_repo_head_hexsha": "99942b425e66b4ddcc26009d7105dde23841e95d", "max_stars_repo_licenses": ["MIT"],...
"""Tools to handle DEMs.""" from __future__ import annotations import json import os import warnings from numbers import Number import numpy as np import pandas as pd import rasterio as rio import richdem as rd import scipy.ndimage import xdem.spatial_tools from osgeo import gdal from tqdm import tqdm import terrade...
{"hexsha": "5f0c72b66a962f04f0b6489b731b357ff4d246e1", "size": 21060, "ext": "py", "lang": "Python", "max_stars_repo_path": "terradem/dem_tools.py", "max_stars_repo_name": "VAW-SwissTerra/terradem", "max_stars_repo_head_hexsha": "146e84cffac1580d67cb9e952a789c22b4d69249", "max_stars_repo_licenses": ["Apache-2.0"], "max...
/////////////////////////////////////////////////////////////////////////////// /// \file regex_primitives.hpp /// Contains the syntax elements for writing static regular expressions. // // Copyright 2008 Eric Niebler. Distributed under the Boost // Software License, Version 1.0. (See accompanying file // LICENSE_1_...
{"hexsha": "dcce60b49147fc8ac0ff08717dc9323c5b8bc1e7", "size": 37649, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "boost/boost/xpressive/regex_primitives.hpp", "max_stars_repo_name": "randolphwong/mcsema", "max_stars_repo_head_hexsha": "eb5b376736e7f57ff0a61f7e4e5a436bbb874720", "max_stars_repo_licenses": ["BSD...
// Copyright (c) James Percent and Unlock contributors. // All rights reserved. // Redistribution and use in source and binary forms, with or without modification, // are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // ...
{"hexsha": "c1a51de7da849fcaa61e6d3442df082a91afe506", "size": 7793, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "unlock/bci/acquire-c++/EnobioSignalHandler.cpp", "max_stars_repo_name": "NeuralProsthesisLab/unlock", "max_stars_repo_head_hexsha": "0c4d95abdab288d3e657ca2db867b06f755f26ff", "max_stars_repo_licens...
#= TestAlgebra: - Julia version: 1.4.2 - Author: akhil - Date: 2020-05-28 =# import ..Maths """ *(x, y, z...) Multiplication operator. `x * y * z *...` calls this function with multiple arguments, i.e. `*(x, y, z...)`. """ function add_value(x) return Maths.abs_value(x)+5 end
{"hexsha": "e9a3e94431dbadae1386625dd5d62487d022b3cd", "size": 286, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Algebra/TestAlgebra.jl", "max_stars_repo_name": "Enforcer007/Algorithms-Julia", "max_stars_repo_head_hexsha": "19b3560f01f6376686c3066754e2b1ce4cf06cbf", "max_stars_repo_licenses": ["MIT"], "max...
# Copyright 2020-2021 OpenDR European Project # # 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 agree...
{"hexsha": "6d0a0a34ca72abc343620b788d40e46eabb03d3a", "size": 3460, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/opendr/perception/object_tracking_2d/deep_sort/algorithm/deep_sort_tracker.py", "max_stars_repo_name": "makistsantekidis/opendr", "max_stars_repo_head_hexsha": "07dee3b59d3487b9c5a93d694631717...
from collections import deque import numpy as np EPSILON = 1e-16 class FIFOQueue: def __init__(self, capacity): self.cap = capacity self.size = 0 self.data = deque() def add(self, item): if self.is_full(): self.data.popleft() else: self.size +=...
{"hexsha": "846c796895221106df0fb397a853558d47ad5bb6", "size": 636, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils.py", "max_stars_repo_name": "AmeetR/RL_IRL_Modeling", "max_stars_repo_head_hexsha": "8cf4f8d747430073a4dddcdb4871441f40bf5a3b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
import math import torch import numpy as np from loss.bce_loss_with_logits import bce_loss_with_logits from torch.nn import functional as F class TestBceLossWithLogits: def test_bce_loss_with_logits_2d(self): batch_size = 5 x = 10 y = 10 output = torch.Tensor(np.zeros((batch_size,...
{"hexsha": "499d7e8931e71bba3c6083f78caf32251e44ad65", "size": 1565, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/loss/test_bce_loss_with_logits.py", "max_stars_repo_name": "cbim-medical-group/pytorch-template", "max_stars_repo_head_hexsha": "7f76ee095420e23efe22df560d8e0a314fbc16dd", "max_stars_repo_li...
using AstroRecipes
{"hexsha": "794de547124c096c1b94f76ee61582b41e87e2ed", "size": 21, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "gcalderone/Astrocook.jl", "max_stars_repo_head_hexsha": "9b245d1a05b430a24789207642be60dc961e692b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
a <-2 a*a
{"hexsha": "0d2d8939af1aa51571ba0b51215c668978b23c68", "size": 9, "ext": "r", "lang": "R", "max_stars_repo_path": "analasis.r", "max_stars_repo_name": "xhguo86/spiced", "max_stars_repo_head_hexsha": "171ae506b747c20bf08176ce58d5c61345aca1d4", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "max_stars_repo_...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on July 9 19:55:34 2018 @author: daiwei.lin """ try: from .VrepRemoteApiBindings import vrep except: print ('--------------------------------------------------------------') print ('"vrep.py" could not be imported. This means it is very likely') ...
{"hexsha": "53cfdf597f143b50eb51e4c36fac908e603eb9f2", "size": 25414, "ext": "py", "lang": "Python", "max_stars_repo_path": "Environment/LASROMEnv.py", "max_stars_repo_name": "UWaterloo-ASL/ML_lite", "max_stars_repo_head_hexsha": "1bde4c38da8912cd923dfe3bb655af4ca4bcf700", "max_stars_repo_licenses": ["MIT"], "max_stars...
[STATEMENT] lemma Says_imp_used: "Says A B X \<in> set evs \<Longrightarrow> parts {X} \<subseteq> used evs" [PROOF STATE] proof (prove) goal (1 subgoal): 1. Says A B X \<in> set evs \<Longrightarrow> parts {X} \<subseteq> used evs [PROOF STEP] by (induct evs, auto intro: used_ConsI)
{"llama_tokens": 111, "file": null, "length": 1}
import pandas as pd import seaborn as sns import numpy as np DS_PATH = 'datasets/' #load dataset def getDSFuelConsumptionCo2(): return pd.read_csv(DS_PATH + 'FuelConsumptionCo2.csv') def getDSPriceHousing(): return pd.read_csv(DS_PATH + 'USA-priceHousing.csv') #classification problem def getDSPriceHousing_C...
{"hexsha": "85cd8091fd4be2d8b4f7ce7cae1f43fb4554412a", "size": 1363, "ext": "py", "lang": "Python", "max_stars_repo_path": "ds_utils.py", "max_stars_repo_name": "andersonmgomes/automl", "max_stars_repo_head_hexsha": "d1c3e366d09ac18d4db672efd34f136c1ffd73ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 4, "m...
""" struct InfoLine([ block_name="", data_type=Float32, n_dim=Int32(0), is_present=zeros(Int32, 6) ]) Contains the data of a single entry in the `INFO` block of a Gadget snapshot. # Fields | Name | Meaning ...
{"hexsha": "a79e6f8145a256510c1977813ce0ba6f9f1ccc16", "size": 4602, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/read_snapshot/read_info.jl", "max_stars_repo_name": "LudwigBoess/GadgetIO.jl", "max_stars_repo_head_hexsha": "cb5bd8066a6742df15077ffa37100f49758a4aec", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma restriction_eq_view_card:"restrict v f c = lan v \<longrightarrow> |restrict v f c| =|lan v|" [PROOF STATE] proof (prove) goal (1 subgoal): 1. restrict v f c = lan v \<longrightarrow> |restrict v f c| = |lan v| [PROOF STEP] by simp
{"llama_tokens": 95, "file": "Hybrid_Multi_Lane_Spatial_Logic_Restriction", "length": 1}
using HMMs using Brobdingnag using Distributions using Random Random.seed!(1) x = rand( 10, 5 ) name = tempname() file = open( name, "w" ) HMMs.writearray( file, x ) close(file) file = open( name, "r" ) y = HMMs.readarray( file, Matrix{Float64} ) close(file) rm(name) @assert( x == y ) N = 2 T = 1000 Random.seed!(1) h...
{"hexsha": "019f09a45b9cdbe34fc2fc9e1b9a73247a132b8b", "size": 8098, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "atteson/HMMs.jl", "max_stars_repo_head_hexsha": "ddf4fec0181370e3af8304bb8a09e754488b9ced", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import os import pickle from typing import List, Optional, Any import numpy as np import pandas as pd from sklearn.preprocessing import LabelEncoder import torch from preprocessing import dense_preprocessing_pipeline from model_utils import build_classifier, train_classifier, save_torch_model preprocessor = None d...
{"hexsha": "43b63d950a4107c026aaa094c09c2d28617551a5", "size": 4146, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_templates/training/python3_pytorch_multiclass/custom.py", "max_stars_repo_name": "sas2py/datarobot-user-models", "max_stars_repo_head_hexsha": "ab493be2db21f43d4d9a2e6e588bfe6d1f18db12", "ma...
import numpy import itertools import scipy import numpy.random import math import transforms3d class GraphData(object): def __init__(self,numDir): self.vertexCount = 0 self.V = [] self.vertexLock = False self.numDir = numDir def addVertex(self, vertex): if not self.vert...
{"hexsha": "bef57e1a4fe4338c20713af4f53025a3bc3bb228", "size": 4134, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/graphcnn/util/modelnet/GraphData.py", "max_stars_repo_name": "WDot/G3DNet", "max_stars_repo_head_hexsha": "448e2e26646219de8cbb6d7ec54b168cddab09bb", "max_stars_repo_licenses": ["MIT"], "max_s...
import matplotlib.pyplot as plt import numpy as np import plotly.graph_objs as go import plotly.offline as py from scipy.ndimage import maximum from sc.utils.plot import colorscale_from_mpl from .base import BasePlotter __all__ = ["Plotly2DPlotter"] class Plotly2DPlotter(BasePlotter): VALID_SCALINGS = "centers"...
{"hexsha": "96ab9947ee56f4f8936cc41f28c9ee549068a4eb", "size": 4455, "ext": "py", "lang": "Python", "max_stars_repo_path": "_legacy/plotters/plotly.py", "max_stars_repo_name": "StepicOrg/submissions-clustering", "max_stars_repo_head_hexsha": "d61f4cd24ff165ed9b0cdde79d9dcd1ffae47387", "max_stars_repo_licenses": ["MIT"]...
class ImageWork(): def __init__(self,satType = ''): import os self.sep = os.sep if satType == '': self.satType = 'S2R' elif satType.upper() == 'S2R': self.satType = satType.upper() elif satType.upper() == 'L8R': self.satType = satT...
{"hexsha": "319efbdaf0ad8087c0d342ee9944eb3cc1cd29fa", "size": 43601, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/main/app-resources/node_flood_extraction/water_OpticalSat_detection.py", "max_stars_repo_name": "geohazards-tep/dcs-optical-flood-tool", "max_stars_repo_head_hexsha": "8ae79e021a0f3080a9b8258...
#!/usr/bin/env python from functools import lru_cache from pydantic import BaseModel, Field, Extra from pydantic.typing import Annotated from pathlib import Path from typing import List, Any, Literal, Union, Dict, Optional import numpy as np from dash_component_template import ComponentTemplate from dash import htm...
{"hexsha": "0e1d4b8a8ab4c9e93efd9c2de49e2e8c8eea14b4", "size": 14479, "ext": "py", "lang": "Python", "max_stars_repo_path": "dasha/examples/plot_panel_example.py", "max_stars_repo_name": "toltec-astro/dasha", "max_stars_repo_head_hexsha": "d6e7a8489d6c58c77858df18d4798e10196bb3eb", "max_stars_repo_licenses": ["BSD-3-Cl...
import pandas as pd import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from sklearn.model_selection import learning_curve import plotly.graph_objects as go from sklearn.model_selection import validation_curve import matplotlib.pyplot as plt from sklearn import tree def indices_of_top_k(arr, k...
{"hexsha": "4a0f7faa7ba5d32f665a9b1a4fed05df6a693903", "size": 7181, "ext": "py", "lang": "Python", "max_stars_repo_path": "Notebooks/ml_util.py", "max_stars_repo_name": "bprasad26/modeling_earthquake_damage", "max_stars_repo_head_hexsha": "cae6ccaadb6c86ba9fd24fecb86eb1677da4224d", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma in_set_cyc_permutationss: assumes "distincts xss" shows "yss \<in> set (cyc_permutationss xss) \<longleftrightarrow> distincts yss \<and> map set xss = map set yss \<and> map hd xss = map hd yss" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (yss \<in> set (cyc_permutationss xss)) = (distincts...
{"llama_tokens": 3501, "file": "Planarity_Certificates_Planarity_Executable_Permutations", "length": 27}
import cupy as cp import numpy as np from cupy.testing import assert_array_almost_equal, assert_array_equal from cucim.skimage.measure import profile_line image = cp.arange(100).reshape((10, 10)).astype(float) def test_horizontal_rightward(): prof = profile_line(image, (0, 2), (0, 8), order=0, mode="constant") ...
{"hexsha": "46971a0591901ffb4c0aa668d4abff4095086a15", "size": 7909, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/cucim/src/cucim/skimage/measure/tests/test_profile.py", "max_stars_repo_name": "aasthajh/cucim", "max_stars_repo_head_hexsha": "a95cc5c4ab25beffeac42d642dea8cb1bbf21408", "max_stars_repo_li...
function err_fun_generate() counter::Integer = 0 fun = (x::Vector{Float64}) -> begin counter += 1 if counter > 5 throw(ErrorException("Function can be called only 5 times.")) end 5.0 + (x[1]-3.0)^2 + (x[2]-4.0)^2 end end @testset "loss error in :CICO_ONE_PASS" be...
{"hexsha": "37097e731ec84619419cfb848d4d4e15555980f5", "size": 1911, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/test_loss_error.jl", "max_stars_repo_name": "metelkin/LikelihoodProfiler.jl", "max_stars_repo_head_hexsha": "ead95214dd4a08dd69453e4c73c409cffcdb7515", "max_stars_repo_licenses": ["MIT"], "max...
function obj = createRaster(obj, varargin) % CREATERASTER Create raster from point cloud. % Input parsing ---------------------------------------------------------------- validRasterValue = {'average' 'linear' 'mask' 'plane'}; p = inputParser; p.addParameter('CellSize' , 1 , @(x) isnumeric(x) && x>0); p.a...
{"author": "pglira", "repo": "Point_cloud_tools_for_Matlab", "sha": "4768f45e7d3527c52e911eb0450c31ca19b58f72", "save_path": "github-repos/MATLAB/pglira-Point_cloud_tools_for_Matlab", "path": "github-repos/MATLAB/pglira-Point_cloud_tools_for_Matlab/Point_cloud_tools_for_Matlab-4768f45e7d3527c52e911eb0450c31ca19b58f72/c...
[STATEMENT] lemma P\<^sub>1_B\<^sub>1_lower_bound_card: assumes "bp P" "inv\<^sub>1 P\<^sub>1 P\<^sub>2 B\<^sub>1 B\<^sub>2 (S \<union> L)" "bij_exists P\<^sub>1 (\<Union>(P\<^sub>2 \<union> wrap B\<^sub>2))" shows "card (P\<^sub>1 \<union> wrap B\<^sub>1) \<le> card P" [PROOF STATE] proof (prove) goal (1 subgoal):...
{"llama_tokens": 1376, "file": "Approximation_Algorithms_Approx_BP_Hoare", "length": 16}
using Gadfly set_default_plot_size(21cm, 8cm) y = [0.46, 0.13, 0.4, 0.73, 0.43] p1 = plot(x=[0,10], y=[0,1], Geom.blank) p2 = plot() p3 = push!(plot(), layer(x=1:5, y=y, Geom.point)) hstack(p1, p2, p3)
{"hexsha": "b9be443e9319eee23f262a72f54cae608262caac", "size": 207, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/testscripts/blank.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Gadfly.jl-c91e804a-d5a3-530f-b6f0-dfbca275c004", "max_stars_repo_head_hexsha": "d180d5760c758863f24e27e2bc42d7c669f...
# coding: utf-8 import pickle,random,os,time import model as vcgan import scipy.io as sio import tensorflow as tf from utils import * def train_VAE(_model): Ilf = np.zeros((_model.batch_size, 1)) rng = np.random.RandomState(23456) Ia = _model.Ia Ib = _model.Ib _model.file.write("VAE start\n") ...
{"hexsha": "aeea5b308f6528cebfba0af83e3e31f0788f25a9", "size": 9395, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/train_vae.py", "max_stars_repo_name": "shubhMaheshwari/Automatic-Unpaired-Shape-Deformation-Transfer", "max_stars_repo_head_hexsha": "8c9afe017769f9554706bcd267b6861c4c144999", "max_stars_r...
import rospy from panda_robot import PandaArm import numpy as np # import matplotlib.pyplot as plt # from std_msgs.msg import Float64 from copy import deepcopy names = ['panda_joint1','panda_joint2','panda_joint3','panda_joint4','panda_joint5','panda_joint6','panda_joint7'] if __name__ == '__main__': rospy.init_...
{"hexsha": "72798d92a0d335d620e0c03818431053dde42f27", "size": 1336, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/controller_test.py", "max_stars_repo_name": "jr-robotics/panda_robot", "max_stars_repo_head_hexsha": "cf0ad32cde445e411cb227004107c971178988b0", "max_stars_repo_licenses": ["Apache-2.0"], "m...
# 3 layered model import numpy as np import torch as T import torch.nn as nn #import torch.nn.functional as F from torchvision import datasets, transforms from tqdm.notebook import tqdm class mnist_model(nn.Module): def __init__(self): super().__init__() self.hidden = nn.Linear(784, 500)...
{"hexsha": "e030dd26a6e1e389b7c5997873d23b932ff76b7f", "size": 1943, "ext": "py", "lang": "Python", "max_stars_repo_path": "ML Projects/training_MNIST/MLP_MNIST.py", "max_stars_repo_name": "Manas1820/Hacktoberfest2021_awesome-projects", "max_stars_repo_head_hexsha": "9a2442e5a082fbd90736ed4a2c64e7a7e5d93cb5", "max_star...