text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# Aula 5 - Regressão e Machine Learning import pandas as pd import seaborn as sns import matplotlib.pyplot as plot import math import time start = time.time() # Formatação geral para apresentar os dados com 2 casas decimais pd.options.display.float_format = '{:,.2f}'.format sns.set_style("whitegrid") # Biblioteca...
{"hexsha": "e75196acd4901dad75c51406a7d73661dc1b0fb7", "size": 10207, "ext": "py", "lang": "Python", "max_stars_repo_path": "Aula 05.py", "max_stars_repo_name": "brunoamaia94/Quarentena_Dados", "max_stars_repo_head_hexsha": "9402ec6223dc15146906f659db05eb1c0b41de97", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
section \<open>General purpose definitions and lemmas\<close> theory Misc imports Main begin text \<open>A handy abbreviation when working with maps\<close> abbreviation make_map :: "'a set \<Rightarrow> 'b \<Rightarrow> ('a \<rightharpoonup> 'b)" ("[ _ |=> _ ]") where "[ks |=> v] \<equiv> \<lambda>k. if k \<in>...
{"author": "data61", "repo": "PSL", "sha": "2a71eac0db39ad490fe4921a5ce1e4344dc43b12", "save_path": "github-repos/isabelle/data61-PSL", "path": "github-repos/isabelle/data61-PSL/PSL-2a71eac0db39ad490fe4921a5ce1e4344dc43b12/SeLFiE/Example/afp-2020-05-16/thys/GPU_Kernel_PL/Misc.thy"}
#redirect Big Blue
{"hexsha": "347676e280f3b8525c9f8d8fb5fd5ea690ca60d5", "size": 19, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "lab/davisWiki/The_Yellow_House.f", "max_stars_repo_name": "voflo/Search", "max_stars_repo_head_hexsha": "55088b2fe6a9d6c90590f090542e0c0e3c188c7d", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
[STATEMENT] lemma ereal_mult_less_0_iff: fixes a b :: ereal shows "a * b < 0 \<longleftrightarrow> (0 < a \<and> b < 0) \<or> (a < 0 \<and> 0 < b)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (a * b < 0) = (0 < a \<and> b < 0 \<or> a < 0 \<and> 0 < b) [PROOF STEP] by (cases rule: ereal2_cases[of a b]) (simp_a...
{"llama_tokens": 165, "file": null, "length": 1}
#!/usr/bin/env python """ P2sGrad: Zhang, X. et al. P2sgrad: Refined gradients for optimizing deep face models. in Proc. CVPR 9906-9914, 2019 I think the grad defined in Eq.(11) is equivalent to define a MSE loss with 0 or 1 as target: \mathcal{L}_i = \sum_{j=1}^{K} (\cos\theta_{i,j} - \delta(j == y_i))^2 The dif...
{"hexsha": "ce1ffd24a20223a913ba89c499de21f68e2a5cdc", "size": 3964, "ext": "py", "lang": "Python", "max_stars_repo_path": "core_modules/p2sgrad.py", "max_stars_repo_name": "Nijta/project-NN-Pytorch-scripts", "max_stars_repo_head_hexsha": "06a50ab072613fb60b8b8e1cea85c4aa8e75549d", "max_stars_repo_licenses": ["BSD-3-Cl...
""" Copyright (c) 2020 Intel Corporation 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 in wri...
{"hexsha": "af7ad42a85803467a0ebed57db5118e2f68d224e", "size": 12033, "ext": "py", "lang": "Python", "max_stars_repo_path": "pytorch_toolkit/text_spotting/text_spotting/models/text_recognition_heads/attention_based.py", "max_stars_repo_name": "morkovka1337/openvino_training_extensions", "max_stars_repo_head_hexsha": "8...
[STATEMENT] lemma image_eq_to_f: assumes "f1 ` S1 = f2 ` S2" obtains f where "\<And> x. x \<in> S2 \<Longrightarrow> f x \<in> S1 \<and> f1 (f x) = f2 x" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>f. (\<And>x. x \<in> S2 \<Longrightarrow> f x \<in> S1 \<and> f1 (f x) = f2 x) \<Longrightarrow> thesis)...
{"llama_tokens": 754, "file": "Incredible_Proof_Machine_Build_Incredible_Tree", "length": 7}
# Monopoly odds import numpy as np from numba import njit from collections import Counter SIDES = 4 def solve(): iterations = 1_000_000 distribution = np.array([i + j + 2 for i, j in np.ndindex(SIDES, SIDES)]) positions = np.zeros(iterations, dtype=np.uint8) rng = np.random.default_rng() rints ...
{"hexsha": "7efd09813b1513bffa845038cdffb5c966734dad", "size": 1637, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/p084.py", "max_stars_repo_name": "wephy/project-euler", "max_stars_repo_head_hexsha": "cc4824478282d3e1514a1bf7a1821b938db5bfcb", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
[STATEMENT] lemma fun_upds_append_drop [simp]: "size xs = size ys \<Longrightarrow> m(xs@zs[\<mapsto>]ys) = m(xs[\<mapsto>]ys)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. length xs = length ys \<Longrightarrow> m(xs @ zs [\<mapsto>] ys) = m(xs [\<mapsto>] ys) [PROOF STEP] proof (induct xs arbitrary: ys) [PROOF...
{"llama_tokens": 869, "file": null, "length": 6}
# Augmenting Face Image Database via Transformations (Flip, Rotate, Crop & Scale) # Jay Narhan # UserID: JN721 # # This class is designed to apply a series of image transformations to a set of images. A transformation is simply a # function. It is a function that maps the image to another version of the image. ...
{"hexsha": "073764b7600dba5d7c658a14f837a080dba7bb5a", "size": 5512, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/JN721.py", "max_stars_repo_name": "shubham07kb/facial_expressions", "max_stars_repo_head_hexsha": "f620279b6729bd8697d9d98b4208bff074bec180", "max_stars_repo_licenses": ["Apache-2.0"], "max...
import numpy as np x = np.array([-1, 1, 2.569858113, 6]) # x coordinates in space y = np.array([1, 3, 1, -2]) # f(x) print("Column 0 ") print(y) n = len(y) table = np.zeros([n, n]) # Create a square matrix to hold table table[::, 0] = y # first column is y results = {"table": [], "coefficient": [...
{"hexsha": "65fde16b02f0a099129549c54caf5e10177f03ab", "size": 1255, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python/newtonInterpolation.py", "max_stars_repo_name": "eechava6/NumericalAnalysisMethods", "max_stars_repo_head_hexsha": "3eeb06bdb20d97f13a09fd0ed71bce045173ffef", "max_stars_repo_licenses": ["M...
using StatsPlots, Distributions @testset "fa" begin Random.seed!(1234) a = rand(Uniform(0.5, 2.0), 30) b = [sort(rand(Uniform(-3, 3), 4); rev = false) for i in 1:30] θ = rand(Normal(0, 1), 3000) resp = generate_response(θ, a, b) fit1 = fa(resp; method = :em) @test all(loadings(fit1) .≤...
{"hexsha": "003fb3388d03a2e292e60fda3a2eb3cc91f352fe", "size": 1637, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/Test2_parallel.jl", "max_stars_repo_name": "takuizum/ParallelAnalysis.jl", "max_stars_repo_head_hexsha": "56609f6f0822dba101b8720f16b20ea3bfc3ad72", "max_stars_repo_licenses": ["MIT"], "max_st...
import cv2 import numpy as np img = np.zeros((512, 512, 3), np.uint8) # print(img.shape) # img[200:300, 100:300] = 255, 0, 0 # draw a line cv2.line(img, (0, 0), (300, 300), (0, 255, 0), 3) # draw a rewctangle cv2.rectangle(img, (0, 0), (250, 350), (0, 0, 255), 3) # draw a circle cv2.circle(img, (250, 250), 30, (255,...
{"hexsha": "0138baf49094f7172471cf4c98a93ff73615e21a", "size": 470, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/opencv/chapter_03.py", "max_stars_repo_name": "snandasena/udacity-dl", "max_stars_repo_head_hexsha": "7ea13ec7ebd992f1199f43bd5300782436ed71e5", "max_stars_repo_licenses": ["Apache-2.0"], "max_...
[STATEMENT] lemma almost_full_on_pp_iff: "almost_full_on (adds) A \<longleftrightarrow> almost_full_on (adds) (mapping_of ` A)" (is "?l \<longleftrightarrow> ?r") [PROOF STATE] proof (prove) goal (1 subgoal): 1. almost_full_on (adds) A = almost_full_on (adds) (pp.mapping_of ` A) [PROOF STEP] proof [PROOF STATE] proo...
{"llama_tokens": 1583, "file": "Polynomials_PP_Type", "length": 18}
[STATEMENT] lemma partitionI: \<^marker>\<open>contributor \<open>Paulo Em?lio de Vilhena\<close>\<close> fixes A :: "'a set" and B :: "('a set) set" assumes "\<Union>B = A" and "\<And>b1 b2. \<lbrakk> b1 \<in> B; b2 \<in> B \<rbrakk> \<Longrightarrow> b1 \<inter> b2 \<noteq> {} \<Longrightarrow> b1 = b2" sho...
{"llama_tokens": 1753, "file": null, "length": 18}
#include <boost/numeric/odeint/external/mpi/mpi_nested_algebra.hpp>
{"hexsha": "71be267b9324b5b7c70074cced878ead74d29bf3", "size": 68, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_numeric_odeint_external_mpi_mpi_nested_algebra.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_...
import os import streamlit as st import streamlit.components.v1 as components import time from video import getvideo from modelDownloader import downloader import cv2 import numpy as np # import matplotlib.pyplot as plt from PIL import Image import tempfile import requests from pathlib import Path def detect_objects(...
{"hexsha": "841d164d52dbbc07a38c19c6bff9eb6b8a1f0546", "size": 16108, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/app.py", "max_stars_repo_name": "Kaushal000/Streamlit-coronavirus-detection-app", "max_stars_repo_head_hexsha": "3f6c646c4e7a268f27f2cb6b7d8d02d002e8679a", "max_stars_repo_licenses": ["MIT"],...
from torch.utils import data import json from PIL import Image import os import cv2 import numpy as np class DataLoader(data.Dataset): def __init__(self, data_list, transform=None): with open(os.path.abspath(data_list)) as json_file: data = json.load(json_file) self.data = data ...
{"hexsha": "c9580a1d58328dc4d998d23f3431adb89dfe65cc", "size": 792, "ext": "py", "lang": "Python", "max_stars_repo_path": "classification/data_loader.py", "max_stars_repo_name": "hrlblab/Glo-In-One", "max_stars_repo_head_hexsha": "7daef49c557bccd6f5c956b88603357346dc78a2", "max_stars_repo_licenses": ["Apache-2.0"], "ma...
#!/usr/bin/python # -*- coding: utf-8 -*- # Basic ROS import rospy # ROS messages from visualization_msgs.msg import Marker from sensor_msgs.msg import LaserScan # Maths import numpy as np # Custom libraries from splitandmerge import splitandmerge from probabilistic_lib.functions import publish_lines #============...
{"hexsha": "322264a06588b4d24fff91a396d9315ce1b2c7f7", "size": 2237, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/split_and_merge/src/splitandmergenode.py", "max_stars_repo_name": "karanchawla/ROS", "max_stars_repo_head_hexsha": "e005b8b488bcf493a6dd283d3179db597bfcb09d", "max_stars_repo_licenses": ["MIT"...
#!/usr/bin/env python # coding: utf-8 import sys import os import time import json import numpy as np import pandas as pd import dill import random from os.path import join, dirname, abspath, pardir, basename from sklearn.pipeline import FeatureUnion, Pipeline from sklearn.ensemble import RandomForestClassifier from...
{"hexsha": "2547f520d972a5e26b0883d47d8f358df054b76e", "size": 8380, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/doh_data_classifier/classifier_rfc.py", "max_stars_repo_name": "yshao321/doh_website_fingerprinting", "max_stars_repo_head_hexsha": "2c44940f80ba6503075735302a1d8cd421571ada", "max_stars_repo...
[STATEMENT] lemma arctan_bounds: assumes "0 \<le> x" "x < 1" shows arctan_lower_bound: "(\<Sum>k<2 * n. (- 1) ^ k * (1 / real (k * 2 + 1) * x ^ (k * 2 + 1))) \<le> arctan x" (is "(\<Sum>k<_. (- 1)^ k * ?a k) \<le> _") and arctan_upper_bound: "arctan x \<le> (\<Sum>k<2 * n + 1. (- 1) ^ k * (1 / real ...
{"llama_tokens": 2635, "file": null, "length": 15}
# This file is part of IntegerTriangles. # Copyright Peter Luschny. License is MIT. # Version of: UTC 2021-05-22 22:01:34 # 8228b27e-bb38-11eb-3e8e-73d8fe660356 # Do not edit this file, it is generated from the modules and will be overwritten! # Edit the modules in the src directory and build this file with BuildTria...
{"hexsha": "a1c06463d72a8c54f421c2b4d2586a979d88337b", "size": 2372, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/perftests.jl", "max_stars_repo_name": "OpenLibMathSeq/IntegerTriangles.jl", "max_stars_repo_head_hexsha": "15cc716086e8d59309b30869f6a4ed59be2dc068", "max_stars_repo_licenses": ["MIT"], "max_s...
from scipy.spatial.distance import pdist, squareform from numpy.random import np from numpy import concatenate import heapq # Solves a facility location problem using the algorithm from Jain et al. "Greedy Facility Location Algorithms Analyzed # using Dual Fitting with Factor-Revealing LP". A facility location algori...
{"hexsha": "189672695fc9b1e5493b5bbb1adb82f628b378a1", "size": 19977, "ext": "py", "lang": "Python", "max_stars_repo_path": "crowdsourcing/util/facility_location.py", "max_stars_repo_name": "sbranson/online_crowdsourcing", "max_stars_repo_head_hexsha": "d1f7c814bb60aae9cf5e76e0b299713246f98ce3", "max_stars_repo_license...
%---------------------------Shape----------------------------- \section{Edge Ratio\label{s:hex-edge-ratio}} The edge ratio quality metric is the ratio of the longest to shortest edge of a hexahedron: \[ q = \frac{L_{\max}}{L_{\min}}. \] \hexmetrictable{edge ratio}% {$1$}% Dimens...
{"hexsha": "481350b32b9755dc940aa579a9a5af0786d9e925", "size": 677, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Utilities/verdict/docs/VerdictUserManual2007/HexEdgeRatio.tex", "max_stars_repo_name": "Lin1225/vtk_v5.10.0", "max_stars_repo_head_hexsha": "b54ac74f4716572862365fbff28cd0ecb8d08c3d", "max_stars_repo...
! ------------------------------------------------------------------------------ ! ! Main Program mtclim ! ! author: Johannes Brenner ! ! created: 03.08.2016 ! last update: 30.05.2017 ! ! ------------------------------------------------------------------------------ ! program main ! use mo_kind, only: i4, dp use m...
{"hexsha": "8d488e4b065f4d1f1602834ec3f7cb1eb149644f", "size": 8504, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "test/test_mo_mtclim/main.f90", "max_stars_repo_name": "mcuntz/jams_fortran", "max_stars_repo_head_hexsha": "a1dcab78eda21f930aa6c8c3633598a522f01659", "max_stars_repo_licenses": ["MIT"], "max_st...
using OpenQuantumBase, Test import LinearAlgebra: Diagonal funcs = [(x) -> x, (x) -> 1 - x] test_diag_operator = OpenQuantumBase.DiagonalOperator(funcs) @test test_diag_operator(0.5) == OpenQuantumBase.Diagonal([0.5, 0.5]) test_geometric_operator = OpenQuantumBase.GeometricOperator(((x) -> -1.0im * x)) @test test_geo...
{"hexsha": "5b55dc303877f855568925ada599c1cb16293862", "size": 1517, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/hamiltonian/adiabatic_frame_hamiltonian.jl", "max_stars_repo_name": "neversakura/QTBase.jl", "max_stars_repo_head_hexsha": "937a3236f1b9578bc223b21817dec2e7a8512ee2", "max_stars_repo_licenses"...
# This file was generated by the Julia Swagger Code Generator # Do not modify this file directly. Modify the swagger specification instead. mutable struct IoK8sApimachineryPkgApisMetaV1ObjectMeta <: SwaggerModel annotations::Any # spec type: Union{ Nothing, Dict{String, String} } # spec name: annotations clu...
{"hexsha": "282c8d9f00f8759a67032368511a74b14883fa1b", "size": 7639, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/api/model_IoK8sApimachineryPkgApisMetaV1ObjectMeta.jl", "max_stars_repo_name": "UnofficialJuliaMirrorSnapshots/Kuber.jl-87e52247-8a1b-5e01-9430-8fbcac83a23a", "max_stars_repo_head_hexsha": "dd6...
import numpy as np from classification_model.config import core from classification_model.processing import preprocessors as pp def test_FeatureKeeper(pipeline_inputs): """Testing FeatureKeeper function""" # Given feature_keeper = pp.FeatureKeeper( variables_to_keep=core.config.model_config.VARIA...
{"hexsha": "517aa659f0b5f70e91210f192f7281a3944e0616", "size": 2822, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_processing/test_preprocessors.py", "max_stars_repo_name": "Windact/classification_model", "max_stars_repo_head_hexsha": "e42e8099069467eeb21f94f6777eb34e68906500", "max_stars_repo_licen...
import pygame, sys import numpy as np import subprocess import time import json WIDTH = 600 HEIGHT = 600+100 LINE_WIDTH = 15 WIN_LINE_WIDTH = 15 BOARD_ROWS = 3 BOARD_COLS = 3 SQUARE_SIZE = 200 CIRCLE_RADIUS = 60 CIRCLE_WIDTH = 15 CROSS_WIDTH = 25 SPACE = 55 RED = (255, 0, 0) BG_COLOR = (20, 200, 160) LINE_COLOR = (23...
{"hexsha": "e42cd4be592a6c62e4d5fb6fd0bfe7a32692c2af", "size": 7661, "ext": "py", "lang": "Python", "max_stars_repo_path": "gui/game.py", "max_stars_repo_name": "guiltygyoza/tictactoe-on-starknet", "max_stars_repo_head_hexsha": "9ff31e7813e0686fc509cb8471803f70b539d6f2", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from sklearn import linear_model from stable_baselines.common.vec_env.vec_video_recorder import VecVideoRecorder from stable_baselines.low_dim_analysis.eval_util import get_full_param_traj_file_path, get_aug_plot_dir, get_full_params_dir, get_save_dir import minepy from matplotlib import pyplot as plt import numpy ...
{"hexsha": "77fd6ade5dad5cfaf49bd297cbad2fa04022169f", "size": 19412, "ext": "py", "lang": "Python", "max_stars_repo_path": "new_neuron_analysis/visualize_augment_policy.py", "max_stars_repo_name": "hugerepo-tianhang/low_dim_update_stable", "max_stars_repo_head_hexsha": "565f6cbf886d266d0633bc112ccae28f1d116ee1", "max_...
import torch import torch.nn as nn import torch.nn.parallel from torch.autograd import Variable import torch.nn.functional as F from torchvision import models import torch.utils.model_zoo as model_zoo from torch.nn import init import os import numpy as np def weights_init_normal(m): classname = m.__class__.__na...
{"hexsha": "8a1dae863d7924b8a818052fe998ef9263921fbd", "size": 26686, "ext": "py", "lang": "Python", "max_stars_repo_path": "Tencent/Video_Generation/MakeItTalk/src/models/model_image_translation.py", "max_stars_repo_name": "orange-eng/internship", "max_stars_repo_head_hexsha": "c8c566df453d3a4bdf692338f74916ae15792fa1...
# Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import time from dataclasses import dataclass from enum import Enum from typing import List, Optional, Union import magnum as mn import numpy a...
{"hexsha": "e9ac508a47940cfc90069782327d8453e0335f2b", "size": 12500, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/fairmotion_interface_utils.py", "max_stars_repo_name": "narekvslife/habitat-sim", "max_stars_repo_head_hexsha": "69ae4848503d5dcc74d6b5920957c1a641ef0a9b", "max_stars_repo_licenses": ["M...
program crystal2d nk !c use ieee_arithmetic ! implicit double precision (a-h,o-z) dp !*********************************************************************** ! ...
{"hexsha": "18620ff7fea2f7fa5e94ed46ef990c2d7e141d2a", "size": 9640, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "src/crystal2d.f", "max_stars_repo_name": "imohame/LabCode", "max_stars_repo_head_hexsha": "b7fca6e58f6c26917ff4a8862ab473da282d027d", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
"""Cross-validated training and prediction.""" import numpy as np import pandas as pd from sklearn.base import BaseEstimator, ClassifierMixin, clone class CVModel(BaseEstimator, ClassifierMixin): def __init__(self, base_estimator=None): self.base_estimator = base_estimator def fit(self, X_train, y_tr...
{"hexsha": "b4c3207a5e0c3591a483e6408b4aed5f8ab28c39", "size": 7080, "ext": "py", "lang": "Python", "max_stars_repo_path": "ml_insights/CVModel.py", "max_stars_repo_name": "JustinKurland/introspective", "max_stars_repo_head_hexsha": "3626c5a176c70fb6d09071307949032b5ff4f0e5", "max_stars_repo_licenses": ["MIT"], "max_st...
""" Script for performing a fit to a histogramm of recorded time differences for the use with QNet """ import scipy.optimize as optimize import numpy import pylab import sys #import optimalbins def main(bincontent=None,binning = (0,10,21), fitrange = None): def decay(p,x): return p[0]*numpy.exp(-x/p[1]...
{"hexsha": "5767384faba457308d0537d25d0cef4345e3b74e", "size": 8464, "ext": "py", "lang": "Python", "max_stars_repo_path": "muonic/analysis/fit.py", "max_stars_repo_name": "LambdaDigamma/muonic", "max_stars_repo_head_hexsha": "cc242582168101f1ab444ffdc915f8a007078bc4", "max_stars_repo_licenses": ["Naumen", "Condor-1.1"...
import kbmod import numpy import re import pdb # layered image functions def science_to_numpy(self, copy_data=False): if copy_data == None: copy_data = False return numpy.array( self.get_science(), copy=copy_data ) def mask_to_numpy(self, copy_data=False): if copy_data == None: copy_data = False...
{"hexsha": "c313b1632d20734ccc854cd626d695878629d1f7", "size": 5629, "ext": "py", "lang": "Python", "max_stars_repo_path": "search/pybinds/kbmodpy.py", "max_stars_repo_name": "fraserw/kbmod", "max_stars_repo_head_hexsha": "65d69746d1dd8de867f8da147d73c09439d28b41", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_star...
import itertools import numpy as np from arqtic.program import Program, Gate from arqtic.exceptions import Error import scipy from sklearn.linear_model import Lasso, LinearRegression import qiskit as qk from qiskit.aqua.operators.primitive_ops import MatrixOp from qiskit import Aer, execute import scipy.linalg as la #...
{"hexsha": "0a1bcc9a98536623f6039d6bb90ec3c040427cfc", "size": 19547, "ext": "py", "lang": "Python", "max_stars_repo_path": "arqtic/qite.py", "max_stars_repo_name": "lebassman/ArQTiC", "max_stars_repo_head_hexsha": "23d9877dfb0a8c5c10da2865abaf9ca830298199", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], "max_stars_...
import numpy as np def calculate_exploration_prob(loss_history, act_explor_prob,threshold): mean = np.mean(loss_history) variance = 0 for i in loss_history: variance += np.square(i-mean) if threshold >= variance: act_explor_prob += 0.05 else: act_explor_prob -= 0.05 i...
{"hexsha": "a654046012f0a0be8b5fe2ef5b6e639fae49832b", "size": 450, "ext": "py", "lang": "Python", "max_stars_repo_path": "Zadanie3/srcV2/Misc.py", "max_stars_repo_name": "letv3/NSIETE", "max_stars_repo_head_hexsha": "3e65c66ddb14cf11b4757bdc8a70d5438785dec2", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_cou...
[STATEMENT] theorem cptn_iff_cptn_mod: "(c \<in> cptn) = (c \<in> cptn_mod)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (c \<in> cptn) = (c \<in> cptn_mod) [PROOF STEP] apply(rule iffI) [PROOF STATE] proof (prove) goal (2 subgoals): 1. c \<in> cptn \<Longrightarrow> c \<in> cptn_mod 2. c \<in> cptn_mod \<Longr...
{"llama_tokens": 293, "file": null, "length": 4}
import numpy as np for train_set in ['train_yyn', 'train_ynn']: all_res = [] for nlayer in [1, 2, 3]: for eunits in [50, 60, 70, 80, 90]: average_list = [] for random_seed in [1, 3, 5, 7, 9]: exp_dir = 'exp/%s_pytorch_train_delta_%d_%d_%d' % (train_set, ...
{"hexsha": "001a14568ca601c274e0a46bb8544a5308d3bce9", "size": 858, "ext": "py", "lang": "Python", "max_stars_repo_path": "egs/modified_yesno/asr_mfcc_char_ns/local/average_random_seed.py", "max_stars_repo_name": "ZhaoZeyu1995/espnet", "max_stars_repo_head_hexsha": "350e97da275e35a9495da8ee2f53d19f93f50241", "max_stars...
# Importing Required Libraries from scipy.spatial import distance as dist from imutils import perspective from imutils import contours import numpy as np import argparse import imutils import cv2 import matplotlib.pyplot as plt # helper function to find midpoint between two points def midpoint(ptA, ptB): return ((...
{"hexsha": "4d47db0f7e9b964e3996e9259c7351a1f78e95af", "size": 3562, "ext": "py", "lang": "Python", "max_stars_repo_path": "Baggage Fitment Index/final.py", "max_stars_repo_name": "sahilrider/Machine-Vision-Challenge", "max_stars_repo_head_hexsha": "d930a1dad0de05643a1245c3c243fb03a268ba4b", "max_stars_repo_licenses": ...
[STATEMENT] lemma parCases'[consumes 5, case_names cPar1 cPar2 cComm1 cComm2]: fixes \<Psi> :: 'b and P :: "('a, 'b, 'c) psi" and Q :: "('a, 'b, 'c) psi" and \<alpha> :: "'a action" and T :: "('a, 'b, 'c) psi" and C :: "'d::fs_name" assumes Trans: "\<Psi> \<rhd> P \<parallel> ...
{"llama_tokens": 6351, "file": "Psi_Calculi_Tau", "length": 27}
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. from nn_meter.utils.utils import try_import_onnx import networkx as nx from .utils import get_tensor_shape from .constants import SLICE_TYPE from itertools import chain import logging class OnnxConverter: def __init__(self, model): o...
{"hexsha": "d4d214f9065299fae8d0877722c3a467dd181c16", "size": 5134, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn_meter/ir_converters/onnx_converter/converter.py", "max_stars_repo_name": "kaleid-liner/nn-Meter", "max_stars_repo_head_hexsha": "526f8ddeeb33816a0b2b7f97964683e0510cd85d", "max_stars_repo_licen...
import numpy as np #import nengolib from nengo_ssp.spatial_semantic_pointer import SpatialSemanticPointer from nengo_ssp.hrr_algebra import HrrAlgebra def PlaneWaveBasis(K): # Create the bases vectors X,Y as described in the paper with the wavevectors # (k_i = (u_i,v_i)) given in a matrix K. To get hexganal p...
{"hexsha": "89e2827ee3ea1adee47c56141def5bd19967ad6c", "size": 7364, "ext": "py", "lang": "Python", "max_stars_repo_path": "nengo_ssp/vector_generation.py", "max_stars_repo_name": "nsdumont/nengo_ssp", "max_stars_repo_head_hexsha": "9530a4618e213fb695b52887772c1309d0f07a0b", "max_stars_repo_licenses": ["MIT"], "max_sta...
// Implementation of all debugging command handlers. #include <iostream> #include <map> #include <unordered_map> #include <string> #include <vector> #include <boost/graph/breadth_first_search.hpp> #include <boost/tokenizer.hpp> #include "typedefs.h" #include "debugger_commands.h" #include "debugger_graph.h" #include...
{"hexsha": "9852767131d2cd6e10298404db863bdb8afa2735", "size": 11949, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "common/debugger_commands.cpp", "max_stars_repo_name": "nitish2112/ALADDIN", "max_stars_repo_head_hexsha": "2cef8aa854f25483f9f50a8a07d185b56c53e150", "max_stars_repo_licenses": ["BSD-3-Clause"], "m...
/* * Copyright 2011 Matthias Fuchs * * 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": "bf98c498d6fa946652d3af7c000e090b785dc24e", "size": 1883, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "python/stromx/runtime/XmlReader.cpp", "max_stars_repo_name": "roteroktober/stromx", "max_stars_repo_head_hexsha": "e081a35114f68a77e99a4761946b8b8c64eb591a", "max_stars_repo_licenses": ["Apache-2.0"...
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /* * File: RpcServerModule.cpp * Author: ubuntu * * Created on January 20, 2018, 2:46 PM */ #include <boost/beast.hpp> #incl...
{"hexsha": "2a9ef07e9cfdefc8041cfa09027a8e4f96644281", "size": 960, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/modules/rpc_server/RpcServerModule.cpp", "max_stars_repo_name": "burntjam/keto", "max_stars_repo_head_hexsha": "dbe32916a3bbc92fa0bbcb97d9de493d7ed63fd8", "max_stars_repo_licenses": ["MIT"], "max...
using MedicalImagingUtils using Documenter DocMeta.setdocmeta!(MedicalImagingUtils, :DocTestSetup, :(using MedicalImagingUtils); recursive=true) makedocs(; modules=[MedicalImagingUtils], authors="Dale <djblack@uci.edu> and contributors", repo="https://github.com/Dale-Black/MedicalImagingUtils.jl/blob/{com...
{"hexsha": "8d0ad85d9d84c00df3fffee28c73f96a3fc09d40", "size": 691, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/make.jl", "max_stars_repo_name": "Dale-Black/MedicalImagingUtils.jl", "max_stars_repo_head_hexsha": "3e58d48fd93c7608f8a557139bd902a96137b974", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
#!/usr/bin/env python # Copyright 2014-2018 The PySCF Developers. 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 # # U...
{"hexsha": "0ee8634fb2ddf829f231dc38f931da6f63b5af01", "size": 28209, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyscf/lib/gto/test/test_ecp.py", "max_stars_repo_name": "mfkasim1/pyscf", "max_stars_repo_head_hexsha": "7be5e015b2b40181755c71d888449db936604660", "max_stars_repo_licenses": ["Apache-2.0"], "max...
! { dg-do compile } ! ! PR 42188: [OOP] F03:C612. The leftmost part-name shall be the name of a data object ! ! Contributed by Janus Weil <janus@gcc.gnu.org> module grid_module implicit none type grid contains procedure :: new_grid procedure :: new_int end type contains subroutine new_grid(this) class(gr...
{"hexsha": "51f5b8634945d3ea36da08db7777f9a9827d0af3", "size": 921, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/derived_result_2.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo...
from sklearn.svm import LinearSVR from sklearn.linear_model import SGDRegressor from sklearn.linear_model import LinearRegression from sklearn.pipeline import make_pipeline from sklearn.preprocessing import StandardScaler from sklearn.datasets import make_regression from sklearn.model_selection import train_test_...
{"hexsha": "844a059771536f1bdead9e1a1dcd9d080ba67b15", "size": 916, "ext": "py", "lang": "Python", "max_stars_repo_path": "nn2.py", "max_stars_repo_name": "WayneFerrao/autofocus", "max_stars_repo_head_hexsha": "80a5d2366639177dbd16708a79b88df17528054c", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "max_sta...
\setchapterpreamble[u]{\margintoc} \chapter{Energy Systems} \labch{tut1} After completing this session successfully, you should be able \begin{itemize} \item to understand what an energy system is, \item to know about issues connected with current energy systems, and \item to explain the necessity of energy system t...
{"hexsha": "e8fdd6944784a2336e51aa96ad843806c6207127", "size": 7357, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "handbook/chapters/session_1.tex", "max_stars_repo_name": "lhofbauer/outreach_course", "max_stars_repo_head_hexsha": "2c15f6e33103f3a06be2e1228cc43ac2547632ef", "max_stars_repo_licenses": ["CC-BY-4.0...
# -*- coding: utf-8 -*- import numpy as np import pycuda.autoinit # noqa import pycuda.driver as cuda class _CalibratorBuffer: def __init__(self, bindings, batch_size): self.bindings = bindings self.allocations = {} for binding in self.bindings.values(): elem_size = binding....
{"hexsha": "005f7f255a02dc68f96e22301a5020a1c29e723f", "size": 2803, "ext": "py", "lang": "Python", "max_stars_repo_path": "turret/int8/int8_calibrator.py", "max_stars_repo_name": "hemantranvir/turret", "max_stars_repo_head_hexsha": "bc3df21541ce2f808c749c985db47a210149f22c", "max_stars_repo_licenses": ["MIT"], "max_st...
import ITlib import numpy import matplotlib.pyplot as plt print "\nExample 2" print "Entropy example for a binary source\n" step = 0.001 p1 = numpy.arange(0,1+step,step) # p1 defined in the [0,1] range p2 = 1 - p1 # p2 = 1 - p1 H = numpy.zeros...
{"hexsha": "b1c68e1078b2f77e8a79653434e0a75d65f76f85", "size": 703, "ext": "py", "lang": "Python", "max_stars_repo_path": "example2.py", "max_stars_repo_name": "tyiannak/inf_teiste_info_theory_lab", "max_stars_repo_head_hexsha": "94ac5469d850472e492afdc36785e3590760660d", "max_stars_repo_licenses": ["Apache-2.0"], "max...
\documentclass[a4paper,12pt]{article} % Margins \usepackage{a4wide} % Write english \usepackage[english]{babel} % Used for images \usepackage{graphicx} % Used to show eps on Windows \usepackage{epstopdf} \usepackage{float} % Text encoding % Needed to use headers \usepackage{fancyhdr} \usepackage{hyperref} % Used for t...
{"hexsha": "acd01daf36e9073d17c7c95bde3fa9b8400931f2", "size": 32904, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "AMMA/ProgressReport.tex", "max_stars_repo_name": "FlashYoshi/UGentProjects", "max_stars_repo_head_hexsha": "5561ce3bb73d5bc5bf31bcda2be7e038514c7072", "max_stars_repo_licenses": ["MIT"], "max_stars...
import time import mrcfile import argparse import numpy as np import multiprocessing from scipy import ndimage as ndi from scipy.stats import wasserstein_distance from skimage import transform, measure from multiprocessing import cpu_count as mul_cpu_count SHIFT = ['Euclidean', 'L1', 'cosine'] # Metrics requiring rea...
{"hexsha": "772d7cb94fa360435db10493fd8f932528f54028", "size": 11355, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/slicem.py", "max_stars_repo_name": "marcottelab/2D_projection_clustering", "max_stars_repo_head_hexsha": "35431b16af7d1ca9d0647aa5d0bcff62243dbcdc", "max_stars_repo_licenses": ["MIT"], "max_s...
import numpy as np import HEngine def OnUpdateRuntime(transformComponent, ts): transformComponent.SetTranslation(transformComponent.GetTranslation().x + ts.GetSeconds(), transformComponent.GetTranslation().y, transformComponent.GetTranslation().z) return transformComponent; def OnUpdateEditor(transformCompone...
{"hexsha": "541fb899d81bf88f5676ab0790175487d2de51ba", "size": 373, "ext": "py", "lang": "Python", "max_stars_repo_path": "Engine/Source/Scripts/MoveRight.py", "max_stars_repo_name": "hebohang/HEngine", "max_stars_repo_head_hexsha": "82f40797a7cfabaa11aeeb7797fba70551d18017", "max_stars_repo_licenses": ["MIT"], "max_st...
# Copyright 2020 Forschungszentrum Jülich # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
{"hexsha": "f31ebfeb75233f679de37ac4c1ea153e2d80efc8", "size": 8866, "ext": "py", "lang": "Python", "max_stars_repo_path": "webjugex/util.py", "max_stars_repo_name": "FZJ-INM1-BDA/PyJuGEx", "max_stars_repo_head_hexsha": "6cb82679a3a25512f7faa388df98445d46e9471a", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_co...
[GOAL] ι : Type u_1 R : Type u_2 S : Type u_3 M : ι → Type u_4 N : Type u_5 dec_ι : DecidableEq ι inst✝⁷ : Semiring R inst✝⁶ : (i : ι) → AddCommMonoid (M i) inst✝⁵ : (i : ι) → Module R (M i) inst✝⁴ : AddCommMonoid N inst✝³ : Module R N inst✝² : Semiring S inst✝¹ : Module S N inst✝ : SMulCommClass R S N F : (i : ι) → M ...
{"mathlib_filename": "Mathlib.LinearAlgebra.DFinsupp", "llama_tokens": 90178}
import matplotlib.pyplot as plt from pyexocross.exomol import ExomolDef from pyexocross import ExocrossRunner import numpy as np path_to_exocross = '/Users/ahmed/Documents/repos/exocross/xcross.exe' path_to_linelist = '/Users/ahmed/Documents/Linelists/H2O/' path_to_def_file = '/Users/ahmed/Documents/Linelists/H2O/1H2...
{"hexsha": "e496f82d128ebab7193ad055146593959948886d", "size": 1618, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/example_run.py", "max_stars_repo_name": "ucl-exoplanets/pyexocross", "max_stars_repo_head_hexsha": "703341cd0fddafcbb04e935c89ddc9d02dda9f59", "max_stars_repo_licenses": ["BSD-3-Clause"],...
from __future__ import absolute_import, division, print_function import numpy as np from numpy.testing import (assert_allclose, assert_equal, assert_almost_equal, assert_raises) from scipy.spatial import procrustes class TestProcrustes(object): def setup_method(self): """creat...
{"hexsha": "2903a0b68b33773f95d9cd90df2bb75db2224967", "size": 5049, "ext": "py", "lang": "Python", "max_stars_repo_path": "scipy/spatial/tests/test__procrustes.py", "max_stars_repo_name": "rostyboost/scipy", "max_stars_repo_head_hexsha": "2f5aa264724099c03772ed784e7a947d2bea8398", "max_stars_repo_licenses": ["BSD-3-Cl...
# -*- coding: utf-8 -*- # import numpy as np # from numpy import testing # # from sktime.contrib.interval_based._cif import CanonicalIntervalForest # from sktime.datasets import load_gunpoint, load_italy_power_demand # # # def test_cif_on_gunpoint(): # # load gunpoint data # X_train, y_train = load_gunpoint(spl...
{"hexsha": "1d25e22b4bebae4595fa73b321318c5c90515f12", "size": 2717, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/contrib/interval_based/test_cif.py", "max_stars_repo_name": "bmurdata/sktime", "max_stars_repo_head_hexsha": "fb079e76e3f3dfbb849fb805e53f09adec6cdf79", "max_stars_repo_licenses": ["BSD-3-C...
<a href="https://colab.research.google.com/github/john-s-butler-dit/Numerical-Analysis-Python/blob/master/Chapter%2009%20-%20Elliptic%20Equations/902_Poisson%20Equation-Zero%20Boundary%20Conditions.ipynb" target="_parent"></a> # Finite Difference Methods for the Poisson Equation with Zero Boundary This notebook will f...
{"hexsha": "7024f9f33fe98e64988f7443c1a7eff56a41ce09", "size": 264356, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "Chapter 09 - Elliptic Equations/902_Poisson Equation-Zero Boundary Conditions.ipynb", "max_stars_repo_name": "jjcrofts77/Numerical-Analysis-Python", "max_stars_repo_head_hexsha": "9...
from unittest import TestCase import numpy as np import nucleoatac.NucleosomeCalling as Nuc import pyatac.VMat as V from pyatac.chunkmat2d import BiasMat2D from pyatac.chunk import ChunkList from pyatac.bias import InsertionBiasTrack class Test_variance(TestCase): """class for testing variance calculation on back...
{"hexsha": "e633004fb704ae3c5d9deac20f9dd45f4a61e6ee", "size": 1764, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_var.py", "max_stars_repo_name": "oaxiom/NucleoATAC", "max_stars_repo_head_hexsha": "e1ec144df924ab48f5f6fe65c52e4ec40d5a89f8", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 101...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 3 11:53:06 2021 @author: ghiggi """ import pandas as pd import numpy as np def _define_event_id(timesteps, maximum_interval_without_timesteps): # Check type validity if not isinstance(timesteps, (list, pd.Series,np.ndarray)): ra...
{"hexsha": "58c57c6628484b1b963b783e8ae92e7a260d5915", "size": 2537, "ext": "py", "lang": "Python", "max_stars_repo_path": "mascdb/utils_event.py", "max_stars_repo_name": "ltelab/pymascdb", "max_stars_repo_head_hexsha": "d4ff0888aefcfa84a551459c61b0a93ab7d61622", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
import numpy as np from car.Car import Car # Create a 2D world of 0's height = 4 width = 6 world = np.zeros((height, width)) # Define the initial car state initial_position = [0, 0] # [y, x] (top-left corner) velocity = [0, 1] # [vy, vx] (moving to the right) cara = Car(initial_position,velocity,world) cara.move()...
{"hexsha": "38c9b5a06f15e93d47ae182e46b7611a13c4bf38", "size": 503, "ext": "py", "lang": "Python", "max_stars_repo_path": "self-driving/Matrix/move.py", "max_stars_repo_name": "xta0/Python-Playground", "max_stars_repo_head_hexsha": "513ebd2ad7f0a8c69f2f04b4f7524b31e76fa5bc", "max_stars_repo_licenses": ["MIT"], "max_sta...
import numpy as np from common.prioritized import PrioritizedExperienceReplay class ReplayMemory(object): def __init__(self, n_buffer,len_state,len_action): # Parameters self.n_buffer = n_buffer self.len_state = len_state self.len_action = len_action self.n_expe...
{"hexsha": "d72479d0e051c4a22354d598e1cbb9a5f7561db5", "size": 1907, "ext": "py", "lang": "Python", "max_stars_repo_path": "ReinforcementLearning/ExperienceReplay.py", "max_stars_repo_name": "Suryavf/SelfDrivingCar", "max_stars_repo_head_hexsha": "362ac830516366b1c31ef01ea0456eb99f0d9722", "max_stars_repo_licenses": ["...
# """ # Runs libEnsemble on the 6-hump camel problem. Documented here: # https://www.sfu.ca/~ssurjano/camel6.html # # Execute via the following command: # mpiexec -np 4 python3 test_6-hump_camel_uniform_sampling.py # The number of concurrent evaluations of the objective function will be 4-1=3. # """ from __futur...
{"hexsha": "c4d164d61d1e68fbf3646ee21d28e4a71c382f5d", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "libensemble/tests/regression_tests/test_6-hump_camel_uniform_sampling.py", "max_stars_repo_name": "Kardyne/libensemble", "max_stars_repo_head_hexsha": "566c8f5daafe2ad4deebc13198a1e131e4ce6542", "...
#ifndef __COMMON_H__ #define __COMMON_H__ #include <array> #include <assert.h> #include "otype.hpp" // define random seed #define SEED 2333333 // define stencil type #define STENCIL_STAR 0 #define STENCIL_BOX 1 // define boundary type #define BOUND_OPEN 0 #define BOUNDARY_OPEN 0 #define BOUND_PERIODIC 1 #define BO...
{"hexsha": "f4fc322f99650dd6b33b76920352a1d5e1efb60e", "size": 2494, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "common.hpp", "max_stars_repo_name": "hxmhuang/OpenArray_Dev", "max_stars_repo_head_hexsha": "863866a6b7accf21fa253567b0e66143c7506cdf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3.0, "m...
import numpy as np import matplotlib.pyplot as plt from pprint import pprint def to_pt(l): # return tuple(map(float, l.split(" - ")[0].replace("(", "").split(","))) return l.split(" - ")[0].replace("(", "").split(",") with open("/home/slam_data/data_sets/pcl_plane_pts.txt", "r") as conn: pts1 = conn.read...
{"hexsha": "6c1ead886d2fe69bbfc3956c17c72469d136bd92", "size": 1855, "ext": "py", "lang": "Python", "max_stars_repo_path": "temp3.py", "max_stars_repo_name": "BOpermanis/pyORBSLAM2", "max_stars_repo_head_hexsha": "ff7c303bc6d2023fc3c22090e6af048072cce90b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
[STATEMENT] lemma Qp_pow_ConsI: assumes "t \<in> carrier Q\<^sub>p" assumes "x \<in> carrier (Q\<^sub>p\<^bsup>m\<^esup>)" shows "t#x \<in> carrier (Q\<^sub>p\<^bsup>Suc m\<^esup>)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. t # x \<in> carrier (Q\<^sub>p\<^bsup>Suc m\<^esup>) [PROOF STEP] using assms cart...
{"llama_tokens": 355, "file": "Padic_Field_Padic_Semialgebraic_Function_Ring", "length": 2}
import operator import os import re from collections import OrderedDict from typing import List import numpy as np from sortedcollections import OrderedSet from EXIFnaming.helpers import constants as c, settings from EXIFnaming.helpers.decode import read_exiftag from EXIFnaming.helpers.program_dir import log from EXI...
{"hexsha": "3b07a7f67ad452d41b2d743c2c4d264e2e08cc54", "size": 19501, "ext": "py", "lang": "Python", "max_stars_repo_path": "EXIFnaming/helpers/tag_conversion.py", "max_stars_repo_name": "mvolkert/EXIFnaming", "max_stars_repo_head_hexsha": "2cd7aa03cec8e05e046ccc84c523d560ccc3b8c0", "max_stars_repo_licenses": ["MIT"], ...
#ifndef LIB_INCLUDE_TICK_ARRAY_VECTOR_OPERATIONS_H_ #define LIB_INCLUDE_TICK_ARRAY_VECTOR_OPERATIONS_H_ // License: BSD 3 clause #include <atomic> #include <vector> #include <numeric> #include <algorithm> #include <type_traits> #include "promote.h" #include "tick/base/defs.h" #if defined(TICK_USE_MKL) #include "m...
{"hexsha": "bb288e98d09b991dacd20587d2b805bfeb4df702", "size": 1085, "ext": "h", "lang": "C", "max_stars_repo_path": "lib/include/tick/array/vector_operations.h", "max_stars_repo_name": "sumau/tick", "max_stars_repo_head_hexsha": "1b56924a35463e12f7775bc0aec182364f26f2c6", "max_stars_repo_licenses": ["BSD-3-Clause"], "...
import warnings import numpy as np import numpy.linalg as la import numpy.random as rnd from pymanopt.manifolds.manifold import EuclideanEmbeddedSubmanifold class _Sphere(EuclideanEmbeddedSubmanifold): """Base class for tensors with unit Frobenius norm.""" def __init__(self, *shape, name, dimension): ...
{"hexsha": "73f3a1c9dc76ca62b023f8a43eeda5ba10b97d38", "size": 5816, "ext": "py", "lang": "Python", "max_stars_repo_path": "manifolds/sphere.py", "max_stars_repo_name": "cjyaras/pymanopt", "max_stars_repo_head_hexsha": "447545fd9a6f33f3060a083fde1a2ac643ed340e", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
subroutine runP_i(k,i1,f,Gr,Shat2,N0) implicit none include 'pvDnames.f' include 'pvDv.f' include 'Darraydef.f' include 'Darrays.f' integer ep,N0,k,i1,np parameter(np=3) double precision f(np),Gr(np,np) double complex Shat2(np,np,-2:0) do ep=-2,0...
{"hexsha": "13e8b640cd39501d0c24d0d6f403cde9061eaf4e", "size": 577, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "MCFM-JHUGen/TensorReduction/recur/smallP/runP_i.f", "max_stars_repo_name": "tmartini/JHUGen", "max_stars_repo_head_hexsha": "80da31668d7b7eb5b02bb4cac435562c45075d24", "max_stars_repo_licenses": ["...
[STATEMENT] lemma composition_of_substs_eq : shows "(subst_equation (subst_equation e \<sigma>) \<eta>) = (subst_equation e (comp \<sigma> \<eta>))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. subst_equation (subst_equation e \<sigma>) \<eta> = subst_equation e (\<sigma> \<lozenge> \<eta>) [PROOF STEP] by ...
{"llama_tokens": 140, "file": "SuperCalc_equational_clausal_logic", "length": 1}
[STATEMENT] lemma wfT_fun_return_t: fixes \<tau>a'::\<tau> and \<tau>'::\<tau> assumes "\<Theta>; \<B>; (xa, b, ca) #\<^sub>\<Gamma> GNil \<turnstile>\<^sub>w\<^sub>f \<tau>a'" and "(AF_fun_typ x b c \<tau>' s') = (AF_fun_typ xa b ca \<tau>a' sa')" shows "\<Theta>; \<B>; (x, b, c) #\<^sub>\<Gamma> GNil \<tur...
{"llama_tokens": 6078, "file": "MiniSail_WellformedL", "length": 29}
import pandas as pd import numpy as np from pycaret.classification import predict_model, load_model def load_data(filepath): """ Loads churn data into a DataFrame from a string filepath. """ df = pd.read_csv(filepath, index_col='customerID') return df def make_predictions(df): """ Uses th...
{"hexsha": "be37f8db7b78c231762b5cfa59214910a6dd6ae8", "size": 1679, "ext": "py", "lang": "Python", "max_stars_repo_path": "predict_churn.py", "max_stars_repo_name": "kodama3d/msds_600_week5", "max_stars_repo_head_hexsha": "746fbc1bb92811e4ef568a8220a1c93301d14909", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import GitLab using Base.Test myauth = GitLab.authenticate(ENV["GITLAB_AUTH"]) # don't hardcode your access tokens! println("Authentication successful") options = Dict("private_token" => myauth.token) myrepo = GitLab.repo_by_name("TestProject1"; headers=options) file = GitLab.file(myrepo, "src/file1", "master"; heade...
{"hexsha": "af1305dd4b0fb9abe489e06f6c0fe8436c771229", "size": 410, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/contents.jl", "max_stars_repo_name": "UnofficialJuliaMirror/GitLab.jl-ec55e9df-579d-5e55-a10d-b795213e2edd", "max_stars_repo_head_hexsha": "28fc1fc4f561b027ebf117f1bc7a497252f47123", "max_stars...
""" Propagation module """ # struct for handling information of the problem struct ShootingSettings n::Int nr::Int n_sv::Int prob_stm::ODEProblem tofs::Array r0::Array # fixed vector rf::Array # fixed vector v0::Array vf::Array method reltol::Float64 abstol::Float64 tolDC::Float64 ...
{"hexsha": "c5f66a16623bd8bcd3b3d585551bf7cacefd132f", "size": 5257, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/twostage_shooting.jl", "max_stars_repo_name": "Yuricst/ShootingStar.jl", "max_stars_repo_head_hexsha": "89243d55bb53ea28c25719767d9addef20dcdb4f", "max_stars_repo_licenses": ["MIT"], "max_stars...
import numpy as np import matplotlib.pyplot as plt values_mV = np.loadtxt("ljpValues.txt") values_uV = values_mV * 1000 valuesMean_uV = np.mean(values_uV) valuesMean_mV = valuesMean_uV / 1000.0 baselineValues_uV = values_uV - valuesMean_uV n, bins, patches = plt.hist(baselineValues_uV, 100) details = "n: %d, mean: %f ...
{"hexsha": "abf1265de170651ca42b53859d960dd72db98762", "size": 568, "ext": "py", "lang": "Python", "max_stars_repo_path": "dev/variance/calculateVariance.py", "max_stars_repo_name": "swharden/JLJP", "max_stars_repo_head_hexsha": "9644ceb2d7a6ed5c61f94e535e556a0887ef0753", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import pandas as pd from feature_selection import read_data from keras.models import Sequential from keras.layers import Dense from sklearn import svm from sklearn.svm import SVC from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import (accuracy_score, f1_score, precision_score...
{"hexsha": "9110695003914a46f145bf493da85108a8f998ed", "size": 5964, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/classification.py", "max_stars_repo_name": "federico-code/PedMS-Classification", "max_stars_repo_head_hexsha": "04215b78dd299463cf5ae6ca33c1deb3d49acd41", "max_stars_repo_licenses": ["MIT"], ...
[STATEMENT] lemma (in comm_group) subgroup_iso_DirProds_IDirProds: assumes "subgroup J G" "is_idirprod J S I" "finite I" shows "(\<lambda>x. \<Otimes>\<^bsub>G\<^esub>i\<in>I. x i) \<in> iso (DirProds (\<lambda>i. G\<lparr>carrier := (S i)\<rparr>) I) (G\<lparr>carrier := J\<rparr>)" (is "?fp \<in> iso ?DP ?J") [PR...
{"llama_tokens": 15144, "file": "Finitely_Generated_Abelian_Groups_DirProds", "length": 98}
import numpy as np class Tree(object): def __init__(self, dim, rank): self.dim = dim self.rank = rank self.nodes = [] self.edges = [] def check_structure(matrix): """Check if a given matrix is a vine array and should respect the conditions a regular vine. Para...
{"hexsha": "9a93edf82d4cc8b3a90d408921481971c887981e", "size": 2620, "ext": "py", "lang": "Python", "max_stars_repo_path": "depimpact/model.py", "max_stars_repo_name": "NazBen/dep-impact", "max_stars_repo_head_hexsha": "284e72bccfb6309110df5191dfae3c0a93ce813b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nu...
#---------------------------------------------------------------- # When run this script, plwase consider whether there is a need to comment line # 741-746 in Env2DCyliner (just to make sure baseline runs longer time than # single run session) # # The default running time steps are used for Re=200, and it may run a ...
{"hexsha": "f1a2a9dc712c49937233cb8120a4cbea355171d8", "size": 3733, "ext": "py", "lang": "Python", "max_stars_repo_path": "RobustDRLCylinder2DControl/simulation_base/baseline_single_run.py", "max_stars_repo_name": "thw1021/Cylinder2DFlowControlGeneral", "max_stars_repo_head_hexsha": "ac5ea7fd304dedefa4489790e45c42ca94...
"""Class that schedules motion on can bus.""" import asyncio from collections import defaultdict import logging from typing import List, Set, Tuple, Iterator, Union import numpy as np from opentrons_hardware.firmware_bindings import ArbitrationId from opentrons_hardware.firmware_bindings.constants import NodeId from o...
{"hexsha": "f3b765c7643dbde437e1a2d4765e0d9891e6d6e7", "size": 16281, "ext": "py", "lang": "Python", "max_stars_repo_path": "hardware/opentrons_hardware/hardware_control/move_group_runner.py", "max_stars_repo_name": "Opentrons/protocol_framework", "max_stars_repo_head_hexsha": "ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f"...
#!/usr/bin/env python3 import sys try: #TODO this is a hack, at minimum should be done s.t. it'll work for aaaany ros distribution sys.path.remove('/opt/ros/kinetic/lib/python2.7/dist-packages') sys.path.append('/opt/ros/kinetic/lib/python2.7/dist-packages') except Exception as e: print(e) print("no...
{"hexsha": "7ce65a01169f459ed9442d59105a5e88cfee4f16", "size": 4156, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/environments/simple_tracker.py", "max_stars_repo_name": "gamerDecathlete/neural_jacobian_estimation", "max_stars_repo_head_hexsha": "44deed91f0650830dd2da1796e67d084f0918995", "max_stars_repo_...
/** * Copyright (c) 2015 Eugene Lazin <4lazin@gmail.com> * * 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 app...
{"hexsha": "18fa38c904d89c7f9f2e60e079e581a4c9ab6fe3", "size": 6202, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "libakumuli/seriesparser.cpp", "max_stars_repo_name": "vladon/Akumuli", "max_stars_repo_head_hexsha": "c45672a23b929ccb3a5743cc5e9aae980c160eb0", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars...
#!/usr/bin/env python """ Local Processing Unit (LPU) with plugin support for various neuron/synapse models. """ import time import collections import numbers import copy import itertools from future.utils import iteritems from past.builtins import long from builtins import zip import pycuda.gpuarray as garray from...
{"hexsha": "ffe97310fe40db1979f26e7e8035250b02684660", "size": 60005, "ext": "py", "lang": "Python", "max_stars_repo_path": "neurokernel/LPU/LPU.py", "max_stars_repo_name": "yiyin/neurodriver", "max_stars_repo_head_hexsha": "34e6874a1cf35633cda1191920cbaeac5d25dc9b", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_st...
\subsection{Burn} \label{sec:721Burn} We continue with the notation and indices from the prior sections.\\ \\ Suppose Bob is the owner of the token commitment $Z_B$ which represents the ERC-721 asset with tokenId $\alpha$ (as discussed in the prior section). The asset $\alpha$ can continue to be transferred unde...
{"hexsha": "db6d2ec8d49bc9b65b8c629317536b2194675556", "size": 21278, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/whitepaper/protocols/ERC721/burn721.tex", "max_stars_repo_name": "roggerJose/nightfall", "max_stars_repo_head_hexsha": "59d7d83bcaf920bbf7c7427d14b5fcdb7e53843c", "max_stars_repo_licenses": ["C...
#ifndef SIMPLEBOT_DRIVER_HPP #define SIMPLEBOT_DRIVER_HPP #include <JetsonGPIO.h> #include <string> #include <cmath> #include <boost/asio.hpp> #include "nlohmann/json.hpp" #include <ros/ros.h> typedef struct { int pinPWM; int pinDirA; int pinDirB; } pinInfo; typedef struct{ int left; int right; } encoderD...
{"hexsha": "a2ae4cd0154c2a1fa398b19d292dc255b584625c", "size": 902, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "simplebot_hardware/include/simplebot_hardware/simplebot_driver.hpp", "max_stars_repo_name": "yukimakura/simplebot", "max_stars_repo_head_hexsha": "21625af59bbfd70b63e6881a02e41dc0ed67c3fa", "max_star...
from typing_extensions import SupportsIndex from django.shortcuts import render # Create your views here. from django.http import HttpResponse from .forms import InputForm import pandas as pd import numpy as np import pickle from pymongo import MongoClient client = MongoClient('localhost', 27017) db = cli...
{"hexsha": "f71650e79d12d7042562e07291e570fa83922710", "size": 2081, "ext": "py", "lang": "Python", "max_stars_repo_path": "heart_app/views.py", "max_stars_repo_name": "kylepgr/heart-disease-pred", "max_stars_repo_head_hexsha": "d128cc815dde4839ba18e887113bb47387499ce1", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
#= Similar to Batch Normalization, except online and without the rescaling/skew y = (a .- μ) ./ σ TODO: This is currently broken because OnlineStats.Variances no longer exists. =# type InputNorm{T,W<:Weight} <: Transformation n::Int # maps n --> n vars::Variances{W} input::SumNode{T,1} # ...
{"hexsha": "f1fba208cc66623f99cac30d8ade1ef4de191ae0", "size": 1306, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/inputnorm.jl", "max_stars_repo_name": "JuliaTagBot/Transformations.jl", "max_stars_repo_head_hexsha": "96041d4b3ef913c3f2f2e7cd65f9090cf40bb851", "max_stars_repo_licenses": ["MIT"], "max_stars_...
!+ gaseous absorption after Rosenkranz 98 model subroutine rosen98_gasabs & (errorstatus,& ! out freq, & ! in tempK, & ! in rhoWv, & ! in pres, & ! in absAir,& ! out absWv ) ! out ! Description: ! Based on frequency, temperature, water vapor density, and pressure, thi...
{"hexsha": "373a6051c49f566f28fea02c60afac0984cf2b59", "size": 4830, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "rosen98_gasabs.f90", "max_stars_repo_name": "DaveOri/pyGasAbs", "max_stars_repo_head_hexsha": "966eae26d0d356f33bb8964c912d63e2fffe2345", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# test on generic type using Pseudospectra, Test, GenericSVD @testset "Generic(Big)" begin @info("This test is expected to comment about lack of methods for BigFloat eigvals") A = Matrix{BigFloat}(Pseudospectra.grcar(8)) # ax is needed until ∃ eigvals(BigFloat) opts = Dict{Symbol,Any}(:ax => [-1,3,-3...
{"hexsha": "4a26464f11fba634c95938324db727ba288bb2f0", "size": 867, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/big.jl", "max_stars_repo_name": "ranocha/Pseudospectra.jl", "max_stars_repo_head_hexsha": "63b3c62dc34707289bb73959bbeaee0529ecee36", "max_stars_repo_licenses": ["BSD-3-Clause", "MIT"], "max_st...
! { dg-do compile { target { ! *-*-* } } } ! program bug use H5GLOBAL implicit none integer :: i i=H5P_DEFAULT_F end program bug
{"hexsha": "5eee0986b809806b127477ae63996d8926cb70c5", "size": 137, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "validation_tests/llvm/f18/gfortran.dg/pr77420_4.f90", "max_stars_repo_name": "brugger1/testsuite", "max_stars_repo_head_hexsha": "9b504db668cdeaf7c561f15b76c95d05bfdd1517", "max_stars_repo_licens...
using Test using PyCall using BenchmarkTools using Fermi using Fermi.Wavefunction using Fermi.CoupledCluster: RCCSD,RCCD,DFRCCD psi4.core.be_quiet() #turn off output psi4.set_num_threads(6) using LinearAlgebra BLAS.set_num_threads(6) # > setup tol = 1E-14 psi4.set_options(Dict("D_CONVERGENCE" => 14, ...
{"hexsha": "7bfa0bc84a856aa2a79cd95158ff535b61c3aabe", "size": 1052, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "benchmark/BenchCoupledCluster.jl", "max_stars_repo_name": "jturney/Fermi.jl", "max_stars_repo_head_hexsha": "46a22ee67b0de7496c6767cb73c71d21dce397cf", "max_stars_repo_licenses": ["MIT"], "max_star...
# importing modules and packages # system tools import os import sys import argparse sys.path.append(os.path.join("..", "..")) from contextlib import redirect_stdout # pandas, numpy, gensim import pandas as pd import numpy as np import gensim.downloader # import my classifier utility functions - see the Github repo! ...
{"hexsha": "ade713c52195e4d636a5f8f37736575316cae117", "size": 5648, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/4/lr_got.py", "max_stars_repo_name": "marmor97/cds-language-exam", "max_stars_repo_head_hexsha": "d6f1aa543ba3f78d1a9f34c67a687e4f0944a665", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
Require Import List. Require Import ZArith. Require Import String. Open Scope string_scope. Ltac inv H := inversion H; subst. Ltac break_match := match goal with | _ : context [ if ?cond then _ else _ ] |- _ => destruct cond as [] eqn:? | |- context [ if ?cond then _ else _ ] => destruct cond as ...
{"author": "palmskog", "repo": "street-fighting-proof-assistants", "sha": "f89660fab17a8c1a6c9cd9c14484ed8d72fb0088", "save_path": "github-repos/coq/palmskog-street-fighting-proof-assistants", "path": "github-repos/coq/palmskog-street-fighting-proof-assistants/street-fighting-proof-assistants-f89660fab17a8c1a6c9cd9c144...
import argparse import math import numpy as np import torch from torch import nn from basicsr.archs.stylegan2_arch import StyleGAN2Generator from basicsr.metrics.fid import (calculate_fid, extract_inception_features, load_patched_inception_v3) def calculate_stylegan2_fid(): devic...
{"hexsha": "8a3d8a978fa0f5971f6d03aaa3d6add2fff87013", "size": 2851, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/modules/BasicSR/scripts/metrics/calculate_stylegan2_fid.py", "max_stars_repo_name": "harryprabowo/multipurpose-iris-recognition", "max_stars_repo_head_hexsha": "549cb95499abb3ea7900aa29ced55a...