Skip to content

Instantly share code, notes, and snippets.

View dspp779's full-sized avatar

Jhih-Jie Chen dspp779

View GitHub Profile
@dspp779
dspp779 / standford_parser.ipynb
Last active February 9, 2022 11:46
Using Stanford Parser
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
新竹好好吃
冰品甜點
阿宗冰店
葉家大粒粉圓
正宗燒仙草
阿惠冰店(光華二街、西門街)
河堤上的貓
西米露之家
海洋冰城
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dspp779
dspp779 / fizzbuzz.rb
Last active September 26, 2016 01:40
SOA hw CODE: Mission FizzBuzz
## write your fizzbuzz method in this file
# see http://en.wikipedia.org/wiki/Fizz_buzz for details on FizzBuzz game
def fizzbuzzify(n)
res = ''
res << 'Fizz' if (n % 3).zero?
res << 'Buzz' if (n % 5).zero?
res.empty? ? n : res
end
def fizzbuzz(size)
require 'csv'
require 'yaml'
def read_tsv(filepath)
table = CSV.read(filepath, col_sep: "\t", headers: true)
table.map(&:to_h)
end
if ARGV.size == 2
data = read_tsv ARGV[0]
require 'yaml'
require 'csv'
if ARGV.size == 2
data = YAML.load_file(ARGV[0])
CSV.open(ARGV[1], 'wb', col_sep: '\t') do |csv|
csv << data.first.keys
data.to_a.each { |item| csv << item.values }
end
else
@dspp779
dspp779 / Practice161020.ipynb
Last active October 30, 2016 02:31
Practice for khub
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.