Skip to content

Instantly share code, notes, and snippets.

View Lanlanb's full-sized avatar
🎯
Focusing

Bulan Nurlaela Lanlanb

🎯
Focusing
View GitHub Profile
def init():
print("Welcome to tic tac toe!\nWe will start with choosing teams.")
one = input("Player 1, do you want to be O or X: ").upper()
one = one if one in ("O", "X") else "O"
two = "O" if one == "X" else "X"
board = [[" " for _ in range(3)] for _ in range(3)]
return one, two, board
def show(matrix, columns):
print(" 1 2 3 \n ---+---+---")

🕒 JKT48 Last PM

Last updated: 2024-11-07 04:30 WIB
🔗 JKT48Live

Member Last PM
Adel Jumat, 4/10/2024 17:53 WIB
Alya Rabu, 6/11/2024 20:53 WIB
const MY_DOMAIN = 'rezaarkan.com';
const SLUG_TO_PAGE = {
'': '882cd6dd6e1e482d823b464f326213e5',
'now': '25b7df64071d420d8f609bf76d9f4114',
'portfolio': '6000547bed0d441793bfba1498c063e2',
'resume': '0934b80d2d1544f99dedadb00be9d146',
'recommendations': '29115129efa44f1a870f390dd2c0a6c0',
'photos': 'e78c0492a5ec486aa51f4cdb2c6f4603',
'blog': '29bb193c1a104ba2b832788b57d58cd6',
@Coldsp33d
Coldsp33d / iter_vs_vec_benchmark.py
Last active November 8, 2024 13:59
Comparing iteration and vectorisation with a simple example
import perfplot
import pandas as pd
def vec(df):
return df['A'] + df['B']
def vec_numpy(df):
return df['A'].to_numpy() + df['B'].to_numpy()
def list_comp(df):