Skip to content

Instantly share code, notes, and snippets.

View allenyllee's full-sized avatar

Allen.YL allenyllee

View GitHub Profile
@allenyllee
allenyllee / FindOpenMP.cmake
Created September 30, 2017 15:55 — forked from mirkow/FindOpenMP.cmake
Modified FindOpenMP to work with Clang 3.8 under Ubuntu 14.04
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# FindOpenMP
# ----------
#
# Finds OpenMP support
#
# This module can be used to detect OpenMP support in a compiler. If
@allenyllee
allenyllee / thread_project2
Created October 4, 2017 14:31 — forked from ozanyildiz/thread_project2
Example of Multithreading in C
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#define M 3
#define K 2
#define N 3
#define NUM_THREADS M * N
/* Global variables for threads to share */
@allenyllee
allenyllee / Windows_setup.bat
Last active October 5, 2017 12:53
windows_setup.bat
::
:: install choco
::
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
::
:: install wget
::
choco install -y wget
@allenyllee
allenyllee / sample.wsd
Created October 6, 2017 06:05
sample of plantuml
@startuml
actor Foo1
boundary Foo2
control Foo3
entity Foo4
database Foo5
collections Foo6
Foo1 -> Foo2 : To boundary
Foo1 -> Foo3 : To control
Foo1 -> Foo4 : To entity
@allenyllee
allenyllee / sample.py
Created October 6, 2017 06:06
sample of jupyter Notebook
#%%
import matplotlib.pyplot as plt
import matplotlib as mpl
import numpy as np
x = np.linspace(0, 20, 100)
plt.plot(x, np.sin(x))
plt.show()
@allenyllee
allenyllee / cnn.py
Created October 6, 2017 06:08
sample of tensorflow
"""Simple convolutional neural network classififer."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
FLAGS = tf.flags.FLAGS
@allenyllee
allenyllee / fetch_gdrive_file.sh
Last active November 10, 2017 08:03 — forked from ppetraki/fetch_gdrive_file.sh
allows you do non-interactively download large public files from gdrive
#!/bin/bash
SOURCE="$1"
if [ "${SOURCE}" == "" ]; then
echo "Must specify a source url"
exit 1
fi
DEST="$2"
#if [ "${DEST}" == "" ]; then
@allenyllee
allenyllee / Timer.bat
Created December 3, 2017 12:32
Timer for windows
@echo off
::echo Waiting For 2.5 Hour...
TIMEOUT /T 9000 /NOBREAK
shutdown /h
::echo.
::echo (Put some Other Processes Here)
::echo.
::pause >nul
@allenyllee
allenyllee / Convolutional Arithmetic.ipynb
Created December 21, 2017 08:18 — forked from akiross/Convolutional Arithmetic.ipynb
Few experiments on how convolution and transposed convolution (deconvolution) should work in tensorflow.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.