This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "keymap_common.h" | |
#include "led.h" | |
#include "action_layer.h" | |
/* | |
* HHKB Layout | |
*/ | |
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |
/* 0: Default layer | |
* ,-----------------------------------------------------------. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
# $date: 09-16-16 | |
# $purpose: basic configuration | |
# $author: jeasinema [jeasinema[at]gmail[dot]com] | |
CREATE_USER_NAME="jeasinema" | |
# Create account | |
echo "============= now create an account =============" | |
sudo useradd -s /usr/bin/fish -m $CREATE_USER_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !/bin/bash | |
# $date: 09-16-16 | |
# $purpose: basic configuration | |
# $author: jeasinema [jeasinema[at]gmail[dot]com] | |
UNAME="jeasinema" | |
DOT_FILE="https://github.com/jeasinema/.dotfile.git" | |
DOT_NAME=".dotfile" | |
VIM_REPO_NAME="vim-config" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
# File Name : train_hook.py | |
# Purpose : | |
# Creation Date : 14-12-2017 | |
# Last Modified : 2017-12-14 Thu 00:59:06 | |
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com] | |
import os |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
# File Name : colorize.py | |
# Purpose : | |
# Creation Date : 21-12-2017 | |
# Created By : Jeasine Ma [jeasinema[at]gmail[dot]com] | |
# ref: https://gist.github.com/jimfleming/c1adfdb0f526465c99409cc143dea97b |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'formula' | |
class BsdgamesOsx < Formula | |
desc 'The classic bsdgames of yore for Mac OS X and macOS.' | |
homepage 'https://github.com/ctdk/bsdgames-osx' | |
url 'https://github.com/ctdk/bsdgames-osx/archive/bsdgames-osx-2.19.3.tar.gz' | |
sha256 '699bb294f2c431b9729320f73c7fcd9dcf4226216c15137bb81f7da157bed2a9' | |
head 'https://github.com/ctdk/bsdgames-osx.git' | |
version '2.19.3' | |
depends_on "bsdmake" => ':build' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Simple example on how to log scalars and images to tensorboard without tensor ops. | |
License: Copyleft | |
""" | |
__author__ = "Jeasine Ma" | |
import tensorflow as tf | |
from PIL import Image | |
import numpy as np | |
from io import BytesIO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:UTF-8 -*- | |
import torch | |
import torch.nn as nn | |
import torch.nn.init as init | |
def weight_init(m): | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def bar(current, total, prefix="", suffix="", bar_sz=25, end_string=None): | |
''' | |
Usage: | |
bar(iter+1, epoch_amount, "Iters:{}/{}".format(iter, epoch_amount), end_string='') | |
''' | |
sp = "" | |
print("\x1b[2K\r", end='') | |
for i in range(bar_sz): | |
if current * bar_sz // total > i: | |
sp += '=' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
import torch.nn.functional as F | |
from torch.nn.parameter import Parameter | |
import numpy as np | |
class SpatialSoftmax(torch.nn.Module): | |
def __init__(self, height, width, channel, temperature=None, data_format='NCHW'): | |
super(SpatialSoftmax, self).__init__() | |
self.data_format = data_format |
OlderNewer