Skip to content

Instantly share code, notes, and snippets.

View mstump's full-sized avatar
😀

Matt Stump mstump

😀
View GitHub Profile
@mihai-dinculescu
mihai-dinculescu / 01-build.rs
Last active September 4, 2024 17:48
ESP32-MQTT-Rust
// build.rs
use embuild::build::LinkArgs;
fn main() -> anyhow::Result<()> {
// Necessary because of this issue: https://github.com/rust-lang/cargo/issues/9641
LinkArgs::output_propagated("ESP_IDF")?;
Ok(())
}
@MarshalX
MarshalX / 1_pytgcalls_video_telethon_example.py
Last active August 22, 2024 20:39
Example of the most simple way to stream any video to Telegram Live Stream (Group Call) with https://github.com/MarshalX/tgcalls
# before run this script install required packages via command below
# pip3 install -U pytgcalls==3.0.0.dev24
import asyncio
import pytgcalls
import telethon
# EDIT THIS
# more info about API keys here https://docs.telethon.dev/en/latest/basic/signing-in.html
@alexbaumgertner
alexbaumgertner / app-builder.Dockerfile
Last active February 23, 2024 11:23
Docker and private github packages
ARG DEPS_IMAGE=deps-installer:latest
FROM $DEPS_IMAGE as deps-installer
FROM node:8.15.0-alpine
WORKDIR /app
COPY ./ ./
COPY --from=deps-installer /deps/node_modules ./node_modules
@ciniml
ciniml / lib.rs
Created June 11, 2019 21:52
M5Stack Rust Example
#![no_std]
#![feature(lang_items, alloc_error_handler, alloc)]
use core::panic::PanicInfo;
use core::alloc::{GlobalAlloc, Layout};
use core::fmt;
use core::fmt::Write;
use core::convert::From;
use core::ptr;
use core::mem;
use core::str;
@benraskin92
benraskin92 / .gitignore
Last active June 4, 2019 19:14
M3DB Client Example
vendor/
@dandanwei
dandanwei / osx_egpu_pytorch_fastai.md
Last active February 16, 2023 10:22
Make Nvidia EGPU working on mac os with Pytorch and Fast.ai

[Updated on 2018.11.14] I finally made my GTX1070 working with my MBP for Pytorch and fast.ai. Below are the steps:

Environment

  • MacBook Pro (15-inch, 2016) with touch bar
  • OSX version: 10.13.6 (Mojave may not work yet as of now)
  • eGPU: Razer Core X + GTX 1070 (MSI)

Steps 1: Install Nvidia Web Driver

@dideler
dideler / bot.rb
Last active September 21, 2024 15:07
Sending a notification message to Telegram using its HTTP API via cURL
# Use this script to test that your Telegram bot works.
#
# Install the dependency
#
# $ gem install telegram_bot
#
# Run the bot
#
# $ ruby bot.rb
#
@shamatar
shamatar / rwa.py
Last active January 14, 2022 20:17
Keras (keras.is) implementation of Recurrent Weighted Average, as described in https://arxiv.org/abs/1703.01253. Follows original implementation in Tensorflow from https://github.com/jostmey/rwa. Works with fixed batch sizes, requires "batch_shape" parameter in input layer. Outputs proper config, should save and restore properly. You are welcome…
from keras.layers import Recurrent
import keras.backend as K
from keras import activations
from keras import initializers
from keras import regularizers
from keras import constraints
from keras.engine import Layer
from keras.engine import InputSpec
@kanaka
kanaka / addTwo.wast
Last active June 17, 2021 21:39
Run wast (WebAssembly) in node
(module
(func $addTwo (param i32 i32) (result i32)
(i32.add
(get_local 0)
(get_local 1)))
(export "addTwo" (func $addTwo)))
@cs224
cs224 / pyjags_rain_sprinkler_grass_simple_bayesian_network.py
Last active October 27, 2022 17:57
Simple Bayesian Network via Monte Carlo Markov Chain in PyMC3
import math
import pyjags
import numpy as np
import pandas as pd
np.random.seed(0)
np.set_printoptions(precision=3)
def pyjags_trace():