Skip to content

Instantly share code, notes, and snippets.

View shyney7's full-sized avatar
💭
The fact that 'goto' can do anything is exactly why we don't use it.

Marcel shyney7

💭
The fact that 'goto' can do anything is exactly why we don't use it.
View GitHub Profile
@shyney7
shyney7 / awtrix_spotifiy.yaml
Created October 9, 2023 18:38 — forked from BerriJ/awtrix_spotifiy.yaml
Awtrix Spotify
alias: pixelclock_spotify
description: ""
trigger:
- platform: state
entity_id: media_player.spotify_vistagamer
condition: []
action:
- choose:
- conditions:
- condition: state
@BerriJ
BerriJ / awtrix_spotifiy.yaml
Created August 29, 2023 07:16
Awtrix Spotify
alias: pixelclock_spotify
description: ""
trigger:
- platform: state
entity_id: media_player.spotify_vistagamer
condition: []
action:
- choose:
- conditions:
- condition: state
@cdleveille
cdleveille / Install⁄Update Xone
Last active March 3, 2024 15:41
Install or update xone driver for Steam Deck (desktop shortcut and bash script)
[Desktop Entry]
Comment[en_US]=
Comment=
Exec=bash $HOME/xone_install_or_update.sh
GenericName[en_US]=
GenericName=
Icon=preferences-desktop-gaming
MimeType=
Name[en_US]=Install⁄Update Xone
Name=Install⁄Update Xone
@thomasnield
thomasnield / linear_regression_manim.py
Created October 4, 2022 19:55
linear_regression_manim.py
import pandas as pd
from math import sqrt
from manim import *
def create_model() -> tuple:
data = list(pd.read_csv("https://bit.ly/2KF29Bd").itertuples())
m = ValueTracker(1.93939)
b = ValueTracker(4.73333)
ax = Axes(
@MatMercer
MatMercer / wsl-vpn-fix.sh
Last active August 23, 2022 06:24
Fix WSL 2 DNS resolution when connected to Cisco AnyConnect VPN
#!/bin/bash
#--------------------------------------------------------------------------------#
# #
# Fix WSL DNS resolution with Cisco AnyConnect #
# #
# ! Don't forget to set this configuration in /etc/wsl.conf: #
# [network] #
# generateResolvConf = false #
# #
# Based on: #
@coltenkrauter
coltenkrauter / fix-wsl2-dns-resolution
Last active April 26, 2024 06:32
Fix DNS resolution in WSL2
More recent resolution:
1. cd ~/../../etc (go to etc folder in WSL).
2. echo "[network]" | sudo tee wsl.conf (Create wsl.conf file and add the first line).
3. echo "generateResolvConf = false" | sudo tee -a wsl.conf (Append wsl.conf the next line).
4. wsl --terminate Debian (Terminate WSL in Windows cmd, in case is Ubuntu not Debian).
5. cd ~/../../etc (go to etc folder in WSL).
6. sudo rm -Rf resolv.conf (Delete the resolv.conf file).
7. In windows cmd, ps or terminal with the vpn connected do: Get-NetIPInterface or ipconfig /all for get the dns primary and
secondary.
@mbinna
mbinna / effective_modern_cmake.md
Last active April 18, 2024 19:26
Effective Modern CMake

Effective Modern CMake

Getting Started

For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.

After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft

@asimshankar
asimshankar / README.md
Last active January 28, 2024 17:24
Training TensorFlow models in C++

Training TensorFlow models in C++

Python is the primary language in which TensorFlow models are typically developed and trained. TensorFlow does have bindings for other programming languages. These bindings have the low-level primitives that are required to build a more complete API, however, lack much of the higher-level API richness of the Python bindings, particularly for defining the model structure.

This file demonstrates taking a model (a TensorFlow graph) created by a Python program and running the training loop in C++.