Skip to content

Instantly share code, notes, and snippets.

View Axect's full-sized avatar
😀
So nice day to programming

Tae-Geun Kim Axect

😀
So nice day to programming
View GitHub Profile
@Axect
Axect / gadfly.jl
Created August 20, 2017 08:34
Gadfly Tutorial
using Gadfly, DataFrames
X = 0:0.01:2pi
Y = sin.(X);
df = DataFrame(X=X, Y=Y)
pl = plot(df, x=:X, y=:Y, Geom.line, Guide.title("Gadfly Tutorial"))
draw(SVG("tutorial.svg", 1000px, 600px), pl)
@Axect
Axect / bubble.go
Created October 15, 2017 18:30
Bubble Sorting
package main
import (
"fmt"
)
var toBeSorted [10]int = [10]int{1,3,2,4,8,6,7,2,3,0}
func bubbleSort(input [10]int) {
// n is the number of items in our list
@Axect
Axect / tasks.json
Last active October 25, 2017 04:59
VS Code Task Configuration file for Scala
{
"version": "0.1.0",
"tasks": [
{
"taskName": "build",
"command": "sbt",
"args": ["compile"],
"isShellCommand": true,
"showOutput": "always"
},{
@Axect
Axect / coffee.scala
Last active October 26, 2017 07:14
Side Effect Example
// Side Effect
class Cafe {
def buyCoffee(cc: CreditCard): Coffee = { // Method of class is determined with def
val cup = new Coffee()
cc.charge(cup.price) // Side Effect!
cup // Scala doesn't need return
}
}
@Axect
Axect / upgrade.sh
Last active October 31, 2017 05:09
Solus Symbol
sudo eopkg up
@Axect
Axect / typora.desktop
Created October 27, 2017 07:17
desktop file for typora
[Desktop Entry]
Name=Typora
Comment=Open Typora
Exec=typora
Icon=typora
Terminal=false
Type=Application
Categories=Development;
@Axect
Axect / symbol.sh
Created October 27, 2017 07:22
bash command for typora symbolic
sudo ln -s /path/to/dir/typora /usr/bin/typora
@Axect
Axect / memoryError.py
Created February 17, 2018 19:51
Memory Errors 1
print [i for i in range(1,100000000001)][0]
@Axect
Axect / lazy1.hs
Last active February 17, 2018 19:58
Lazy1
main = print $ head [1..]
@Axect
Axect / lazy2.hs
Created February 17, 2018 20:06
Lazy 2
primes' = 2 : [x | x <- [3..], isPrime' x]
isPrime' x = all (\p -> x `rem` p > 0) (factorsToTry x)
where
factorsToTry x = takeWhile (\p -> p*p <= x) primes'