Skip to content

Instantly share code, notes, and snippets.

View Taresin's full-sized avatar

Dougy Lee Taresin

View GitHub Profile
# ---------------------------------------------------------------------------- #
# #
# Module: main.py #
# Author: dougy #
# Created: 2/12/2026, 11:14:38 PM #
# #
# Project: Fighter Controller #
# Description: This project upgrades the use of the controller to use #
# fighting game style inputs to control the AIM Robot #
# #
@Taresin
Taresin / vex_scissors_paper_rock.py
Created February 11, 2026 10:16
his project will demonstrate Robot to Robot messaging using a simple Scissors Paper Rock game
# ---------------------------------------------------------------------------- #
# #
# Module: main.py #
# Author: dougy lee #
# Created: 2/7/2026, 8:53:10 AM #
# #
# Project: Scissors Paper Rock #
# Description: This project will demonstrate Robot to Robot messaging #
# using a simple Scissors Paper Rock game #
# #
# MIT License
#
# Copyright (c) 2026
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
@Taresin
Taresin / __sydney_trains_baseline_script_story.md
Last active February 5, 2025 03:50
Write a python script that creates a baseline betweenness centrality scores for the Sydney trains network

Scripting Story

I’ll need to interact with the Neo 4J database using the Python driver.

The package that I used was the neo4J library.

Install that and import the graph database driver.

from neo4j import GraphDatabase
@Taresin
Taresin / _sydney_trains_betweenness.cypher
Created February 3, 2025 11:27
Calculating the betweenness centrality property of Sydney Trains nodes
CALL gds.graph.project.cypher(
'projection_trains',
'MATCH (s:Stop) RETURN id(s) AS id',
'MATCH (s:Stop)-[:NEXT_STOP]->(t:Stop) RETURN id(s) AS source, id(t) AS target, "NEXT_STOP" AS type'
);
CALL gds.betweenness.write('projection_trains', {
writeProperty: 'betweennessCentrality'
});
@Taresin
Taresin / _create_station_relationships.py
Last active February 3, 2025 09:41
Adding all the train stations on the Sydney trains network into a knowledge graph
import os
# Iterate through all .txt files in "data" folder
if not os.path.exists("output"):
os.makedirs("output")
station_list = set()
for file in os.listdir("data"):
if file.endswith(".txt"):
text = open("data/{}".format(file), "r").read().split("\n")
@Taresin
Taresin / harry_potter_relationships.cypher
Last active February 2, 2025 10:20
Fetching and processing CSV data of the character relationships of Harry Potter
// Basic import from a CSV file hosted online
LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/efekarakus/potter-network/master/data/characters.csv' AS character
CREATE (c:Character {
id: character.id,
name: character.name,
bio: character.bio
});
LOAD CSV WITH HEADERS FROM 'https://raw.githubusercontent.com/efekarakus/potter-network/master/data/relations.csv' AS relationship
@Taresin
Taresin / dates.csv
Last active January 31, 2025 06:09
Creating a random set of Tinder users and pairing them up in dates
a b
98 43
39 93
28 99
28 41
74 51
74 48
18 30
51 10
51 44
# ==============================================================================
# Title: Taxi-V3 OpenAI Gym Environment Update
# Author: Taresin
# Date: 26/02/2024
#
# Description: This code is an update to a previously existing Gist for OpenAI Gym
# environments. It incorporates fixes the functionality
# with compatibility to the new Gymnasium library. The update is based on the original work found in Aske Plaat's
# book "Deep Reinforcement Learning" and the original code by Geffy available at
# https://gist.github.com/geffy/b2d16d01cbca1ae9e13f11f678fa96fd
#!/usr/bin/env bash
# Creates a file called test.txt
FILE_NAME="chmod_game.txt"
get_random() {
shuf -i 0-$1 -n 1
}
owner=$(get_random 7)