Skip to content

Instantly share code, notes, and snippets.

View orison09's full-sized avatar

Orison orison09

View GitHub Profile
@orison09
orison09 / data_mining_2017_fall_nthu.md
Last active October 13, 2017 14:33 — forked from omarsar/data_mining_2017_fall_nthu.md
Data Mining Lab Session ( 2017 Fall)

###Test

Computing Resources

  • Operating system: Preferably Linux or MacOS. If you have Windows, things may crash unexpectedly (try installing a virtual machine if you need to)
  • RAM: Minimum 8GB
  • Disk space: Mininium 8GB

Software Requirements

Here is a list of the required programs and libraries necessary for this lab session. (Please install them before coming to our lab session on Tuesday; this will save us a lot of time, plus these are the same libraries you may need for your first assignment).

@orison09
orison09 / orison.rb
Created March 19, 2018 02:52 — forked from soumyaray/orison.rb
Orison Ruby Q&A
# OOP What
module Scrambler
def scramble
json_output = to_json
json_output.chars.sample(json_output.length).join
end
end
class Student
include Scrambler
@orison09
orison09 / fizzbuzz.txt
Last active September 20, 2018 13:41
FizzBuzz - SOA Week 2 Assignment 1
## write your fizzbuzz method in this file
# see http://en.wikipedia.org/wiki/Fizz_buzz for details on FizzBuzz game
# Version 1.3: Passes all tests. Rubocop.
def fizzbuzz(value)
fz = (1..value).to_a.map { |i| (i % 15) != 0 ? i : 'FizzBuzz' }
fz = fz.map { |i| (i % 5) != 0 ? i : 'Buzz' }
result = fz.map { |i| (i % 3) != 0 ? i : 'Fizz' }
result.map { |i| yield i } if block_given?
result
@orison09
orison09 / tsv_to_yml.rb
Last active September 22, 2018 16:31
TSV and YML Converter
# Version 1.1 Basic structure. Added more.
require 'yaml'
require 'csv'
infile = ARGV[0]
yaml = File.read(infile)
data = YAML.safe_load(yaml)
key = data[0].keys