Skip to content

Instantly share code, notes, and snippets.

View chemicalfiend's full-sized avatar

Pranay Venkatesh chemicalfiend

View GitHub Profile
@chemicalfiend
chemicalfiend / wall.jl
Created May 3, 2023 11:01
Simulation of a fluid against a moving wall.
#=
Simulation of a fluid mounted against a moving wall. Plots the velocity profile Vx(y) and showcases how it changes.
=#
using GLMakie
using Makie.Colors
@chemicalfiend
chemicalfiend / monopoly.py
Created August 14, 2022 06:47
Monopoly in Python
# A simple two player Monopoly game in python
# Everything except rent, houses and prison
# Requires images to be added in same directory to play
import pygame
import random
pygame.init()
win = pygame.display.set_mode((1000, 1100))
@chemicalfiend
chemicalfiend / tsp.py
Created August 14, 2022 05:57
Simulated Annealing Simulation for Travelling Salesman Problem
"""
Solving TSP using Simulated Annealing
Author : Pranay Venkatesh
Oh, ya, the cities are replaced with planets and the salesman is an Imperial Fleet trying to save fuel.
"""
import numpy as np
from random import shuffle, randint, uniform
tour = []
@chemicalfiend
chemicalfiend / pib.py
Created August 14, 2022 05:48
Particle in a box simulator in Python
"""
A plotting tool for 3D particle in a box.
Pranay Venkatesh
"""
import math
import numpy as np
import matplotlib.pyplot as plt
from scipy.constants import h, hbar
from mpl_toolkits.mplot3d import Axes3D
@chemicalfiend
chemicalfiend / schoolSystem.java
Created August 14, 2022 05:46
schoolSystem 10th grade project
/**
* This application creates a Time Table based on a given set of inputs.
*
* @author Pranay Venkatesh
* @version 1.0
*
*/
//headers
import java.util.ArrayList; //This is used for creating a list of teachers.
@chemicalfiend
chemicalfiend / syndicate.java
Created August 14, 2022 05:44
syndicate game (10th grade project)
import java.util.ArrayList;
import java.util.Scanner;
public class SyndicateV2 {
ArrayList <Player> players;
ArrayList <String> placeNames;
ArrayList <Place> board;
ArrayList <Stock> StockMarket;
ArrayList <Seat> Parliament;
ArrayList <Party> parties;
@chemicalfiend
chemicalfiend / civ.md
Created August 7, 2022 06:03
Getting Civ6 to work on ArchLinux

cd "~/.steam/steam/steamapps/common/Sid Meier's Civilization VI/GameGuide/lib" mv libfreetype.so.6 libfreetype.so.6.old

@chemicalfiend
chemicalfiend / makie-arch.md
Created August 6, 2022 04:18
getting GLMakie on Arch Linux

Installing Makie on Arch Linux (no GPU needed)

Getting Makie setup on Linux when you don't have a GPU can be a pain.

Try first getting makie by the standard ] add GLMakie on Julia. if it fails to precompile, you might lack some of the video drivers necessary. Try : doas pacman -S mesa mesa-utils xorg-dev and get all the necessary OpenGL stuff too. Then reboot your system.

The next step is to get rid of a pesky file. Go to [julia-version]/lib/julia/ and delete the libstdc++.so.6. Maybe reboot again? This may not be necessary.

Now start a Julia REPL and try using GLMakie . It should work.