text
stringlengths
0
1.25M
meta
stringlengths
47
1.89k
#!/usr/bin/env python import numpy as np import matplotlib.pyplot as plt from osgeo import gdal from skimage.filters import threshold_otsu from skimage.morphology import binary_dilation, binary_erosion, binary_closing, binary_opening # initialize driver driver = gdal.GetDriverByName('GTiff') def write_image(img, file...
{"hexsha": "8e43b78d13e0f6fdd009378867fa04e31ac02ad9", "size": 1679, "ext": "py", "lang": "Python", "max_stars_repo_path": "basics/morphology.py", "max_stars_repo_name": "h4k1m0u/scikit-image-scripts", "max_stars_repo_head_hexsha": "2197f23b904463b358421bc8a8bd85a3cb4cc2f1", "max_stars_repo_licenses": ["MIT"], "max_sta...
import keep_alive import asyncio import json import os import random import time import colorama import discord import numpy import requests from colorama import Fore from discord.ext import commands from discord.utils import get with open('config.json') as f: config = json.load(f) token = os.getenv('TOKEN') ...
{"hexsha": "3f76f438a61ce135e056da4e2f1436775f3f530e", "size": 1908, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "Adiezt/Streaming-Activity", "max_stars_repo_head_hexsha": "dab8fedf9da120192a8a981c093a71d1fdc07693", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count"...
struct QuadratureRule{T,N} order::Int nodes::Vector{T} weights::Vector{T} end function QuadratureRule(order, nodes::AbstractVector{T}, weights::AbstractVector{T}, TT=T) where {T} @assert length(nodes) == length(weights) QuadratureRule{TT, length(nodes)}(order, nodes, weights) end """ Integrate a ...
{"hexsha": "3afb22a5845635ac669e0a0c77caebf1f593d9c1", "size": 1595, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/quadrature_rule.jl", "max_stars_repo_name": "JuliaGNI/QuadratureRules.jl", "max_stars_repo_head_hexsha": "188e1a1e85970803ae4456b5158a771a7aeeafd4", "max_stars_repo_licenses": ["MIT"], "max_sta...
[STATEMENT] lemma wp_omega_fix: "wp (x ^ \<omega>) p = wp x (wp (x ^ \<omega>) p) \<sqinter> p" [PROOF STATE] proof (prove) goal (1 subgoal): 1. wp (x ^ \<omega>) p = wp x (wp (x ^ \<omega>) p) \<sqinter> p [PROOF STEP] apply (subst omega_fix) [PROOF STATE] proof (prove) goal (1 subgoal): 1. wp (x * x ^ \<omega> \<sq...
{"llama_tokens": 190, "file": "MonoBoolTranAlgebra_Statements", "length": 2}
using DashBootstrapComponents, DashHtmlComponents list_group = html_div([ dbc_listgroup( [ dbc_listgroupitem("Item 1"), dbc_listgroupitem("Item 2"), dbc_listgroupitem("Item 3"), ], horizontal=true, className="mb-2", ), dbc_listgroup( ...
{"hexsha": "4d9b5f1a2ff4ab52cc1d1aeedb763e380432ed06", "size": 495, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "docs/components_page/components/list_group/horizontal.jl", "max_stars_repo_name": "harisbal/dash-bootstrap-components", "max_stars_repo_head_hexsha": "d7c91c08e0821ccfd81330db912cde71ec57c171", "max...
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from yolov3.utils.data.bbox import compute_bbox_ious class YOLOLayer(nn.Module): def __init__(self, in_channels, all_anchors, anchor_indices, downsample_rate, n_classes, iou_thresh): """YOLO layer ...
{"hexsha": "d37057629a7ccf0d1750f509bbfa09eb1f357bc1", "size": 8646, "ext": "py", "lang": "Python", "max_stars_repo_path": "yolov3/models/yolo_layer.py", "max_stars_repo_name": "hysts/pytorch_yolov3", "max_stars_repo_head_hexsha": "6d4c7a1e42d366894effac8ca52f7116f891b5ab", "max_stars_repo_licenses": ["MIT"], "max_star...
import streamlit as st import pandas as pd import plotly.express as px from sklearn.decomposition import PCA from sklearn.preprocessing import StandardScaler import numpy as np def pca_maker(data_import): numerical_columns_list = [] categorical_columns_list = [] for i in data_import.columns: if da...
{"hexsha": "71edfb649013afc88a9c157ec5a6521abdb715b4", "size": 1282, "ext": "py", "lang": "Python", "max_stars_repo_path": "application_functions.py", "max_stars_repo_name": "KishanTeli/pca_python_application", "max_stars_repo_head_hexsha": "3a9984c009d99feaf565a157f32b03d7036cfcda", "max_stars_repo_licenses": ["MIT"],...
[STATEMENT] lemma dis_introR[intro]: assumes "\<psi> \<pi>l" shows "dis \<phi> \<psi> \<pi>l" [PROOF STATE] proof (prove) goal (1 subgoal): 1. dis \<phi> \<psi> \<pi>l [PROOF STEP] using assms [PROOF STATE] proof (prove) using this: \<psi> \<pi>l goal (1 subgoal): 1. dis \<phi> \<psi> \<pi>l [PROOF STEP] unfolding o...
{"llama_tokens": 214, "file": "HyperCTL_Shallow", "length": 3}
# experiment tracker import sys import os import numpy as np import pandas as pd from dask import compute, delayed sys.path.append('../../') sys.path.append('../') sys.path.append('../../experiment-impact-tracker/') from experiment_impact_tracker.data_interface import DataInterface from experiment_impact_tracker.data...
{"hexsha": "2fce3b435ac597d8c9f210baabe7446a94d6eaeb", "size": 8335, "ext": "py", "lang": "Python", "max_stars_repo_path": "utils/dashboard_utils.py", "max_stars_repo_name": "neurodatascience/watts_up_compute", "max_stars_repo_head_hexsha": "1ed41e62690f99f699b44180208689cc19616bb7", "max_stars_repo_licenses": ["MIT"],...
import numpy as np from sklearn.decomposition import DictionaryLearning from . import create_patches_overlap, patch_average class DLInpainting(): """ Inpainting using supervised dictionary learning. Adapted from sklearn.decomposition.DictionaryLearning. """ def __init__(self, y, ytruth, n_iter=20...
{"hexsha": "0e6bf25509186b832ecdeed30aec09005c6fc866", "size": 4181, "ext": "py", "lang": "Python", "max_stars_repo_path": "experiments/others/utils/inpainting_dl.py", "max_stars_repo_name": "bmalezieux/plipy", "max_stars_repo_head_hexsha": "35d17cad908219013fa43d81c4aeb6bb46ce9384", "max_stars_repo_licenses": ["MIT"],...
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np, os from pyapprox.orthonormal_polynomials_1d import \ jacobi_recurrence, hermite_recurrence, gauss_quadrature from pyapprox.utilities import beta_pdf, beta_pdf_derivative from functools i...
{"hexsha": "9c4893aef7ae41b257fcf2726c655583dc562743", "size": 23308, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyapprox/univariate_quadrature.py", "max_stars_repo_name": "samtx/pyapprox", "max_stars_repo_head_hexsha": "c926d910e30fbcfed7d0621175d3b0268d59f852", "max_stars_repo_licenses": ["MIT"], "max_sta...
using Distances # kernelweights.jl: kernel weights for nonparametrics function kernelweights(x, xeval, bandwidth, prewhiten=true, kernel="gaussian", neighbors=1) if prewhiten v = cov(x) if isposdef(v) P = inv(chol(v)) else P = sqrt(inv(diag(v))) end ...
{"hexsha": "fbf404e22ca81e904365333b6a1c5b9ada09a775", "size": 1128, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/NP/kernelweights.jl", "max_stars_repo_name": "UserQuestions/Econometrics.jl", "max_stars_repo_head_hexsha": "f9db0ca3046e7c5328f085581a12b1c733cf9bcf", "max_stars_repo_licenses": ["MIT"], "max_...
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
{"hexsha": "0a333b5154654384a7b902e5b6b74e2d3f98859a", "size": 46893, "ext": "py", "lang": "Python", "max_stars_repo_path": "mindspore_xai/runner/image_classification_runner.py", "max_stars_repo_name": "mindspore-ai/xai", "max_stars_repo_head_hexsha": "6d8046ba94cc8f319c99fb7f7e7eea163a170693", "max_stars_repo_licenses...
""" ======= Montage ======= """ import os import json from typing import List, TypeVar, Dict, Optional from PySide2.QtGui import QCursor from PySide2.QtCore import QTimer, QSize, Qt from PySide2.QtWidgets import QLabel, QComboBox, QTableWidgetItem, QApplication, QCheckBox from PySide2.QtGui import QResizeEvent impor...
{"hexsha": "4fbfdaa331983da9bbac09f7a442ffbb5eba6f7c", "size": 29493, "ext": "py", "lang": "Python", "max_stars_repo_path": "bci_framework/framework/widgets/montage.py", "max_stars_repo_name": "UN-GCPDS/bci-framework", "max_stars_repo_head_hexsha": "2bf8e2912a51d909604d680c96cac159b26e566f", "max_stars_repo_licenses": ...
from bilma import bilma_model import numpy as np import twitt_mask_seq_wordpiece_classification from tensorflow import keras from tensorflow.keras.models import Model, load_model import tensorflow as tf from tensorflow.keras.layers import Dense, Dropout import getopt, sys arglist = sys.argv[1:] options = "hc:e:t:m:"...
{"hexsha": "347d41b61910524875dca867bd46d266513e4c11", "size": 3673, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_twitt_classifier.py", "max_stars_repo_name": "msubrayada/bilma", "max_stars_repo_head_hexsha": "d30d49e883cd78bfdd97330a63a7282f5d31a2e0", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
import PySimpleGUI as sg import os import io import json import cv2 import glob import numpy as np import PIL.Image from cairosvg import svg2png ######################################## ## CalibrationTargetInfo ## -- just stores nx/ny corners at the moment ## -- could be used for different kinds of targe...
{"hexsha": "09a9c04728f9f53af90b12763cea265cc610e4b6", "size": 6378, "ext": "py", "lang": "Python", "max_stars_repo_path": "Scripts/calibration/gui-target.py", "max_stars_repo_name": "n1ckfg/volumetricpipeline", "max_stars_repo_head_hexsha": "374fc479817132030ef6e001e38d603847832a01", "max_stars_repo_licenses": ["MIT"]...
%& -shell-escape \documentclass[reqno,12pt,oneside,dvipsnames,svgnames,table,x11names]{report} % 12 point font, print one-sided \usepackage{pdfpages} % https://tex.stackexchange.com/a/23776 \usepackage{amsmath} \usepackage{amsxtra} % Use various AMS/math packages \usepackage{amsthm} \usepackage{amssymb} \usepackage{...
{"hexsha": "8f9f4f7b12da6bf668b22640a2d90725ade51c9d", "size": 9861, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "tex_thesis/thesis.tex", "max_stars_repo_name": "dmpe/master", "max_stars_repo_head_hexsha": "4703c12362ce7cf4e7f2f7e7154010ff9e2677e7", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "...
import unittest from cupy import testing import cupyx.scipy.special # NOQA import numpy @testing.gpu @testing.with_requires('scipy') class TestDigamma(unittest.TestCase): @testing.with_requires('scipy>=1.1.0') @testing.for_all_dtypes(no_complex=True) @testing.numpy_cupy_allclose(atol=1e-5, scipy_name='...
{"hexsha": "eb85e77d12036ee7e9128817289c11b5e9f80a66", "size": 1673, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/cupyx_tests/scipy_tests/special_tests/test_digamma.py", "max_stars_repo_name": "dendisuhubdy/cupy", "max_stars_repo_head_hexsha": "b612827e858b8008455a76e8d9b396386c1e4467", "max_stars_repo_...
//================================================================================================== /*! @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": "22ea278928c3b27539abf9591475a5d2591b2a0d", "size": 1657, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "third_party/boost/simd/arch/common/scalar/function/genmaskc.hpp", "max_stars_repo_name": "SylvainCorlay/pythran", "max_stars_repo_head_hexsha": "908ec070d837baf77d828d01c3e35e2f4bfa2bfa", "max_stars...
[STATEMENT] lemma wt_interpretation_exists: obtains \<I>::"('fun,'var) subst" where "interpretation\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<I>" "wt\<^sub>s\<^sub>u\<^sub>b\<^sub>s\<^sub>t \<I>" "subst_range \<I> \<subseteq> public_ground_wf_terms" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (\<And>\<I>. \<...
{"llama_tokens": 7304, "file": "Stateful_Protocol_Composition_and_Typing_Typing_Result", "length": 30}
/* * TS Elements * Copyright 2015-2018 M. Newhouse * Released under the MIT license. */ #pragma once #include "resources/geometry.hpp" #include "utility/rect.hpp" #include "utility/color.hpp" #include "utility/vector2.hpp" #include <boost/optional.hpp> #include <algorithm> #include <array> #include <cmath> #includ...
{"hexsha": "9218bc3ea85006f7711d88f8ad0690ef2ce20ec5", "size": 1415, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/scene/track_vertices.hpp", "max_stars_repo_name": "mnewhouse/tselements", "max_stars_repo_head_hexsha": "bd1c6724018e862156948a680bb1bc70dd28bef6", "max_stars_repo_licenses": ["MIT"], "max_stars...
# Unit test fit # ============================================================================== import numpy as np import pandas as pd from skforecast.ForecasterAutoregMultiOutput import ForecasterAutoregMultiOutput from sklearn.linear_model import LinearRegression def test_fit_last_window_stored(): ''' ...
{"hexsha": "884d45215d66d86e5827b06939534e3d1c26d41b", "size": 692, "ext": "py", "lang": "Python", "max_stars_repo_path": "skforecast/ForecasterAutoregMultiOutput/tests/test_fit.py", "max_stars_repo_name": "JoaquinAmatRodrigo/skforecaster", "max_stars_repo_head_hexsha": "3ab526d63bbb94ae4bd18ae964197042a675a34a", "max_...
# Author: Guillaume VIDOT (AIRBUS SAS) # # This file is licensed under the license found in the # LICENSE file in the root directory of this source tree. import random import torch import numpy as np class DecisionTree(torch.nn.Module): ''' This is the class ``DecisionTree''. This source code is based o...
{"hexsha": "65c95209772150019cb968127408e337be76b37b", "size": 8957, "ext": "py", "lang": "Python", "max_stars_repo_path": "models/forest_model.py", "max_stars_repo_name": "paulviallard/NeurIPS21-PB-Robustness", "max_stars_repo_head_hexsha": "ff26f43d5bac7d2a4bb28632fb2533ca766cbeea", "max_stars_repo_licenses": ["MIT"]...
from keras.models import Sequential from keras.layers import Dense, Activation import numpy as np x_data = [[73., 80., 75.], [93., 88., 93.], [ 89., 91., 90.], [96., 98., 100.], [73., 66., 70.]] y_data = [[152.], [185.], [180.], [196.], [142.]] model = Sequential() model.add(Dense(output_dim=1, input_dim=3)) mode...
{"hexsha": "b02c400811a8a631d6bba08b9b7ae6ccdd08a051", "size": 521, "ext": "py", "lang": "Python", "max_stars_repo_path": "klab-04-1-multi_input_linear_regression.py", "max_stars_repo_name": "KANG91/Deep_Learning", "max_stars_repo_head_hexsha": "e3e9de769ab835215d0ebeee79ff869afbe64ebf", "max_stars_repo_licenses": ["MI...
import numpy as np import torch import pytest from chesscog.core.statistics import StatsAggregator @pytest.fixture def aggregator() -> StatsAggregator: agg = StatsAggregator(["a", "b"]) a_output = np.array([.9, .1, .8, .2, .9, .9, .9, .2]) b_output = 1 - a_output outputs = torch.tensor(np.stack([a_ou...
{"hexsha": "696db3e84a5f807d33bd097ee1e2d0807ec7f47e", "size": 1973, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/core/test_statistics.py", "max_stars_repo_name": "MarinusHeindl/chesscog", "max_stars_repo_head_hexsha": "9022e19b1ad125481b561c765a886285abc16eb0", "max_stars_repo_licenses": ["MIT"], "max_...
#!/usr/bin/env python # encoding: utf-8 # The MIT License (MIT) # Copyright (c) 2018 CNRS # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation ...
{"hexsha": "cf7ba5fb1203ae61aec640845c5e1204076a189c", "size": 6672, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyannote/audio/labeling/tasks/speaker_change_detection.py", "max_stars_repo_name": "Ruslanmlnkv/pyannote-audio", "max_stars_repo_head_hexsha": "b678920057ace936c8900c62d2975e958903fae2", "max_star...
/** * @example ocean/test/attenuation_test.cc */ #include <boost/test/unit_test.hpp> #include <usml/ocean/ocean.h> #include <fstream> BOOST_AUTO_TEST_SUITE(attenuation_test) using namespace boost::unit_test; using namespace usml::ocean; /** * @ingroup ocean_test * @{ */ /** * Test the basic features of the at...
{"hexsha": "4be83d75ccfab7f71747cc736f8cd0d160993a37", "size": 3466, "ext": "cc", "lang": "C++", "max_stars_repo_path": "ocean/test/attenuation_test.cc", "max_stars_repo_name": "fraclipe/UnderSeaModelingLibrary", "max_stars_repo_head_hexsha": "52ef9dd03c7cbe548749e4527190afe7668ff4e7", "max_stars_repo_licenses": ["BSD-...
MODULE icetab !!====================================================================== !! *** MODULE icetab *** !! sea-ice : transform 1D (2D) array to a 2D (1D) table !!====================================================================== !! History : 4.0 ! 2018...
{"hexsha": "57be8f423511bfa5dc71f79d75d8af71c3c0732b", "size": 5314, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "icetab.f90", "max_stars_repo_name": "deardenchris/psycloned_nemo_CDe", "max_stars_repo_head_hexsha": "d0040fb20daa5775575b8220cb5f186857973fdb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max...
using Oceananigans.Fields: AbstractField using Oceananigans.Grids: znode using Oceananigans.Operators: Δzᵃᵃᶠ, Δzᵃᵃᶜ const c = Center() const f = Face() """ Return the geopotential height at `i, j, k` at cell centers. """ @inline Zᵃᵃᶜ(i, j, k, grid) = ifelse(k < 1, znode(c, c, c, i, j, 1, grid) + (1 - ...
{"hexsha": "58002dcb75fc07b19f225eeb44f55ef598b7fe71", "size": 2609, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/BuoyancyModels/nonlinear_equation_of_state.jl", "max_stars_repo_name": "chemicalfiend/Oceananigans.jl", "max_stars_repo_head_hexsha": "04ca8e2f143afd53fd60bdaeb885a4dc1ed5825c", "max_stars_repo...
[STATEMENT] lemma pfinite_parallel_wiring [pfinite_intro]: "pfinite_converter ((\<I>1 \<oplus>\<^sub>\<I> \<I>2) \<oplus>\<^sub>\<I> (\<I>3 \<oplus>\<^sub>\<I> \<I>4)) ((\<I>1 \<oplus>\<^sub>\<I> \<I>3) \<oplus>\<^sub>\<I> (\<I>2 \<oplus>\<^sub>\<I> \<I>4)) parallel_wiring" [PROOF STATE] proof (prove) goal (1 subgoal...
{"llama_tokens": 415, "file": "Constructive_Cryptography_CM_More_CC", "length": 2}
library(date) # # This script MUST be run AFTER the "read_ASCII_grid_generic.r" script # is run....this script processes the output of the "read_ASCII_grid" script. # source("D:/SMWData/R_Scripts/matrix_manip.r") source("D:/SMWData/R_Scripts/image_legend.r") guiSetStyle.tcltk(style = "large", ...
{"hexsha": "81250477d23bef94151e9415d1931b476b02bb0f", "size": 5026, "ext": "r", "lang": "R", "max_stars_repo_path": "share/R-scripts/animate_ASCII_grid_generic.r", "max_stars_repo_name": "timcera/swb", "max_stars_repo_head_hexsha": "006b93b47373d7d97a422e7e9178d6df14590876", "max_stars_repo_licenses": ["CC0-1.0"], "ma...
""" Comparing different connectivity measures ========================================= This example shows how to extract signals from regions defined by an atlas, and to estimate different connectivity measures based on these signals. """ import matplotlib.pyplot as plt import matplotlib import numpy as np # Copied...
{"hexsha": "fe5fa718560aee054d28d761dbb1c5be5d8b5c83", "size": 8805, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_adhd_tangent.py", "max_stars_repo_name": "salma1601/nilearn", "max_stars_repo_head_hexsha": "ce5b1f99f7c781cf757d691d75d8783198437c9e", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars...
tomlpath = joinpath(@__DIR__, "hbv_config.toml") config = Wflow.Config(tomlpath) model = Wflow.initialize_hbv_model(config) model = Wflow.update(model) # test if the first timestep was written to the CSV file flush(model.writer.csv_io) # ensure the buffer is written fully to disk @testset "CSV output" begin cs...
{"hexsha": "ec46c27a89b228ff180c5c3be67750bee9a21f7d", "size": 2146, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "test/run_hbv.jl", "max_stars_repo_name": "laurenebouaziz/Wflow.jl", "max_stars_repo_head_hexsha": "3420d2384f0d570db47a8eeb26b79bfef1abb62f", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma ht_hash_in_dom_bounded_hashcode_nat_in_dom: assumes "ht_hash l" assumes "1 < length l" assumes "k \<in> dom (map_of(l!bounded_hashcode_nat (length l) k))" shows "k \<in> dom (map_of(concat l))" [PROOF STATE] proof (prove) goal (1 subgoal): 1. k \<in> dom (map_of (concat l)) [PROOF STEP] using...
{"llama_tokens": 350, "file": "Separation_Logic_Imperative_HOL_Examples_Hash_Map", "length": 2}
import random as r import pandas as pd import numpy as np import time import tkinter as tk # Import and process data from xlsx file. dataframe = pd.read_excel("KoreanVocab.xlsx").applymap(str.strip) dataframe.loc[:, 'power'] = 1 dataframe.loc[:, 'counter'] = 0 lang1 = dataframe.groupby(['Lang1', 'Grammar'], sort=Fals...
{"hexsha": "a308a8137ba2fc2968ccf7bf1b539a36377c1a67", "size": 8435, "ext": "py", "lang": "Python", "max_stars_repo_path": "SpacedVocabularyPractice/VocabQuiz.py", "max_stars_repo_name": "ndMaso/pythonGUIexperiments", "max_stars_repo_head_hexsha": "9c58f390695278c27136fc08eaf618d150649302", "max_stars_repo_licenses": [...
# logger **private** Provides a common logging module. ## Usage `var logger = require ('@the-brain-trust/logger');` ## Publishing `npm publish`
{"hexsha": "f1a944a98c8baa78528951a7a7fa55fc5ba785e6", "size": 149, "ext": "rd", "lang": "R", "max_stars_repo_path": "logger/README.rd", "max_stars_repo_name": "gnedster/the-brain-trust", "max_stars_repo_head_hexsha": "c6381f5668e5b14f7f905fcf6756a4b7188718be", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import os import cv2 cv2.setNumThreads(0) import torch import numpy as np from random import shuffle import torch.utils.data as data #own imports import os import csv from collections import namedtuple class BaseDataset(data.Dataset): #*************calss mebers************************* isCustomData = False...
{"hexsha": "8cd6ddc5bb8ff2a1a4d239360e9c1be79f598e9b", "size": 11827, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/datasets/BaseDataset.py", "max_stars_repo_name": "Gaussianer/FasterSeg", "max_stars_repo_head_hexsha": "f2e102b433275ac9f3387a8c2ae8439b2687bfda", "max_stars_repo_licenses": ["MIT"], "max_s...
from config import COLOR_TYPE, CLASS_DICT, IMAGE_SIZE, EPS from keras.models import load_model from model_utils import single_class_accuracy, import_folder_to_numpy_array, get_dataset_path from ara_cnn import build_simple_cnn_model_with_dropout import keras.backend as K import numpy def load_dropout_model_instance(m...
{"hexsha": "73d6f7e008880f423e9cb9e43c38cdb83f2c131f", "size": 4424, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/variational_dropout.py", "max_stars_repo_name": "Pacific89/ARA-CNN", "max_stars_repo_head_hexsha": "1698b98447356eab7c30eef700c0b6e2c60d3918", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
/* * * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); y...
{"hexsha": "0d2025270dc872c49e3d185f6ef002594edb8915", "size": 4723, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/tests/legacystore/jrnl/jtt/_ut_read_arg.cpp", "max_stars_repo_name": "irinabov/debian-qpid-cpp-1.35.0", "max_stars_repo_head_hexsha": "98b0597071c0a5f0cc407a35d5a4690d9189065e", "max_stars_repo_...
"""Prediction of Users based on Tweet embeddings.""" import numpy as np from sklearn.linear_model import LogisticRegression from .models import User # from .twitter import BASILICA from .twitter import nlp def predict_user(user1_name, user2_name, user3_name, user4_name, tweet_text): """ Determine and return...
{"hexsha": "a8584af7cba452feac3268a7aba05ba5b26e1f54", "size": 1389, "ext": "py", "lang": "Python", "max_stars_repo_path": "twitapp/predict.py", "max_stars_repo_name": "skhabiri/TwitOff", "max_stars_repo_head_hexsha": "917917a793b9f987e2f7e803cf0a12e69ce6a884", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
(* Title: HOL/Bali/Type.thy Author: David von Oheimb *) subsection {* Java types *} theory Type imports Name begin text {* simplifications: \begin{itemize} \item only the most important primitive types \item the null type is regarded as reference type \end{itemize} *} datatype prim_ty --{* prim...
{"author": "Josh-Tilles", "repo": "isabelle", "sha": "990accf749b8a6e037d25012258ecae20d59ca62", "save_path": "github-repos/isabelle/Josh-Tilles-isabelle", "path": "github-repos/isabelle/Josh-Tilles-isabelle/isabelle-990accf749b8a6e037d25012258ecae20d59ca62/src/HOL/Bali/Type.thy"}
from __future__ import annotations import abc import glob import os import shutil import sqlite3 from contextlib import closing from dataclasses import dataclass from os.path import dirname, isdir, isfile from typing import Any import numpy as np import pandas as pd from loguru import logger from tqdm import tqdm fr...
{"hexsha": "f434a14a9fa80230fb3c291844d616b2aa5c0df3", "size": 12647, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyriksprot/metadata/generate.py", "max_stars_repo_name": "welfare-state-analytics/pyriksprot", "max_stars_repo_head_hexsha": "a7dab9246c3d9bb1cf19543208bc72fbacb9e909", "max_stars_repo_licenses":...
from . import jtow import glob import numpy as np import warnings import os import pkg_resources from astropy.io import fits, ascii from copy import deepcopy import pdb path_to_defaults = "params/default_params.yaml" defaultParamPath = pkg_resources.resource_filename('jtow',path_to_defaults) defaultParam = jtow.read_y...
{"hexsha": "aec78ee414d434bd8be8981dddbd16564ba7f256", "size": 3676, "ext": "py", "lang": "Python", "max_stars_repo_path": "jtow/auto_jtow.py", "max_stars_repo_name": "eas342/jtow", "max_stars_repo_head_hexsha": "22f07da7e625b7d62dd93eaa240412cecc75893b", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "ma...
\chapter{Literature Study} \label{cha:litreview} This chapter contains a review of some of the most important techniques necessary to build an end-to-end speech recognition system. After looking at possible input feature representations, the most important machine learning tools will be explored. Finally sequence-to-se...
{"hexsha": "21c46300d62ff5ec2a86fba9bbde8a56f9941c88", "size": 53051, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "chapters/literature.tex", "max_stars_repo_name": "v0lta/masterThesis", "max_stars_repo_head_hexsha": "ee80552c2ba44117c50c7524c85f12b9eb39f412", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars...
#!/usr/bin/env python # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: version = '0.1dev' def configuration(parent_package='', top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration(None, parent_package, top_p...
{"hexsha": "b95032d156a5cfb55637e28eba309c3ec679e607", "size": 1081, "ext": "py", "lang": "Python", "max_stars_repo_path": "setup.py", "max_stars_repo_name": "alexis-roche/nireg", "max_stars_repo_head_hexsha": "6ed32f2830ff6ebc1860519dc630ebdf8e969dcf", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": 29...
""" Alternating Least Squares for Collaborative Filtering """ # Author: Vladimir Larin <vladimir@vlarine.ru> # License: MIT import numpy as np import scipy.sparse as sp import six GOT_NUMBA = True try: from pyrecsys._polara.lib.hosvd import tucker_als except ImportError: GOT_NUMBA = False __all__ = ['ALS', ]...
{"hexsha": "d8c711a1c20f4ec0a1f635a7dcafe269a57710b6", "size": 11091, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyrecsys/collaborative_filtering.py", "max_stars_repo_name": "vlarine/pyrecsys", "max_stars_repo_head_hexsha": "7572f7ca7cf2adb027f642b43849c1b40e746557", "max_stars_repo_licenses": ["MIT"], "max...
[STATEMENT] lemma widest_spread_spec: "(k, s) = widest_spread ks ps \<Longrightarrow> widest_spread_axis k (set ks) (set ps)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. (k, s) = widest_spread ks ps \<Longrightarrow> widest_spread_axis k (set ks) (set ps) [PROOF STEP] proof (induction ks ps arbitrary: k s rule:...
{"llama_tokens": 5212, "file": "KD_Tree_Build", "length": 33}
from collections import OrderedDict import numpy as np from AnyQt.QtCore import Qt from Orange.classification.rules import ( WeightedRelativeAccuracyEvaluator, LaplaceAccuracyEvaluator, EntropyEvaluator, _RuleClassifier, _RuleLearner, get_dist, ) from Orange.data import Table from Orange.widge...
{"hexsha": "30ecb21834d284d4d5231cc85a930cbcc16f73bb", "size": 16368, "ext": "py", "lang": "Python", "max_stars_repo_path": "orange3/Orange/widgets/model/owrules.py", "max_stars_repo_name": "rgschmitz1/BioDepot-workflow-builder", "max_stars_repo_head_hexsha": "f74d904eeaf91ec52ec9b703d9fb38e9064e5a66", "max_stars_repo_...
import os import numpy as np import pandas as pd import openpyxl from . import helper def main(): """Read and clean the BoothSchedule file Returns: DataFrame: The cleaned BoothSchedule """ # Read the schedule file fname = os.path.join("data", "BoothSchedule.xlsx") print(f"Reading Boo...
{"hexsha": "54e1bbd5a380b619a841b5316a1e0f6eb94e32ab", "size": 2698, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/booth_schedule.py", "max_stars_repo_name": "ssordopalacios/booth-course-planner", "max_stars_repo_head_hexsha": "f656be89db1eae2cdce84cdd2f0dba8c99b3ddda", "max_stars_repo_licenses": ["MIT"], ...
# -*- coding: utf-8 -*- from __future__ import print_function from builtins import range from past.builtins import basestring from pyqtgraph.Qt import QtCore, QtGui import numpy as np import pyqtgraph as pg import sys from pyqtgraph.graphicsItems import ROI, ImageItem class Scroller(QtGui.QWidget): def __init__(s...
{"hexsha": "995ddcc9c023217542902daee1ea5a4e28b6cf0a", "size": 5059, "ext": "py", "lang": "Python", "max_stars_repo_path": "RRtoolFC/GUI/forms.py", "max_stars_repo_name": "davtoh/RRTools", "max_stars_repo_head_hexsha": "6dde2d4622719d9031bf21ffbf7723231a0e2003", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_c...
import serial import matplotlib.pyplot as plt import numpy as np import time portName = '/dev/tty.usbmodem1411' p = serial.Serial(port=portName, baudrate=230400, bytesize=serial.EIGHTBITS, parity=serial.PARITY_NONE) plt.ion() #Turn on interactive mode on plot from matplotlib samples = 2048 #Define...
{"hexsha": "5721a333af336d8a5c1c3686c30197f05c0a885b", "size": 1822, "ext": "py", "lang": "Python", "max_stars_repo_path": "new_protocol.py", "max_stars_repo_name": "CadeiraCuidadora/UMISS_Embedded", "max_stars_repo_head_hexsha": "20efa652aa4c486b56f1674e4e54063782e28f40", "max_stars_repo_licenses": ["MIT"], "max_stars...
r""" Mixed Differential Forms Let `M` and `N` be differentiable manifolds and `\varphi : M \longrightarrow N` a differentiable map. A *mixed differential form along* `\varphi` is an element of the graded algebra represented by :class:`~sage.manifolds.differentiable.mixed_form_algebra.MixedFormAlgebra`. Its homogeneous...
{"hexsha": "9901f51ff708e6a40aac25d5b849550e03fb2641", "size": 52670, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/sage/manifolds/differentiable/mixed_form.py", "max_stars_repo_name": "hsm207/sage", "max_stars_repo_head_hexsha": "020bd59ec28717bfab9af44d2231c53da1ff99f1", "max_stars_repo_licenses": ["BSL-...
function torn_system_jacobian_sparsity(sys) s = structure(sys) @unpack fullvars, graph, partitions = s # The sparsity pattern of `nlsolve(f, u, p)` w.r.t `p` is difficult to # determine in general. Consider the "simplest" case, a linear system. We # have # A u = p. # Clear...
{"hexsha": "2910b2ba65341d2d846777b0c7cdfd9b76f5c34d", "size": 12082, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/structural_transformation/codegen.jl", "max_stars_repo_name": "KirillZubov/ModelingToolkit.jl", "max_stars_repo_head_hexsha": "8bec99030165f3b160e4c1af5daaaa0befd8b9f7", "max_stars_repo_licens...
import matplotlib as mlp import matplotlib.pyplot as plt # import random plt.style.use('seaborn-whitegrid') import numpy as np from sklearn.gaussian_process import GaussianProcess # define the model and draw some data model = lambda x: x * np.sin(x) xdata = np.array([1, 3, 5, 6, 8]) ydata = model(xdata) # Compute the G...
{"hexsha": "19c6f82b8860ec0f37dd5e56e3ad37a803c7afb4", "size": 780, "ext": "py", "lang": "Python", "max_stars_repo_path": "matplotlib/7.Continuous Errors.py", "max_stars_repo_name": "sudeep0901/python", "max_stars_repo_head_hexsha": "7a50af12e72d21ca4cad7f2afa4c6f929552043f", "max_stars_repo_licenses": ["MIT"], "max_st...
# -*- coding: utf-8 -*- # -- Sheet -- #%pip install python-binance #This package is not present in the standard library databases, need to pip install it # IMPORTS import pandas as pd import math import os.path from datetime import datetime, timedelta from datetime import date from dateutil import parser import pick...
{"hexsha": "53b279cd7bef7b8ca86082403e81e0c4f220951d", "size": 2123, "ext": "py", "lang": "Python", "max_stars_repo_path": "Causality_between_time_series/Strategy_Bitcoin_influence.py", "max_stars_repo_name": "zachHFT/Optimal-Cryptocurrency-Trading-Strategies-Step3", "max_stars_repo_head_hexsha": "80dfaf1e8e7485404663e...
(** * Simulation up to taus *) (** A preorder [sutt t1 t2], where every visible step ([RetF] or [VisF]) on the left must be matched with a corresponding step on the right, ignoring [TauF]. In particular, [spin := Tau spin] is less than everything. The induced equivalence relation is [eutt]. [[ Theorem sutt...
{"author": "DeepSpec", "repo": "InteractionTrees", "sha": "8e28e2ee08496c696e03916a22d93c39559a9715", "save_path": "github-repos/coq/DeepSpec-InteractionTrees", "path": "github-repos/coq/DeepSpec-InteractionTrees/InteractionTrees-8e28e2ee08496c696e03916a22d93c39559a9715/theories/Eq/SimUpToTaus.v"}
import numpy as np import pandas as pd import tensorflow as tf from tensorflow.python.framework import dtypes from tensorflow.contrib import learn import logging logging.basicConfig(level=logging.INFO) def x_sin(x): return x * np.sin(x) def sin_cos(x): return pd.DataFrame(dict(a=np.sin(x), b=n...
{"hexsha": "fbf45c311c0bd43c887534b7137dbb22d36faf47", "size": 4990, "ext": "py", "lang": "Python", "max_stars_repo_path": "lstm_predictor.py", "max_stars_repo_name": "mgorkove/Time-Series-Prediction-with-LSTM-Recurrent-Neural-Networks-in-Python-with-Keras", "max_stars_repo_head_hexsha": "71937e6b25736c17bdc68abea0519f...
[STATEMENT] lemma raise_Subst: assumes "t \<noteq> \<^bold>\<sharp>" shows "v \<noteq> \<^bold>\<sharp> \<Longrightarrow> raise p (Subst n v t) = Subst (p + n) v (raise p t)" [PROOF STATE] proof (prove) goal (1 subgoal): 1. v \<noteq> \<^bold>\<sharp> \<Longrightarrow> Raise 0 p (Subst n v t) = Subst (p + n) v...
{"llama_tokens": 2915, "file": "ResiduatedTransitionSystem_LambdaCalculus", "length": 3}
#include <boost/fusion/include/convert.hpp>
{"hexsha": "0f080351dbcdf846d94320237a600fffd15b7d9f", "size": 44, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "src/boost_fusion_include_convert.hpp", "max_stars_repo_name": "miathedev/BoostForArduino", "max_stars_repo_head_hexsha": "919621dcd0c157094bed4df752b583ba6ea6409e", "max_stars_repo_licenses": ["BSL-1....
import scipy.stats as sc from scipy.integrate import quad import numpy as np import numba as nb import pytest def test_njit_with_numba_stats(): from numba_stats import norm @nb.njit def test(x): p = norm.cdf(x, 0, 1) return norm.ppf(p, 0, 1) expected = np.linspace(-3, 3, 10) got ...
{"hexsha": "26a621f55315e8069945d9191ebdba3493558b4e", "size": 2302, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_stats.py", "max_stars_repo_name": "claudiocc1/numba-stats", "max_stars_repo_head_hexsha": "e79be268220b2a864f738b34942bad61fbcac22d", "max_stars_repo_licenses": ["MIT"], "max_stars_coun...
(* *********************************************************************) (* *) (* The Compcert verified compiler *) (* *) (* Xavier Leroy...
{"author": "k-qy", "repo": "thesis", "sha": "51bf3bac68af9a70ab3bfbbafa7bb53ef4d83877", "save_path": "github-repos/coq/k-qy-thesis", "path": "github-repos/coq/k-qy-thesis/thesis-51bf3bac68af9a70ab3bfbbafa7bb53ef4d83877/func_spec/CompCert-2.5/powerpc/Asmgenproof.v"}
import click import numpy as np import pandas as pd from utility.dataset import ( RWC_Popular_Dataset, CCM_Dataset, RWC_Popular_Dataset_accomp, Huawei_Dataset, ) from utility.algorithmsWrapper import ( AlgoSeqRecur, AlgoSeqRecurBound, AlgoSeqRecurSingle, GroudTruthStructure, MsafAlg...
{"hexsha": "80521f2059490b83b32e3db19f20f287f06e5539", "size": 5549, "ext": "py", "lang": "Python", "max_stars_repo_path": "code/modules/structure_module/eval_algos.py", "max_stars_repo_name": "Himusoka/Beatmap-gen_Thesis", "max_stars_repo_head_hexsha": "1ed210ccdefaa367cc3c54b9f74f8c7f2906b3d2", "max_stars_repo_licens...
def make_video(filename_in,filename_out,elevation_angle=0, azimuth_angle=0,framerange=None,fps=30,edgetype='edge', axislims=None): ''' Uses pre-processed VICON data to generate a video of the motion at a specified viewing angle Parameters ---------- ...
{"hexsha": "a1bf4f374f309db9d988f7822884beb3f195da37", "size": 6229, "ext": "py", "lang": "Python", "max_stars_repo_path": "vicon/make_video.py", "max_stars_repo_name": "artvalencio/vicon", "max_stars_repo_head_hexsha": "45fa144f49beb8ad1aff3e34000f3a6d9219f27a", "max_stars_repo_licenses": ["MIT", "Unlicense"], "max_st...
from PIL import Image import numpy as np import jetkiller.config as cfg import jetkiller.array as jkar def convert_image(image, colormap=cfg.default_output_colormap): """Convert an image from the "jet colormap" to a better one.""" data = image2array(image) data = jkar.convert_array(data, colormap) out...
{"hexsha": "0b4c25c1f4007da58599a412f872197628bb34cb", "size": 645, "ext": "py", "lang": "Python", "max_stars_repo_path": "jetkiller/image.py", "max_stars_repo_name": "Arnaud-D/jetkiller-python", "max_stars_repo_head_hexsha": "7f574deace0918e4fefd5dc1bbf152c33e025799", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import cv2 import numpy as np import os from sklearn.cluster import KMeans import sys n_clusters = 10 height = 16 if __name__ == '__main__': if len(sys.argv) < 2: sys.stderr.write("Usage: {} <imgfile>".format(sys.argv[0])) sys.exit(1) filename = sys.argv[1] img = cv2.im...
{"hexsha": "cec4c8ac16d82c085edcaf2263014f5d8191858a", "size": 1495, "ext": "py", "lang": "Python", "max_stars_repo_path": "main.py", "max_stars_repo_name": "nekketsuuu/palette-generator", "max_stars_repo_head_hexsha": "b88e3ad0d37b277ac59fc92d2545ebedd07c7084", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars_coun...
import os os.chdir('../models/') from matplotlib import pyplot as plt from GAN32 import GAN32Model from GAN64 import GAN64Model from GAN128 import GAN128Model from AutoEncoder import AutoEncoderModel from utils.ImageLoader import ImageLoader from tensorflow import keras import numpy as np from keras.applications.vgg1...
{"hexsha": "192692b8ca2ddffab996adfc88dbee4eef324295", "size": 1454, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/program_tester/model_test.py", "max_stars_repo_name": "IUS-CS/s22-project-breakneck", "max_stars_repo_head_hexsha": "80d462e375256a44d83d16a187b423c32b0496d4", "max_stars_repo_licenses": ["MIT...
import numpy as np import torch from functools import reduce def get_num_params(model): """ Get the total number trainable parameters in model. """ num_params = 0 for param in model.parameters(): num_params += reduce(lambda x, y: x*y, param.shape, 1) return num_params def warmup_par...
{"hexsha": "2b40dd1bcbcc230b21c49b57fb4c5defe6cad93b", "size": 1124, "ext": "py", "lang": "Python", "max_stars_repo_path": "autoagent/utils/torch.py", "max_stars_repo_name": "lpraat/autoagent", "max_stars_repo_head_hexsha": "0db7b581cdb55bff710097ab71fc94a328bddc6e", "max_stars_repo_licenses": ["MIT"], "max_stars_count...
import gif import matplotlib.pyplot as plt import numpy as np N = 50 red = np.random.normal(loc=45, scale=3, size=N) blue = np.random.normal(loc=48, scale=5, size=N) @gif.frame def plot_hop(i, margin=0.1): plt.figure(figsize=(5, 3), dpi=100) plt.hlines(y=red[i], xmin=0, xmax=1 - margin, colors="r", lw=2) ...
{"hexsha": "72a4cc5e13164d5fcf15173bb087a8add8df43dd", "size": 720, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/hop.py", "max_stars_repo_name": "maxhumber/attachment", "max_stars_repo_head_hexsha": "65d7802143b198c607016b3fe7f9ecafe20099ca", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
import matplotlib.pyplot as plt import numpy as np # 変数Xに数列の始点が-π(-3.14..)、終点がπ(3.14..)、 要素数50、endpoint(生成する数列に終点を含むか否か) X = np.linspace(-np.pi, np.pi, 50, endpoint=True) print(X) # サイン(sin)、コサイン(cos)の値をとる C, S = np.cos(X), np.sin(X) print(C) print(S) # コサイン(cos)のグラフを描画する # labelでグラフの説明を追加する plt.plot(X, C, label="cos...
{"hexsha": "1d2ef6da5f5cad7baf00588d7d5b92531e81fe7e", "size": 612, "ext": "py", "lang": "Python", "max_stars_repo_path": "use_matplotlib/sample_matplotlib.py", "max_stars_repo_name": "hirotoyoshidome/python_utils", "max_stars_repo_head_hexsha": "1c59aa8b8a3de6c350abddf2be29484a427e45ef", "max_stars_repo_licenses": ["M...
[STATEMENT] lemma safe_reach_safe_rtrancl: "safe_reach step safe cfg \<Longrightarrow> step^** cfg cfg' \<Longrightarrow> safe cfg'" [PROOF STATE] proof (prove) goal (1 subgoal): 1. \<lbrakk>safe_reach step safe cfg; step\<^sup>*\<^sup>* cfg cfg'\<rbrakk> \<Longrightarrow> safe cfg' [PROOF STEP] by (simp only: safe_re...
{"llama_tokens": 130, "file": "Store_Buffer_Reduction_ReduceStoreBuffer", "length": 1}
from time import perf_counter from collections import defaultdict import matplotlib.pyplot as plt import numpy as np from Block import * from BlockMap import * from PriorityQueue import * from LDDB import * def visualize_map(Map, start=None, goal=None, path=None): X = Map + 0. X[X == 1] = 5 X[X == 0] = 1 if pat...
{"hexsha": "7a7541bdfc929d2cb32376c134fb6df18ac76803", "size": 1477, "ext": "py", "lang": "Python", "max_stars_repo_path": "visualizations.py", "max_stars_repo_name": "AdeelH/Block_A_star", "max_stars_repo_head_hexsha": "52f40ff2b7105a8b62512ee6c8c6fbb0408427d6", "max_stars_repo_licenses": ["MIT"], "max_stars_count": n...
# -*- coding: utf-8 -*- # @Author : liaozhi # @Time : 2021-07-01 # @Contact : liaozhi_edo@163.com """ 特征 """ # packages import numpy as np from config import * from sklearn.preprocessing import LabelEncoder, OneHotEncoder, MinMaxScaler def extract_features(df, action): """ 提取特征 :param df: Dat...
{"hexsha": "84de28ba94c0a17d010cd9ebc88770d24303d65f", "size": 2413, "ext": "py", "lang": "Python", "max_stars_repo_path": "feature.py", "max_stars_repo_name": "edd666/WeChat-Big-Data-Challenge-2021", "max_stars_repo_head_hexsha": "4e4afc991a84047aed4e217635e65535542762cc", "max_stars_repo_licenses": ["Apache-2.0"], "m...
import time import numpy as np np.random.seed(124) randnums = np.random.randint(1, int(1e9), int(1e5)) def firstDuplicate1(a): minSecInd = len(a) isFound = False for i, n in enumerate(a): for j in list(range(i+1, len(a))): if n == a[j] and j < minSecInd: minSecInd = j ...
{"hexsha": "edbbcf3e5db3e0b2b42c5da2c5d3910ac05b75f3", "size": 2315, "ext": "py", "lang": "Python", "max_stars_repo_path": "arrs/firstDuplicate.py", "max_stars_repo_name": "B3WD/CodeSignal", "max_stars_repo_head_hexsha": "502fb3165e6623a1b42dea6f82a6f7447cd9beed", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
import matplotlib import matplotlib.pyplot as plt import numpy as np import scipy.optimize matplotlib.rcParams['mathtext.fontset'] = 'stix' color_list = ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf'] # The numeric values are obtained by using another f...
{"hexsha": "de047091a1335cf6dfc105534fab7e4ea93bc4b0", "size": 4021, "ext": "py", "lang": "Python", "max_stars_repo_path": "jax/draw_trace_H2.py", "max_stars_repo_name": "phyjoon/circuit_comparison", "max_stars_repo_head_hexsha": "a5ee8d0acd3ecc0893cb088ea4b4692e5e83965d", "max_stars_repo_licenses": ["MIT"], "max_stars...
""" Classifying twitter posts using a BERT model Matthew Flegg ~ matthewflegg@outlook.com Date ~ 21/02/2022 """ ##################### ### PREPROCESSING ### ##################### import tensorflow as tf # Machine learning import prep.dataset as dataset # src/prep/dataset.py, loads data (e.g. the dataframe) from keras...
{"hexsha": "ae369c328bd244e5b51e00d51d9788d6559f5769", "size": 3459, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/BERT_model.py", "max_stars_repo_name": "matthewflegg/mbti", "max_stars_repo_head_hexsha": "2a8ed2e59b93ad01d492d1e76b4023d3ba9b6396", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_coun...
""" Module for the QPQ survey """ from __future__ import print_function, absolute_import, division, unicode_literals import numpy as np import pdb from pkg_resources import resource_filename from astropy.table import Table from astropy.coordinates import SkyCoord from astropy import units as u from linetools.spect...
{"hexsha": "50c9529db65694920907b0348e9b1a57d3cf36d3", "size": 22629, "ext": "py", "lang": "Python", "max_stars_repo_path": "pyigm/cgm/qpq.py", "max_stars_repo_name": "pyigm/pyigm", "max_stars_repo_head_hexsha": "8b4bc7f7f1c9f1c280720a4cc0693cd7cb79e9cb", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count": ...
[STATEMENT] lemma (in algebraic_semidom) coprime_iff_coprime [simp, code]: "coprime = Rings.coprime" [PROOF STATE] proof (prove) goal (1 subgoal): 1. coprime = algebraic_semidom_class.coprime [PROOF STEP] by (simp add: fun_eq_iff coprime_def coprime_def')
{"llama_tokens": 111, "file": "Berlekamp_Zassenhaus_Unique_Factorization", "length": 1}
import contextlib import dataclasses import logging import os import sys from collections.abc import Sequence from typing import Callable, Optional, Union import numpy as np import tqdm import morello.impl.base from .. import cost, pruning, specs from . import common, random HEURISTIC_SAMPLES_PER_SPEC = 10 HEURISTI...
{"hexsha": "ad79181e22587c15b46ef5e0f8e00db881429faf", "size": 7302, "ext": "py", "lang": "Python", "max_stars_repo_path": "morello/search/beam.py", "max_stars_repo_name": "samkaufman/morello", "max_stars_repo_head_hexsha": "20984494c39c0eba657254690b19a9265aa6cfcf", "max_stars_repo_licenses": ["BSD-2-Clause-Patent"], ...
# Copyright (C) 2020 NVIDIA Corporation. All rights reserved. # # This work is made available under the Nvidia Source Code License-NC. # To view a copy of this license, check out LICENSE.md import functools import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from imaginaire.layers i...
{"hexsha": "6b60f409883304bb47cc01d49a7c8b5e5c4f37e6", "size": 5528, "ext": "py", "lang": "Python", "max_stars_repo_path": "imaginaire/discriminators/fpse.py", "max_stars_repo_name": "MichaelDoron/imaginaire", "max_stars_repo_head_hexsha": "5f95b988453d391e972fa528152121d0dd3cb51a", "max_stars_repo_licenses": ["RSA-MD"...
""" ============================ LocalOutlierFactor benchmark ============================ A test of LocalOutlierFactor on classical anomaly detection datasets. """ from time import time import numpy as np import matplotlib.pyplot as plt from sklearn.neighbors import LocalOutlierFactor from sklearn.metrics import ro...
{"hexsha": "620adc3d43b0c3e9ccc5e78de2de19655dfa17dc", "size": 3548, "ext": "py", "lang": "Python", "max_stars_repo_path": "benchmarks/bench_lof.py", "max_stars_repo_name": "NickVeld/scikit-learn-proj", "max_stars_repo_head_hexsha": "9694a5641a7abbec96c93817aed88ce827dbacd3", "max_stars_repo_licenses": ["BSD-3-Clause"]...
import numpy as np white = 0 black = 1 def other(color): return not color west = 2 east = 3 north = 4 south = 5 num_channels = 6 boardsize = 13 padding = 2 input_size = boardsize+2*padding neighbor_patterns = ((-1,0), (0,-1), (-1,1), (0,1), (1,0), (1,-1)) input_shape = (num_channels,input_size,input_size) def cell...
{"hexsha": "91cdaa1a7c8925ff83aca494c1e218c885447ea6", "size": 4192, "ext": "py", "lang": "Python", "max_stars_repo_path": "inputFormat.py", "max_stars_repo_name": "gauthamv529/Neurohex", "max_stars_repo_head_hexsha": "5e2b2240d22457e7f3356f661e251a07973c0358", "max_stars_repo_licenses": ["MIT"], "max_stars_count": nul...
{-# OPTIONS --cubical --safe #-} module Cubical.HITs.S1 where open import Cubical.HITs.S1.Base public -- open import Cubical.HITs.S1.Properties public
{"hexsha": "95b7e45bb9c04509043f6c55ab55c2995d2eb1cb", "size": 153, "ext": "agda", "lang": "Agda", "max_stars_repo_path": "Cubical/HITs/S1.agda", "max_stars_repo_name": "cj-xu/cubical", "max_stars_repo_head_hexsha": "7fd336c6d31a6e6d58a44114831aacd63f422545", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null,...
#!/usr/bin/env python3 # -*- encoding: utf8 -*- import matplotlib.pyplot as plt import numpy as np from rasterize import rasterize from segmentation import get_skeleton_segments from skimage.filters import gaussian from skimage.measure import label from skimage.morphology import medial_axis, skeletonize class RefFinde...
{"hexsha": "6664be8a1ad2dd7bf7aac46581099dbccd45a3f0", "size": 2429, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/cv/ref_finder.py", "max_stars_repo_name": "lvwzhen/glow-sans", "max_stars_repo_head_hexsha": "715f35148a9e023568839b9740908fe1feccbd19", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
PROGRAM F030 ! Copyright 2021 Melwyn Francis Carlo IMPLICIT NONE CHARACTER (LEN=10) :: STR INTEGER :: SUM_VAL = 0 INTEGER :: SUM_OF_POWERS = 0 INTEGER :: I, J, STR_LEN DO I = 2, 1000000 WRITE(STR, '(I10)') I STR = ADJUSTL(STR) STR_LEN = LEN_TRIM(STR) ...
{"hexsha": "c46e9f4afc7d9f631269b1be4029fcd5eae9823b", "size": 647, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "problems/030/030.f90", "max_stars_repo_name": "melwyncarlo/ProjectEuler", "max_stars_repo_head_hexsha": "c4d30ed528ae6de82232f3d2044d608c6e8f1c37", "max_stars_repo_licenses": ["MIT"], "max_stars_...
import os, sys import re import networkx as nx def usage(): print '\nThis script designed for getting gene ontology annotation of a gene list.\n' print 'Author: zhoujj2013@gmail.com\n' print 'Usage: '+sys.argv[0]+' <gene_list> <go_db_dir> <aspect=C|F|P>' print '' sys.exit(2) if __name__ == "__main__": if len(s...
{"hexsha": "37a3c11e0643233a4f8fc026551a1a5f182cbc5a", "size": 2856, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/FunctionalAnnotation/PreGoAnnotation.py", "max_stars_repo_name": "zhoujj2013/lncfuntk", "max_stars_repo_head_hexsha": "65f6d18a2dbc2a09901a867583f5e2a84bdfb3a9", "max_stars_repo_licenses": ["M...
import logging import random from typing import List, Tuple import numpy as np from skimage.transform import resize from scipy.ndimage import zoom from toolbox import images from toolbox.images import crop, mask_bbox from .poisson_disk import sample_poisson_uniform logger = logging.getLogger(__name__) class PatchT...
{"hexsha": "f70acf373ecdb330c0ce11c3f2115bd7f4f066b1", "size": 6494, "ext": "py", "lang": "Python", "max_stars_repo_path": "toolbox/sampling/__init__.py", "max_stars_repo_name": "keunhong/toolbox", "max_stars_repo_head_hexsha": "e8d1dadab4d9ccf8d78fe86ea933819ac6a07fca", "max_stars_repo_licenses": ["MIT"], "max_stars_c...
""" 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 writing, software distributed under the License ...
{"hexsha": "7c352d1f083db295039a112a178bc12b23a042a3", "size": 14575, "ext": "py", "lang": "Python", "max_stars_repo_path": "open_turb_arch/architecting/problem.py", "max_stars_repo_name": "jbussemaker/OpenTurbofanArchitecting", "max_stars_repo_head_hexsha": "2a6c82b107720e5c281908387c9c3045e3dad749", "max_stars_repo_l...
# Authors: Stephane Gaiffas <stephane.gaiffas@gmail.com> # License: BSD 3 clause """ This module contains all required container types for nodes (including the node numpy dtypes and several functions operating locally in nodes. """ from math import log import numpy as np from numba import from_dtype, jit, boolean, ui...
{"hexsha": "4472c17fbdc99e5cd1e95284cbb3da4c92b5a84c", "size": 24565, "ext": "py", "lang": "Python", "max_stars_repo_path": "wildwood/_node.py", "max_stars_repo_name": "yiyang-yu/wildwood", "max_stars_repo_head_hexsha": "4c0ef4ef92a8488e908803da8862605f147bb07d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_...
import os import numpy as np import argparse from aist_plusplus.loader import AISTDataset from utils.features.kinetic import extract_kinetic_features from utils.features.manual_new import extract_manual_features from smplx import SMPL import torch import multiprocessing import functools parser = argparse.ArgumentPa...
{"hexsha": "fcaa1b19aa924017370f2f72dcc176663d617f28", "size": 2698, "ext": "py", "lang": "Python", "max_stars_repo_path": "extract_aist_features.py", "max_stars_repo_name": "lisiyao21/Bailando", "max_stars_repo_head_hexsha": "125b529b3c596b58b9d70f22c05dc3f04a01895c", "max_stars_repo_licenses": ["MIT"], "max_stars_cou...
import mlp.config as cfg import time import os from mlp.utils.polyBezier import * import pinocchio as pin from pinocchio import SE3, Quaternion from pinocchio.utils import * import numpy.linalg from multicontact_api import WrenchCone,SOC6,ContactSequenceHumanoid import numpy as np from numpy import array, dot, vstack, ...
{"hexsha": "288a600bd2b2465f34ebd5c65245226bb4e9f0ed", "size": 28725, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/mlp/end_effector/bezier_constrained.py", "max_stars_repo_name": "JasonChmn/multicontact-locomotion-planning", "max_stars_repo_head_hexsha": "061f89a58ea6363b2b0d5ee0156950e22040cc0d", "ma...
\section*{NP-completeness - Ada Nzulumike} Introduction: \\ - Purpose (identifying hard problems) \\ - The class P (decision problems, language framework, decided) \\ - The class NP (verification) NP-completeness: \\ - Reducibility (Definition of NP-complete languages) \\ - Proof of Theorem 34.9.
{"hexsha": "956e0cc731790f89327894ceaed8682277c561d3", "size": 299, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "Uge4/AdaDisp-NPC.tex", "max_stars_repo_name": "pdebesc/AADS", "max_stars_repo_head_hexsha": "a26e24d18adee973d3ce88bdfd96d857ec472fdf", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m...
from collections import Counter import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from src.helpers import paths def one(): df = pd.read_csv("file.csv") n_rows = df.shape[0] columns = list(df['Unnamed: 0']) n = n_rows // 4 cols = ['country_destination_...
{"hexsha": "33193d66c04fcc2bf7e9d9599c33400b9598995e", "size": 1436, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/data/data_corr.py", "max_stars_repo_name": "markrofail/airbnb-new-user-bookings-kaggle-", "max_stars_repo_head_hexsha": "9e82b80e0fb514d7e0d65940bdd9880f895d3304", "max_stars_repo_licenses": [...
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! !!!! MIT License !!!! !!!! ParaMonte: plain p...
{"hexsha": "06f74a3897f55571748b63ee0334cbb15e0b3cf9", "size": 6495, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "src/kernel/tests/Test_GeoCyclicFit_mod.f90", "max_stars_repo_name": "ekourkchi/paramonte", "max_stars_repo_head_hexsha": "15f8ea27cb514078a94d9c4ee4b60e4f45826f17", "max_stars_repo_licenses": ["...
import numpy as np import torch import random from skimage import io, transform import torch.nn.functional as F from torchvision import transforms torch.manual_seed(17) random.seed(42) class Resize(object): """Rescale the image in a sample to a given size. Args: output_size (tuple or int): Desired ou...
{"hexsha": "225758df209fdc21d3d7b5373f0662b169f6ecec", "size": 3111, "ext": "py", "lang": "Python", "max_stars_repo_path": "data_utils.py", "max_stars_repo_name": "BloomBabe/Underwater-Enhancing", "max_stars_repo_head_hexsha": "6154cd11c402fdc3f353dee9dc7c4166a1f36751", "max_stars_repo_licenses": ["MIT"], "max_stars_co...
! { dg-do run } program collapse3 call test1 call test2 (2, 6, -2, 4, 13, 18) call test3 (2, 6, -2, 4, 13, 18, 1, 1, 1) call test4 call test5 (2, 6, -2, 4, 13, 18) call test6 (2, 6, -2, 4, 13, 18, 1, 1, 1) contains subroutine test1 integer :: i, j, k, a(1:7, -3:5, 12:19), m logical :: l l = ....
{"hexsha": "eac9eac651bc2faba7b7da6cf6e65dc257c78083", "size": 6250, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "binutils-2.21.1/gcc-4.5.1/libgomp/testsuite/libgomp.fortran/collapse3.f90", "max_stars_repo_name": "cberner12/xv6", "max_stars_repo_head_hexsha": "53c4dfef0d48287ca0d0f9d27eab7a6ed7fee845", "max...
Require Import List. Import ListNotations. Inductive Forall3 {A B C : Type} (R : A -> B -> C -> Prop) : list A -> list B -> list C -> Prop := | Forall3_nil : Forall3 R [] [] [] | Forall3_cons : forall x y z xs ys zs, R x y z -> Forall3 R xs ys zs -> Forall3 R (x :: xs) (y :: ys) (z :: zs).
{"author": "uwplse", "repo": "oeuf", "sha": "f3e4d236465ba872d1f1b8229548fa0edf8f7a3f", "save_path": "github-repos/coq/uwplse-oeuf", "path": "github-repos/coq/uwplse-oeuf/oeuf-f3e4d236465ba872d1f1b8229548fa0edf8f7a3f/src/Forall3.v"}
function calculate_ideal_deltas(Q::Matrix{WEIGHT}, y::OPINIONS, α::PSYCHOLOGICAL_FACTOR, budget::WEIGHT) (n, m) = size(Q) T = Q * diagm(α) new_vals = fill(WEIGHT(0.0), n) counts = fill(WEIGHT(0.0), n) for i = 1:n if y[i] != 0.0 @simd for j = 1:m if (T[i,j] > 0) &...
{"hexsha": "824c1bc177d136fcf0b6f2ac5eb36feba663be85", "size": 854, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/temp.jl", "max_stars_repo_name": "InzamamRahaman/SignedDegroot", "max_stars_repo_head_hexsha": "c10e390a7364faacaccb60a745fa0426cdff96e9", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ...
[STATEMENT] lemma sorted_quicksort_acc: "\<lbrakk> sorted ac; \<forall>x \<in> set xs. \<forall>a \<in> set ac. x < a \<rbrakk> \<Longrightarrow> sorted (quicksort_acc ac xs)" and sorted_quicksort_part: "\<lbrakk> sorted ac; \<forall>y \<in> set lts \<union> {x} \<union> set eqs \<union> set gts \<union> set zs...
{"llama_tokens": 25024, "file": "Containers_Set_Impl", "length": 41}
from pytorch_grad_cam.activations_and_gradients import ActivationsAndGradients from pytorch_grad_cam import GradCAM from pytorch_grad_cam.utils.image import scale_cam_image from pytorch_grad_cam.utils.svd_on_activations import get_2d_projection from os.path import join,isfile import datetime import h5py import numpy...
{"hexsha": "49aacf6561dbd93a0c54ac6465658a75b2b127a8", "size": 7735, "ext": "py", "lang": "Python", "max_stars_repo_path": "classifier/engine/trainer.py", "max_stars_repo_name": "yidarvin/firstaid_classification", "max_stars_repo_head_hexsha": "5cb1ec5a896766ec4670e0daca23014a879e6c14", "max_stars_repo_licenses": ["MIT...
# Authors: Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Alexandre Gramfort <alexandre.gramfort@inria.fr> # Martin Luessi <mluessi@nmr.mgh.harvard.edu> # # License: BSD-3-Clause # The computations in this code were primarily derived from Matti Hämäläinen's # C code. from time import time from copy im...
{"hexsha": "7cce6f251f3d7ae468ee39b9376a5c4f85f4bf58", "size": 75023, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne/forward/forward.py", "max_stars_repo_name": "guiomar/mne-python", "max_stars_repo_head_hexsha": "2d19800a07904cfe69c1ba290c3eaf712625c6ab", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_s...