Skip to content

Instantly share code, notes, and snippets.

@lbn
lbn / matprint.js
Last active April 28, 2024 11:25
Pretty print a matrix in ES6
"use strict"
function matprint(mat) {
let shape = [mat.length, mat[0].length];
function col(mat, i) {
return mat.map(row => row[i]);
}
let colMaxes = [];
for (let i = 0; i < shape[1]; i++) {
colMaxes.push(Math.max.apply(null, col(mat, i).map(n => n.toString().length)));
@ezrapierce000
ezrapierce000 / gsoc22.md
Last active April 28, 2024 11:25
Machine Learning with Bela & IREE - GSoC 2022

Machine Learning with Bela & IREE

This project took place over the summer of 2022 as part of the Google Summer of Code, with support from the Intelligent Instruments Lab, Beagleboard Foundation and Bela. The project's objective was to improve the tooling available for those looking to use machine learning models in their Bela projects. For some background, Bela is a maker platform built on top of the Beaglebone Black with a focus on real-time audio and sensor processing for use in interactive art projects including digital instrument design. The availability of machine learning tools to be used with Bela would allow for new design practices incorporating machine learning models.

The original goal of this project arose out of the constraints of Bela's low-powered (in machine learning terms) processor and the real-time constraints of interactive projects. To aid development on this platform there is a need for performance analysis tools that allow for quick evaluation of different models on Bela. This proj

@idoop
idoop / Makefile
Created November 17, 2021 10:20
GattLib as OpenWRT package
#
# Copyright (C) 2020-2030 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
# Author: Chen Yang <idoop@msn.cn>
# Github: https://github.com/idoop
include $(TOPDIR)/rules.mk
@stek29
stek29 / 0webosbrew-letsencrypt-ca.md
Last active April 28, 2024 11:20
fix webOS ca certificates for DST Root X3 expiry (on rooted TVs)

HowTo

  • Root via rootmy.tv
  • Install

Tested on webOS 4.5, should at least on webOS 3.5+

Installation/Update

curl -qs "https://gist.githubusercontent.com/stek29/761232c6f7e1ffbc36b98da2a3a0f4d9/raw/install.sh?$(date +%s)" | sh -
@baymaxium
baymaxium / content.md
Created October 18, 2017 09:12
趣味解析,斗鱼直播大数据的玩法儿

原文:CSDN大数据

↑ 点击上方蓝字关注我们,和小伙伴一起聊技术!

作者 | 吴瑞诚

文章来源GitChat,CSDN独家合作发布,点击「阅读原文」查看交流实录

@mohanpedala
mohanpedala / bash_strict_mode.md
Last active April 28, 2024 11:17
set -e, -u, -o, -x pipefail explanation
@mmistakes
mmistakes / markdown-img-picture-replacement.rb
Last active April 28, 2024 11:16
Jekyll plugin to replace Markdown images eg. `![description](image.jpg)` with `{% picture %}` tag
# Description: Jekyll plugin to replace Markdown image syntax with {% picture %} tag for crafting responsive images
# place in /_plugins/
Jekyll::Hooks.register :posts, :pre_render do |post, payload|
docExt = post.extname.tr('.', '')
# only process if we deal with a markdown file
if payload['site']['markdown_ext'].include? docExt
newContent = post.content.gsub(/\!\[(.+)\]\((.+)\)/, '{% picture default \2 alt="\1" %}')
post.content = newContent
end
@ardakazanci
ardakazanci / RulerView.kt
Created April 28, 2024 06:15
RulerView - Jetpack Compose
@Composable
fun RulerView(
startValue: Int,
endValue: Int,
step: Int
) {
val density = LocalDensity.current
val scrollState = rememberScrollState()
val sectionWidth = 80.dp
var sliderValue by remember { mutableFloatStateOf(0.5f) }
@fanaugen
fanaugen / workflow.scpt
Last active April 28, 2024 11:13
Automator workflow to batch-convert MS Word documents (.doc, .docx) into PDF using Apple Pages
(*
* embed this applescript into an Automator workflow to batch-convert
* MS Word documents (.doc, .docx) into PDF using Apple Pages.
*)
on run {input, parameters}
tell application "Pages"
activate
repeat with doc in input
@Studiodews
Studiodews / getting-remote-json-data-with-the-fetch-api.markdown
Created August 13, 2020 19:03
Getting remote JSON data with the fetch API