Skip to content

Instantly share code, notes, and snippets.

@GzuPark
GzuPark / pytorch.Dockerfile
Created February 3, 2022 08:20
Sample Dockerfiles for TensorFlow & PyTorch
ARG UBUNTU_VERSION=20.04
ARG CUDA_VERSION=11.3.1
ARG CUDA=11.3
ARG CUDNN_VERSION=8
FROM nvidia/cuda:${CUDA_VERSION}-cudnn${CUDNN_VERSION}-devel-ubuntu${UBUNTU_VERSION}
LABEL maintainer "http://gzupark.dev"
ARG CUDA_VERSION
ARG CUDA
@butuzov
butuzov / Installing Google Test on Mac.md
Last active April 4, 2024 10:08
Bash Script to install Google Test and Google Mock on Mac

Installing Google Test on Mac

One bash script to install google test (and mock) on your Mac. I assume you already had install cmake (if not, use brew - brew install cmake).

It use brew directories to store gmock and gtest.

gtest_installer.sh

#!/usr/bin/env bash
@DavidWells
DavidWells / serverless.yml
Created September 15, 2017 05:39
DynamoDB custom index serverless.yml example
service: service-name
provider:
name: aws
runtime: nodejs6.10
functions:
myfunc:
handler: handler.myfunc
@mjdietzx
mjdietzx / waya-dl-setup.sh
Last active March 13, 2024 15:08
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda
@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active May 3, 2024 20:50
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

@ericelliott
ericelliott / gensync-full.js
Last active August 8, 2018 06:40
Full demonstration of synchronous style flow control with generators.
const isPromise = obj => Boolean(obj) && typeof obj.then === 'function';
const next = (iter, callback, prev = undefined) => {
const item = iter.next(prev);
const value = item.value;
if (item.done) return callback(prev);
if (isPromise(value)) {
value.then(val => {
@lukas-h
lukas-h / license-badges.md
Last active May 1, 2024 10:20
Markdown License Badges for your Project

Markdown License badges

Collection of License badges for your Project's README file.
This list includes the most common open source and open data licenses.
Easily copy and paste the code under the badges into your Markdown files.

Notes

  • The badges do not fully replace the license informations for your projects, they are only emblems for the README, that the user can see the License at first glance.

Translations: (No guarantee that the translations are up-to-date)

@staltz
staltz / introrx.md
Last active May 7, 2024 09:38
The introduction to Reactive Programming you've been missing
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 7, 2024 09:29
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k