text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
# ------------------------------------------------------ # Morphological Operations: Erosion # # Created by Khushi Agrawal on 19/09/21. # Copyright (c) 2021 Khushi Agrawal. All rights reserved. # # ------------------------------------------------------ import cv2 import numpy as np # Image path # Tried with other im...
{"hexsha": "13f3bb05992aaa9d6f6397c22efc327a06575dc7", "size": 1067, "ext": "py", "lang": "Python", "max_stars_repo_path": "opencv/2021/lab-2/ques2/erosion.py", "max_stars_repo_name": "khushi-411/tutorials", "max_stars_repo_head_hexsha": "e7f627f9242d21f76e49c235edeaa99e5befc24c", "max_stars_repo_licenses": ["Apache-2....
function [tf,te,to,sc,I,up] = tsurf_cad(F,V,varargin) % [tf,te,to,sc,I,up] = tsurf_cad(F,V,varargin) % % TSURF_CAD Display a triangle mesh in a CAD-like rendering style: edges, % shadow, floor. % % Inputs: % F #F by 3 list of face indices % V #V by 3 list of vertex positions % Outputs: % tf ...
{"author": "alecjacobson", "repo": "gptoolbox", "sha": "a0cb37d8edbcfb1e3587f793df8f24c76a2d7305", "save_path": "github-repos/MATLAB/alecjacobson-gptoolbox", "path": "github-repos/MATLAB/alecjacobson-gptoolbox/gptoolbox-a0cb37d8edbcfb1e3587f793df8f24c76a2d7305/mesh/tsurf_cad.m"}
from typing import TextIO import numpy as np class Logger: """ Logs the train progress to stdout and log file """ def multi_stage_to_text(self, losses): losses = [f"{l:4.2f}" for l in losses] return '->'.join(losses) def log_train_progress(self, epoch: int, losses, num_stages: int...
{"hexsha": "4ad79a2d89c173987f5f6a7a14e6732f5d9ad4ca", "size": 3128, "ext": "py", "lang": "Python", "max_stars_repo_path": "utility/logger.py", "max_stars_repo_name": "davda54/meta-tasnet", "max_stars_repo_head_hexsha": "8f3fee69f5f03e67bc495b55736ffb51eb428a45", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1...
""" test_measures ------------- Collections of measures. """ import numpy as np from ..artificial_data.create_artificial_timeseries import create_random_ts,\ create_random_raster, create_brownian_noise_regular_ts from ..Measures.hurst_measures import hurst from ..Measures.hurst_measures import create_RS_scales_s...
{"hexsha": "cddc5f8665c202469377a5f3fef06c098202687a", "size": 4089, "ext": "py", "lang": "Python", "max_stars_repo_path": "TimeSeriesTools/tests/test_measures.py", "max_stars_repo_name": "Psicowired87/TimeSeriesTools", "max_stars_repo_head_hexsha": "de42dbcc5371ee576df6c9521b1c79a47c147dd1", "max_stars_repo_licenses":...
[STATEMENT] lemma evaln_Suc: "<c,s> -n-> s' ==> <c,s> -Suc n-> s'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. <c,s> -n-> s' \<Longrightarrow> <c,s> -Suc n-> s' [PROOF STEP] apply (erule evaln_nonstrict) [PROOF STATE] proof (prove) goal (1 subgoal): 1. n \<le> Suc n [PROOF STEP] apply auto [PROOF STATE] proof (p...
{"llama_tokens": 178, "file": null, "length": 3}
# -------------------------------------------------------- # Licensed under The MIT License [see LICENSE for details] # -------------------------------------------------------- import argparse import datetime import numpy as np import itertools import torch from core.bc import BC from core.ddpg import DDPG from core....
{"hexsha": "99039f805c6ace195d0e28894cfd6a2a79c2344e", "size": 27530, "ext": "py", "lang": "Python", "max_stars_repo_path": "core/train_online.py", "max_stars_repo_name": "liruiw/HCG", "max_stars_repo_head_hexsha": "a928ce7fb0df022cb2ceaeff32925f13de369519", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 3, "ma...
import dgl import tensorflow as tf from tensorflow.keras.models import Model from gnn.models.tools import Linear, evaluate class GATLayer(Model): def __init__(self, out_feats, batch_norm=False, dropout_rate=None): super(GATLayer, self).__init__() # init fully connected linear layer self....
{"hexsha": "5ee99937020c207fe9e7c0c2832b601efcb6ba33", "size": 7886, "ext": "py", "lang": "Python", "max_stars_repo_path": "gnn/models/gat_conv.py", "max_stars_repo_name": "cwfparsonson/gnn", "max_stars_repo_head_hexsha": "ed41968b7253382d0a791608e042c64b97168071", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_...
include("./src/MyPlots.jl") import .MyPlots as plo plo.plot()
{"hexsha": "1b5aad5f06a829f3e63d2f67a587bab3d89a92b5", "size": 64, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "coord-desc/MyPlots/main.jl", "max_stars_repo_name": "applied-math-coding/article-snippets", "max_stars_repo_head_hexsha": "3ac3dc58905a9f6c662e3922dafc9b230a9ffd6e", "max_stars_repo_licenses": ["MIT"...
/* RevKit: A Toolkit for Reversible Circuit Design (www.revkit.org) * Copyright (C) 2009-2011 The RevKit Developers <revkit@informatik.uni-bremen.de> * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software ...
{"hexsha": "febace0d9d5bfdbaf2796e75b26ee66ce3e1c455", "size": 34785, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "rkqc/src/core/circuit.hpp", "max_stars_repo_name": "clairechingching/ScaffCC", "max_stars_repo_head_hexsha": "737ae90f85d9fe79819d66219747d27efa4fa5b9", "max_stars_repo_licenses": ["BSD-2-Clause"],...
"""Unit tests for the main detector code""" import logging from pathlib import Path import numpy as np import pytest from copydetect import CodeFingerprint, CopyDetector, compare_files, utils TESTS_DIR = str(Path(__file__).parent) class TestTwoFileDetection: """Test of the user-facing copydetect code for a si...
{"hexsha": "8d323ea9c0bf6fc6091d4362d8bcd57d4944e23f", "size": 9518, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_detector.py", "max_stars_repo_name": "Apex-Design/copydetect", "max_stars_repo_head_hexsha": "ef9e172988e3605bab22a896dbe694d551fed7c5", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
import numpy as np from mAP import cal_mAP def readtxt(path): label = [] with open(path, 'r') as f: x = f.readlines() for name in x: temp = int(name.strip().split()[1]) label.append(temp) label = np.array(label) return label train_label = readtxt( "/home/a...
{"hexsha": "db50236b999ca6e5a758d0e3f4e73f633aaf6424", "size": 876, "ext": "py", "lang": "Python", "max_stars_repo_path": "Deep-Hash-learning-for-Remote-Sensing-Image-Retrieval/Metric/test.py", "max_stars_repo_name": "LiuChaoXD/Remote-Sensing-Image-Retrieval-Models", "max_stars_repo_head_hexsha": "c135562263102080716e3...
from scipy import ndimage from skimage import measure import numpy as np import cv2 def crop_rectangle(image, rect): # rect has to be upright num_rows = image.shape[0] num_cols = image.shape[1] if not inside_rect(rect = rect, num_cols = num_cols, num_rows = num_rows): print("Proposed rectang...
{"hexsha": "f73c27bb08a8934e59e20f51fc072681cf6f55ce", "size": 4278, "ext": "py", "lang": "Python", "max_stars_repo_path": "datasets/DataAugmentations.py", "max_stars_repo_name": "DrJonoG/StomataGSMax", "max_stars_repo_head_hexsha": "18e5f993ed875ae6af07a4c7d1c0e4ff97e2c947", "max_stars_repo_licenses": ["Apache-2.0"], ...
"""Group together various number density descriptors.""" import numpy as np import frbpoppy.precalc as pc class NumberDensity: """Class for cosmic number density.""" def __init__(self, model='vol_co', z_max=2.0, H_0=67.74, W_m=0.3089, ...
{"hexsha": "3dee2d03cfb271714cc08f3041fc2321bd4de1ad", "size": 3430, "ext": "py", "lang": "Python", "max_stars_repo_path": "frbpoppy/number_density.py", "max_stars_repo_name": "macrocosme/frbpoppy", "max_stars_repo_head_hexsha": "b23a0c1dbf4e6559f26e79994147ed2a9352ffc7", "max_stars_repo_licenses": ["MIT"], "max_stars_...
from flask import Flask,render_template, Response,request import json,base64,io,websockets,cv2,asyncio,socket import numpy as np from shapeDetectionClass import ShapeDetection from webSocketsOpencvClient import WebSocketsOpencvClient from roboSocketCom import RoboSocketCom from websocket import create_connection app=F...
{"hexsha": "124b5a1e720210d54a9a2fbc297e0ef4eaa8df85", "size": 7179, "ext": "py", "lang": "Python", "max_stars_repo_path": "Rover/Controller-PC/loopPC.py", "max_stars_repo_name": "harunlakodla/Gallipoli_Rov", "max_stars_repo_head_hexsha": "5dea2c681c35d81a3560ba93f2820cb717550446", "max_stars_repo_licenses": ["MIT"], "...
# Copyright 2016-2020 Blue Marble Analytics LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
{"hexsha": "6965b181f48e8d2322355a11e9d543ee80529032", "size": 4287, "ext": "py", "lang": "Python", "max_stars_repo_path": "gridpath/system/reliability/prm/prm_requirement.py", "max_stars_repo_name": "anamileva/gridpath", "max_stars_repo_head_hexsha": "e55eacb88ca5e6c034a90b18819e17cbd6f43854", "max_stars_repo_licenses...
// // Copyright (c) 2021 Richard Hodges (hodges.r@gmail.com) // // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt) // #ifndef NEW_YEAR_2021_HTTP_CONNECTION_KEY_HPP_1D2C5F73C1CF482A9289DABEEBCBA1C8 #define NEW_YEAR_2021_HTTP_C...
{"hexsha": "669a65dee3b68099c56e2ec705056c529a5400ab", "size": 1055, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/http/connection_key.hpp", "max_stars_repo_name": "madmongo1/blog-new-year-2021", "max_stars_repo_head_hexsha": "b6e247e523f9a65a8e0a6375fd727878494dfac5", "max_stars_repo_licenses": ["BSL-1.0"],...
f1:=proc() return 1; end proc: f2:=proc() return 2; end proc: f3:=proc() return 3; end proc: f4:=proc() return 4; end proc: fun:=proc(f1) global f2,f3,f4; print(f1(),f2(),f3(),f4()); end proc: coverArgs:={},{}: Grid:-Launch(fun,coverArgs,eval(f1), imports=['f2',"f3",':-f4'=eval(f4)]);
{"hexsha": "74a949cd8a7092b2746800a612a963f38343a74b", "size": 306, "ext": "mpl", "lang": "Maple", "max_stars_repo_path": "Grid/imports/procs.mpl", "max_stars_repo_name": "yu961549745/MapleParallel", "max_stars_repo_head_hexsha": "6fe9ceb7766e0803761ab7368caa9b3f856dcf5b", "max_stars_repo_licenses": ["MIT"], "max_stars...
// Copyright (C) 2021 Djordje Vukcevic <djordje dot vukcevic at h-brs dot de> // Version: 1.0 // Author: Djordje Vukcevic <djordje dot vukcevic at h-brs dot de> // URL: http://www.orocos.org/kdl // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General P...
{"hexsha": "c60b882d41ae1eb765c18c6293b593ff5e918f4c", "size": 6683, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "3rdparty/kdl/src/chainexternalwrenchestimator.hpp", "max_stars_repo_name": "rocos-sia/rocos-app", "max_stars_repo_head_hexsha": "83aa8aa31dd303d77693cfc5ad48055d051fa4bc", "max_stars_repo_licenses":...
#MenuTitle: Myanmar Medial Ra Maker # -*- coding: utf-8 -*- import GlyphsApp import numpy as np import re number_of_glyphs = 5 def mean(it): return sum(it)/len(it) def roundto(x,y): return int(x/y)*y def ssq(j, i, sum_x, sum_x_sq): if (j > 0): muji = (sum_x[i] - sum_x[j-1]) / (i - j + 1) ...
{"hexsha": "e1599d982c1a88cdbb92075127e9f1478961a3d9", "size": 6686, "ext": "py", "lang": "Python", "max_stars_repo_path": "Myanmar Medial Ra Maker.py", "max_stars_repo_name": "simoncozens/GlyphsScripts", "max_stars_repo_head_hexsha": "dc474b598a4016b5df8aa088362e72bdaffa8034", "max_stars_repo_licenses": ["MIT"], "max_...
#=============================================================================== DeconvolutionMatrices.jl types for K matrices and their inverses used in deconvolution.jl Author: Tom Price Date: June 2019 ===============================================================================...
{"hexsha": "f34ea720307f4ca240dd7568296608e55e05bfc9", "size": 3714, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "bioinformatics/QpcrAnalysis/defines/DeconvolutionMatrices.jl", "max_stars_repo_name": "MakerButt/chaipcr", "max_stars_repo_head_hexsha": "a4c0521d1b2ffb2aa1c90ff21f3ca4779b6831d1", "max_stars_repo_...
import pandas as pd import matplotlib.pyplot as plt import matplotlib import numpy as np import time import random import datetime from datetime import date from datetime import timedelta from dateutil.relativedelta import relativedelta import pickle from pyomo.environ import * from pyomo.opt import SolverFactory def...
{"hexsha": "2d7c5fd17d4db26834e86eb81f9bed5d3da9d417", "size": 4692, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/risk_methods_pyomo.py", "max_stars_repo_name": "DavimenUC3M/IronIA-RoboAdvisor", "max_stars_repo_head_hexsha": "06d37889d5cb9c40139ceb6a41c959b92fff3291", "max_stars_repo_licenses": ["MIT"], "...
import os import numpy as np import torch opj = os.path.join import pickle as pkl device = 'cuda' if torch.cuda.is_available() else 'cpu' from awave.transform1d import DWT1d from awave.transform2d import DWT2d def warm_start(p, out_dir): '''load results and initialize model ''' print('\twarm starting...
{"hexsha": "ad105f5e7bad6b1f3b4053ac47b4778544f6f429", "size": 2289, "ext": "py", "lang": "Python", "max_stars_repo_path": "awave/utils/warmstart.py", "max_stars_repo_name": "Yu-Group/adaptive-wavelets", "max_stars_repo_head_hexsha": "e67f726e741d83c94c3aee3ed97a772db4ce0bb3", "max_stars_repo_licenses": ["MIT"], "max_s...
import .mod_f import .hol_bdd import number_theory.modular import algebra.big_operators.basic import .q_expansion import analysis.complex.unit_disc.basic import number_theory.modular --import data.nat.lattice open complex open_locale big_operators classical noncomputable theory open modular_form modular_group com...
{"author": "ferrandf", "repo": "valenceformula", "sha": "c542edc32e3fc0ef142d69a0c897192f040e4b3e", "save_path": "github-repos/lean/ferrandf-valenceformula", "path": "github-repos/lean/ferrandf-valenceformula/valenceformula-c542edc32e3fc0ef142d69a0c897192f040e4b3e/src/valence_formula.lean"}
# -------------- # Initialization # -------------- using LLLplus using Test using LinearAlgebra using Documenter # -------------- # tests with small matrices # -------------- println("tests with small matrices...") # Matrix from http://home.ie.cuhk.edu.hk/~wkshum/wordpress/?p=442 H =[1 9 1 2; 1 8 8 3;...
{"hexsha": "b1c8b0285613743ae93fe8c379b1b58438d8a021", "size": 2204, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/runtests.jl", "max_stars_repo_name": "GiggleLiu/LLLplus.jl", "max_stars_repo_head_hexsha": "01fbfa2ec47cbee224cf6827e90a1c2f208ba9ce", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 51...
#define CATCH_CONFIG_MAIN #include <catch.hpp> #define BOOST_THREAD_PROVIDES_FUTURE #define BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION // Enables future::then #include <boost/thread.hpp> #include <boost/asio.hpp> #include <cstdio> using namespace boost; using namespace boost::asio; TEST_CASE ("future_42Test", "[futu...
{"hexsha": "1e18504bd1d3e0e069ffaf141db3292d93478959", "size": 532, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/boost_ms/future_42Test.cpp", "max_stars_repo_name": "tlanc007/coroutine-ts", "max_stars_repo_head_hexsha": "2da75f32178597a3377a0e8b489b2123d18591bf", "max_stars_repo_licenses": ["MIT"], "max_s...
import argparse import os import os.path as osp import cc3d import numpy as np import torch import trimesh import kaolin as kal from architectures import Generator from hanging_points_generator.create_mesh import create_urdf from hanging_points_generator.generator_utils import save_json parser = argparse.ArgumentPar...
{"hexsha": "48a899d10b6734559febe9b9681515c72e457b2f", "size": 5156, "ext": "py", "lang": "Python", "max_stars_repo_path": "random_mesh/random_mesh_generator.py", "max_stars_repo_name": "kosuke55/hanging_points_generator", "max_stars_repo_head_hexsha": "36738fd348a3d8950769cb8125fc0a731447c204", "max_stars_repo_license...
""" ===================================================== Galactic Synchrotron (:mod:`~cora.foreground.galaxy`) ===================================================== .. currentmodule:: cora.foreground.galaxy Generate semi-realistic simulations of the full sky synchrotron emission from the Milky Way. Classes ======= ...
{"hexsha": "b97c4857d1e2601049ba89d0d2b4d2d5631cf360", "size": 11390, "ext": "py", "lang": "Python", "max_stars_repo_path": "cora/foreground/galaxy.py", "max_stars_repo_name": "sjforeman/cora", "max_stars_repo_head_hexsha": "48d127d9e00b1fb1cf2024004d1d1e7441fd1e1f", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import cv2 import torch import random import librosa import numpy as np cv2.setNumThreads(0) def image_crop(image, bbox): return image[bbox[1]:bbox[3], bbox[0]:bbox[2]] def gauss_noise(image, sigma_sq): h, w = image.shape gauss = np.random.normal(0, sigma_sq, (h, w)) gauss = gauss.reshape(h, w) ...
{"hexsha": "f4c67c18e677ba218ad1c5a297d53014928f4b28", "size": 8729, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/transforms.py", "max_stars_repo_name": "SarthakYadav/GISE-51-pytorch", "max_stars_repo_head_hexsha": "2cf816ed14db27d468b44a88702f0386f7c733c1", "max_stars_repo_licenses": ["MIT"], "max_s...
library(shiny) library(dplyr) library(plotly) library(readxl) library(lubridate) #library(shinyalert) library(shinyWidgets) library("httr") library("jsonlite") library(rgdal) library(leaflet) library(lubridate) knitr::opts_chunk$set(echo = TRUE) #library('BBmisc') #library(viridis) # paletas de colores set.seed(19990)...
{"hexsha": "e38862b557c41101b5513a5430cec3ed3bb98e49", "size": 7374, "ext": "r", "lang": "R", "max_stars_repo_path": "app/server.r", "max_stars_repo_name": "felinblackcat/Trabajo1TAE2020", "max_stars_repo_head_hexsha": "3e6d9dc66b7771f4eb534b96f2b3f74083107dc9", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_cou...
from src.execise_7 import execise_7 from src.execise_8 import execise_8 import matplotlib.pyplot as plt import numpy as np from numpy import array class exercise4: def __init__(self, arg): self.arg = arg self.obs = [] self.goal_ = [-2.0, 0] self.start_ = [2.0, 0] self.goal ...
{"hexsha": "a4fac31092f8a6b297720627fc93dd00bc409afe", "size": 6879, "ext": "py", "lang": "Python", "max_stars_repo_path": "HW3_gradient_descent_C_space_links_rotation/src/exercise4.py", "max_stars_repo_name": "CooviM/motion_planning", "max_stars_repo_head_hexsha": "9d94feebcd85f71fe51f0ac62a6472d3086a5955", "max_stars...
# -*- coding: utf-8 -*- u""" :copyright: Copyright (c) 2020 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function import time import os import yaml import numpy as np def record_time(func, time_list, *args, ...
{"hexsha": "373839e70c9fcbb0a725a1ed6ee590e364a0220e", "size": 5186, "ext": "py", "lang": "Python", "max_stars_repo_path": "rswarp/run_files/tec/tec_utilities.py", "max_stars_repo_name": "radiasoft/rswarp", "max_stars_repo_head_hexsha": "867fdcfb0b9b75ad7458b6e5ae065de340ff59bb", "max_stars_repo_licenses": ["Apache-2.0...
# coding=utf-8 import numpy as np # 选项 CHOICES = "ABCDE" # 一行选项+题号列数,例如一行有3题,一题4个选项,所以总共有3*4+3个列 CHOICE_COL_COUNT = 18 # 每题题选项数 CHOICES_PER_QUE = 5 # 每个选项框里面白色点所占比例阈值,小于则说明该选项框可能被填涂 WHITE_RATIO_PER_CHOICE = 0.80 # 受限于环境,光源较差的情况下或腐蚀膨胀参数设置不对, # 可能会有误判,这个参数这是比较两个都被识别为涂写的选项框是否有误判的阈值 MAYBE_MULTI_CHOICE_THRESHOLD = 0.07...
{"hexsha": "4ba60e89a6c41691a76fac512f0ebde848350384", "size": 1351, "ext": "py", "lang": "Python", "max_stars_repo_path": "settings.py", "max_stars_repo_name": "godinthehell/answer-sheet-scan", "max_stars_repo_head_hexsha": "aaf7d322a212d68edd348b05194df6166bbc2e5c", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
# For licensing see accompanying LICENSE.txt file. # Copyright (C) 2021 Apple Inc. All Rights Reserved. # HDR Environment Map Estimation for Real-Time Augmented Reality, CVPR 2021. # Demo application using the reference implementations of the AngularError and FID metric used in the above paper. import cv2 import nump...
{"hexsha": "999796b76de9235376f9986a70cc42b7e51c3847", "size": 3882, "ext": "py", "lang": "Python", "max_stars_repo_path": "DemoEnvMapNetMetrics.py", "max_stars_repo_name": "LaudateCorpus1/ml-envmapnet", "max_stars_repo_head_hexsha": "326379ed50cd2bf3a277a3d16fc85d6d4b703eb2", "max_stars_repo_licenses": ["AML"], "max_s...
''' A custom Keras layer to perform L2-normalization. Copyright (C) 2017 Pierluigi Ferrari This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any la...
{"hexsha": "5d5f0498bced30b90b5f2a32f172fba897a71c7e", "size": 2179, "ext": "py", "lang": "Python", "max_stars_repo_path": "keras_layer_L2Normalization.py", "max_stars_repo_name": "sa-y-an/Face-detection-with-mobilenet-ssd", "max_stars_repo_head_hexsha": "58fafb6e93d28531797aac1e9a4436730c8cee7c", "max_stars_repo_licen...
[STATEMENT] lemma HYH_is_minusY [simp]: "H * Y * H = - Y" [PROOF STATE] proof (prove) goal (1 subgoal): 1. H * Y * H = - Y [PROOF STEP] apply(simp add: Y_def H_def times_mat_def) [PROOF STATE] proof (prove) goal (1 subgoal): 1. mat 2 2 (\<lambda>(i, j). row (mat 2 2 (\<lambda>(i, j). row (1 / complex_of_real (sqrt ...
{"llama_tokens": 1208, "file": "Isabelle_Marries_Dirac_Quantum", "length": 3}
From Test Require Import tactic. Section FOFProblem. Variable Universe : Set. Variable UniverseElement : Universe. Variable p_ : Universe -> Prop. Variable l_ : Universe -> Prop. Variable i_ : Universe -> Universe -> Prop. Variable goal_ : Prop. Variable e_ : Universe -> Universe -> Prop. Variable dom_ : Universe ->...
{"author": "janicicpredrag", "repo": "Larus", "sha": "a095ca588fbb0e4a64a26d92946485bbf85e1e08", "save_path": "github-repos/coq/janicicpredrag-Larus", "path": "github-repos/coq/janicicpredrag-Larus/Larus-a095ca588fbb0e4a64a26d92946485bbf85e1e08/benchmarks/coq-problems/coherent-logic-benches/cro_8_2_in.v"}
import numpy as np from sklearn.model_selection import train_test_split from problem_2.parameters import * # Function to load data from file def load_data(train_file): # Matrices to store data X = np.zeros([TRAIN_SAMPLES, DIMENSIONS]) Y = np.zeros(TRAIN_SAMPLES) # Read train data file file = open...
{"hexsha": "9bc47d1c21cbbe99934d09bb12b5aeaa3f1cd76b", "size": 912, "ext": "py", "lang": "Python", "max_stars_repo_path": "problem_2/load_data.py", "max_stars_repo_name": "vineeths96/SVM-and-Neural-Networks", "max_stars_repo_head_hexsha": "84d734542d4f7fc718c49a8d63db07b0597ccbc7", "max_stars_repo_licenses": ["MIT"], "...
#include <libv/lma/ttt/mpl/naming.hpp> #include <iostream> #include <boost/mpl/remove_if.hpp> #include <boost/mpl/vector.hpp> #include <boost/mpl/equal.hpp> #include <boost/mpl/less.hpp> #include <boost/mpl/count.hpp> #include <iostream> template<class ... T> struct Struct { }; using namespace boost; template<clas...
{"hexsha": "552da93067b3e99d84930e17be6e096bccb0411b", "size": 735, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "tests/rename.cpp", "max_stars_repo_name": "bezout/LMA", "max_stars_repo_head_hexsha": "9555e41eed5f44690c5f6e3ea2d22d520ff1a9d2", "max_stars_repo_licenses": ["BSL-1.0"], "max_stars_count": 29.0, "max...
from gdsctools.anova import ANOVA from gdsctools.anova_report import ANOVAReport from gdsctools import ic50_test import numpy as np def test_html(): # same as above, could factorise an = ANOVA(ic50_test) features = an.features.df features = features[features.columns[0:30]] an = ANOVA(ic50_test, fe...
{"hexsha": "485a8942b7d248bf37decc6c0ad11aefd513912e", "size": 778, "ext": "py", "lang": "Python", "max_stars_repo_path": "test/gdsctools/test_anova_html.py", "max_stars_repo_name": "Donnyvdm/gdsctools", "max_stars_repo_head_hexsha": "164ccd284e33202117f505210af96ae44d819203", "max_stars_repo_licenses": ["Python-2.0", ...
//================================================================================================== /*! @file @copyright 2016 NumScale SAS Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt) */ //===========================...
{"hexsha": "9157f17ed4458ebc79f9a1e6a773e58e669fd741", "size": 1832, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/constant/nbmantissabits.hpp", "max_stars_repo_name": "SylvainCorlay/pythran", "max_stars_repo_head_hexsha": "908ec070d837baf77d828d01c3e35e2f4bfa2bfa", "max_stars_repo_license...
We have used different ideas and methods in this project. In this chapter methods are explained in following \textit{\hyperref[mth:preproces]{Preprocessing}}, \textit{\hyperref[mth:wordrep]{Word Representation}}, \textit{\hyperref[mth:features]{Features}}, \textit{\hyperref[mth:ml]{Machine Learning}}, \textit{\hyp...
{"hexsha": "e5eff760a3dd4a3901b796b0b9874f76e1480e1a", "size": 16091, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "06-methodology.tex", "max_stars_repo_name": "mahsaghn/FinalProject_Doc", "max_stars_repo_head_hexsha": "06008f61f77ae5257cabbf7216edf9bcc37c9986", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
#!/usr/bin/python3 import cv2 import math import numpy as np import matplotlib.pyplot as plt import pdb from PIL import Image, ImageDraw import torch from typing import List, Mapping, Optional, Tuple from mseg.utils.conn_comp import scipy_conn_comp from mseg.utils.colormap import colormap from mseg.utils.cv2_utils i...
{"hexsha": "0ef31e9ec23092bb9f5908d5b0937f23b6d80ef3", "size": 34550, "ext": "py", "lang": "Python", "max_stars_repo_path": "mseg/utils/mask_utils.py", "max_stars_repo_name": "mintar/mseg-api", "max_stars_repo_head_hexsha": "df7b899b47b33ad82dcbf17c289856a1f1abea22", "max_stars_repo_licenses": ["CC-BY-4.0"], "max_stars...
{-# OPTIONS --allow-unsolved-metas #-} open import Agda.Builtin.Nat test : (n : Nat) → Nat test n with zero ... | n = {!n!}
{"hexsha": "9f59153d554c7dda605b9b7fadbdafaee285624e", "size": 126, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "test/Succeed/Issue1820.agda", "max_stars_repo_name": "cagix/agda", "max_stars_repo_head_hexsha": "cc026a6a97a3e517bb94bafa9d49233b067c7559", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_...
[STATEMENT] lemma replicate_stutter': "u \<frown> replicate n (v 0) \<frown> v \<approx> u \<frown> v" [PROOF STATE] proof (prove) goal (1 subgoal): 1. u \<frown> replicate n (v 0) \<frown> v \<approx> u \<frown> v [PROOF STEP] using stutter_extend_concat replicate_stutter [PROOF STATE] proof (prove) using this: ?u \<...
{"llama_tokens": 231, "file": "Partial_Order_Reduction_Basics_Stuttering", "length": 2}
import pytest import numpy as np from deoxys_image import normalize from deoxys_image import apply_random_brightness, apply_random_contrast from deoxys_image import apply_random_gaussian_noise def test_normalize_all_channel(): base_data = np.array([np.arange(30) for _ in range(5)]) normalized_image = np.zero...
{"hexsha": "d368d12644d783da5f54b71588fc91bdee543c3f", "size": 6646, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_point_operation.py", "max_stars_repo_name": "huynhngoc/deoxys-image", "max_stars_repo_head_hexsha": "69faff2e28e062356ddfdc067e482aaae5db014d", "max_stars_repo_licenses": ["MIT"], "max_...
[STATEMENT] lemma mono_Increasing_o: "mono g ==> Increasing f \<subseteq> Increasing (g o f)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. mono g \<Longrightarrow> Increasing f \<subseteq> Increasing (g \<circ> f) [PROOF STEP] apply (simp add: Increasing_def Stable_def Constrains_def stable_def ...
{"llama_tokens": 320, "file": null, "length": 3}
from __future__ import absolute_import, division, print_function __metaclass__ = type # see https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef from os.path import join, basename, splitext from astwro.exttools import Runner from astwro.config import find_opt_file from .Sextractor import SexResults class Sca...
{"hexsha": "4d932915b54bbdb5fb98fff1b432e4331d466b71", "size": 3074, "ext": "py", "lang": "Python", "max_stars_repo_path": "astwro/sex/Scamp.py", "max_stars_repo_name": "majkelx/astwro", "max_stars_repo_head_hexsha": "4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 6, "...
from utils import SAP import tensorflow as tf import numpy as np class ActorCriticAgent: def __init__(self, env, actor, critic): self.env = env self.actor = actor self.critic = critic # We should initialize critic with small random values # Callbacks for logging (self -> ...) ...
{"hexsha": "d87e4fbfcda7cde5edb1454f277524c67138977a", "size": 3050, "ext": "py", "lang": "Python", "max_stars_repo_path": "assignment-1/agent.py", "max_stars_repo_name": "patrikkj/it3105", "max_stars_repo_head_hexsha": "2e856c42a8affec841d700b29bb59a426f67b232", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
import numpy as np import pandas as pd import matplotlib.pyplot as plt import cv2 import torch import torchvision from glob import glob from models import model_transfer, use_cuda from PIL import Image import torchvision.transforms as transforms,ToPILImage # list of class names by index, i.e. a name can be accessed li...
{"hexsha": "86f534399a338c03e9d84460d25a3da7d458f3e0", "size": 2711, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "rajan-blackboxes/dog-breed-classifier", "max_stars_repo_head_hexsha": "d82b83e8bc20aad7110277253f2f5948b933c84a", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
# -*- coding: utf-8 -*- """ Created on Tue Oct 9 22:01:28 2018 @author: JeremyJ """ import pandas as pd import matplotlib.pylab as plt import numpy as np import itertools from mpl_toolkits.mplot3d import Axes3D from collections import Counter import util from model import Model import matplotlib.gridspec as gridsp...
{"hexsha": "77b34fd53b1386ed3347febc1146c2a9233a100d", "size": 47763, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/Python/library.py", "max_stars_repo_name": "skyshine102/FitnessLandscape_SD", "max_stars_repo_head_hexsha": "529360e4f3bbb2ed5ed4cbecd624e725f6c245d8", "max_stars_repo_licenses": ["MIT"], "ma...
import numpy as np import cv2 import matplotlib.pyplot as plt from helper_functions import * # Define a class to receive the characteristics of each line detection class Line(): def __init__(self, image_shape, debug = False): # HYPERPARAMETERS # Number of sliding windows self.nwind...
{"hexsha": "51e0a412faf798dece36b3427647a48a52cf43ff", "size": 10149, "ext": "py", "lang": "Python", "max_stars_repo_path": "line.py", "max_stars_repo_name": "JoaoGranja/CarND-Advanced-Lane-Lines", "max_stars_repo_head_hexsha": "2341a152d07e7681fce7807d2e4d26b39265f8f7", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
from collections import defaultdict from typing import Dict from typing import List import numpy as np class ArrayStore: """Storage class for keeping track of arrays.""" def __init__(self) -> None: self._container = defaultdict() # type: Dict[str, LiFoStack] def __repr__(self) -> str: ...
{"hexsha": "99f523648cbaf8ad84b2d4b236cb0db021668ec9", "size": 1453, "ext": "py", "lang": "Python", "max_stars_repo_path": "glacier_flow_model/utils/store.py", "max_stars_repo_name": "munterfi/glacier-flow-model", "max_stars_repo_head_hexsha": "fd79b4dde841c7b49a2d9da57c203bb943873d49", "max_stars_repo_licenses": ["MIT...
from flask import Flask, jsonify, request, abort from flask_cors import CORS import os import sys import numpy as np from keras.models import load_model from keras import backend as K import tensorflow as tf import json models = None graph = None """ Function responsible for loading our models from a given path...
{"hexsha": "e891acbc3a9a781a67b2a446b18dc5eac0662f19", "size": 5695, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/web/api.py", "max_stars_repo_name": "icmc-data/bot-tweet", "max_stars_repo_head_hexsha": "eae84e5a5d54a642ae30825130122465996d1470", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null...
import unittest import numpy as np from flutter_utilities import * class TestComplex2RealNotation(unittest.TestCase): @classmethod def setUpClass(cls): pass @classmethod def tearDownClass(cls): pass def setUp(self): pass def tearDown(self): pass def tes...
{"hexsha": "ebe8ffea7791af6a7f79be0b707030c57724c91f", "size": 1371, "ext": "py", "lang": "Python", "max_stars_repo_path": "5_flutter_analysis_tools/test_flutter_utilities.py", "max_stars_repo_name": "mpentek/SWEToolbox", "max_stars_repo_head_hexsha": "dbebf6ea2b35dd7ed2c459e2ed8377e93b49fbaa", "max_stars_repo_licenses...
//======================================================================= // Copyright 1997, 1998, 1999, 2000 University of Notre Dame. // Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek // // Distributed under the Boost Software License, Version 1.0. (See // accompanying file LICENSE_1_0.txt or copy at // http...
{"hexsha": "5e33894f5e3f3539d8adfdcce7b1a4f5af008ee5", "size": 4125, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "game24/aoc171202.cpp", "max_stars_repo_name": "jiayuehua/adventOfCode", "max_stars_repo_head_hexsha": "fd47ddefd286fe94db204a9850110f8d1d74d15b", "max_stars_repo_licenses": ["Unlicense"], "max_stars...
from thinc.api import strings2arrays, NumpyOps, Ragged, registry import numpy import pytest from ..util import get_data_checker @pytest.fixture(params=[[], [(10, 2)], [(5, 3), (1, 3)], [(2, 3), (0, 3), (1, 3)]]) def shapes(request): return request.param @pytest.fixture def ops(): return NumpyOps() @pytes...
{"hexsha": "8de5341d785cca4ec0db2d11eada7bb5f4d41818", "size": 1975, "ext": "py", "lang": "Python", "max_stars_repo_path": "thinc/tests/layers/test_transforms.py", "max_stars_repo_name": "TheVinhLuong102/thinc", "max_stars_repo_head_hexsha": "7b54f728ddec7765a1d8a5e553d4b4b90b9edaec", "max_stars_repo_licenses": ["MIT"]...
""" StringCollision string collision between contact points origin_parent: position of contact on parent body relative to center of mass origin_child: position of contact on parent body relative to center of mass length: maximum distance between contact point """ mutable struct StringCollision{T,O...
{"hexsha": "af55b26ad6864bdb55e17ea11e574880bfa2286e", "size": 8247, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/contacts/collisions/string.jl", "max_stars_repo_name": "dojo-sim/Dojo.jl", "max_stars_repo_head_hexsha": "33ccdde8d7f74c4ea3c3bffdebcc6ed65959a5be", "max_stars_repo_licenses": ["MIT"], "max_sta...
# Tweet Analysis -- objective, predict the retweet level of a tweet import string import seaborn as sns import pandas as pd import matplotlib.pyplot as plt import numpy as np import os from sklearn.model_selection import train_test_split from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer analyser = S...
{"hexsha": "bcb846731afdde2b470ca97e61006fc8ad15313d", "size": 9457, "ext": "py", "lang": "Python", "max_stars_repo_path": "Clinton-Logistic-Regression.py", "max_stars_repo_name": "jcg122562/JCG-CEBD-1160-Project", "max_stars_repo_head_hexsha": "54a73d3cb6d0c6ca157e9b0916b16091882c8261", "max_stars_repo_licenses": ["MI...
# Load libraries from scipy.stats import uniform from sklearn import linear_model, datasets from sklearn.model_selection import RandomizedSearchCV # Load data iris = datasets.load_iris() X = iris.data y = iris.target # Create logistic regression logistic = linear_model.LogisticRegression() # Create regularization p...
{"hexsha": "c92c27b45a399b3060268bbda95988f8aceafa95", "size": 987, "ext": "py", "lang": "Python", "max_stars_repo_path": "Model Selection/tuning-using-random-search.py", "max_stars_repo_name": "WyckliffeAluga/data-chronicles", "max_stars_repo_head_hexsha": "5219fe9cdbafb9fd7be88727483952c4c13f2790", "max_stars_repo_li...
# -*- coding: utf-8 -*- """ """ import numpy as np from skimage import io, util # Loading a RAW image img_raw = util.img_as_float(io.imread("./../lighthouse_RAW_noisy_sigma0.01.png")) # Size of RAW image (ydim, xdim) = img_raw.shape # Creating array for each channel RGB cr = np.zeros((ydim, xdim)) cg = np.zeros((ydi...
{"hexsha": "aaf3e27866e9f849824a0d5c15329a51210beb10", "size": 5703, "ext": "py", "lang": "Python", "max_stars_repo_path": "task02/task02.py", "max_stars_repo_name": "supremacey/ComphotLab01", "max_stars_repo_head_hexsha": "94f16665083ba2742a3dc5507396f601bf381a98", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
import numpy as np class GeneralizedSuttonChenEAM: def __init__(self,StructureContainer=[],A=None,B=None,C=None): """ Equation is E_i = (sum 1/(r_ij^B))^C + sum 1/(r_ij^A) Attributes ----------- hyperparameters : dictionary(hyperparamters) dicitonary wit...
{"hexsha": "aaebaa7ed3563eda3a1f563ef85a5537c078bdfe", "size": 7801, "ext": "py", "lang": "Python", "max_stars_repo_path": "ipm/Potentials/ManyBodyPotentials.py", "max_stars_repo_name": "wilsonnater/IPM", "max_stars_repo_head_hexsha": "36f579c79a9b2d8c97df5c3636b4d0d606b0c0dc", "max_stars_repo_licenses": ["MIT"], "max_...
# %% import geopandas as gpd import pandas as pd from numpy import array_split from itertools import islice from sqlalchemy import create_engine from tqdm import tqdm from shapely.geometry import LineString import numpy as np from valhalla import Actor, get_config, get_help from valhalla.utils import decode_polyline e...
{"hexsha": "057bc4520ab006d2783a0e036f0b2a8b985571d8", "size": 3043, "ext": "py", "lang": "Python", "max_stars_repo_path": "cabi/valhalla_routing.py", "max_stars_repo_name": "mlinds/cabi-data", "max_stars_repo_head_hexsha": "2fa93fe5e0f87bdd13daff09e7224aafeeccbc10", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
@testset "Statistics" begin fname = joinpath(dirname(@__FILE__), "..", "data", "test_Hz19.5-testing.bdf") s = read_SSR(fname) @testset "Global Field Power" begin ~ = gfp(s.data) # TODO: Check result end end
{"hexsha": "06d2823c8ec3a5deaef4233fc56d4a171720fa8b", "size": 236, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/statistics/gfp.jl", "max_stars_repo_name": "behinger/Neuroimaging.jl", "max_stars_repo_head_hexsha": "0bed495b40cced7f1945931f26305b809cf0b501", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
#!/usr/bin/python import numpy as np import pytest from cvxopt import matrix, solvers from homeworks.hw01.perceptron import (calculate_p_f_neq_g, perceptron_learning, label_points, random_line, random_points) NUM_RUNS = 1000 MONTE_CARLO_NUM_POINTS = 1000 solvers.options['show_progress'] = False # Disable c...
{"hexsha": "f936d70c8ec309b3029ea9586b2da2a0f6c11df1", "size": 3155, "ext": "py", "lang": "Python", "max_stars_repo_path": "homeworks/hw07/svm.py", "max_stars_repo_name": "danieljl/Caltech-LFD-Solution", "max_stars_repo_head_hexsha": "c50b25f4540124879bca8288fe7f0b3d56573ca8", "max_stars_repo_licenses": ["MIT"], "max_s...
from __future__ import division import numpy as np import tensorflow as tf import os import pickle import math from math import exp, expm1 # FUN = performs uniform quantization def uniform_quant(x,x_max,x_min,nbits,type=0): L = 2**nbits range = x_max-x_min q = range/L # step size if (type): ...
{"hexsha": "c1b86908c183da668acd7af97a37a0cf3f1c58df", "size": 1968, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/examples/classifier_compression/sinreq_v2_svhn_runcode/mu_law_quantize.py", "max_stars_repo_name": "he-actlab/waveq.code", "max_stars_repo_head_hexsha": "024d55af6d989d4074d3e555d03b76a2f7eac...
\section{Reference frame of the grids} \subsection{Vertical alignment} There are several non-intuitive hits about definition of coordinete system in the code: \begin{itemize} \item The code works in coordinate system where the origin of sampling grid is always in point (x,y,z)=(0,0,0). The geometry of sampl...
{"hexsha": "0d66721f50f38f70e8ba69f9a57f6c7be84d8fad", "size": 1940, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/technical_details/technical_details.tex", "max_stars_repo_name": "eimrek/ProbeParticleModel", "max_stars_repo_head_hexsha": "31494db595cdc1763de5fb73b2f63dfe8280e7fe", "max_stars_repo_licenses":...
import os import time import numpy as np import cv2 import depthai as dai import contextlib import glob2 as glob # first do: pip install future # tkinter should work after this import tkinter as tk # Enable / Disable debug statements verbose = True currExp = 1 currISO = 100 fInit = 0 expInit = 0 isoInit = 0 wbInit ...
{"hexsha": "47022d91d3c9649b6f2363465f9cdcfcd8e4f0c6", "size": 6874, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/calibrationRM.py", "max_stars_repo_name": "ScripteJunkie/T3", "max_stars_repo_head_hexsha": "f0f205f39bf3dc23c2dc13d0037fbae6ac296874", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
# @title Zurich Instruments HDAWG instrument driver # @author Christian Križan # @contrib Andreas Bengtsson, Simon Gustavsson, Christopher Warren # @date 2020-09-14 # @version v0.835.1 # @other The author of this driver takes no responsibility for # any and all ...
{"hexsha": "b00ce76050094ca07434fddf61f6f114b06ed89e", "size": 142593, "ext": "py", "lang": "Python", "max_stars_repo_path": "Zurich Instruments HDAWG.py", "max_stars_repo_name": "christiankrizan/Labber-drivers-for-Zurich-Instruments-HDAWG-and-UHFQA", "max_stars_repo_head_hexsha": "df399b257d61b9056a709793f4510045bc725...
[STATEMENT] lemma (in ring) indexed_eval_in_carrier: assumes "list_all carrier_coeff Ps" shows "carrier_coeff (indexed_eval Ps i)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. carrier_coeff (indexed_eval Ps i) [PROOF STEP] using assms indexed_eval_aux_in_carrier[of "rev Ps"] [PROOF STATE] proof (prove) using thi...
{"llama_tokens": 211, "file": null, "length": 2}
/* ============================================================================== KratosStructuralApplication A library based on: Kratos A General Purpose Software for Multi-Physics Finite Element Analysis Version 1.0 (Released on march 05, 2007). Copyright 2007 Pooyan Dadvand, Riccardo Rossi, Janosch Staschei...
{"hexsha": "2d8294df9e60ed3da192165c63acaaf0bce84a77", "size": 15834, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "custom_elements/kinematic_linear_nurbs.cpp", "max_stars_repo_name": "rwilliams01/isogeometric_structural_application", "max_stars_repo_head_hexsha": "5f0468c35ae0b1f8e16861b3568d755222b8a967", "max...
import logging import os import networkx as nx import copy import re from enum import Enum from IPython import embed from fnmatch import fnmatch from android.dac import Cred, AID_MAP, AID_MAP_INV from android.sepolicy import SELinuxContext from android.capabilities import Capabilities log = logging.getLogger(__name__...
{"hexsha": "f79deb089741027feddcec2c5ba7400fb8ce1d67", "size": 82680, "ext": "py", "lang": "Python", "max_stars_repo_path": "overlay.py", "max_stars_repo_name": "7homasSutter/BigMAC", "max_stars_repo_head_hexsha": "4c434796decf8d6119813e6bd30ee822193ee046", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count"...
\documentclass[a4paper,11pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage{underscore} \newcommand{\code}[1]{\texttt{#1}} \newtheorem{theorem}{Theorem} \title{Drawing thermal ellipsoids with OpenGL} \author{Luc J. Bourhis} \begin{document} \maketitle \section{From anisotropic displacements to elli...
{"hexsha": "85d9f41d38566f8c2d1ae75cad7c2e2c9b47cf36", "size": 6435, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "gltbx/adp-display.tex", "max_stars_repo_name": "rimmartin/cctbx_project", "max_stars_repo_head_hexsha": "644090f9432d9afc22cfb542fc3ab78ca8e15e5d", "max_stars_repo_licenses": ["BSD-3-Clause-LBNL"], ...
""" Bowls and Oranges problem in cpmpy. From BitTorrent Developer Challenge http://www.bittorrent.com/company/about/developer_challenge ''' You have 40 bowls, all placed in a line at exact intervals of 1 meter. You also have 9 oranges. You wish to place all the oranges in the bowls, no more than one orange in each b...
{"hexsha": "32d803b6c43dc89c8f5bebd9798f359db2200d3f", "size": 1555, "ext": "py", "lang": "Python", "max_stars_repo_path": "cpmpy/bowls_and_oranges.py", "max_stars_repo_name": "hakank/hakank", "max_stars_repo_head_hexsha": "313e5c0552569863047f6ce9ae48ea0f6ec0c32b", "max_stars_repo_licenses": ["MIT"], "max_stars_count"...
/****************************************************************************** * NOTICE * * * * This software (or technical data) was produced for the U.S. Government * ...
{"hexsha": "ed0dc6fdb78bf9a8a92edc82e6940b801181660b", "size": 23334, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "cpp/KeywordTagging/KeywordTagging.cpp", "max_stars_repo_name": "openmpf/openmpf-components", "max_stars_repo_head_hexsha": "acf012aeda0bac902e4678a97338b0aa5ffe38bf", "max_stars_repo_licenses": ["A...
""" Notes: Many of .dat files are written using Matlab. Hence, there are "-1" subtraction to Python 0-based indexing """ from __future__ import division import math import numpy as np from config import _3DMM_DEFINITION_DIR VERTEX_NUM = 53215 TRI_NUM = 105840 def load_3DMM_tri(): # Triangle definition (i.e. fro...
{"hexsha": "d7799b59d5001aa0815f5af0f4c79f62f47ac9dd", "size": 2307, "ext": "py", "lang": "Python", "max_stars_repo_path": "_3dmm_utils.py", "max_stars_repo_name": "3D-Face/Nonlinear_Face_3DMM", "max_stars_repo_head_hexsha": "f0f0fafa7c1453cad80b73079f391858e9fa5af6", "max_stars_repo_licenses": ["Apache-2.0"], "max_sta...
theory trinhlibs imports Main begin (*----supporting functions-------------------------------------------------------*) fun lookup_1 :: "nat \<Rightarrow> (nat * nat list) list \<Rightarrow> nat list" where "lookup_1 k [] = []" | "lookup_1 k (x#xs) = (if fst x = k then (snd x) else lookup_1 k xs)" fun lookup_2 :: "...
{"author": "TrinhLK", "repo": "Isabelle-Code", "sha": "6eb41d730967df6b4dca606376a6825d16968c20", "save_path": "github-repos/isabelle/TrinhLK-Isabelle-Code", "path": "github-repos/isabelle/TrinhLK-Isabelle-Code/Isabelle-Code-6eb41d730967df6b4dca606376a6825d16968c20/Jan21-Isab/trinhlibs.thy"}
# This module contains implementation of the primal-dual algorithm and itc coordinate extensions for the basis pursuit problem. import numpy as np import scipy.linalg as LA from time import process_time, time from numba import jit, vectorize from prox_numba import prox_l1 from utils import subdif_gap def pd_basis_p...
{"hexsha": "4c4a6147125c8df46b7a768ee1c85eb44c9f27ee", "size": 11961, "ext": "py", "lang": "Python", "max_stars_repo_path": "basis_pursuit/algorithms.py", "max_stars_repo_name": "ymalitsky/coo-pda", "max_stars_repo_head_hexsha": "8b604c1b2927d3f0f9adb49f2d09f88481e5d734", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import numpy as np import fidimag # PdFe on Ir(111) [PRL, 114(17):1-5, 2015] Ms = 1.1e6 D = -3.9e-3 XL = 15e-9 YL = XL ZL = XL nx = 2 ny = 1 nz = 1 def set_D(pos): x, y, z = pos if x < XL/2: return 0 else: return -D mesh = fidimag.common.CuboidMesh(nx=nx,ny=ny,nz=nz, dx=XL/nx, dy=YL/n...
{"hexsha": "c1f9106a167e9698e3da81e8ebbf20863de6e4ce", "size": 525, "ext": "py", "lang": "Python", "max_stars_repo_path": "sandbox/more-dmi/dmi-test.py", "max_stars_repo_name": "computationalmodelling/fidimag", "max_stars_repo_head_hexsha": "07a275c897a44ad1e0d7e8ef563f10345fdc2a6e", "max_stars_repo_licenses": ["BSD-2-...
[STATEMENT] lemma radical_sqrt_circle_circle_intersection: assumes absA: "(abscissa A) \<in> radical_sqrt" and ordA: "(ordinate A) \<in> radical_sqrt" and absB: "(abscissa B) \<in> radical_sqrt" and ordB: "(ordinate B) \<in> radical_sqrt" and absC: "(abscissa C) \<in> radical_sqrt" and ordC: "(ordinate C...
{"llama_tokens": 5161, "file": "Impossible_Geometry_Impossible_Geometry", "length": 37}
import typing import json import os import warnings import pandas as pd import numpy as np from .base import AbstractAdapter import dalmatian class FirecloudAdapter(AbstractAdapter): """ Job input adapter Parses inputs as firecloud expression bois if enabled, job outputs will be written back to workspa...
{"hexsha": "79c4a24c377e85a8367c033d378dee0293c8e67a", "size": 7396, "ext": "py", "lang": "Python", "max_stars_repo_path": "canine/adapters/firecloud.py", "max_stars_repo_name": "Marlin-Na/canine", "max_stars_repo_head_hexsha": "5a56360231d381239934e4a44143f9c9aed7ef22", "max_stars_repo_licenses": ["BSD-3-Clause"], "ma...
[STATEMENT] lemma vertices_restrict[simp]: "vertices (restrict G) = vertices G" [PROOF STATE] proof (prove) goal (1 subgoal): 1. vertices (restrict G) = vertices G [PROOF STEP] by(cases G,auto simp:restrict_def)
{"llama_tokens": 82, "file": "Graph_Saturation_LabeledGraphs", "length": 1}
import numpy as np from scipy.stats import pearsonr from sklearn.metrics import mean_absolute_error, mean_squared_error # Mean absolute error def mae(y_pred, y, mask=None, device=None): try: y_pred, y = y_pred.numpy().squeeze(), y.numpy().squeeze() except TypeError: y_pred, y, mask = y_pred.cpu().n...
{"hexsha": "725167bdfa7d05b35d539b95301cc56d4e15a65e", "size": 1633, "ext": "py", "lang": "Python", "max_stars_repo_path": "deepsphere_model/deepsphere/utils/metrics.py", "max_stars_repo_name": "metinsuloglu/ca-flow-from-shape", "max_stars_repo_head_hexsha": "b4839a726cfe65267d51253228a37f8fd68b7f27", "max_stars_repo_l...
\documentclass[letterpaper,final,12pt,reqno]{amsart} \usepackage[total={6.3in,9.2in},top=1.1in,left=1.1in]{geometry} \usepackage{times,bm,bbm,empheq,fancyvrb,graphicx} \usepackage[dvipsnames]{xcolor} \usepackage{tikz} \usetikzlibrary{decorations.pathreplacing} % hyperref should be the last package we load \usepackag...
{"hexsha": "4f81ae0383500d0565395cfb572c1d6df70fc4c1", "size": 76492, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "paper/simp.tex", "max_stars_repo_name": "bueler/stokes-implicit", "max_stars_repo_head_hexsha": "e6f40798c9d441316d1b88a93b9103b8e6cb5e89", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1,...
""" Trading-Technical-Indicators (tti) python library File name: test_utils_trading_simulation.py tti.utils package, trading_simulation.py module unit tests. """ import unittest import pandas as pd import numpy as np from tti.utils.trading_simulation import TradingSimulation from tti.utils.exceptions import Wron...
{"hexsha": "3da6ea931ba75aeceeae3b059c7b9e4cb7100a32", "size": 32952, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_utils_trading_simulation.py", "max_stars_repo_name": "Bill-Software-Engineer/trading-technical-indicators", "max_stars_repo_head_hexsha": "fc00008a41da54f160609343e866c72306f4962c", "m...
import cmath import numpy as np import seaborn as sns import matplotlib.pyplot as plt import scipy.signal as signal sns.set() class ModifiedCovarianceMethod(): def __init__(self): self.f = None self.default_f = np.linspace(0, 0.5, 500) self.x = None self.N = None self.p = ...
{"hexsha": "78b283e3f93567c0beeae6d1c8dba3861312c06c", "size": 3176, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/source/parametric/ModifiedCovarianceMethod.py", "max_stars_repo_name": "e71828/spectral-estimation", "max_stars_repo_head_hexsha": "9e4c3f4ed867e97ec764f85d577a7fcaac6a8a7c", "max_stars_rep...
""" Create feature files. Before this script is run, the `download.py` should get executed to generate a handwriting_datasets.pickle with exactly those symbols that should also be present in the feature files and only raw_data that might get used for the test-, validation- and training set. """ # Core Library module...
{"hexsha": "6092274fdf05ebda6998f922ffcfe63742e14ea8", "size": 13400, "ext": "py", "lang": "Python", "max_stars_repo_path": "hwrt/create_ffiles.py", "max_stars_repo_name": "MartinThoma/hwrt", "max_stars_repo_head_hexsha": "7b274fa3022292bb1215eaec99f1826f64f98a07", "max_stars_repo_licenses": ["MIT"], "max_stars_count":...
from stock_data_analysis_module.reinforcement_learning.deep_q.memory.agent_transitional_memory_abc import AgentTransitionMemoryABC from typing import Tuple, List import numpy as np class CircularTransitionalMemory(AgentTransitionMemoryABC): def __init__(self, input_shape: Tuple[int, int, int], memory_size...
{"hexsha": "4494f91fcb736bb4dfa9901374a30bdb3568f625", "size": 2696, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/stock_data_analysis_module/reinforcement_learning/deep_q/memory/circular_transitional_memory.py", "max_stars_repo_name": "Freitacr/ML-StockAnalysisProject", "max_stars_repo_head_hexsha": "3741...
# 4. faza: Analiza podatkov logisticna <- function(x) { 100 / (1 + exp(-x)) } logisticna_inv <- function(y) { log(y / (100 - y)) } logisticna_breaks <- . %>% logisticna() %>% extended_breaks()() %>% logisticna_inv() logisticna_trans <- trans_new("logistična funkcija", logisticna, logisticna_inv) primerjava_rasti_l...
{"hexsha": "ea93dfe90827d93dae9e1d7719b04089fa04262a", "size": 7497, "ext": "r", "lang": "R", "max_stars_repo_path": "analiza/analiza.r", "max_stars_repo_name": "M4rble/APPR-2019-20", "max_stars_repo_head_hexsha": "f247539508025cb8c0ccfb0d9c9d2d60118f51ef", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
setwd('/home/pc-752828/Dev/results-search-master/outputs-normal') library(reshape2) library(nortest) data_norm <- read.csv(file = 'output-n-price.csv', sep = ',', header = T) get_df <- function(seed, data) { my_ite <- 10 bo1 <- list() bo2 <- list() bo3 <- list() bo4 <- list() rs <- list() app <- list()...
{"hexsha": "2a61484c199ed56d86bcf61f70a3dd9b8ff921cd", "size": 4776, "ext": "r", "lang": "R", "max_stars_repo_path": "results-dissertation/test-cost.r", "max_stars_repo_name": "lmcad-unicamp/PB3Opt", "max_stars_repo_head_hexsha": "21759ca06c36e8a05f310d43a08e43063b1efd76", "max_stars_repo_licenses": ["MIT"], "max_stars...
"""Metrics. Evaluation metrics * :func:`.log_prob` * :func:`.acc` * :func:`.accuracy` * :func:`.mse` * :func:`.sse` * :func:`.mae` ---------- """ __all__ = [ "accuracy", "mean_squared_error", "sum_squared_error", "mean_absolute_error", "r_squared", "true_positive_rate", "true_negative_...
{"hexsha": "6f7d9a69e421eaba6fcf3f607083c4d2127d8817", "size": 4549, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/probflow/utils/metrics.py", "max_stars_repo_name": "chiragnagpal/probflow", "max_stars_repo_head_hexsha": "1ba0619cd4f482a015cd25633d2f113d5d0f3476", "max_stars_repo_licenses": ["MIT"], "max_s...
/************************************************************************/ /* */ /* Copyright 2009 by Ullrich Koethe */ /* */ /* This file is p...
{"hexsha": "2819bc80e25ec3831613e4421a31a893eaf5a883", "size": 35172, "ext": "cxx", "lang": "C++", "max_stars_repo_path": "vigranumpy/src/core/convolution.cxx", "max_stars_repo_name": "BSeppke/vigra", "max_stars_repo_head_hexsha": "490213d8954a03bdb985b52cfaafd6389431efd8", "max_stars_repo_licenses": ["MIT"], "max_star...
impts=zeros(yw*exf,xw*exf); n_rendered=0; weight=str2double(get(handles.weight,'String')); size_fac=str2double(get(handles.size_fac_edit,'String')); for i=nstart:nend if xc(i)>=1 && yc(i)>=1 && xc(i)<xw*exf && yc(i)<yw*exf && N(i)>0 wide=ceil(size_fac*lppix(i)*1.5+1); % if wide>20 % wide=20;...
{"author": "aludnam", "repo": "MATLAB", "sha": "020b5cb02cc843e09a0ed689589382f18cce5e6d", "save_path": "github-repos/MATLAB/aludnam-MATLAB", "path": "github-repos/MATLAB/aludnam-MATLAB/MATLAB-020b5cb02cc843e09a0ed689589382f18cce5e6d/TGgui070708/render_func.m"}
#!/bin/python import numpy import unittest from src import ciphertext from src import homomorphic_arithmetic class HomomorphicArithmeticTest(unittest.TestCase): @classmethod def setUpClass(cls): cls.dimension = 3 cls.odd_modulus = 5 cls.ciphertexts = [ ciphertext.Ciphertex...
{"hexsha": "76398d5d90b2722b845b39beedd0ff07eb7afffa", "size": 4829, "ext": "py", "lang": "Python", "max_stars_repo_path": "tst/homomorphic_arithmetic_test.py", "max_stars_repo_name": "UMComp4140ATeam/Raymond", "max_stars_repo_head_hexsha": "2ccff4d15835ab386d3e25b2bb3a7ed03feffe81", "max_stars_repo_licenses": ["MIT"],...
function generate_execute(domain::Domain, state::State, domain_type::Symbol, state_type::Symbol) execute_def = quote function execute(domain::$domain_type, state::$state_type, term::Term) execute(domain, state, get_action(domain, term.name), term.args) end ...
{"hexsha": "3768cd92b7a4dbcaf7084b92d7974f94179e994f", "size": 2489, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/compiler/execute.jl", "max_stars_repo_name": "JuliaPlanners/PDDL.jl", "max_stars_repo_head_hexsha": "8bbb7a6a3f87ea9d18ace8c4356dc5658cc75fad", "max_stars_repo_licenses": ["Apache-2.0"], "max_s...
"""Compute the mean number of labels.""" import os import numpy as np def _get_nb_labels_apply(row, column_label, column_alt): all_labels = [] nb_labels = 0 label = row[column_label] alt = row[column_alt] if label != '' and label is not None: nb_labels = 1 all_labels += [label] ...
{"hexsha": "538d9107726227a0ea6514dad0c9c07619827af8", "size": 2366, "ext": "py", "lang": "Python", "max_stars_repo_path": "orphanet_translation/metrics/synonyms.py", "max_stars_repo_name": "euranova/orphanet_translation", "max_stars_repo_head_hexsha": "87a761ed273928d4b606db43e813f936682ee0e3", "max_stars_repo_license...
import copy import numpy as np import distance from jellyfish._jellyfish import damerau_levenshtein_distance import unicodecsv def DL_Distance(str1, str2): print(str1, str2) print("distance 1: ", distance.nlevenshtein(str1, str2)) print("distance 2: ", damerau_levenshtein_distance(str1, str2)) dls = (...
{"hexsha": "98f6dd0852a3d514daa216499c6405d0400126e3", "size": 575, "ext": "py", "lang": "Python", "max_stars_repo_path": "Evaluate/StringDistance.py", "max_stars_repo_name": "DinhLamPham/PredictingESN", "max_stars_repo_head_hexsha": "f8e6b8f9c0a2d4c052c6178f4b4fe793055050ff", "max_stars_repo_licenses": ["Apache-2.0"],...
[STATEMENT] lemma adj_iso2: "f \<stileturn> g \<Longrightarrow> mono g" [PROOF STATE] proof (prove) goal (1 subgoal): 1. f \<stileturn> g \<Longrightarrow> mono g [PROOF STEP] unfolding adj_def mono_def [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<forall>x y. (f x \<le> y) = (x \<le> g y) \<Longrightarrow> \<fo...
{"llama_tokens": 178, "file": "Order_Lattice_Props_Galois_Connections", "length": 2}
# Copyright 2022 Google LLC # # 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 to in writing, so...
{"hexsha": "81453c3bf0995be0bd3bcc0ed64d6e9976316e50", "size": 6172, "ext": "py", "lang": "Python", "max_stars_repo_path": "bigbench/models/query_logging_model.py", "max_stars_repo_name": "sarahadlerrous/BIG-bench", "max_stars_repo_head_hexsha": "e71e63598538674cece60f8457475f8ddbdf785a", "max_stars_repo_licenses": ["A...
import numpy as np import collections import copy from generic.data_provider.batchifier import AbstractBatchifier from generic.data_provider.image_preprocessors import get_spatial_feat from generic.data_provider.nlp_utils import padder, padder_3d class GuesserBatchifier_RAH(AbstractBatchifier): def __init__(sel...
{"hexsha": "086b59de4402f2fbb556f42914f9adb75dba4574", "size": 4108, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/guesswhat/data_provider/guesser_qa_batchifier.py", "max_stars_repo_name": "zipengxu-c/ADVSE-GuessWhat", "max_stars_repo_head_hexsha": "44ca8b1e2368b4afd90a74a8c22a6553e8fc351e", "max_stars_rep...
##### file path # input path_df_D = "tianchi_fresh_comp_train_user.csv" path_df_part_1 = "df_part_1.csv" path_df_part_2 = "df_part_2.csv" path_df_part_3 = "df_part_3.csv" path_df_part_1_tar = "df_part_1_tar.csv" path_df_part_2_tar = "df_part_2_tar.csv" path_df_part_1_uic_label = "df_part_1_uic_label.csv" ...
{"hexsha": "98ad20fd81768c65669eabd9c601f2a81b23bd53", "size": 74288, "ext": "py", "lang": "Python", "max_stars_repo_path": "model_lr_and_gdbt_and_xgboost/feature_construct/feature_construct_part_3.py", "max_stars_repo_name": "Goooaaal/ali_freshman_compatiton", "max_stars_repo_head_hexsha": "8d3dd71f0757cb08d915f89daf1...