I hereby claim:
- I am radames on github.
- I am radames (https://keybase.io/radames) on keybase.
- I have a public key whose fingerprint is 00F4 8FAC 27C4 481A 55AE ABFB A5A5 1E37 DF61 6F4D
To claim this, I am signing this object:
long lastTime = 0; | |
long minutes = 0; | |
long hours = 0; | |
void setup() { | |
} | |
void loop() { |
#include <Wire.h> | |
#include <Adafruit_PWMServoDriver.h> | |
// called this way, it uses the default address 0x40 | |
// you can also call it with a different address you want | |
Adafruit_PWMServoDriver servo1 = Adafruit_PWMServoDriver(0x40); | |
Adafruit_PWMServoDriver servo2 = Adafruit_PWMServoDriver(0x42); | |
Adafruit_PWMServoDriver light1 = Adafruit_PWMServoDriver(0x43); | |
Adafruit_PWMServoDriver light2 = Adafruit_PWMServoDriver(0x44); |
import cv2 | |
cap = cv2.VideoCapture(0) | |
cap.set(3, 640) # WIDTH | |
cap.set(4, 480) # HEIGHT | |
face_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_frontalface_default.xml") | |
eye_cascade = cv2.CascadeClassifier(cv2.data.haarcascades + "haarcascade_eye.xml") | |
while(True): |
I hereby claim:
To claim this, I am signing this object:
// add this to functions.php | |
//register acf fields to Wordpress API | |
//https://support.advancedcustomfields.com/forums/topic/json-rest-api-and-acf/ | |
function acf_to_rest_api($response, $post, $request) { | |
if (!function_exists('get_fields')) return $response; | |
if (isset($post)) { | |
$acf = get_fields($post->id); | |
$response->data['acf'] = $acf; |
#!/bin/zsh | |
# You can run this on base folder with all csvs | |
rm -f res/world.tsv; | |
touch res/world.tsv; | |
firstfile=`ls -t *.tsv | head -n 1` | |
col=`echo 'code\t'` | |
firstline=`ls -t *.tsv | head -n 1 | xargs sed -n '1,1p'` | |
res=`echo $firstline | sed 's/^/'$col'/'`; | |
echo $res >> res/world.tsv; |
Using this amazing project tmate.io you can SSH tunnel to your colab notebook machine. You can with few lines of code download the binary, run an instance in the background and output the generated SSH address.
!wget -nc https://github.com/tmate-io/tmate/releases/download/2.4.0/tmate-2.4.0-static-linux-i386.tar.xz &> /dev/null
!tar --skip-old-files -xvf tmate-2.4.0-static-linux-i386.tar.xz &> /dev/null
!rm -f nohup.out; bash -ic 'nohup ./tmate-2.4.0-static-linux-i386/tmate -S /tmp/tmate.sock new-session -d & disown -a' >/dev/null 2>&1
!./tmate-2.4.0-static-linux-i386/tmate -S /tmp/tmate.sock wait tmate-ready
<div class="animation"></div> | |
<div class="slider"></div> | |
<p> | |
Credit: | |
<a | |
href="https://observablehq.com/@observablehq/how-to-embed-a-notebook-in-a-react-app" | |
>🤔 How to: Embed a Notebook in a React App by Observable</a | |
> | |
</p> |
# https://github.com/numba/llvmlite/issues/693#issuecomment-909501195
brew install llvm@11
LLVM_CONFIG="/opt/homebrew/Cellar/llvm@11/11.1.0_4/bin/llvm-config" arch -arm64 pip install llvmlite
pip install umap-learn
<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>Bookmark this javascript code to make the minimal Stable Diffusion UI thanks to @huggingface inference API pic.twitter.com/i1slI4ObdH
— Radamés Ajna (@radamar) February 1, 2023
Bookmark this code
javascript:p=prompt("Enter your prompt:");fetch("https://api-inference.huggingface.co/models/runwayml/stable-diffusion-v1-5",{method:"POST",headers:{"content-type":"application/json","X-Wait-For-Model":"true"},body:JSON.stringify({inputs:p})}).then(e=>e.blob()).then(e=>window.open(URL.createObjectURL(e),"_self"))