Skip to content

Instantly share code, notes, and snippets.

View soiqualang's full-sized avatar
🙃
hihihaha

Đỗ Thành Long soiqualang

🙃
hihihaha
View GitHub Profile
@soiqualang
soiqualang / nvmCommands.js
Created February 8, 2023 08:00 — forked from chranderson/nvmCommands.js
Useful NVM commands
View nvmCommands.js
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
@monokaijs
monokaijs / fb-video-downloader-script.js
Last active July 7, 2023 18:03
A small snippet to help you download Facebook video at ease...
View fb-video-downloader-script.js
/**
** Author: @MonokaiJs
** Contact: monokaijs@northstudio.vn | https://fb.me/monokaijssss | monokaijs.com
**
** Free to use, but don't abuse :>
**/
(()=>{let a=location.href.match(/\/(?:videos|reel|watch)(?:\/?)(?:\?v=)?(\d+)/);if(a.length<2){console.log("Please open a video before running this script.");return}let c=function(d,e){let f=[],a;for(a in d)if(d.hasOwnProperty(a)){let g=e?e+"["+a+"]":a,b=d[a];f.push(null!==b&&"object"==typeof b?c(b,g):encodeURIComponent(g)+"="+encodeURIComponent(b))}return f.join("&")},b=function(a,b){return fetch("https://www.facebook.com/api/graphql/",{method:"POST",headers:{"content-type":"application/x-www-form-urlencoded"},body:c({doc_id:a,variables:JSON.stringify(b),fb_dtsg:require("DTSGInitialData").token,server_timestamps:!0})})};console.log("Getting info..."),b("5279476072161634",{UFI2CommentsProvider_commentsKey:"CometTahoeSidePaneQuery",caller:"CHANNEL_VIEW_FROM_PAGE_TIMELINE",displayCommentsContextEnableComment:null,displayCommentsContextIsAdPreview:null,displayComm
@HimDek
HimDek / Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md
Last active December 1, 2023 06:37
This Guide will show you how to install and run apk files or Android apps in any Edition of Windows 11 using Windows Subsystem for Android. WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator.
View Install Android apps or apk files in Windows using Windows Subsystem for Android (No Emulator).md

Install Android apps or apk files in Windows using Windows Subsystem for Android

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow my guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • Windows Subsystem for Android or WSA must be Installed.

Click here to view the guide that shows how to install Windows Subsystem for Android in any Edition of Windows 11 (including Windows 11 Home) non Inider or stable release.

How to Install Android Apps or apk files in Windows Subsystem for Android:

@FreddieOliveira
FreddieOliveira / docker.md
Last active December 1, 2023 20:34
This tutorial shows how to run docker natively on Android, without VMs and chroot.
View docker.md

Docker on Android 🐋📱

Edit 🎉

All packages, except for Tini have been added to termux-root. To install them, simply pkg install root-repo && pkg install docker. This will install the whole docker suite, left only Tini to be compiled manually.


Summary

@soiqualang
soiqualang / zonal_stats.py
Created March 28, 2020 14:42 — forked from perrygeo/zonal_stats.py
Python implementation of zonal statistics function. Optimized for dense polygon layers, uses numpy, GDAL and OGR to rival the speed of starspan.
View zonal_stats.py
"""
Zonal Statistics
Vector-Raster Analysis
Copyright 2013 Matthew Perry
Usage:
zonal_stats.py VECTOR RASTER
zonal_stats.py -h | --help
zonal_stats.py --version
@huks0
huks0 / cellrecognition.py
Last active November 15, 2023 19:31
A table detection, cell recognition and text extraction algorithm to convert tables in images to excel files, using pytesseract and open cv.
View cellrecognition.py
import cv2
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import csv
try:
from PIL import Image
except ImportError:
import Image
View Clone_Github_Repository_Setup.sh
# Clone github repository setup
# import join used to join ROOT path and MY_GOOGLE_DRIVE_PATH
from os.path import join
# path to your project on Google Drive
MY_GOOGLE_DRIVE_PATH = 'My Drive/MyDrive/Udacity/deep-learning-v2-pytorch'
# replace with your Github username
GIT_USERNAME = "vsay01"
# definitely replace with your
GIT_TOKEN = "{YOUR_GITHUB_TOKEN}"
View elevation_query.py
#!/usr/bin/env python
from fiona.transform import transform_geom
from rasterstats import point_query
import mercantile
def make_dem_url(lon: float, lat: float, z: int = 14) -> str:
"""Returns a URL referencing the GeoTiff Digitial Elevation Model (DEM)
for the given point at a zoom level (default, max is 14).
@scionoftech
scionoftech / run_on_gpu.py
Created October 3, 2019 10:02
How to run python script on GPU
View run_on_gpu.py
# pip install --user numba
from numba import jit, cuda
import numpy as np
# to measure exec time
from timeit import default_timer as timer
# normal function to run on cpu
def func(a):
for i in range(10000000):