text stringlengths 0 1.25M | meta stringlengths 47 1.89k |
|---|---|
// Copyright Ross MacGregor 2013
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include "AsioExpressTest/pch.hpp"
#include <boost/test/unit_test.hpp>
#include <boost/shared_ptr.hpp>
... | {"hexsha": "b453ed34b5ce650ed66613c1fb75ab7ccc49e899", "size": 1941, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "source/AsioExpressTest/DataBufferTest.cpp", "max_stars_repo_name": "suhao/asioexpress", "max_stars_repo_head_hexsha": "2f3453465934afdcdf4a575a2d933d86929b23c7", "max_stars_repo_licenses": ["BSL-1.0... |
[STATEMENT]
lemma mult_imp_msetext_huet:
assumes
irrefl: "irreflp gt" and trans: "transp gt" and
in_mult: "(mset xs, mset ys) \<in> mult {(x, y). gt y x}"
shows "msetext_huet gt ys xs"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. msetext_huet gt ys xs
[PROOF STEP]
using in_mult
[PROOF STATE]
proof (pro... | {"llama_tokens": 16969, "file": "Lambda_Free_RPOs_Extension_Orders", "length": 140} |
[STATEMENT]
lemma WTBlock_code:
"\<And>is_lub. \<lbrakk> is_type P T; is_lub,P,E(V \<mapsto> T) \<turnstile> e :: T';
case vo of None \<Rightarrow> True | \<lfloor>v\<rfloor> \<Rightarrow> case typeof v of None \<Rightarrow> False | Some T' \<Rightarrow> P \<turnstile> T' \<le> T \<rbrakk>
\<Longrightarrow> ... | {"llama_tokens": 308, "file": "JinjaThreads_J_WellType", "length": 1} |
"""
GCN model for relation extraction.
"""
import copy
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.autograd import Variable
import numpy as np
from model.BiLSTM import EncoderLSTM
from model.localEncoder import LocalEncoder
from model.classifier import EntityClassifier
cl... | {"hexsha": "adc7a414e1760ab879dd17e979f8429d47ead70e", "size": 4306, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/model/docBilstm.py", "max_stars_repo_name": "AndrewZhe/Three-Sentences-Are-All-You-Need", "max_stars_repo_head_hexsha": "afad6f9e700c9a95e03ef200718ebee8e18ca016", "max_stars_repo_licenses": [... |
#!/usr/bin/env python3
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2021 Beartype authors.
# See "LICENSE" for further details.
'''
**Beartype PEP-agnostic type hint getter utility unit tests.**
This submodule unit tests the public API of the private
:mod:`beart... | {"hexsha": "e1559ad005747940ec79066d848807ac005c5059", "size": 5234, "ext": "py", "lang": "Python", "max_stars_repo_path": "beartype_test/a00_unit/a00_util/hint/a90_core/test_a00_utilhintget.py", "max_stars_repo_name": "vcokltfre/beartype", "max_stars_repo_head_hexsha": "9a1f81bea37a0eb4f51443dded8cec2e751e42a8", "max_... |
import numpy as np
import torch
from base import BaseTrainer
from utils.bbox import Toolbox
class Trainer(BaseTrainer):
"""
Trainer class
Note:
Inherited from BaseTrainer.
self.optimizer is by default handled by BaseTrainer based on config.
"""
def __init__(self, model, loss, metri... | {"hexsha": "a4f5e59ec269e5851c20f9b92d43377f82976804", "size": 4796, "ext": "py", "lang": "Python", "max_stars_repo_path": "trainer/trainer.py", "max_stars_repo_name": "lijian10086/FOTS.PyTorch", "max_stars_repo_head_hexsha": "3bbebbf08f077bc998b5f0bbc5311e920a5f675d", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_... |
\documentclass[a4paper,10pt]{article}
\usepackage[utf8]{inputenc}
\usepackage[margin=1in,includefoot,footskip=30pt]{geometry}
\usepackage{tikz}
\usepackage{bbm}
\usepackage{amsmath}
\usepackage{hyperref}
\newcommand\D{\mathrm{d}}
\newcommand\R{\mathbbm{R}}
\newcommand\Convolution{\ast}
\newcommand\Correlation{\star}... | {"hexsha": "33d4bc2617e802d351390424fda0bc85d6e8e856", "size": 22524, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "doc/shapes/shapes.tex", "max_stars_repo_name": "lereldarion/hawkes", "max_stars_repo_head_hexsha": "bdcb7284e6baa11e915c818b099a076084b8c3f6", "max_stars_repo_licenses": ["MIT"], "max_stars_count":... |
# -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... | {"hexsha": "717bec954aff2392f2b95c6ff2d9de0d53300661", "size": 3904, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/demo/scene/isocurve_for_trisurface_qt.py", "max_stars_repo_name": "izaid/vispy", "max_stars_repo_head_hexsha": "402cf95bfef88d70c9c45bb27c532ed72944e14a", "max_stars_repo_licenses": ["BSD... |
\documentclass{article}
\usepackage{fullpage}
\usepackage{amsmath}
\newcommand{\F}{\mathbf{F}}
\newcommand{\N}{\mathbf{N}}
\renewcommand{\S}{\mathbf{S}}
\newcommand{\D}{\mathbf{D}}
\newcommand{\X}{\mathbf{X}}
\newcommand{\f}{\mathbf{f}}
\renewcommand{\P}{\mathbf{P}}
\newcommand{\Ds}{\D_s}
\newcommand{\Dm}{\D_m}
\renew... | {"hexsha": "1b144ab169b484e4a713dad5c52b1888a0d64e39", "size": 3064, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "applications/physbam/physbam-lib/Public_Library/PhysBAM_Solids/PhysBAM_Deformables/Constitutive_Models/neo_hookean_energy.tex", "max_stars_repo_name": "schinmayee/nimbus", "max_stars_repo_head_hexsh... |
import numpy as np
import subprocess
preface_script = '''#!/bin/bash
#SBATCH -N 1
#SBATCH --partition=batch
#SBATCH -J {name}
#SBATCH -o ./SLURM_jobs/{name}.%J.out
#SBATCH -e ./SLURM_jobs/{name}.%J.err
#SBATCH --time={days}-00:00:00
#SBATCH --gres=gpu:v100:1
#SBATCH --mem=140G
#SBATCH --constraint=[gpu]
#SBATCH --cp... | {"hexsha": "e273d8a658ca72096648dd7dbae0cd1a77e0b744", "size": 6989, "ext": "py", "lang": "Python", "max_stars_repo_path": "run_SLURM_jobs.py", "max_stars_repo_name": "THinnerichs/MiS-Information-Clustering", "max_stars_repo_head_hexsha": "597c70e1283222e0e841e24f6805b967aaf3c9e0", "max_stars_repo_licenses": ["MIT"], "... |
import numpy as np
from ..base import Model, ParamMixin, CollectionMixin
from ..feed import Feed
from ..loss import SoftmaxCrossEntropy
class NeuralNetwork(Model, CollectionMixin):
def __init__(self, layers, loss):
self.layers = layers
self.loss = loss
self.bprop_until = next((idx for idx,... | {"hexsha": "974dc10865f4551169bdcc58a23764d1412d1d79", "size": 2008, "ext": "py", "lang": "Python", "max_stars_repo_path": "deeppy/feedforward/neural_network.py", "max_stars_repo_name": "purushothamgowthu/deeppy", "max_stars_repo_head_hexsha": "8cb658b33b91a0a91dea089a843941baf3f73481", "max_stars_repo_licenses": ["MIT... |
import cv2 as cv
import numpy as np
import os
import sys
import time
path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(path, ".."))
sys.path.append(os.path.join(path, "../../../../common/"))
sys.path.append(os.path.join(path, "../../../../common/atlas_utils"))
from constants import IMG_E... | {"hexsha": "d8ee726ca72f5c7d09f2af12e9836c8fffee52c5", "size": 2450, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/level2_simple_inference/6_other/colorization_picture/src/colorize.py", "max_stars_repo_name": "Dedederek/samples", "max_stars_repo_head_hexsha": "31d99de20af2f7046556e0f48c4b789b99e422f8", ... |
# -*- coding: utf-8 -*-
"""Compute medoids from time series."""
__author__ = ["chrisholder", "TonyBagnall"]
import numpy as np
from sktime.distances import pairwise_distance
def medoids(
X: np.ndarray,
precomputed_pairwise_distance: np.ndarray = None,
distance_metric: str = "dtw",
):
"""Compute the ... | {"hexsha": "db320b4d167b316d9f1eb06e3fdbc81143af8aeb", "size": 1316, "ext": "py", "lang": "Python", "max_stars_repo_path": "sktime/clustering/metrics/medoids.py", "max_stars_repo_name": "mikofski/sktime", "max_stars_repo_head_hexsha": "87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7", "max_stars_repo_licenses": ["BSD-3-Clause... |
import os, sys
import glob
import argparse
import numpy as np
import pandas as pd
from tqdm import tqdm
def generate_results_table(results_dir, key, savepath=None, append=False):
flist = glob.glob(os.path.join(results_dir, '*_sender_RTT.csv'))
table = [] # key, tracename, duration, blksize, qsize, mmdelay,... | {"hexsha": "4e1bccbd34a292866d646d656c09b4f3aa476c3f", "size": 3067, "ext": "py", "lang": "Python", "max_stars_repo_path": "make_table.py", "max_stars_repo_name": "shivariyer/mmwave_cc", "max_stars_repo_head_hexsha": "5bb2ebbff1f2bc080e5fe81a6b1ca00aed441400", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 2, "... |
function h = tc_sessionPlots(tcs, plotType, titleType);
% h = tc_sessionPlots(tcs, plotType, [titleType = 1]);
%
% produce a figure showing individual subjects time course or amplitude data
% each subject's data will be a subplot of the figure
% plotType (string):
% 'wholetc' raw timecourse
% 'meanampsplust... | {"author": "vistalab", "repo": "vistasoft", "sha": "7f0102c696c091c858233340cc7e1ab02f064d4c", "save_path": "github-repos/MATLAB/vistalab-vistasoft", "path": "github-repos/MATLAB/vistalab-vistasoft/vistasoft-7f0102c696c091c858233340cc7e1ab02f064d4c/mrBOLD/EventRelated/TimeCourseUI/tc_sessionPlots.m"} |
from __future__ import absolute_import
from __future__ import print_function
import pandas as pd
import numpy as np
import matplotlib
from matplotlib import pyplot as plt
from matplotlib.pyplot import grid
from matplotlib import figure
from matplotlib.ticker import MultipleLocator,FuncFormatter,NullFormatter
from . im... | {"hexsha": "7a5f2887d73cfa2998f75be9c4e97bb471d543d0", "size": 21970, "ext": "py", "lang": "Python", "max_stars_repo_path": "rowingphysics/expdata.py", "max_stars_repo_name": "sanderroosendaal/rowingphysics", "max_stars_repo_head_hexsha": "9b809c80708e96d13761861218ff7744829cc4c9", "max_stars_repo_licenses": ["MIT"], "... |
MODULE btree
!
! Purpose:
! To define the derived data type used as a node in the
! binary tree, and to define the operations >, <. and ==
! for this data type. This module also contains the
! subroutines to add a node to the tree, write out the
! values in the tree, and find a value in the t... | {"hexsha": "86352aefb2d5b96869fad60bdcaf881a8ac050be", "size": 10196, "ext": "f90", "lang": "FORTRAN", "max_stars_repo_path": "Fortran952003ForScientistsandEngineers3rdStephenJChapman/chap15/btree.f90", "max_stars_repo_name": "yangyang14641/FortranLearning", "max_stars_repo_head_hexsha": "3d4a91aacd957361aff5873054edf3... |
import numpy as np
import argparse
parser = argparse.ArgumentParser(description="A silly script to convert the angular bin of a light curve in the simulation data to its angle in degrees")
parser.add_argument("--angular-bin", type=int, help="The angular bin")
args = parser.parse_args()
# Averge the upper and lower bo... | {"hexsha": "5f8f14b60872e46215f39b52a78df94931613d42", "size": 486, "ext": "py", "lang": "Python", "max_stars_repo_path": "bin/convert_angular_bin_to_theta.py", "max_stars_repo_name": "liz-champion/lc_fit", "max_stars_repo_head_hexsha": "f86d28781252783240a33a4b8854e9ecefeab27c", "max_stars_repo_licenses": ["MIT"], "ma... |
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: iotanalytics
using AWS.Compat
using AWS.UUIDs
"""
BatchPutMessage()
Sends messages to a channel.
# Required Parameters
- `channelName`: The name of the channel where the messages are sent.
- `messages`: The list of messages to be se... | {"hexsha": "00459cdf705e355ed50aacfcfdd42ba132cef6a7", "size": 29904, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/services/iotanalytics.jl", "max_stars_repo_name": "BradLyman/AWS.jl", "max_stars_repo_head_hexsha": "30a46ae732050585e62def0c4955f5e1363c4d86", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
[STATEMENT]
lemma msteps0_msteps0_stateless: "fst (msteps0 w st) = msteps0_stateless w st"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. fst (msteps0 w st) = msteps0_stateless w st
[PROOF STEP]
by (induct w arbitrary: st) (auto simp: split_beta) | {"llama_tokens": 105, "file": "MFODL_Monitor_Optimized_Monitor", "length": 1} |
from enum import Enum
import numpy as np
NUMERICAL_TYPES = tuple([float, int, np.float, np.float64])
class Comparator(Enum):
"""
Enum for less equals, equals and greater equals.
"""
LESS_EQUALS = 0
"""Less equals (<=)"""
EQUALS = 1
"""Equals (=)"""
GREATER_EQUALS = 2
"""Greater eq... | {"hexsha": "3d9b6ac52256c430553c201f13eeb214a787c48e", "size": 1867, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/hips/constants.py", "max_stars_repo_name": "cxlvinchau/hips", "max_stars_repo_head_hexsha": "696942e76fb3b131d5215726191ae0f751229c39", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 8... |
(************************************************************************)
(* v * The Coq Proof Assistant / The Coq Development Team *)
(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2017 *)
(* \VV/ **************************************************************)
(* // * Th... | {"author": "uwplse", "repo": "pumpkin-pi", "sha": "a7743d4665d8c7a0ebfd9d39e1247ee7804d402b", "save_path": "github-repos/coq/uwplse-pumpkin-pi", "path": "github-repos/coq/uwplse-pumpkin-pi/pumpkin-pi-a7743d4665d8c7a0ebfd9d39e1247ee7804d402b/plugin/eval/equiv4free/perm.v"} |
#include <stdexcept>
#include <boost\test\unit_test.hpp>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
using namespace std;
BOOST_AUTO_TEST_SUITE( TestFloatingPoint )
BOOST_AUTO_TEST_CASE( ShouldNotEqualWhen1Over3 )
{
float a1 = (float)( 1.0/3.0 );
double a2 = 1.0/3.0;
BOOST_CHECK( (double)a1 != a2 ... | {"hexsha": "717f37e37aaa4d05d33744c10e9b24aed56e069f", "size": 459, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Sandbox/CPPTest/TestFloatingPoint.cpp", "max_stars_repo_name": "SungwooNam/ProgrammingStudy", "max_stars_repo_head_hexsha": "3c2fe6096fea29547f05ff29bbde14a48c4afa9b", "max_stars_repo_licenses": ... |
# Copyright (C) 2016 Enrique Saurez Georgia Institute of Technology
# Copyright (C) 2016 Li Cheng BUPT www.muzixing.com.
# Copyright (C) 2011 Nippon Telegraph and Telephone Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | {"hexsha": "0e332ec70cd072ca924bba132699ef6b60286e50", "size": 14279, "ext": "py", "lang": "Python", "max_stars_repo_path": "loadbalancer_controller.py", "max_stars_repo_name": "esaurez/workshop4", "max_stars_repo_head_hexsha": "15d5e8c9fe0760e6849655ef2a3f60224a12dffb", "max_stars_repo_licenses": ["Apache-2.0"], "max_... |
# Illustrate the concept of mutual consistency
function illustrate_mc()
dgp = illustration_dgp()
assumptions = Dict{Symbol, Any}(:lb => 0, :ub => 1)
basis1 = (interacted_bernstein_basis(1, notℓ = 2),
interacted_bernstein_basis(1, notℓ = 2))
basis2 = (interacted_bernstein_basis(3, notℓ = 1)... | {"hexsha": "631645416b8e9d9597edc264f1f97b6bace71b7a", "size": 8142, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/paper_simulations.jl", "max_stars_repo_name": "omkarakatta/MarginalTreatmentEffectsWithMultipleInstruments.jl", "max_stars_repo_head_hexsha": "8bc8a7f42817fa3fcc45b6b9a78aaaa11b3092bb", "max_st... |
"""
deflation criterion.
"""
function deflation_criterion(sub::T, da::T, db::T) where {T<:Number}
deflation_criterion1(abs(sub), (abs(da) + abs(db) ))
end
@inline deflation_criterion1(sub::T, da::T) where {T<:Number} = sub <= eps(da) / 4
| {"hexsha": "4568b9973b6b2fea9e770f48e18da7549c8f4db7", "size": 243, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/deflationcrit.jl", "max_stars_repo_name": "KlausC/LinAlgBigFloat", "max_stars_repo_head_hexsha": "5dcfbd8605d39cf0f82b8d4db4a7cafa0dbb3df8", "max_stars_repo_licenses": ["MIT"], "max_stars_count"... |
"""
EA-compatible analogue to to np.putmask
"""
from typing import Any, Tuple
import warnings
import numpy as np
from pandas._libs import lib
from pandas._typing import ArrayLike
from pandas.core.dtypes.cast import (
convert_scalar_for_putitemlike,
find_common_type,
infer_dtype_from,
)
from pandas.core.d... | {"hexsha": "917aace233ee571bbf4bbb9b5c2386cd3e30a03c", "size": 6604, "ext": "py", "lang": "Python", "max_stars_repo_path": "pandas/core/array_algos/putmask.py", "max_stars_repo_name": "yuvalmarciano/pandas", "max_stars_repo_head_hexsha": "a9cacd9efee31e6cff28125ffbad00fad1617833", "max_stars_repo_licenses": ["PSF-2.0",... |
* DF01MD EXAMPLE PROGRAM TEXT
* Copyright (c) 2002-2020 NICONET e.V.
*
* .. Parameters ..
INTEGER NIN, NOUT
PARAMETER ( NIN = 5, NOUT = 6 )
INTEGER NMAX
PARAMETER ( NMAX = 129 )
* .. Local Scalars ..
DOUBLE PRECISION DT
INTEGER ... | {"hexsha": "f795eef4833e8c1a8437925c699d771d48871980", "size": 1908, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "examples/TDF01MD.f", "max_stars_repo_name": "bnavigator/SLICOT-Reference", "max_stars_repo_head_hexsha": "7b96b6470ee0eaf75519a612d15d5e3e2857407d", "max_stars_repo_licenses": ["BSD-3-Clause"], "m... |
import numpy as np
class FilterTypeException(Exception):
"""
Creates custom exception for File Type
"""
pass
class ImageDimensionException(Exception):
"""
Creates custom exception for Image Dimension
"""
pass
class FilterDimensionException(Exception):
"""
Creates custom e... | {"hexsha": "e1f48d1c66b325d1cf9d374980ca026ae2677501", "size": 11151, "ext": "py", "lang": "Python", "max_stars_repo_path": "picturepyfect/applyfilter.py", "max_stars_repo_name": "UBC-MDS/picturepyfect", "max_stars_repo_head_hexsha": "0a9e292cdb6b974edb94b6c3d4e30964276e7ffb", "max_stars_repo_licenses": ["MIT"], "max_s... |
import json
import pandas
import numpy
import logging
logger = logging.getLogger(__name__)
from yahist import Hist1D
import matplotlib.pyplot as plt
def make_ratio_plot(data, mc, save_name, bins, **kwargs):
normalize = kwargs.get("normalize", False)
x_label = kwargs.get("x_label", None)
y_label = kwargs.... | {"hexsha": "cfddad59041a71f4a3735a1595c6c34e2a49546d", "size": 1516, "ext": "py", "lang": "Python", "max_stars_repo_path": "hrl/plots/plotter.py", "max_stars_repo_name": "sam-may/HistogramRestrictedLearning", "max_stars_repo_head_hexsha": "39c8470eca438bd547bf348d7f8312db1daebde3", "max_stars_repo_licenses": ["MIT"], "... |
"""
Simulate inverter model with ADP formulation from the paper
"High-Speed Finite Control Set Model Predictive Control for Power Electronics", B. Stellato, T. Geyer and P. Goulart
"""
# Import numpy
import numpy as np
import pandas as pd
# Power converter model files
from .power_converter import Model
# Import plo... | {"hexsha": "2eca5032528d6ac4fd9a2b8b2af8d69d0899cb73", "size": 4627, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/power_converter/run_example.py", "max_stars_repo_name": "bstellato/miosqp", "max_stars_repo_head_hexsha": "ac672338b0593d865dd15b7a76434f25e24244a9", "max_stars_repo_licenses": ["Apache-2... |
import numpy as np
import cv2
img = cv2.imread('assets/soccer_practice.jpg', 0)
template = cv2.imread('assets/ball.png', 0)
heigth, width = template.shape
methods = [cv2.TM_CCOEFF, cv2.TM_CCOEFF_NORMED, cv2.TM_CCORR,
cv2.TM_CCORR_NORMED, cv2.TM_SQDIFF, cv2.TM_SQDIFF_NORMED]
for method in methods:
img2... | {"hexsha": "0f52ac2821b93216b7d74e93d979844c7e298f9e", "size": 770, "ext": "py", "lang": "Python", "max_stars_repo_path": "openCV/FindPartOfImage.py", "max_stars_repo_name": "MatveiAleksandrovich/Artificial-Intelligence", "max_stars_repo_head_hexsha": "d3d6f253e7c2256f6f9d490b077bdb50ca1da229", "max_stars_repo_licenses... |
import tensorflow as tf
from tensorflow.examples.tutorials.mnist import input_data
import forward_lenet5
import os
import numpy as np
# 定义训练过程中的超参数
BATCH_SIZE = 100 # 一个batch的数量
LEARNING_RATE_BASE = 0.005 # 初始学习率
LEARNING_RATE_DECAY = 0.99 # 学习率的衰减率
REGULARIZER = 0.0001 # 正则化项的权重
STEPS = 50000 # 最大迭代次数
MOVING_AVER... | {"hexsha": "be9355b30311ca139825d7abc1ff02e597d62651", "size": 3805, "ext": "py", "lang": "Python", "max_stars_repo_path": "course-code/imooc-tf-mnist-flask/mnist/lenet5/backforward_lenet5.py", "max_stars_repo_name": "le3t/ko-repo", "max_stars_repo_head_hexsha": "50eb0b4cadb9db9bf608a9e5d36376f38ff5cce5", "max_stars_re... |
//
// Copyright 2014 QuarksLab
//
// 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 ... | {"hexsha": "01cc4f516d87b37bed8d56510f22d22611007352", "size": 5940, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "include/binmap/collectors/pe/resource_parser.hpp", "max_stars_repo_name": "H1d3r/binmap", "max_stars_repo_head_hexsha": "78f5454690958871846a2417513ae75e9a4bacdd", "max_stars_repo_licenses": ["Apach... |
import cv2
import time
import numpy as np
import subprocess
def read_to_frames(video_file, hight, width, start_time='00:00:00'):
process = subprocess.Popen([
'ffmpeg', '-v', 'error',
'-ss', start_time,
'-i', video_file,
'-an',
'-f', 'rawvideo',
'-pix_fmt', 'rgb24',
... | {"hexsha": "fe1ae01cb86bd6ec5ebc296fac1171ea6871261a", "size": 1130, "ext": "py", "lang": "Python", "max_stars_repo_path": "intelab_python_sdk/ffmpeg/ffmpeg_read_frames.py", "max_stars_repo_name": "zwwangoo/intelab-python-sdk", "max_stars_repo_head_hexsha": "b0b40d873f277b20886c5e5bdd5b37d1f060a883", "max_stars_repo_li... |
# --------------------------------------------------------------------------- #
# TEST CLASSIFICATION #
# --------------------------------------------------------------------------- #
#%%
# Imports
import math
import numpy as np
import pandas as pd
import pytest
f... | {"hexsha": "e543781fc8f8d63854bc8d652327da8acd312163", "size": 17937, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/test_supervised_learning/test_classification.py", "max_stars_repo_name": "john-james-ai/ml-studio", "max_stars_repo_head_hexsha": "2230fcd6579d2291c761e559ec93b18ddd7a96e6", "max_stars_repo... |
import os.path
import argparse
import numpy as np
from utils.logger import setup_logger
from utils_balanced_sampling import train_boundary
def parse_args():
"""Parses arguments."""
parser = argparse.ArgumentParser(
description='Train semantic boundary with given latent codes and '
'attribu... | {"hexsha": "6688e6967d4827621d498023d3821cbb9b5c514a", "size": 2338, "ext": "py", "lang": "Python", "max_stars_repo_path": "train_boundary_balanced_sampling.py", "max_stars_repo_name": "perladoubinsky/balanced_sampling_gan_controls", "max_stars_repo_head_hexsha": "cbec7a38176406c0e19d4b6ebbc6c6b52d268036", "max_stars_r... |
""" Plots figure 2.
"""
from matplotlib.lines import Line2D
import ccobra
import matplotlib.gridspec as gridspec
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
def get_response_vector(pattern):
""" Extracts a vector of responses from a given pattern by identifying t... | {"hexsha": "4d02419bce589a8079b44d378eb7f0694c0d2568", "size": 8044, "ext": "py", "lang": "Python", "max_stars_repo_path": "analysis/plot_fig2.py", "max_stars_repo_name": "nriesterer/iccm-nmffeedback", "max_stars_repo_head_hexsha": "11c1595a94d282c469e84a3ad60217abe80e9ec4", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""
Measure transmission / time of flight with the synchronized CCT / pulser.
If both the sensor (spotWave sensor input) and the transmitter (spotWave CCT output) are mounted on
the same structure, the pulser functionality can be used to analyze transmission or measure the time
of flight (using thresholds or timepicke... | {"hexsha": "cdd1e1dfa983aadb31df4ee0266c7c3a072e1eec", "size": 1447, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/spotwave_transmission.py", "max_stars_repo_name": "vallen-systems/pyWaveLine", "max_stars_repo_head_hexsha": "d5bddda16c1f41261dc2d76896b768c469c7218d", "max_stars_repo_licenses": ["MIT"]... |
#ifndef _MATRIX_PERMUTE_HPP_
#define _MATRIX_PERMUTE_HPP_
#include <boost/numeric/ublas/matrix.hpp>
#include <boost/numeric/ublas/matrix_expression.hpp>
namespace matrix {
template<typename T>
struct permutation {
typedef permutation self;
template<class M, class Permutation = self>
struct expression { /... | {"hexsha": "3598a3eca68357019f3c8fee116060b8ab99805a", "size": 1362, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "gamess/libqc/src/matrix/permute.hpp", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "... |
#include <boost/core/enable_if.hpp>
#include <type_traits>
#include <iostream>
template <typename T>
typename boost::disable_if_c<std::is_pointer_v<T>>::type print(T t)
{
std::cout << t << '\n';
}
template <typename T>
typename boost::enable_if_c<std::is_pointer_v<T>>::type print(T t)
{
std::cout << *t << '\n';
}
... | {"hexsha": "acd11f173787505eb699dea43973713219e0d8a9", "size": 386, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "18_boost_enable_if/main.cpp", "max_stars_repo_name": "BorisSchaeling/boost-meta-programming-2020", "max_stars_repo_head_hexsha": "1bb70e88070953daa4bc19f91f891b43583df06e", "max_stars_repo_licenses":... |
import os
import numpy as np
from cae.hybridsvd import HybridSVD
os.environ["THEANO_FLAGS"] = "mode=FAST_RUN,device=cpu,floatX=float32,OMP_NUM_THREADS=4"
os.environ["OMP_NUM_THREADS"] = "4"
os.environ["MKL_NUM_THREADS"] = "4"
os.environ["NUMEXPR_NUM_THREADS"] = "4"
X = np.random.rand(100, 200)
K = np.identity(X.sha... | {"hexsha": "5e84d214a8f0939d7537a46eb64a05d4f1279c19", "size": 888, "ext": "py", "lang": "Python", "max_stars_repo_path": "examples/decomposition.py", "max_stars_repo_name": "arsast/cae", "max_stars_repo_head_hexsha": "14021e4504f56a2214a0b4644fc8a0ce8863648a", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, ... |
import numpy as np
import torch.nn as nn
import torch.distributions as td
class DenseModel(nn.Module):
def __init__(
self,
input_size,
output_size,
info,
dropout = 0,
init_params = None,
zerone = False
):
"""
... | {"hexsha": "d9772897509955d583f75009eca59f4fa1d8abdb", "size": 1991, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/dense.py", "max_stars_repo_name": "TachikakaMin/modular-rl", "max_stars_repo_head_hexsha": "d46c752eb1f8e6f7cdc073d6981e04e1804823df", "max_stars_repo_licenses": ["BSD-2-Clause"], "max_stars_c... |
import cv2
import numpy as np
cap = cv2.VideoCapture("example/test.mp4")
ret, frame1 = cap.read()
prvs = cv2.cvtColor(frame1,cv2.COLOR_BGR2GRAY)
hsv = np.zeros_like(frame1)
hsv[...,1] = 255
while(1):
ret, frame2 = cap.read()
next = cv2.cvtColor(frame2,cv2.COLOR_BGR2GRAY)
flow = cv2.calcOpt... | {"hexsha": "0ab042160ef0f69d159ee7c5b8346c8d21e63f5f", "size": 969, "ext": "py", "lang": "Python", "max_stars_repo_path": "testoptic.py", "max_stars_repo_name": "berktinaz/lip-movement-detector", "max_stars_repo_head_hexsha": "205fafd59779018ea7f973c678c84d653514fb02", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
import numpy as np
import pandas as pd
import numba
import awkward as ak
from .common import reshape_awkward
from sklearn.cluster import DBSCAN
def find_cluster(interactions, cluster_size_space, cluster_size_time):
"""
Function which finds cluster within a event.
Args:
x (pandas.DataFrame): Subent... | {"hexsha": "f2b4411b4b76238ace82ef6b8d2ca5bb29d88e6b", "size": 10208, "ext": "py", "lang": "Python", "max_stars_repo_path": "epix/clustering.py", "max_stars_repo_name": "XENONnT/epix", "max_stars_repo_head_hexsha": "d315551cdcf6b98898c6682952eb0def10646dc3", "max_stars_repo_licenses": ["BSD-3-Clause"], "max_stars_count... |
# -*- encoding: utf-8 -*-
# pylint: disable=E0203,E1101,C0111
"""
@file
@brief Runtime operator.
"""
import numpy
from ._op import OpRunUnaryNum
class ReduceLogSumExp(OpRunUnaryNum):
atts = {'axes': [], 'keepdims': 1}
def __init__(self, onnx_node, desc=None, **options):
OpRunUnaryNum.__init__(self, ... | {"hexsha": "275d619f9cc681dc9b4c8ae54c8179c281063c47", "size": 1146, "ext": "py", "lang": "Python", "max_stars_repo_path": "mlprodict/onnxrt/ops_cpu/op_reduce_log_sum_exp.py", "max_stars_repo_name": "Exlsunshine/mlprodict", "max_stars_repo_head_hexsha": "9ea1a0fc85726822cae82c0b27b23b46f9ef351a", "max_stars_repo_licens... |
/-
Copyright (c) 2021 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin
-/
import category_theory.preadditive.basic
/-!
# Preadditive structure on functor categories
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file re... | {"author": "leanprover-community", "repo": "mathlib", "sha": "5e526d18cea33550268dcbbddcb822d5cde40654", "save_path": "github-repos/lean/leanprover-community-mathlib", "path": "github-repos/lean/leanprover-community-mathlib/mathlib-5e526d18cea33550268dcbbddcb822d5cde40654/src/category_theory/preadditive/functor_categor... |
//
// Created by niko on 26.05.2021.
//
#include <redis_async/details/connection/transport.hpp>
#include <redis_async/error.hpp>
#include <boost/asio/connect.hpp>
#include <boost/bind.hpp>
namespace redis_async {
namespace details {
//*********************************************************************... | {"hexsha": "98aecb486a13582e9c3c87984c0cc18cf4cc1898", "size": 3459, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/details/connection/transport.cpp", "max_stars_repo_name": "Greenvi4/redis_async", "max_stars_repo_head_hexsha": "477fec00fe080c1425ccbaca19ed67bce368c972", "max_stars_repo_licenses": ["MIT"], "m... |
import functools
import os
import traceback
import numpy as np
from colorama import Fore, Style
from taichi._lib import core as _ti_core
from taichi.lang import impl
from taichi.types.primitive_types import (f16, f32, f64, i8, i16, i32, i64, u8,
u16, u32, u64)
_has_pytorch = ... | {"hexsha": "feb18831d91cbf18127bea1c42e13b33788fc415", "size": 5961, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/taichi/lang/util.py", "max_stars_repo_name": "gaoxinge/taichi", "max_stars_repo_head_hexsha": "86d403f071b8505858763d4712b37cd71b89db91", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 17-9-29 下午3:56
# @Author : MaybeShewill-CV
# @Site : https://github.com/MaybeShewill-CV/CRNN_Tensorflow
# @File : test_shadownet.py
# @IDE: PyCharm Community Edition
"""
Use shadow net to recognize the scene text of a single image
"""
import argparse
imp... | {"hexsha": "c3bc160aaef0b2f761d9483ed6de8d985415bbee", "size": 9662, "ext": "py", "lang": "Python", "max_stars_repo_path": "tools/test_shadownet.py", "max_stars_repo_name": "LJXLJXLJX/CRNN_Tensorflow", "max_stars_repo_head_hexsha": "2d2ed639ecfd26da30c5784582388db5dcaec1f8", "max_stars_repo_licenses": ["MIT"], "max_sta... |
#!/usr/bin/python
usage="computeUptimeHist.py [--options] start end"
description="queries data and computes histograms based on uptime"
author = "reed.essick@ligo.org"
#-------------------------------------------------
import os
import sys
import numpy as np
#import snr_utils as psd_utils
from glue.ligolw import ... | {"hexsha": "5a4298042c8fdcda0202317c15d8c0928133cde1", "size": 5365, "ext": "py", "lang": "Python", "max_stars_repo_path": "computeUptimeHist.py", "max_stars_repo_name": "reedessick/observationalBias", "max_stars_repo_head_hexsha": "3f39c57e7f30f34ba67056072882b69267d0aba1", "max_stars_repo_licenses": ["MIT"], "max_sta... |
"""
Hyperparameter tuning using (optionally random) Grid Search.
"""
import tigercontrol
from tigercontrol.utils.random import generate_key
import jax.numpy as np
import jax
from jax import jit, grad, random
import itertools
class GridSearch:
"""
Description: Implements the equivalent of an AR(p) controller... | {"hexsha": "e7acb6a707a6e4fcbeaef1facce2cf0b856b4af9", "size": 5534, "ext": "py", "lang": "Python", "max_stars_repo_path": "tigercontrol/utils/autotuning/grid_search.py", "max_stars_repo_name": "MinRegret/TigerControl", "max_stars_repo_head_hexsha": "b1ca0617cbb2198f9d5cb37f725f3d7accbab08f", "max_stars_repo_licenses":... |
//---------------------------------------------------------------------------//
//!
//! \file Utility_RotationCylindricalSpatialCoordinateConversionPolicy.hpp
//! \author Alex Robinson
//! \brief Rotation cylindrical spatial coordinate conversion policy decl.
//!
//---------------------------------------------------... | {"hexsha": "4b7d26c3def88620cfe7e1371e56882d8086bcf8", "size": 5152, "ext": "hpp", "lang": "C++", "max_stars_repo_path": "packages/utility/system/src/Utility_RotationCylindricalSpatialCoordinateConversionPolicy.hpp", "max_stars_repo_name": "bam241/FRENSIE", "max_stars_repo_head_hexsha": "e1760cd792928699c84f2bdce70ff54... |
[STATEMENT]
lemma coupling_cond:
assumes "coupling Q V D S"
shows "(Q = Map.empty) \<longleftrightarrow> (\<forall>u. u\<notin>S \<longrightarrow> D u = \<infinity>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. (Q = Map.empty) = (\<forall>u. u \<notin> S \<longrightarrow> D u = \<infinity>)
[PROOF STEP]
using... | {"llama_tokens": 208, "file": "Prim_Dijkstra_Simple_Dijkstra_Abstract", "length": 2} |
import unittest
import numpy as np
from bnpy.allocmodel.hmm.HMMUtil import FwdAlg_py, BwdAlg_py, SummaryAlg_py
from bnpy.allocmodel.hmm.HMMUtil import SummaryAlg_cpp, calcRespPair_fast
from bnpy.allocmodel.hmm.HMMUtil import calc_sub_Htable_forMergePair
from bnpy.init.FromTruth import convertLPFromHardToSoft
class ... | {"hexsha": "f9aac1e3c3c8d7ad5429ebc0221ab692349d6916", "size": 5106, "ext": "py", "lang": "Python", "max_stars_repo_path": "tests/allocmodel/hmm/TestSummaryAlg.py", "max_stars_repo_name": "co2meal/-bnpy-dev", "max_stars_repo_head_hexsha": "74f69afde6c9dac8de4c074842df53ae87a15ac1", "max_stars_repo_licenses": ["BSD-3-Cl... |
import streamlit as st
import numpy as np
import pandas as pd
import pickle
import datetime
import matplotlib.pyplot as plt
import seaborn as sns
from keras.models import load_model
st.write('''
# Simple Stock Price Prediction
''')
st.sidebar.header('Users Input Parameters')
df = pd.DataFrame({
'first colum... | {"hexsha": "33ad8371552fffdc86a8cd5dd4c3fd3f6577a5dc", "size": 5219, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py.py", "max_stars_repo_name": "Nayanasalur/Streamlit", "max_stars_repo_head_hexsha": "16bacf0594170626ff685cc3acd94e0d551ad8a4", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars_count": ... |
import matplotlib
from matplotlib import style
import matplotlib.animation as animation
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
import tkinter as tk
from tkinter import ttk
from matplotlib import pyplot as plt
import serial.tools.list_ports
import numpy as np
im... | {"hexsha": "de7e87f3e07e2fe045026df2e2ef7021ae08d59b", "size": 41774, "ext": "py", "lang": "Python", "max_stars_repo_path": "Python_code/final_v1.py", "max_stars_repo_name": "tuw-chemistry/measurement_unit", "max_stars_repo_head_hexsha": "b135e6832bd393c285439431a40a563c27d864a4", "max_stars_repo_licenses": ["BSD-3-Cla... |
#ifndef CONTROLLERS_IMAGEOPERATIONTOGGLECONTROLLER_H
#define CONTROLLERS_IMAGEOPERATIONTOGGLECONTROLLER_H
#include "imageoperationactioncontroller.h"
#include "s3d/cv/image_operation/image_operation.h"
#include <QAction>
#include <gsl/gsl>
class ImageOperationToggleController : public ImageOperationActionControlle... | {"hexsha": "4bdbe13ac04c507a2596c026eea936f500f2896f", "size": 608, "ext": "h", "lang": "C", "max_stars_repo_path": "src/apps/S3DAnalyzer/controllers/imageoperationtogglecontroller.h", "max_stars_repo_name": "hugbed/OpenS3D", "max_stars_repo_head_hexsha": "4ffad16f9b0973404b59eb1424cc45f68754fe12", "max_stars_repo_lice... |
# Copyright 2020 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | {"hexsha": "a0a79f5a2807272a2d86b2c82713cdfb26de3da1", "size": 19195, "ext": "py", "lang": "Python", "max_stars_repo_path": "SCLPsolver/subroutines/time_collision_resolver.py", "max_stars_repo_name": "haroldship/SCLPsolver", "max_stars_repo_head_hexsha": "70b79acb074f51d4a269993f6a1fcf04a8196a89", "max_stars_repo_licen... |
import torch
from torch.autograd import Variable
import numpy as np
import torch.nn.functional as F
import models
# Return triplet of predictions, ground-truth and error
def wrapperNYU(dataBatch, opt,
encoder, albedoDecoder, normalDecoder, roughDecoder, depthDecoder ):
# Load data from cpu to gpu
normal_c... | {"hexsha": "9df712a61c104af137c3836ef28840763dfb0311", "size": 5919, "ext": "py", "lang": "Python", "max_stars_repo_path": "wrapperNYU.py", "max_stars_repo_name": "Z7Gao/InverseRenderingOfIndoorScene", "max_stars_repo_head_hexsha": "f245d20dcbe05b1de766c2e53af79fd489f58d74", "max_stars_repo_licenses": ["MIT"], "max_sta... |
conditionalhello{
if(*name!="Your Name"){
writeLine("stdout", "Hello *name!");
}
else { writeLine("stdout", "Hello world!"); }
}
INPUT *name="Your Name"
OUTPUT ruleExecOut, *name
| {"hexsha": "4ec787f7456362b9f4e63675bbf6baa4edacc457", "size": 203, "ext": "r", "lang": "R", "max_stars_repo_path": "ExampleTrainings/iRODS-User-training/exampleRules/conditionalhello.r", "max_stars_repo_name": "chStaiger/B2SAFE-B2STAGE-Training", "max_stars_repo_head_hexsha": "ab1bc3e4f6b75b9c1501aa77e58233f1f7cc4da5"... |
Require Import Coq.Lists.List.
Require Import MirrorCore.Reify.Reify.
Require Import MirrorCharge.Imp.Imp.
Require Import MirrorCharge.Imp.Syntax.
Reify Declare Patterns patterns_imp_typ := Syntax.typ.
Reify Declare Patterns patterns_imp := (ExprCore.expr Syntax.typ Syntax.func).
Reify Declare Syntax reify_imp_typ :... | {"author": "jesper-bengtson", "repo": "MirrorCharge", "sha": "cb0fe1da80be70ba4b744d4178a4e6e3afa38e62", "save_path": "github-repos/coq/jesper-bengtson-MirrorCharge", "path": "github-repos/coq/jesper-bengtson-MirrorCharge/MirrorCharge-cb0fe1da80be70ba4b744d4178a4e6e3afa38e62/MirrorCharge!/src/MirrorCharge/Imp/Reify.v"} |
"""
By Dr Jie Zheng -Q, NAOC
v1 2019-04-27
"""
import numpy as np
from..util import *
def add_distort():
pass
# pro add_distort, hdr, astr
#; NAME:
#; ADD_DISTORT
#; PURPOSE:
#; Add the distortion parameters in an astrometry structure to a FITS header.
#; EXPLANATION:
#; Called by PUTAS... | {"hexsha": "df81e619d1bdbe7cebf2cf13b305e6b1fad1c4d5", "size": 6395, "ext": "py", "lang": "Python", "max_stars_repo_path": "idl2py/wcs/add_distort.py", "max_stars_repo_name": "RapidLzj/idl2py", "max_stars_repo_head_hexsha": "193051cd8d01db0d125b8975713b885ad521a992", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
#!/usr/bin/env python3.7
# -*- coding: utf-8 -*-
#
# Created on: Sat Nov 2 11:32:55 CET 2019
#
# Author(s): Francesco Urbani <https://urbanij.github.io>
#
# File wave_v0.py
# Description: Ex. Jan 27 201something
#
# ==========================================================
import numpy as np
from mat... | {"hexsha": "2c7a271b574386e43f2544ddf4b229dcd99bbe25", "size": 8568, "ext": "py", "lang": "Python", "max_stars_repo_path": "ef/1_waves/wave_v0.py", "max_stars_repo_name": "urbanij/misc-scripts", "max_stars_repo_head_hexsha": "c4e6ee881dfe84342ee6bd34ceea1efe7d222dce", "max_stars_repo_licenses": ["MIT"], "max_stars_coun... |
"""
pylayers
=========
This file is adapted from scikit-learn package
"""
import sys
__version__ = '0.12-git'
try:
# This variable is injected in the __builtins__ by the build
# process. It used to enable importing subpackages of sklearn when
# the binaries are not built
__PYLAYERS_SETUP__
except Na... | {"hexsha": "402e42a456619510bfd3e244aafbc1d8578408f1", "size": 1786, "ext": "py", "lang": "Python", "max_stars_repo_path": "pylayers/gui/__init__.py", "max_stars_repo_name": "usmanwardag/pylayers", "max_stars_repo_head_hexsha": "2e8a9bdc993b2aacc92610a9c7edf875c6c7b24a", "max_stars_repo_licenses": ["MIT"], "max_stars_c... |
import numpy as np
import pandas as pd
'''
data: path to data directory organized as follows:
data
class_a
example1
example2
...
class_b
example3
...
class_c
example4
...
groups: number of groups of data to split into
returns names of examples in each group of data
'''
def stratified_split(data, gr... | {"hexsha": "40b6694daa787b71e9bfb51ace0ccdc320115278", "size": 329, "ext": "py", "lang": "Python", "max_stars_repo_path": "fairtorch/preprocessing/balancedata.py", "max_stars_repo_name": "maxhirsch/fair-ML", "max_stars_repo_head_hexsha": "9616cab93fd7c016c71250ce687f9f6faf131015", "max_stars_repo_licenses": ["MIT"], "m... |
"""
TechMiner.RecordsDataFrame
==================================================================================================
"""
import pandas as pd
import math
import numpy as np
from sklearn.decomposition import PCA
from techminer.common import cut_text
from techminer.result import Result
import matplotlib.py... | {"hexsha": "6f2068bb92add8742eb2b1ff72d33d359e0c2bcf", "size": 60709, "ext": "py", "lang": "Python", "max_stars_repo_path": "techminer/dataframe.py", "max_stars_repo_name": "jdvelasq/tech-miner", "max_stars_repo_head_hexsha": "85735b3b94b9d56784eafce73c7f9bee37d8c6ed", "max_stars_repo_licenses": ["MIT"], "max_stars_cou... |
[STATEMENT]
lemma wf_juncts:
"wf idx \<phi> \<longleftrightarrow> (\<forall>\<psi> \<in> disjuncts \<phi>. wf idx \<psi>)"
"wf idx \<phi> \<longleftrightarrow> (\<forall>\<psi> \<in> conjuncts \<phi>. wf idx \<psi>)"
[PROOF STATE]
proof (prove)
goal (1 subgoal):
1. local.wf idx \<phi> = (\<forall>\<psi>\<in>disjun... | {"llama_tokens": 189, "file": "Formula_Derivatives_Abstract_Formula", "length": 1} |
"""
One-moment bulk microphysics scheme, which includes:
- terminal velocity of precipitation
- condensation and evaporation of cloud liquid water and
deposition and sublimation of cloud ice (relaxation to equilibrium)
- autoconversion of cloud liquid water into rain and of cloud ice into snow
- accret... | {"hexsha": "b99bf3da2365aad1f19b9c95df9b2194c270d876", "size": 21496, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/Microphysics_1M.jl", "max_stars_repo_name": "CliMA/CloudMicrophysics.jl", "max_stars_repo_head_hexsha": "951148546761bf2208066c3890a274ec85fbf1c7", "max_stars_repo_licenses": ["Apache-2.0"], "... |
include("Include.jl")
# extra:
using Flux
using Flux: @epochs
using BSON: @save
# load the data -
path_data_file_TF = joinpath(_PATH_TO_DATA, "Training-Thrombin-TF.csv")
full_data_table_TF = load(path_data_file_TF)
path_data_file_TF_TM = joinpath(_PATH_TO_DATA, "Training-Thrombin-TF-TM.csv")
full_data_table_TF_TM = l... | {"hexsha": "0d34cfb1adcb7c1b31aacba92909bcbc0aacc06c", "size": 1296, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "build_ann_model.jl", "max_stars_repo_name": "varnerlab/UVM-TopDown-LegacyModel", "max_stars_repo_head_hexsha": "eaab26053ce720b3affc8f1d27aaa0a4b624ca89", "max_stars_repo_licenses": ["MIT"], "max_s... |
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('filename', help='Data file to process')
args = parser.parse_args()
from datetime import datetime
import matplotlib.pyplot as plt
import numpy as np
import os
plt.rcParams.update({'font.size': 10})
filename = args.filename... | {"hexsha": "8148460e4c2b669d8cea48e18e0674d905e7da61", "size": 1490, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/fortify/mf/generic-procedures/data/plot_station_data.py", "max_stars_repo_name": "wilsonify/c-consumer", "max_stars_repo_head_hexsha": "e19a1baf4efb68436bbec50395f2a3a2c6e3c078", "max_stars_re... |
### A Pluto.jl notebook ###
# v0.16.1
using Markdown
using InteractiveUtils
# This Pluto notebook uses @bind for interactivity. When running this notebook outside of Pluto, the following 'mock version' of @bind gives bound variables a default value (instead of an error).
macro bind(def, element)
quote
loc... | {"hexsha": "f3ef373c4d4a14eb94095fe13a9bfcded869992b", "size": 23579, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "notebooks/generalized_linear_regression.jl", "max_stars_repo_name": "jbrea/MLCourse", "max_stars_repo_head_hexsha": "68b120f3be86a8f6140b272ceecc1d5746fabc6e", "max_stars_repo_licenses": ["MIT"], ... |
using InvariantMeasures
using ValidatedNumerics
using Plots
using LaTeXStrings
using StatsPlots
"""
Simple and quick experiment to precompile all needed functions before timing measurements
"""
D = Iterate(mod1_dynamic(x->2*x+0.5*x*(1-x)), 4)
B = Ulam(8)
Q = DiscretizedOperator(B, D)
norms = powernormbounds(B, D; Q... | {"hexsha": "50a517088aace949b8f79ff921dcacf702ef0282", "size": 959, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "examples/warmup.jl", "max_stars_repo_name": "orkolorko/InvariantMeasures.jl", "max_stars_repo_head_hexsha": "2ade4708a5b61b3e5eca50d182736687d5a7a856", "max_stars_repo_licenses": ["MIT"], "max_stars... |
# -*- coding: utf-8 -*-
from essentia.streaming import *
import essentia.standard as es
import essentia
import librosa
import librosa.display
import numpy as np
def melspectrogram(audio, sampleRate=44100, frameSize=2048, hopSize=1024,
window='blackmanharris62', zeroPadding=0, center=True,
... | {"hexsha": "d3a5ca16baf0449c36760b536b9378d2dd5ad405", "size": 14101, "ext": "py", "lang": "Python", "max_stars_repo_path": "audio_extract.py", "max_stars_repo_name": "andrebola/icassp2021", "max_stars_repo_head_hexsha": "bc551a5453f17728dacafdc74971337d4ee92e44", "max_stars_repo_licenses": ["MIT"], "max_stars_count": ... |
<figure>
<IMG SRC="gfx/Logo_norsk_pos.png" WIDTH=100 ALIGN="right">
</figure>
# Particle in a box
*Roberto Di Remigio*, *Luca Frediani*
The [particle in a box] model is among the simplest, exactly solvable models in quantum mechanics.
In the one-dimensional case, we assume a particle of mass $m$ to be confined into... | {"hexsha": "2dc3c10197ca5658e17f06f8b7dba3672de433ae", "size": 16274, "ext": "ipynb", "lang": "Jupyter Notebook", "max_stars_repo_path": "particle_in_a_box.ipynb", "max_stars_repo_name": "ilfreddy/KJE1005", "max_stars_repo_head_hexsha": "be919140e830ed741b04e982183fdd2f14cc8b77", "max_stars_repo_licenses": ["MIT"], "ma... |
from math import pi
import numpy as np
## 3.2 Tension Members
def sec3_2(An, FY):
'''Design Tensile Strength. Eq 3.2-1.
Parameters
----------
An: float,
net area de la seccion.
Fy: float,
tension de fluencia segun Tabla A1 - ASCE 8.
Returns
-------
fi... | {"hexsha": "d7877139bc7e32c973f7082777f8a002aa189b14", "size": 36107, "ext": "py", "lang": "Python", "max_stars_repo_path": "steeldesign/modules/sec_3.py", "max_stars_repo_name": "mainqueg/steeldesign", "max_stars_repo_head_hexsha": "e1250f93af0b156f5820e83e5925d2d991d43519", "max_stars_repo_licenses": ["MIT"], "max_st... |
# Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | {"hexsha": "49e87f6a5e7937acebb0e28056881695182c1e3a", "size": 15100, "ext": "py", "lang": "Python", "max_stars_repo_path": "PaddleNLP/legacy/benchmark/bert/run_glue.py", "max_stars_repo_name": "weiwei1115/models", "max_stars_repo_head_hexsha": "e2c96c5f64b1dc8f0d5d9aa121300b87150e11e3", "max_stars_repo_licenses": ["Ap... |
import os, sys
from sys import platform as _platform
import glob
import yaml
import time
import requests
import numpy as np
import cv2
from afy.videocaptureasync import VideoCaptureAsync
from afy.arguments import opt
from afy.utils import info, Once, Tee, crop, pad_img, resize, TicToc
import afy.camera_selector as ca... | {"hexsha": "6342e2d932056616ab6d0b53b4a04af903bf091c", "size": 14637, "ext": "py", "lang": "Python", "max_stars_repo_path": "cam_fomm (1).py", "max_stars_repo_name": "Tushar010119/THE-AI-FACE", "max_stars_repo_head_hexsha": "83457f8cd837b70d2e1cf67527e69f85ceb63f07", "max_stars_repo_licenses": ["Apache-2.0"], "max_star... |
"""
Just all the imports for all other scripts and notebooks.
"""
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from collections import OrderedDict
import pandas as pd
import pickle
import pdb
import netCDF4 as nc
import xarray as xr
import h5py
from glob import glob
import sys, os
from os ... | {"hexsha": "9e10924a19825d76c200da8e15b95d6c253b8a47", "size": 510, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/imports.py", "max_stars_repo_name": "Somendratripathi/CBRAIN-CAM", "max_stars_repo_head_hexsha": "3a47941a282f4f250b130f4cc485db0807570bfb", "max_stars_repo_licenses": ["MIT"], "max_stars_count... |
function seq = ScanMatch_NumToDoubleStr(num, modulus)
%SCANMATCH_NUMTODOUBLESTR transform an array of numbers into a sequence of
% double characters (each number is represented by a residue of two letter) in
% function of the modulus. The modulus is the length of the
% alphabet used for the second letter of a residue. ... | {"author": "Allopart", "repo": "rbpf-gmapping", "sha": "affe0adc25fa446fc7af4902d699d92864bdba1b", "save_path": "github-repos/MATLAB/Allopart-rbpf-gmapping", "path": "github-repos/MATLAB/Allopart-rbpf-gmapping/rbpf-gmapping-affe0adc25fa446fc7af4902d699d92864bdba1b/rvctools/ScanMatcher/ScanMatch_NumToDoubleStr.m"} |
# The whole frame from GNN Explainer to get data and model
""" explainer_main.py
Main user interface for the explainer module.
"""
from graphshap_explainer import GraphSHAP
from explainer import explain
import utils.train_utils as train_utils
import utils.parser_utils as parser_utils
import utils.math_utils as ma... | {"hexsha": "671099b7b478b25e96a64aefa6dfbeb170308e78", "size": 18592, "ext": "py", "lang": "Python", "max_stars_repo_path": "initial_test.py", "max_stars_repo_name": "AlexDuvalinho/GNNE_eval", "max_stars_repo_head_hexsha": "da6fa3c8f6587276cc270dde4be265c487b1239f", "max_stars_repo_licenses": ["Apache-2.0"], "max_stars... |
#!/usr/bin/python3
"""transliteration of Kim Asendorf's pixel sorting script"""
from copy import copy
from random import random, gauss
from PIL import Image
from numpy import int32
from argparse import ArgumentParser
# PROGRAM CONSTANTS
# rgb(103, 105, 128)
BLACK_VALUE = int32(-10000000)
# rgb(164, 114, 128)
WHITE_V... | {"hexsha": "2996df27209f1d350199a6a54bcf14fae9ad1a1a", "size": 6173, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/pixel_sorting.py", "max_stars_repo_name": "in3rtial/imgsrt", "max_stars_repo_head_hexsha": "2dec237b7d797d9964ed874c4e4d72f7eb23eaf0", "max_stars_repo_licenses": ["CC0-1.0"], "max_stars_count"... |
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from ast import literal_eval as make_tuple
def plotHashtags(filename, savePng=True):
"""Created a stacked bar plot for the given hashtag data csv
:input: filename: path to file of csv
savePng: if user wants the plot save... | {"hexsha": "483ed84e11814ea3eaef7f2395d40ac2603bfdde", "size": 2098, "ext": "py", "lang": "Python", "max_stars_repo_path": "plot_hashtag_bar.py", "max_stars_repo_name": "AlexHtZhang/A-billion-dollar-deal", "max_stars_repo_head_hexsha": "573ba92026f063d90a08daca73cc61c1325eb695", "max_stars_repo_licenses": ["Apache-2.0"... |
import pandas as pd
import numpy as np
from scipy import stats
import glob, os
class KalmanFilter(object):
def __init__(self, F = None, B = None, H = None, Q = None, R = None, P = None, x0 = None):
if(F is None or H is None):
raise ValueError("Set proper system dynamics.")
self.n = F.... | {"hexsha": "ad35100e84f31c67d8d330be992fecf16d39b4e4", "size": 3468, "ext": "py", "lang": "Python", "max_stars_repo_path": "gesture_dataset/filter_noise.py", "max_stars_repo_name": "hamanhbui/hand-gesture_recognition", "max_stars_repo_head_hexsha": "4225122f85c982a1f291bcbc6a406b9eb65c7ffb", "max_stars_repo_licenses": ... |
*DECK POISTG
SUBROUTINE POISTG (NPEROD, N, MPEROD, M, A, B, C, IDIMY, Y,
+ IERROR, W)
C***BEGIN PROLOGUE POISTG
C***PURPOSE Solve a block tridiagonal system of linear equations
C that results from a staggered grid finite difference
C approximation to 2-D elliptic PDE's.
C***LIBRARY ... | {"hexsha": "e1deb5ecd75110455440dbd9ad4ee1fbbc0f7bb1", "size": 11417, "ext": "f", "lang": "FORTRAN", "max_stars_repo_path": "slatec/src/poistg.f", "max_stars_repo_name": "andremirt/v_cond", "max_stars_repo_head_hexsha": "6b5c364d7cd4243686488b2bd4318be3927e07ea", "max_stars_repo_licenses": ["Unlicense"], "max_stars_cou... |
% CS615 Aspects of System Administration
% Author: Jan Schaumann <jschauma@netmeister.org>
% $Id: slides.tex,v 1.6 2006/03/07 13:55:55 jschauma Exp $
\documentclass[xga]{xdvislides}
\usepackage[landscape]{geometry}
\usepackage{graphics}
\usepackage{graphicx}
\usepackage{colordvi}
\begin{document}
\setfontphv
%%% Hea... | {"hexsha": "62aa69578e7c962e77e60079910da3f428924f4d", "size": 28902, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "07-backup-dns/slides.tex", "max_stars_repo_name": "jschauma/cs615asa", "max_stars_repo_head_hexsha": "54f9b03689c884966b131a13c5c56bf817a2adbb", "max_stars_repo_licenses": ["CC-BY-3.0"], "max_stars... |
#!/usr/bin/python3
"""
This script generates the write-heavy access pattern for ABDB vs Redis evaluation.
"""
import pandas as pd
import argparse
import numpy as np
parser = argparse.ArgumentParser(description='Read-heavy access pattern generator')
parser.add_argument('function_count', type=int, help='Number of funct... | {"hexsha": "161d411055c776b972f41b7f7fb80641299585c5", "size": 2327, "ext": "py", "lang": "Python", "max_stars_repo_path": "scripts/journal/gen_write_heavy_access_pattern.py", "max_stars_repo_name": "hsnlab/annabellaDB", "max_stars_repo_head_hexsha": "daeaf394babd07b6d980a3eaa74be6614e7124b8", "max_stars_repo_licenses"... |
#include <Interpreters/Access/InterpreterShowAccessQuery.h>
#include <Parsers/formatAST.h>
#include <Interpreters/Context.h>
#include <Interpreters/Access/InterpreterShowCreateAccessEntityQuery.h>
#include <Interpreters/Access/InterpreterShowGrantsQuery.h>
#include <Columns/ColumnString.h>
#include <Processors/Sources... | {"hexsha": "a385f6c8d7a1183a4870d2b67d928f391e20cc54", "size": 2680, "ext": "cpp", "lang": "C++", "max_stars_repo_path": "src/Interpreters/Access/InterpreterShowAccessQuery.cpp", "max_stars_repo_name": "540522905/ClickHouse", "max_stars_repo_head_hexsha": "299445ec7da10bd2ef62d8e333a95b7ab12bf5f2", "max_stars_repo_lice... |
%% Regression test data generator
% This program should be executed at the very beginning of refactoring a
% major revision. This is for making legacy STRAIGHT v40_007d to be
% compatible with MATLAB R2015b and Octave
% Copyright(c) 2016, Hideki Kawahara, (kawahara@sys.wakayama-u.ac.jp)
clear all
close all
original_... | {"author": "HidekiKawahara", "repo": "legacy_STRAIGHT", "sha": "964684981fe12cd232c5e882259dff126b3af0f2", "save_path": "github-repos/MATLAB/HidekiKawahara-legacy_STRAIGHT", "path": "github-repos/MATLAB/HidekiKawahara-legacy_STRAIGHT/legacy_STRAIGHT-964684981fe12cd232c5e882259dff126b3af0f2/src/regressionTestBaseGenerat... |
\documentstyle[11pt,reduce,makeidx]{article}
\title{TRIGD: Trigonometrical Functions\\ with Degree Arguments }
\date{}
\author{Alan Barnes \\
School of Engineering \& Applied Science \\
Aston University, Aston Triangle, \\
Birmingham B4 7ET \\ GREAT BRITAIN (now retired)\\
Email: Alan.Barnes45678@gmail.com}
\begin{d... | {"hexsha": "967f43a538890557a8831eb2f0eb9f55c212baf0", "size": 15803, "ext": "tex", "lang": "TeX", "max_stars_repo_path": "packages/misc/trigd/trigd.tex", "max_stars_repo_name": "arthurcnorman/general", "max_stars_repo_head_hexsha": "5e8fef0cc7999fa8ab75d8fdf79ad5488047282b", "max_stars_repo_licenses": ["BSD-2-Clause"]... |
import os
import random
import math
from datetime import datetime
import pygame as pg
from wall import *
from tank import *
from bullet import *
from explosion import *
from base import *
from score import *
from search import *
from path_symbol import *
from profiler import *
from util import *
from logger import Logg... | {"hexsha": "aea646a21996080a3258c01bca8f2643290732fe", "size": 13633, "ext": "py", "lang": "Python", "max_stars_repo_path": "src/game.py", "max_stars_repo_name": "vmkul/battle-city", "max_stars_repo_head_hexsha": "7d303ca2ab71bc160f3c6236e75d45bcff20aa92", "max_stars_repo_licenses": ["MIT"], "max_stars_count": null, "m... |
# coding:utf-8
import matplotlib.pyplot as plt
from sklearn.cluster import KMeans
import numpy as np
# from sqlalchemy import create_engine
import pandas as pd
import pymysql
from collections import Counter
from shortestpass import ReadFile
from shortestpass import Station
import math
class Vertex():
def __init... | {"hexsha": "adf8307c0e877fc916ba73062bc6372d86bd6241", "size": 35741, "ext": "py", "lang": "Python", "max_stars_repo_path": "python/subwayflow/graph.py", "max_stars_repo_name": "StevenRCE0/MassTransportUtilizer", "max_stars_repo_head_hexsha": "6b3ac1cd447d736094cf16e8a482924b16076705", "max_stars_repo_licenses": ["MIT"... |
import streamlit as st
import json
from wordcloud import WordCloud
import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
def load_data():
with open('data/weekly.json','r') as file:
weekly_keywords = json.load(file)
with open('data/combined.json') as file:
combined_... | {"hexsha": "5143b96216c626906717cac65c1f7eb9b048631f", "size": 1767, "ext": "py", "lang": "Python", "max_stars_repo_path": "app.py", "max_stars_repo_name": "rahulbanerjee26/Word_Clouds", "max_stars_repo_head_hexsha": "765ccabf07aa5a6cf382a0e49c579c1ab8a7de04", "max_stars_repo_licenses": ["MIT"], "max_stars_count": 1, "... |
import os
import pickle
import sys
import time
import math
import argparse
from typing import Any, List
import numpy as np
import pandas as pd
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
import torch.nn.functional as F
import... | {"hexsha": "08fa4bf6e1150d7e7b327b0ba1a1deb9b005e482", "size": 14220, "ext": "py", "lang": "Python", "max_stars_repo_path": "code_florian/scripts/make_preds.py", "max_stars_repo_name": "artyompal/kaggle_salt", "max_stars_repo_head_hexsha": "3c323755730745ac7bbfd106f1f20919cceef0ee", "max_stars_repo_licenses": ["MIT"], ... |
#!/usr/bin/env python
# coding: utf-8
# In[4]:
import pandas
from pandas import read_csv
from pandas import datetime
from matplotlib import pyplot
from statsmodels.tsa.arima.model import ARIMA
from sklearn.metrics import mean_squared_error
from math import sqrt
import os
import numpy as np
def prediction_arima(ts... | {"hexsha": "50a8764c2fa2d8b63462b1d0eea2e7efebdb345f", "size": 2734, "ext": "py", "lang": "Python", "max_stars_repo_path": "back_codes/arima_function.py", "max_stars_repo_name": "Hermann-web/Demand-forecasting-with-python", "max_stars_repo_head_hexsha": "393fcb115a02073d359bd407ec7257127e877188", "max_stars_repo_licens... |
from ..parametric import _compute_hommel_value, _true_positive_fraction
from nilearn.glm.thresholding import _compute_hommel_value as nl_compute_hommel_value
from nilearn.glm.thresholding import _true_positive_fraction as nl_true_positive_fraction
from numpy.testing import assert_allclose
from scipy.stats import norm
... | {"hexsha": "2501ed3f4ca91dbca4833ca3af2b368d1bae417c", "size": 939, "ext": "py", "lang": "Python", "max_stars_repo_path": "mne_ari/ari/tests/test_hommel.py", "max_stars_repo_name": "john-veillette/mne-ari", "max_stars_repo_head_hexsha": "ae80b38140a8ebb69c6aee34c7f7240f53d160b3", "max_stars_repo_licenses": ["BSD-3-Clau... |
function [ r, center ] = circle_dia2imp_2d ( p1, p2 )
%*****************************************************************************80
%
%% CIRCLE_DIA2IMP_2D converts a diameter to an implicit circle in 2D.
%
% Discussion:
%
% The diameter form of a circle is:
%
% P1 and P2 are the endpoints of a diameter.
%
... | {"author": "johannesgerer", "repo": "jburkardt-m", "sha": "1726deb4a34dd08a49c26359d44ef47253f006c1", "save_path": "github-repos/MATLAB/johannesgerer-jburkardt-m", "path": "github-repos/MATLAB/johannesgerer-jburkardt-m/jburkardt-m-1726deb4a34dd08a49c26359d44ef47253f006c1/geometry/circle_dia2imp_2d.m"} |
# Note that this script can accept some limited command-line arguments, run
# `julia build_tarballs.jl --help` to see a usage message.
using BinaryBuilder
name = "FastJet_Julia_Wrapper"
version = v"0.7.0"
# Collection of sources required to build FastJet_Julia_Wrapper
sources = [
GitSource("https://github.com/jstrub... | {"hexsha": "1cd5de47dd63efc487180fec724542c9694dbcaf", "size": 2285, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "F/FastJet_Julia_Wrapper/build_tarballs.jl", "max_stars_repo_name": "tbeason/Yggdrasil", "max_stars_repo_head_hexsha": "57539ff4219d0defad6f64f790b96ff22066a54e", "max_stars_repo_licenses": ["MIT"],... |
clear;
disp('Program started');
% control mode (0: impedance control
% 1: admittance control(velocity command)
% 2: admittance control(position command))
control_mode = 0;
% reference trajectory mode (0: horizontal line
% 1: circle)
trajectory_mode = 0;
% dyanmic... | {"author": "xuhuairuogu", "repo": "V-REP-Simulation-Projects", "sha": "841b944af4ea3a8fb250578d36434515f577f411", "save_path": "github-repos/MATLAB/xuhuairuogu-V-REP-Simulation-Projects", "path": "github-repos/MATLAB/xuhuairuogu-V-REP-Simulation-Projects/V-REP-Simulation-Projects-841b944af4ea3a8fb250578d36434515f577f41... |
module Day3
function read_input(filepath)
# Parse the file into a 1000x12 matrix of Ints
lines = readlines(filepath)
n_rows = length(lines)
n_cols = length(lines[1])
A = zeros(Int64, (n_rows, n_cols))
for row = 1:n_rows
for col = 1:n_cols
A[row,col] = parse(Int64, lines[row]... | {"hexsha": "1b8651b6da7469abe0d333ce156e391c32ae0068", "size": 3636, "ext": "jl", "lang": "Julia", "max_stars_repo_path": "src/day03/day03.jl", "max_stars_repo_name": "PriceHardman/AdventOfCode2021", "max_stars_repo_head_hexsha": "5a02982448a736c8089940ae0c97d894850f1938", "max_stars_repo_licenses": ["MIT"], "max_stars... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.