- Each folder (node) holds multiple documents (keys).
- When a folder gets too full, we split it into new folders.
- When a folder has too few documents, we borrow or merge with others.
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
num_sem = 3 | |
credits = [22, 26, 23.5] | |
total_gp = 0 | |
total_credits = sum(credits) | |
for i in range(num_sem): | |
gpa = float(input(f"Enter gpa for sem {i+1}:")) | |
gp = gpa * credits[i] | |
total_gp += gp |
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 itertools | |
import random | |
logs = [] | |
old_print = print | |
def new_print(*args, **kwargs): | |
logs.append((args, kwargs)) | |
print = new_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
# Generates characters | |
class Gen: | |
def __getitem__(self, items): | |
if isinstance(items, slice): | |
start = ord(items.start) | |
end = ord(items.stop) | |
return [chr(char) for char in range(start, end+1)] | |
raise AttributeError("Only slices are allowed.") |
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 random | |
import pandas | |
names = [] | |
with open("names_list.txt") as f: | |
for line in f.readlines(): | |
line = line.strip() | |
idx, first, last = line.split(" ") | |
line = f"{first} {last}" | |
names.append(line) |
[Intro] [Instrumental]
There was a train station catering to millions.
[Verse 1] Everyday trains come by and halt at this station, millions get on the train
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
extends GridMap | |
enum Roads {ROAD_END = 9, ROAD_STARIGHT = 15, ROAD_CURVE = 11, ROAD_EMPTY = 12, ROAD_3_WAY = 13, ROAD_4_WAY = 14} | |
const RAY_LENGTH = 1000 | |
var send_ray = false | |
var event_position = Vector2(0, 0) | |
var camera = null | |
var last_road: Vector3 = Vector3() |
-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
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
{ | |
"grinning": "\ud83d\ude00", | |
"smiley": "\ud83d\ude03", | |
"smile": "\ud83d\ude04", | |
"grin": "\ud83d\ude01", | |
"laughing": "\ud83d\ude06", | |
"satisfied": "\ud83d\ude06", | |
"sweat_smile": "\ud83d\ude05", | |
"joy": "\ud83d\ude02", | |
"rofl": "\ud83e\udd23", |
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
{ | |
"grinning": { | |
"emoji": "\ud83d\ude00" | |
}, | |
"smiley": { | |
"emoji": "\ud83d\ude03" | |
}, | |
"smile": { | |
"emoji": "\ud83d\ude04" | |
}, |