Skip to content

Instantly share code, notes, and snippets.

View stanlee321's full-sized avatar

Stanley Salvatierra stanlee321

View GitHub Profile
@stanlee321
stanlee321 / tf_lite.py
Created March 1, 2024 03:38
tflite python opencv demo
import cv2
import numpy as np
import tensorflow as tf
class_id_to_name = {
1: 'cardboard',
2: 'glass',
3: 'metal',
import streamlit as st
import pandas as pd
from vega_datasets import data
"""
# Using different charting libraries
"""
@st.cache
apt-get install libxslt-dev libxml2-dev libpam-dev libedit-dev
@stanlee321
stanlee321 / gdrive downloader
Created October 16, 2020 00:44
gdrive downloader
$ nano ~/.bash_aliases
function gdrive_download () {
CONFIRM=$(wget --quiet --save-cookies /tmp/cookies.txt --keep-session-cookies --no-check-certificate "https://docs.google.com/uc?export=download&id=$1" -O- | sed -rn 's/.*confirm=([0-9A-Za-z_]+).*/\1\n/p')
wget --load-cookies /tmp/cookies.txt "https://docs.google.com/uc?export=download&confirm=$CONFIRM&id=$1" -O $2
rm -rf /tmp/cookies.txt
}
Usage:
https://python-graph-gallery.com/324-map-a-color-to-network-nodes/
https://www.cl.cam.ac.uk/teaching/1314/L109/tutorial.pdf
https://python-graph-gallery.com/325-map-colour-to-the-edges-of-a-network/
https://networkx.github.io/documentation/stable/reference/classes/digraph.html
https://towardsdatascience.com/from-dataframe-to-network-graph-bbb35c8ab675
const data = {
    userType : "ROOT",
    status : "active",
    userName: "stan lee",
    phone : 54323453,
    email: "stanlee321@gmail.com",
    password: "1234",
 firstName: "rammstein",
@stanlee321
stanlee321 / docker-cleanup-resources.md
Created October 13, 2020 04:51 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

https://stackoverflow.com/questions/49754862/jupyter-notebook-save-to-pdf-without-code
https://medium.com/@mackgrenfell/fixing-the-facebook-ad-library-part-i-scraping-can-save-it-6b737d04614c
@stanlee321
stanlee321 / README.md
Last active October 2, 2020 22:13
Tweeter workarounds
user_name = "@nameofuser"

replies = tweepy.Cursor(api.search, q='to:{}'.format(user_name),
                                since_id=tweet_id, tweet_mode='extended').items()
while True:
    try:
        reply = replies.next()
 if not hasattr(reply, 'in_reply_to_status_id_str'):
https://dash-gallery.plotly.host/dash-cytoscape-lda/
https://dash-gallery.plotly.host/dash-circos/
https://dash-gallery.plotly.host/dash-nlp/
https://dash-gallery.plotly.host/dash-oil-gas-ternary/
https://dash-gallery.plotly.host/Portal/
https://dash-gallery.plotly.host/Portal/
https://github.com/ucg8j/awesome-dash
## NEW