Skip to content

Instantly share code, notes, and snippets.

View sailfish009's full-sized avatar

sailfish009

  • freelancer
  • South Korea
View GitHub Profile
sudo mount /dev/sdXY /mnt
sudo mount --bind /dev /mnt/dev &&
sudo mount --bind /dev/pts /mnt/dev/pts &&
sudo mount --bind /proc /mnt/proc &&
sudo mount --bind /sys /mnt/sys
sudo chroot /mnt
sudo ufw default deny outgoing
sudo ufw allow out to any port 80
sudo ufw allow out to any port 443
sudo ufw allow out to any port 53
sudo ufw reload
sudo ufw status numbered
# sudo ufw delete 2
https://pytorch.org/docs/stable/index.html
http://blog.ezyang.com/2019/05/pytorch-internals/
https://www.youtube.com/playlist?list=PLZbbT5o_s2xrfNyHZsM6ufI0iZENK9xgG
torch.nn.Linear(W_target.size(0), 1)
Applies a linear transformation to the incoming data: y = xA^T + b
torch.unsqueeze(input, dim, out=None) → Tensor :
@sailfish009
sailfish009 / pytorch-simple-rnn.py
Created October 5, 2019 04:03 — forked from spro/pytorch-simple-rnn.py
PyTorch RNN training example
import torch
import torch.nn as nn
from torch.nn import functional as F
from torch.autograd import Variable
from torch import optim
import numpy as np
import math, random
# Generating a noisy multi-sin wave
https://www.wikihow.com/Connect-to-a-VPN
@sailfish009
sailfish009 / install-cuda-10-bionic.sh
Last active January 20, 2020 01:30 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
#!/bin/bash
# Purge existign CUDA first
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
@sailfish009
sailfish009 / ProcessAsyncHelper.cs
Created August 26, 2019 01:25 — forked from AlexMAS/ProcessAsyncHelper.cs
The right way to run external process in .NET (async version)
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> ExecuteShellCommand(string command, string arguments, int timeout)
{
var result = new ProcessResult();
https://stackoverflow.com/questions/41833949/opengl-and-remote-desktop
OpenGL RDP does not work on NVidia GeForce, but works on NVidia Quadro
This is simply fixed by Launching Radeon Settings >> on the bottom
of the interface click on Preferences >> on the far right you
will see AMD User Experience Program >> click on the downward
pointing arrow and select Leave, there will be a pop up from windows
security >> just select yes to have the program make changes and
the program will start to uninstall <<< Hope this helps..