Skip to content

Instantly share code, notes, and snippets.

View Manojbhat09's full-sized avatar

Manoj Bhat Manojbhat09

View GitHub Profile
@zuyu
zuyu / ubuntu-install-gcc-6
Last active May 3, 2024 06:57
Install gcc 6 on Ubuntu
sudo apt update && \
sudo apt install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
sudo apt update && \
sudo apt install gcc-6 g++-6 -y && \
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-6 && \
gcc -v
@moskomule
moskomule / tinyimagenet.sh
Created November 6, 2017 10:48
tiny imagenet downloader
#!/bin/bash
# download and unzip dataset
#wget http://cs231n.stanford.edu/tiny-imagenet-200.zip
unzip tiny-imagenet-200.zip
current="$(pwd)/tiny-imagenet-200"
# training data
cd $current/train
@kanhua
kanhua / README.md
Last active February 1, 2023 17:08
A template of writing C or C++ extension for python and numpy

This gist demonstrates how to setup a python project that process a numpy array from C language.

To compile the project, run

make all

To test it, run

make test
@johnhany
johnhany / KNN.cpp
Created August 6, 2017 11:28
KNN on MNIST with OpenCV
#include <iostream>
#include <opencv2/opencv.hpp>
using namespace std;
using namespace cv;
#define PIXELS_IN_IMAGE 28*28
#define ENABLE_TRAIN 1
@drj11
drj11 / ASCII.md
Last active October 23, 2022 03:35
How to memorise ASCII

How to memorise ASCII

You don't need to memorise ASCII as there is a handy chart available by typing man ascii in a Terminal. However, you may find it useful to remember some fun facts about ASCII.

Blocks of 32 are useful. 32 is 2⁵ (2 raised to the power 5) and a block of 32 is enough to represent all 26 common english letters plus some extra stuff.

ASCII is a coding for the first 128 numbers. 0 to 127.

@mtngld
mtngld / install_cuda.sh
Created March 22, 2016 21:18
Install CUDA 7.5 on AWS
# based on https://devtalk.nvidia.com/default/topic/880246/cuda-setup-and-installation/cuda-7-5-unstable-on-ec2-/post/4830634/#4830634
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update -q -y
sudo apt-get -q -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" install linux-generic
wget http://developer.download.nvidia.com/compute/cuda/7.5/Prod/local_installers/cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1404-7-5-local_7.5-18_amd64.deb
sudo apt-get update -q -y
sudo apt-get install cuda -q -y
@vasanthk
vasanthk / System Design.md
Last active May 4, 2024 16:39
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

@alyssaq
alyssaq / cplusplus-stl-containers.md
Last active June 29, 2021 22:30
C++ Standard Template Library (STL) containers

###Containers Forward Container: forward iterators - increment only in O(1)

  • begin(), end()
  • All containers

Reversible Container: bidirectional iterators - increment and decrement in O(1)

  • rbegin(), rend()