Skip to content

Instantly share code, notes, and snippets.

View trinhgiahuy's full-sized avatar

Huy Trinh trinhgiahuy

View GitHub Profile
@jmtatsch
jmtatsch / maxPerf.sh
Created January 8, 2016 19:51
Nvidia's Max Performance Script for Tegra X1
#!/bin/sh
# turn on fan for safety
echo "Enabling fan for safety..."
if [ ! -w /sys/kernel/debug/tegra_fan/target_pwm ] ; then
echo "Cannot set fan -- exiting..."
fi
echo 255 > /sys/kernel/debug/tegra_fan/target_pwm
echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable
@samueljon
samueljon / toggleHT.sh
Last active January 9, 2025 12:55
Disable / Enable HyperThreading cores on runtime - linux
#!/bin/bash
HYPERTHREADING=1
function toggleHyperThreading() {
for CPU in /sys/devices/system/cpu/cpu[0-9]*; do
CPUID=`basename $CPU | cut -b4-`
echo -en "CPU: $CPUID\t"
[ -e $CPU/online ] && echo "1" > $CPU/online
THREAD1=`cat $CPU/topology/thread_siblings_list | cut -f1 -d,`
@ashish2199
ashish2199 / SQL Server commands and queries.md
Last active November 8, 2024 16:30
List of Microsoft SQL Server queries and commands

To create a Table

	create table risk_clos_rank(
		id_num int IDENTITY(1,1) NOT NULL,
	    username nvarchar(100),
	    datetime_of_decision DATETIME
	);
	
	CREATE TABLE TheNameOfYourTable (
 ID INT NOT NULL IDENTITY(1,1),
@heroheman
heroheman / ranger-cheatsheet.md
Last active April 19, 2025 17:27
Ranger Cheatsheet

Ranger Cheatsheet

General

Shortcut Description
ranger Start Ranger
Q Quit Ranger
R Reload current directory
? Ranger Manpages / Shortcuts
@Tiryoh
Tiryoh / ros_kinetic_install_raspizero.bash
Last active October 11, 2023 07:17
ROS Kinetic installation on Raspberry Pi Zero/Raspberry Pi Zero W
sudo apt-get update
sudo apt-get install -y build-essential gdebi
mkdir -p ~/tmp
wget https://github.com/nomumu/Kinetic4RPiZero/releases/download/v_2017-10-15/rpi-zerow-kinetic_1.0.0-1_armhf.zip
unzip rpi-zerow-kinetic_1.0.0-1_armhf.zip
sudo gdebi rpi-zerow-kinetic_1.0.0-1_armhf.deb
sudo /opt/ros/kinetic/initialize.sh
@gyassine
gyassine / Tuto-MQTT.md
Last active August 12, 2022 16:48
Tutoriel pour l'installation de MQTT (mosquitto) sur Raspberry pi et connexion avec un Arduino en Wifi
@HadrienG2
HadrienG2 / High_Performance_Rust.md
Last active April 22, 2025 18:53
Making Rust a perfect fit for high-performance computations

Hello, Rust community!

My name is Hadrien and I am a software performance engineer in a particle physics lab. My daily job is to figure out ways to make scientific software use hardware more efficiently without sacrificing its correctness, primarily by adapting old-ish codebases to the changes that occured in the software and computing landscape since the days where they were designed:

  • CPU clock rates and instruction-level parallelism stopped going up, so optimizing code is now more important.
  • Multi-core CPUs went from an exotic niche to a cheap commodity, so parallelism is not optional anymore.
  • Core counts grow faster than RAM prices go down, so multi-processing is not enough anymore.
  • SIMD vectors become wider and wider, so vectorization is not a gimmick anymore.
@aallan
aallan / benchmark_tf.py
Created April 26, 2019 14:56
Benchmarking script for TensorFlow inferencing on Raspberry Pi, Darwin, and NVIDIA Jetson Nano
#!/usr/bin/env python3
import platform
PLATFORM = platform.system().lower()
GOOGLE = 'edge_tpu'
INTEL = 'ncs2'
NVIDIA = 'jetson_nano'
PI = 'raspberry_pi'
MAC = 'darwin'
IS_LINUX = (PLATFORM == 'linux')

Installing Python 3.7.6 on Raspbian Stretch

As of January 2020, Raspbian Stretch does not yet include any Python release newer than Python 3.5.x. This means we will have to build it ourselves, and here is how to do it.

  1. Install the required build-tools (some might already be installed on your system).
@wannadrunk
wannadrunk / sources.list
Created March 5, 2020 10:18
/etc/apt source list for Raspbian 10 Buster
deb http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi
deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://raspbian.raspberrypi.org/raspbian/ buster main contrib non-free rpi