Skip to content

Instantly share code, notes, and snippets.

View sonpython's full-sized avatar
🎯
Focusing

Michael Phan sonpython

🎯
Focusing
View GitHub Profile
@GuySie
GuySie / cyd-thermostat.yaml
Created November 23, 2023 11:50
ESPHome CYD Thermostat example
# ============================================================
# Edit substitutions for your naming, devices and passwords here.
#
# This code assumes you have a climate thermostat entity and a separate temperature sensor. If you want to use the temperature sensor in your thermostat you need to change the code.
# thermostat_entity: Your climate entity that this device will control.
# temperature_entity: Your thermometer sensor that measures the current temperature in the room. Only used for graph and display.
substitutions:
name: cyd-thermostat
friendly_name: "CYD Thermostat Control"
@rain-1
rain-1 / llama-home.md
Last active May 16, 2024 04:58
How to run Llama 13B with a 6GB graphics card

This worked on 14/May/23. The instructions will probably require updating in the future.

llama is a text prediction model similar to GPT-2, and the version of GPT-3 that has not been fine tuned yet. It is also possible to run fine tuned versions (like alpaca or vicuna with this. I think. Those versions are more focused on answering questions)

Note: I have been told that this does not support multiple GPUs. It can only use a single GPU.

It is possible to run LLama 13B with a 6GB graphics card now! (e.g. a RTX 2060). Thanks to the amazing work involved in llama.cpp. The latest change is CUDA/cuBLAS which allows you pick an arbitrary number of the transformer layers to be run on the GPU. This is perfect for low VRAM.

  • Clone llama.cpp from git, I am on commit 08737ef720f0510c7ec2aa84d7f70c691073c35d.
@renatoccosta
renatoccosta / install-ha-opi5.adoc
Last active May 4, 2024 11:10
Install Home Assistant on OrangePi 5

Installing Home Assistant on OrangePi 5 Board

This tutorial will enable the use of Home Assistant on an OrangePi 5 board with the following characteristics:

  • OrangePi Debian OS

  • OS running on a SDCard

  • Home Assistant Supervised Instalation

The steps are a compilation with few modifications from instructions found over the web. Links are at the end.

@DonSYS91
DonSYS91 / ipv6_proxmox_online.net.md
Last active January 4, 2024 10:25
Configuring IPv6 block from Online.net On Proxmox Host and Guests

Configuring IPv6 block from Online.net On Proxmox Host and Guests

Following the documentation on online.net would get IPv6 to work only in a simple system installation but won't get IPv6 to work with virtualization environment (Exp. Proxmox) as It's missing some IPv6 forwards and proxies on sysctl.conf.

On Proxmox Host (Or Debian if single Debian Installation)

Enable IPv6 on the System:

  • Change Module Options to Enable IPv6:
@jimi008
jimi008 / functions.php
Created July 19, 2016 10:49
Lazy Load The Facebook Comments Plugin Using JavaScript
<script>
function loadAPI() {
var js = document.createElement('script');
js.src = '//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=YOUR_APP_ID&version=v2.0';
document.body.appendChild(js);
}
window.onscroll = function () {
var rect = document.getElementById('comments').getBoundingClientRect();
if (rect.top < window.innerHeight) {
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 23, 2024 09:28
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@willurd
willurd / web-servers.md
Last active May 23, 2024 08:59
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000