Skip to content

Instantly share code, notes, and snippets.

View BIGBALLON's full-sized avatar
🎯
Focusing

WILL LEE BIGBALLON

🎯
Focusing
View GitHub Profile
@BIGBALLON
BIGBALLON / install-tmux.sh
Created June 15, 2020 06:55 — forked from pokev25/install-tmux.sh
Install tmux 2.8 on centos 7
# Install tmux 2.8 on Centos
# install deps
yum install gcc kernel-devel make ncurses-devel
# DOWNLOAD SOURCES FOR LIBEVENT AND MAKE AND INSTALL
curl -LOk https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz
tar -xf libevent-2.1.8-stable.tar.gz
cd libevent-2.1.8-stable
./configure --prefix=/usr/local
from PIL import Image, ImageOps
def padding(img, expected_size):
desired_size = expected_size
delta_width = desired_size - img.size[0]
delta_height = desired_size - img.size[1]
pad_width = delta_width // 2
pad_height = delta_height // 2
padding = (pad_width, pad_height, delta_width - pad_width, delta_height - pad_height)
@BIGBALLON
BIGBALLON / gym_test.py
Last active January 2, 2020 05:49
REINFORCE
import argparse
import gym
import os
import torch
import torch.nn as nn
import torch.optim as optim
import torch.nn.functional as F
import seaborn as sns
import pandas as pd
import numpy as np
@BIGBALLON
BIGBALLON / docker-owncloud.sh
Created November 13, 2019 07:50
docker-owncloud
# uninstall old versions
sudo apt-get remove docker docker-engine docker.io containerd runc
# install latest versions
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common -y
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
# -*-coding:utf-8-*-
import torch
import torch.nn as nn
import torch.nn.functional as F
__all__ = ['sk_resnext29_8x64d', 'sk_resnext29_16x64d']
class SKConv(nn.Module):
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from caffe2.proto import caffe2_pb2
from caffe2.python.predictor import mobile_exporter
from caffe2.python import (
core,
brew,
cnn,
utils,
@BIGBALLON
BIGBALLON / gogui_setup.sh
Created November 28, 2018 14:42
gogui_setup.sh
#!/bin/bash
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt update
sudo apt install oracle-java8-installer -y
javac -version
cd ~/Download
wget https://jaist.dl.sourceforge.net/project/gogui/gogui/1.4.9/gogui-1.4.9.zip
unzip gogui-1.4.9
cd gogui-1.4.9/
sudo ./install.sh
@BIGBALLON
BIGBALLON / caffe2_setup.txt
Created November 8, 2018 07:33
caffe2 install
# == remove & install cuda ==
sudo apt-get update
sudo apt-get install vim screen htop curl -y
sudo apt-get purge cuda* -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
sudo bash cuda_8.0.61_375.26_linux-run --silent --toolkit
# == install cudnn 7.1.4 ==
@BIGBALLON
BIGBALLON / czf_setup.sh
Last active February 20, 2019 09:25
holy shit!!!
# == czf setuo script ==
# == remove & install cuda ==
sudo apt-get update
sudo apt-get install vim screen htop curl -y
sudo apt-get purge cuda* -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
wget https://developer.nvidia.com/compute/cuda/8.0/Prod2/local_installers/cuda_8.0.61_375.26_linux-run
sudo bash cuda_8.0.61_375.26_linux-run --silent --toolkit
# == switch cuda version ==
@BIGBALLON
BIGBALLON / VS code.md
Last active July 24, 2020 22:27
VS code setting for my ubuntu
  • extensions(插件):
    • C/C++
    • Python
    • Markdown All in One
    • Dracula Official
    • GitLens
  • settings:
    • Editor: Render Whitespace
      • boundary
  • Mouse Wheel Zoom