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
git submodule update --init --recursive |
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
fn build_computer(name: String, model: String) -> Computer { | |
Computer { | |
name: name, | |
model: model, | |
cpu: 8, | |
ram_size: 1024, | |
} | |
} | |
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
#[test] | |
fn indexed_string_test() { | |
let mut s = "hello slice literal"; | |
let is_okay = &s[0..1]; | |
let is_not_okay = &s[1]; | |
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() |
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
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
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
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
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 |