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
try: | |
assert requests.get("googlgg.com").status_code == 200 | |
assert requests.get("abcx.com").status_code == 200 | |
except AssertionError: | |
print("?!") |
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
export FZF_DEFAULT_OPTS="--ansi --preview-window 'right:60%' --preview 'bat --color=always --style=header,grid --line-range :300 {}'" |
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
use std::fs::File; | |
use std::io; | |
use std::io::Read; | |
fn beginner() -> Result<String, io::Error> { | |
let f = File::open("hello.txt"); | |
let mut f = match f { | |
Ok(file) => file, | |
Err(e) => return Err(e), |
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 numpy as np | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
import serial | |
import platform | |
import time | |
import datetime | |
import csv | |
import re |
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
data.get('key1', {}).get('key2') | |
data.get('key1', {}).get('key2', {}).get('key3', {}) | |
data.get('key1', {}).get('key2', {}).get('key3', {}).get('key4', {}) |
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
data = { | |
"key1": { | |
"key2": { | |
"key3": "help me!!" | |
} | |
} | |
} |
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
gifts = ["ipad", "air-pot", "8k display"] | |
copy_gifts = gifts[:] | |
gifts[0] = "macbook-pro" | |
# lets guess copy_gifts! | |
# 결과값을 한번 예상해보자. |
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
gifts = ["ipad", "air-pot", "8k display"] | |
copy_gifts = gifts | |
gifts[0] = "macbook-pro" | |
# lets guess copy_gifts! | |
# 결과값을 한번 예상해보자. |
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
e = ["a", "b", "c"] | |
f = [1, 2, 3] | |
zip(e, f) | |
# <zip at 0x10a37af08> | |
dict(e, f) | |
# {'a': 1, 'b': 2, 'c': 3} |
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
my_dictionary = {"a": 1, "b": 2, "c": 3} | |
# {'a': 1, 'b': 2, 'c': 3} | |
my_dictionary.keys() | |
# dict_keys(['a', 'b', 'c']) | |
list(my_dictionary.keys()) | |
# ['a', 'b', 'c'] | |
assert 'a' in my_dictionary.keys() |