Skip to content

Instantly share code, notes, and snippets.

View tomahawk28's full-sized avatar
🏠
Working from home

Jihyuk Bok tomahawk28

🏠
Working from home
View GitHub Profile
'''
Created on Aug 28, 2014
@author: tomahawk28@gmail.com
'''
def atoi(string):
list_string = list(string)[::-1]
decimal = 0
ret = 0
#author jihyuk.bok <jihyuk-bok@jdsu.com>
#content To check actual version of firmware in working source directory
#!usr/bin/perl -w
use strict;
use warnings;
my $ver = "";
while(<>) {
if (/^#.+[ \t].+LKII.+[ \t]+\"(.+)\"/) {
$ver = $1;
package main
import (
"io"
"os"
"strings"
)
type rot13Reader struct {
r io.Reader
@tomahawk28
tomahawk28 / tweet.go
Last active August 29, 2015 14:09
Get Bearer token from Twitter API OAuth2
package main
import (
"bytes"
"encoding/base64"
"flag"
"fmt"
"io/ioutil"
"net/http"
"net/url"
@tomahawk28
tomahawk28 / merge_sort.go
Last active August 29, 2015 14:10
merge_sort.go
package main
import (
"fmt"
"math/rand"
)
func main() {
random_array := make([]int, 1000000)
for random_number := range random_array {
@tomahawk28
tomahawk28 / simple_trie.go
Last active August 29, 2015 14:12
Trie implementation
package main
import "fmt"
type Trie struct {
branch map[byte]*Trie
leaf bool
}
func NewTrie() *Trie {
@tomahawk28
tomahawk28 / hash.go
Created December 31, 2014 05:11
Weekly Coding Interview - Part: Hash
package main
import "fmt"
const (
hashsize = 511
)
type Entry struct {
key string
import copy
def sumVal(d):
sum = 0
for k in d:
sum += k * d[k]
return sum
@tomahawk28
tomahawk28 / crwal_utc.ipynb
Last active September 1, 2016 09:20
crawling utc timedelta from wikipedia page
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
apiVersion: application.giantswarm.io/v1alpha1
kind: App
metadata:
name: "my-cool-prometheus"
labels:
app: "prometheus"
giantswarm.io/cluster: "6iec4"
giantswarm.io/organization: "giantswarm"
giantswarm.io/service-type: "managed"