Skip to content

Instantly share code, notes, and snippets.

View UditSinghParihar's full-sized avatar

Udit Singh Parihar UditSinghParihar

View GitHub Profile
@ChriRas
ChriRas / readme.md
Last active June 30, 2024 08:26
Set up default audio device on Ubuntu 20.04 LTS

Problem

I have a notebook connected to a port replicator. I want to use the build-in speakers and microfone and not the external ones. If I boot my notebook in my port replicator Ubuntu changes the devices to external.

Solution

  1. Find your internal speaker
pactl list short sinks
@davegreenwood
davegreenwood / triangulation.py
Created September 16, 2018 10:18
Triangulate image points to world points comparing openCV to pure python.
from __future__ import print_function
import numpy as np
import cv2
import time
np.set_printoptions(formatter={'float': '{: 0.3f}'.format})
def triangulate_nviews(P, ip):
"""
@TysonRayJones
TysonRayJones / mount_filesystem_osx.md
Last active July 4, 2024 21:11
Mount a remote filesystem in OSX

If you're manipulating files stored on a remote machine, such as ARCUS or ARCHER supercomputers, you can mount the remote file system and interact with the files as if they were stored on your own machine. This makes viewing, editing, and opening files in software on your computer a breeze.

To do this on OSX, first ensure you have homebrew installed. If brew is not recognised in Terminal, run

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
@satwikkansal
satwikkansal / cheatsheet.cpp
Last active July 3, 2024 14:57
C++ STL cheatsheet for competitive progrmming
/*
This a header file that includes every standard library.
You can use it to save time.
NOTE: This header file may not be recognized by compilers
other than gcc.
*/
#include <bits/stdc++.h>
/*
//Use this if the above header file doesn't work.
@gocarlos
gocarlos / Eigen Cheat sheet
Last active July 3, 2024 07:33
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@toch
toch / fibonacci.cpp
Created May 9, 2015 14:42
fibonacci template C++
template<int n>
struct fibonacci
{
static constexpr int value = fibonacci<n-1>::value + fibonacci<n-2>::value;
};
template<>
struct fibonacci<0>
{
static constexpr int value = 0;
};
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 4, 2024 17:58
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname