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 linuxserver/bookstack:latest | |
| COPY ./install-weasyproxy.sh /tmp/ | |
| RUN sh /tmp/install-weasyproxy.sh | |
| RUN mkdir /custom-cont-init.d/ | |
| COPY ./init-weasyproxy.sh /custom-cont-init.d/ |
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 django.db import connection | |
| from django.conf import settings | |
| cursor = connection.cursor() | |
| cursor.execute('SHOW TABLES') | |
| results=[] | |
| for row in cursor.fetchall(): | |
| results.append(row) | |
| for row in results: | |
| cursor.execute('ALTER TABLE %s CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' % (row[0])) |
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
| # List unique values in a DataFrame column | |
| pd.unique(df.column_name.ravel()) | |
| # Convert Series datatype to numeric, getting rid of any non-numeric values | |
| df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
| # Grab DataFrame rows where column has certain values | |
| valuelist = ['value1', 'value2', 'value3'] | |
| df = df[df.column.isin(valuelist)] |
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
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD license | |
| python 3에서 실행 가능하도록 수정, 한글 해설 추가 | |
| """ | |
| import numpy as np | |
| # 데이터를 불러오고, 글자-벡터 간 상호 변환 매핑 준비 | |
| data = open('input.txt', 'r').read() # 텍스트 파일 로드 |