Skip to content

Instantly share code, notes, and snippets.

View tantara's full-sized avatar
🤖
Agent mode

Taekmin Kim tantara

🤖
Agent mode
View GitHub Profile
num = 3
seed = 10
cards = (1..22).to_a
all_hands = cards.permutation(num).to_a
srand(seed) # initialize
shuffled_hands = all_hands.shuffle
@tantara
tantara / gist:7802189
Created December 5, 2013 08:54
ERROR gem install rubysl-yaml --pre
[root@host user]# gem install rubysl-yaml --pre
Building native extensions. This could take a while...
ERROR: Error installing rubysl-yaml:
ERROR: Failed to build gem native extension.
/usr/local/rvm/rubies/ruby-2.0.0-p247/bin/ruby extconf.rb
checking for st.h... yes
creating Makefile
make "DESTDIR="
@Configuration
//@EnableTransactionManagement(proxyTargetClass=true)
public class WebMvcConfig extends WebMvcConfigurationSupport {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations(
"classpath:/static/");
registry.addResourceHandler("/static/fonts/**").addResourceLocations(
"classpath:/static/fonts/");
}
<html>
<head>
...
</head>
<body>
<header>...</header>
<nav>...</nav>
<div id="content">여기만 바꾸고싶다 ~~~</div>
<footer>...</footer>
</body>
<h3>유저 정보 조회 페이지</h3>
<div>
헤헤헤헤헤헤헤헤헤 퇴근하고싶다.
</div>
year-semester year spring fall academic_year required quota enrollment junior double second all
2007-1 2007 1 0 2 1 440 338 49 0 0 297
2007-1 2007 1 0 2 0 80 55 49 0 0 297
2007-1 2007 1 0 3 1 200 116 49 0 0 297
2007-1 2007 1 0 3 0 310 185 49 0 0 297
2007-1 2007 1 0 4 0 540 201 49 0 0 297
2007-2 2007 0 1 2 1 420 250 49 0 0 280
2007-2 2007 0 1 2 0 230 113 49 0 0 280
2007-2 2007 0 1 3 1 260 161 49 0 0 280
2007-2 2007 0 1 3 0 440 159 49 0 0 280
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import re
txt = "#먹스타그램 #먹방 #혼밥 #혼술"
re_sc = re.compile('[\!@#$%\^&\*\(\)\-=_\[\]\{\}\.,/\?~\+\'"|]')
txt = re_sc.sub(' ', txt).strip()
print(txt) # => "먹스타그램 먹방 혼밥 혼술"
from konlpy.tag import Okt
tagger = Okt()
filters = ['Noun', 'Foreign', 'Alpha']
txt = "먹스타그램 먹방 혼밥 혼술"
pos = tagger.pos(txt, norm=True, stem=True)
txt = " ".join([word for (word, tag) in filter(lambda (word, tag): tag in self.filters, pos)])
print(txt) # => "스타 그램 혼밥 혼술"
Word Index
스타 0
그램 1
혼밥 2
...
혼술 149999