Skip to content

Instantly share code, notes, and snippets.

Avatar
🔴
I may be very slow to respond.

Andrews Cordolino Sobral andrewssobral

🔴
I may be very slow to respond.
View GitHub Profile
@andrewssobral
andrewssobral / agx_xavier_tips-and-tricks.md
Last active Oct 17, 2021
Tips and Tricks for Jetson AGX Xavier
View agx_xavier_tips-and-tricks.md
View wakeonlan.sh
# https://doc.ubuntu-fr.org/wakeonlan
# check if your target pc is wake-on-lan enabled:
sudo ethtool enp8s0 | egrep "^[[:blank:]]*Wake-on: (g|d)"
# you should have:
# Wake-on: g
# get target pc mac address
ifconfig enp8s0
@andrewssobral
andrewssobral / disable_leds_rpi3.sh
Last active Sep 13, 2021
Disable leds on Raspberry Pi 3 Model B Rev 1.2
View disable_leds_rpi3.sh
# https://raspberrypi.stackexchange.com/questions/117632/turn-off-external-leds-on-raspberry-pi-3
# check model
cat /sys/firmware/devicetree/base/model
# Raspberry Pi 3 Model B Rev 1.2
# Disable Power (red) and Activity (yellow) leds
sudo nano /etc/rc.local
# Add the following lines before `exit 0`:
sudo sh -c 'echo none > /sys/class/leds/led0/trigger'
@andrewssobral
andrewssobral / Crack Sublime Text Windows and Linux.md
Created Aug 3, 2021 — forked from JerryLokjianming/Crack Sublime Text Windows and Linux.md
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex
View Crack Sublime Text Windows and Linux.md

YouTube Channel https://www.youtube.com/c/jerrylokjianming


How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
View synergy-jetson.sh
sudo apt install xorg-dev libssl-dev qtbase5-dev libgdk-pixbuf2.0-dev libnotify-dev qttools5-dev-tools qttools5-dev
git clone https://github.com/symless/synergy-core.git
cd synergy-core
mkdir build
cd build
cmake ..
make
# https://github.com/symless/synergy-core/wiki/Command-Line
# ./bin/synergyc $SYNERGY_SERVER_IP
@andrewssobral
andrewssobral / gstreamer-opencv.md
Last active Aug 11, 2021
Jetson-Nano GStreamer OpenCV Plugins
View gstreamer-opencv.md
@andrewssobral
andrewssobral / pytorch-distributed-slurm-example.py
Created Mar 15, 2021
pytorch-distributed-slurm-example.py
View pytorch-distributed-slurm-example.py
# https://github.com/ShigekiKarita/pytorch-distributed-slurm-example/blob/master/main_distributed.py
# lauch 2 gpus x 2 nodes (= 4 gpus)
# srun -N2 -p gpu --gres gpu:2 python main_distributed.py --dist-backend nccl --multiprocessing-distributed --dist-file dist_file
import argparse
import os
import random
import shutil
import time
import warnings
import sys
@andrewssobral
andrewssobral / pytorch_lightning_distributed_training.py
Last active Jul 30, 2021
pytorch_lightning_distributed_training.py
View pytorch_lightning_distributed_training.py
import os
import multiprocessing
import torch
import torch.nn.functional as F
import torchmetrics
import pytorch_lightning as pl
from argparse import ArgumentParser
from torch import nn
View cuda_combination.py
"""
Created on Sat Sep 28 00:47:38 2019
@author: Kenan Kilictepe (Entegral / www.entegral.com.tr)
"""
import numba
from numba import cuda
import numpy as np
from pdb import set_trace
View keras_mnist_cnn.py
'''Trains a simple convnet on the MNIST dataset.
Gets to 99.25% test accuracy after 12 epochs
(there is still a lot of margin for parameter tuning).
16 seconds per epoch on a GRID K520 GPU.
'''
import keras
from keras.datasets import mnist
from keras.models import Sequential