Skip to content

Instantly share code, notes, and snippets.

View sairam4123's full-sized avatar
👨‍💻
Working on a fun project in Godot 4.2

Sairam M sairam4123

👨‍💻
Working on a fun project in Godot 4.2
View GitHub Profile
import itertools
import random
logs = []
old_print = print
def new_print(*args, **kwargs):
logs.append((args, kwargs))
print = new_print
# 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.")
@sairam4123
sairam4123 / data_gen.py
Created September 30, 2024 04:52
Just trying out random stuff to build.. (bored)
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

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()
@sairam4123
sairam4123 / c_sharp_for_python.md
Last active September 20, 2020 18:41 — forked from arunavo4/c_sharp_for_python.md
An intro to C# for a Python developer. Made for one of my coworkers.

C# For Python Programmers

Syntax and core concepts

Basic Syntax

  • 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,

@sairam4123
sairam4123 / emoji_map.json
Created June 10, 2020 10:45 — forked from Vexs/emoji_map.json
Discord emoji mapping. This is a JSON file! Please load it with json. Attempting to copy-paste it directly into python will not work! For diversity, see: https://gist.github.com/Vexs/9e4c14d41161590ca94d0d21e456fef0
{
"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",
@sairam4123
sairam4123 / emoji_map_diversity.json
Created June 10, 2020 10:45 — forked from Vexs/emoji_map_diversity.json
Discord emoji mapping, now with diversity!
{
"grinning": {
"emoji": "\ud83d\ude00"
},
"smiley": {
"emoji": "\ud83d\ude03"
},
"smile": {
"emoji": "\ud83d\ude04"
},