This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script setup> | |
| import { RouterLink, RouterView } from "vue-router"; | |
| import { onMounted } from 'vue'; | |
| onMounted(() => { | |
| // document.getElementById("app").classList.add('col-lg-8', 'mx-auto', 'p-3', 'py-md-5') | |
| }) | |
| </script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| python -c "from sysconfig import get_paths as gp; print(gp()['include'])" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Reference: https://stackoverflow.com/questions/9509063/how-do-i-pass-a-parameter-to-a-python-hadoop-streaming-job | |
| # method 1. | |
| In your Python code, | |
| import os | |
| (...) | |
| os.environ["PARAM_OPT"] | |
| In your Hapdoop command include: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Reference: https://stackoverflow.com/questions/8753286/nerd-tree-enter-does-not-open-sub-dirs | |
| Putting this in my .vimrc solved the problem: let g:NERDTreeDirArrows=0 | |
| The creator gave me the fix: https://github.com/scrooloose/nerdtree/issues/108 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 안녕하세요. | |
| 아래와 같이 Mecap 설치를 완료하였습니다. | |
| 직접 import하여 객체 생성을 하려고 하는데 제목과 같은 Error가 발생하네요. | |
| Reference: https://github.com/konlpy/konlpy/issues/182 | |
| Mebcap 설치 완료. | |
| wget https://bitbucket.org/eunjeon/mecab-ko/downloads/mecab-0.996-ko-0.9.2.tar.gz | |
| tar -zxvf mecab--ko-.tar.gz | |
| cd mecab--ko- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Reference: https://www.ghostar.org/2013/09/mass-gzip-files-inside-hdfs-using-the-power-of-hadoop/ | |
| Once that’s done, we want to run the hadoop streaming job. I ran it like this. There’s a lot of output here. I include it only for reference. | |
| $ hadoop jar /usr/lib/hadoop-0.20/contrib/streaming/hadoop-streaming-*.jar | |
| -Dmapred.reduce.tasks=0 -mapper gzipit.sh | |
| -input ./gzipped.txt | |
| -output /user/hcoyote/gzipped.log | |
| -verbose | |
| -inputformat org.apache.hadoop.mapred.lib.NLineInputFormat | |
| -file gzipit.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Reference: https://blog.leocat.kr/notes/2018/02/17/shell-looping-list | |
| $ cat test.sh | |
| #!/bin/bash | |
| for NAME in "ME" "YOU" "THEM" "ALL"; do | |
| echo "Name is ${NAME}" | |
| done | |
| PLANETS=( "EARTH" "MARS" "VINUS" ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from html.parser import HTMLParser | |
| class StripQuery(HTMLParser): | |
| def __init__(self): | |
| super(StripQuery, self).__init__() | |
| self.query = "" | |
| def handle_starttag(self, tag, attrs): | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| def push(channel, message, nickname=None): | |
| print(f"Sending message to {channel}: {message}") | |
| url = 'http://abc.company.com/notice' # or /privmsg | |
| headers = { | |
| 'X-SENDER': 'slack' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import inspect | |
| class A: | |
| def __init__(self, a,b,c): | |
| args, _, _, values = inspect.getargvalues(inspect.currentframe()) | |
| values.pop("self") | |
| for key, val in values.items(): | |
| setattr(self, key, val) |