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=${1:="model"} | |
| RUN_NAME=${2:-$1} | |
| jupyter nbconvert --to script src/model/model.ipynb --output $SCRIPT | |
| echo "cd src/model; time python $SCRIPT.py $RUN_NAME; date; cd -" >> queue | |
| echo "enqueued" |
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 ubuntu:20.04 | |
| SHELL ["/bin/bash", "-c"] | |
| ENV RUNNER_ALLOW_RUNASROOT=true | |
| ARG DEBIAN_FRONTEND=noninteractive | |
| RUN sed -i 's/kr.archive.ubuntu.com/mirror.kakao.com/g' /etc/apt/sources.list | |
| RUN apt update | |
| RUN apt install -y git dnsutils bison brotli bzip2 curl dbus dpkg fakeroot file flex ftp gnupg2 iproute2 iputils-ping jq lib32z1 libc++-dev libc++abi-dev libcurl4 libgbm-dev libgconf-2-4 libgtk-3-0 libsecret-1-dev libsqlite3-dev libunwind8 libxkbfile-dev libxss1 locales m4 netcat openssh-client parallel patchelf pkg-config python-is-python3 rpm rsync shellcheck sqlite3 ssh sudo telnet texinfo time tk tzdata unzip upx wget xorriso xvfb xz-utils zip zstd zsync |
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
| const rog = 'http://www.11st.co.kr/products/3126107080?trTypeCd=03&trCtgrNo=2046005' | |
| const tuf = 'http://www.11st.co.kr/products/3052905270?trTypeCd=03&trCtgrNo=2046005' | |
| const puppeteer = require('puppeteer') | |
| const vulcan = 'http://www.11st.co.kr/products/3136907976?xfrom=&xzone=&ts=1604400314021' | |
| const cases = 'http://www.11st.co.kr/products/2314458619' | |
| async function main(url) { | |
| const browser = await puppeteer.launch(); | |
| const page = await browser.newPage(); |
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
| const zlib = require('zlib') | |
| const R = require('ramda') | |
| const unzip = R.compose( | |
| JSON.parse, | |
| zlib.inflateSync, | |
| R.partialRight(Buffer.from, ['base64']) | |
| ) |
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
| const dataSelectHandler = (data) => { | |
| console.log('data', data) | |
| } | |
| const graph = new Chart(ref.current, { | |
| data : { | |
| labels : Array(30).fill(0).map((_, i) => i + 1 + ''), | |
| datasets: [ | |
| { | |
| values, | |
| chartType: 'line', |
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
| const stack = new Error().stack!.split('\n').slice(3)[0] | |
| const regexp = /\((\S+)\)/ | |
| const match = stack.match(regexp)![1] | |
| const line = `${path.basename(path.dirname(match))}/${path.basename(match)}` |
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 loadConfig from 'next/dist/server/config' | |
| import {PHASE_EXPORT} from 'next/constants' | |
| import exporter from 'next/dist/export' | |
| export const exports = async (event, context, callback) => { | |
| const dir = '.' | |
| const result = await exporter(dir, | |
| { | |
| silent: false, | |
| outdir: 'out', |
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
| class A { | |
| state = { | |
| x: 0, | |
| y: 1 | |
| } | |
| constructor(initialState?: A) { | |
| if (initialState) { | |
| this.state = initialState | |
| } |
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 gql from 'graphql-tag' | |
| const FRAGMENT_REPOSITORY = gql` | |
| fragment repository on Repository { | |
| name | |
| url | |
| createdAt | |
| description | |
| descriptionHTML | |
| labels { |
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 {throttle, debounce} from 'lodash' | |
| const delay = () => new Promise(r => setTimeout(r, 100)) | |
| describe('throttle vs debouce', () => { | |
| beforeEach(() => { | |
| console.log = jest.fn() | |
| }) | |
| it('throttle does not guarantee about execute latest call', async (done) => { | |
| const i = throttle(x => console.log(x), 300) | |
| let count = 0 |
NewerOlder