Skip to content

Instantly share code, notes, and snippets.

@jshaw
jshaw / byobuCommands
Last active May 26, 2024 17:26
Byobu Commands
Byobu Commands
==============
byobu Screen manager
Level 0 Commands (Quick Start)
------------------------------
<F2> Create a new window
@rxaviers
rxaviers / gist:7360908
Last active June 2, 2024 11:04
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@mul14
mul14 / 00_etc-hosts.md
Last active May 15, 2024 10:01
/etc/hosts for Vimeo, Reddit, Imgur, GitHub, DigitalOcean, dll

Unblock Steam, Vimeo, Reddit, Imgur, GitHub, DigitalOcean, NPM, PayPal, dll

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows

@taylorpaul
taylorpaul / README.md
Last active November 20, 2023 10:27
Tensorboard on SLURM

Environment:

Tensorflow: v0.11.0rc2 OS: CENTOS 6.8 (No root access)

Description:

  1. The tensorboardSLURM.sh can be run with the following command to start a tensorboard server on a SLURM cluster:
sbatch --array=0-0 tensorboardSLURM.sh 
@joinAero
joinAero / camera.py
Created May 19, 2017 06:36
Use Kinect with OpenCV (Python)
import cv2
import sys
class Camera(object):
def __init__(self, index=0):
self.cap = cv2.VideoCapture(index)
self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2)
self.fps = 0
@zhanwenchen
zhanwenchen / Install NVIDIA Driver and CUDA.md
Last active March 13, 2024 23:42 — forked from wangruohui/Install NVIDIA Driver and CUDA.md
Install NVIDIA CUDA 9.0 on Ubuntu 16.04.4 LTS
@docPhil99
docPhil99 / pythonVideoCapture.md
Last active September 28, 2023 18:11
How to write lossless video in Python

OpenCV does a reasonable job of reading videos from file or webcams. It's simple and mostly works. When it comes to writing videos, it however leaves a lot to be desired. There is little control over the codecs and it is almost impossible to know which codecs are installed. It also wants to know things like the frame size at intailisation. This isn't always a problem, but if you don't know it yet it means you have to set up the video writer inside your main processing loop.

To make something as cross-platform compatible as possible it would be nice to use FFmpeg. There are a few python wrappers around, but as far as I can tell they are mainly used for transcoding type applications. One solution is run FFmpeg as a subprocess and set its input to accept a pipe. Then every video frame is passed through the pipe. You write this yourself, in fact it's only a few lines of code. However, the scikit-video package will do this for us, with some nice boilerplate to ma

@StefanFabian
StefanFabian / .anaconda_with_ros_wrapper.bash
Last active March 7, 2023 16:49
Bash script to use Anaconda with ROS
### This script wraps all executables in the anaconda bin folder so that they can be used without adding Anaconda
### to the path which would break some functionality of ROS (Robot Operating System)
###
### The commands e.g. jupyter notebook will cause the script to add anaconda to the path, start jupyter notebook
### and after jupyter notebook terminated remove anaconda from the path again
###
### Notable commands:
### * release-the-snake Adds conda to the path and removes all aliases defined by this script
### Conda will stay in the PATH until the end of the session (terminal is closed) or
### until "cage-the-snake" is called
@Collin-Emerson-Miller
Collin-Emerson-Miller / gist:8b4630c767aeb4a0b324ea4070c3db9d
Last active February 17, 2023 23:45
How to Install XBOX Kinect freenect / libfreenect / python

Install Libfreenect

Most of the instructions from this section originate from this aricle. Feel free to follow along with this gist or use the article.

Let's start by making sure our machine is up to date.

sudo apt-get update
sudo apt-get upgrade
@jeremyjordan
jeremyjordan / soft_dice_loss.py
Last active September 20, 2023 12:50
Generic calculation of the soft Dice loss used as the objective function in image segmentation tasks.
def soft_dice_loss(y_true, y_pred, epsilon=1e-6):
'''
Soft dice loss calculation for arbitrary batch size, number of classes, and number of spatial dimensions.
Assumes the `channels_last` format.
# Arguments
y_true: b x X x Y( x Z...) x c One hot encoding of ground truth
y_pred: b x X x Y( x Z...) x c Network output, must sum to 1 over c channel (such as after softmax)
epsilon: Used for numerical stability to avoid divide by zero errors