This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. launch google colab and mount drive | |
2. launch cloud instance (e.g. EC2) | |
3. upload ssh key to google drive | |
4. use scp on google colab: | |
scp -o StrictHostKeyChecking=no -i ~/.ssh/uploaded.pem large-file user@cloud-instance-ip-addr: | |
5. download large-file from the cloud instance to the local machine |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fizz = _fizz = lambda do | |
fizz = lambda do | |
fizz = lambda do | |
fizz = _fizz | |
"Fizz" | |
end | |
"" | |
end | |
"" | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-key del A4B469963BF863CC | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/3bf863cc.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <openssl/pem.h> | |
#include <openssl/rsa.h> | |
#include <stdint.h> | |
#include <string.h> | |
#include <stdio.h> | |
int usage(const char *cmd) { | |
fprintf(stderr, "Error: %s private.pem signature.sig\n", cmd); | |
return 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:20.04 | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt-get update && \ | |
apt-get install -y \ | |
sudo pyqt5-dev-tools python3-pip \ | |
libffi-dev libssl-dev zlib1g-dev liblzma-dev tk-dev \ | |
libbz2-dev libreadline-dev libsqlite3-dev libopencv-dev \ | |
build-essential git vim wget |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SRC = rsa-mod-exp.c main.c | |
OBJ = $(SRC:%.c=%.o) | |
TARGET = rsa | |
CFLAGS += -DUSE_HOSTCC | |
$(TARGET): $(OBJ) | |
$(CC) -o $@ $^ | |
%.o:%.c | |
$(CC) $(CFLAGS) -o $@ -c $< |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
################ | |
function get_source(){ | |
source <(echo xxx=yyy) | |
} | |
get_source | |
echo $xxx |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from threading import Thread | |
from time import sleep | |
mydict = {} | |
def x(): | |
while True: | |
# RuntimeError: dictionary changed size during iteration | |
for k in mydict.keys(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nvcr.io/nvidia/l4t-base:r32.5.0 | |
ENV DEBIAN_FRONTEND=noninteractive | |
# https://qengineering.eu/install-pytorch-on-jetson-nano.html | |
RUN apt-get update && \ | |
apt-get install -y --no-install-recommends \ | |
python3.8 python3.8-dev \ | |
ninja-build git cmake clang build-essential \ | |
libopenmpi-dev libomp-dev ccache \ | |
libopenblas-dev libblas-dev libeigen3-dev \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' # to use volumes type bind | |
x-volumes: &volumes | |
- type: bind | |
source: "${JETPACK_ROOT}/usr/lib/aarch64-linux-gnu/libnvinfer.so.8.0.1" | |
target: "/usr/lib/aarch64-linux-gnu/libnvinfer.so.8.0.1" | |
read_only: true | |
- type: bind | |
source: "${JETPACK_ROOT}/usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8.0.1" | |
target: "/usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so.8.0.1" | |
read_only: true |
NewerOlder