Skip to content

Instantly share code, notes, and snippets.

View odanado's full-sized avatar

odanado odanado

View GitHub Profile
@odanado
odanado / build-llvm.bash
Created April 16, 2017 12:00 — forked from zchee/build-llvm.bash
Build llvm for OS X
#!/bin/bash
set -e
# Building LLVM on OSX CMake setup script
#
# Required:
# - clang by Xcode6 or later
# - cmake
# - ninja
#
@odanado
odanado / work78.c
Created October 30, 2017 09:41 — forked from siberiy4/work78.c
#include<stdio.h>
int main(void){
int a,b,c=1, i, j, e, f, p, d;
printf("桁区切りする値の入力:");
scanf("%d",&a);
b=a;
@odanado
odanado / colorize_text.py
Created November 21, 2017 13:20 — forked from ihsgnef/colorize_text.py
Visualize attention over text with background colors
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
def colorize(words, color_array):
# words is a list of words
# color_array is an array of numbers between 0 and 1 of length equal to words
cmap = matplotlib.cm.get_cmap('RdBu')
template = '<span class="barcode"; style="color: black; background-color: {}">{}</span>'
colored_string = ''