Skip to content

Instantly share code, notes, and snippets.

View dalinaum's full-sized avatar
:octocat:
Learning Rust and IR.

LYK dalinaum

:octocat:
Learning Rust and IR.
View GitHub Profile
@dalinaum
dalinaum / RestorableInt.md
Created December 13, 2023 16:02
RestorableInt

플러터 구현은 크게 플러터와 엔진으로 구분.

플러터는 인텔리제이로 개발하는 것 같고 (안드로이드 스튜디오로 했더니 잘 안됨), 엔진은 VS Code로 하는 것 같은데 안드로이드 스튜디오와 XCode를 써야 할까?

RestorableValue를 iOS에서 쓸려면 Flutter View Controller를 찾아 Restoration ID를 설정해야 한다고 함.

@dalinaum
dalinaum / Dice3.java
Last active July 27, 2023 16:53
주사위 게임 3
import java.util.Collections;
import java.util.HashMap;
class Solution {
public int solution(int a, int b, int c, int d) {
HashMap<Integer, Integer> map = new HashMap<>();
map.put(a, map.getOrDefault(a, 0) + 1);
map.put(b, map.getOrDefault(b, 0) + 1);
map.put(c, map.getOrDefault(c, 0) + 1);
map.put(d, map.getOrDefault(d, 0) + 1);
@dalinaum
dalinaum / Solution.java
Last active July 4, 2023 07:53
programmer 181921
import java.util.ArrayList;
class Solution {
public int[] solution(int l, int r) {
ArrayList<Integer> result = new ArrayList();
for (int i = l; i <= r; ++i) {
String value = String.valueOf(i);
boolean matched = true;
for (int j = 0; j < value.length(); ++j) {
@dalinaum
dalinaum / Solution.java
Created July 3, 2023 07:09
programmers 181923
class Solution {
public int[] solution(int[] arr, int[][] queries) {
int[] answer = new int[queries.length];
for (int i = 0; i < queries.length; i++) {
final int s = queries[i][0];
final int e = queries[i][1];
final int k = queries[i][2];
int minValue = Integer.MAX_VALUE;
print("Hello")
@dalinaum
dalinaum / PipeForward.md
Created April 18, 2023 14:21 — forked from nishanthvijayan/PipeForward.md
Simple Pipe forward operator in Kotlin

Here I try to implement a simple pipe forward operator similar to |> operator in Elixir or the andThen operator in Scala

Let's say you have a need for doing something like this

val x = f("something")
val y = g(x)
val z = h(y)

This is also equivalent to saying:

@dalinaum
dalinaum / 1.py
Last active February 8, 2023 12:22
import FinanceDataReader as fdr
import os.path
import pandas as pd
data_exists = os.path.exists('data.csv')
if data_exists:
print("데이터를 이미 받아왔습니다.")
data = pd.read_csv('data.csv', parse_dates=['Date'], index_col=['Date'])
else:
@dalinaum
dalinaum / config.yaml
Created January 13, 2023 04:56
변동성 돌파 테스트
#홈페이지에서 API서비스 신청시 받은 Appkey, Appsecret 값 설정
APP_KEY: "XXXX"
APP_SECRET: "XXXX"
#계좌번호 앞 8자리
CANO: "70502290"
#계좌번호 뒤 2자리
ACNT_PRDT_CD: "01"
#실전투자
import requests
import json
import datetime
import time
import yaml
with open('config.yaml', encoding='UTF-8') as f:
_cfg = yaml.load(f, Loader=yaml.FullLoader)
APP_KEY = _cfg['APP_KEY']
APP_SECRET = _cfg['APP_SECRET']
@dalinaum
dalinaum / wtf-selenium.py
Last active October 19, 2022 16:22
wtf-selenium.py
#!/usr/bin/env python
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
chrome_path = 'armmac/chromedriver'
driver = webdriver.Chrome(chrome_path)