Skip to content

Instantly share code, notes, and snippets.

View jiOnederfull's full-sized avatar

Jiwon Park jiOnederfull

  • 04:16 (UTC +09:00)
View GitHub Profile
@korakot
korakot / sheet_df.py
Last active March 29, 2024 23:33
Save dataframe to Google Sheet from Colab
# authenticate
from google.colab import auth
auth.authenticate_user()
import gspread
from oauth2client.client import GoogleCredentials as GC
gc = gspread.authorize(GC.get_application_default())
# create, and save df
from gspread_dataframe import set_with_dataframe
title = 'New Sheet'
gc.create(title) # if not exist
@ian0371
ian0371 / 23.04-hands-on.md
Last active April 14, 2023 02:28
Klaytn DevMeet 2023.04 hands-on

Klaytn DevMeet 2023.04 hands-on

Prerequisites

Explore hardfork numbers on-chain

# To use curl,
curl -H "Content-Type: application/json" --data '{"jsonrpc":"2.0", "method":"klay_getChainConfig", "params":["latest"],"id":1}' https://api.baobab.klaytn.net:8651
## shebang https://ko.wikipedia.org/wiki/%EC%85%94%EB%B1%85 참고
#!/bin/sh
src_dir="contrib"
near_postfix="near"
network="mainnet"
near_source="nearcore" # nearcore or datalake
migrate_from=""
use_snapshots=1
@maczniak
maczniak / linux-user-guide-1.md
Created July 14, 2023 01:32
Linux User Guide

standard input/output/error

유닉스는 모든 입출력을 파일로 봅니다. 파일을 읽고쓰는 것은 물론이고 하드웨어 센서와 네트워크 등도 마치 파일을 읽고쓰는 것처럼 처리합니다. 프로세스가 파일/네트워크/하드웨어 입출력을 하려고 대상을 열면(유닉스 시스템호출 open()) (정수값인) file descriptor가 생깁니다. 줄여서 fd라고 쓰고, /proc/PID/fd에 보이는 그 fd입니다. 우리가 /etc/security/limits.conf 파일에 nofile을 설정하면, 프로그램의 최대 fd 개수가 늘어나고 ulimit -a 출력의 open files 줄에서 확인할 수 있습니다.

프로그램을 실행하면, 쉘은 세가지 fd를 만들어서 프로그램에 붙입니다.