Skip to content

Instantly share code, notes, and snippets.

View Mur3ph's full-sized avatar
🤠
RESTafarian

Paul Murphy Mur3ph

🤠
RESTafarian
View GitHub Profile
@vasanthk
vasanthk / System Design.md
Last active March 13, 2026 10:40
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@jahe
jahe / spring-boot-cheatsheet.java
Last active September 3, 2025 14:31
Spring Boot Cheatsheet
// Enable component-scanning and auto-configuration with @SpringBootApplication Annotation
// It combines @Configuration + @ComponentScan + @EnableAutoConfiguration
@SpringBootApplication
public class FooApplication {
public static void main(String[] args) {
// Bootstrap the application
SpringApplication.run(FooApplication.class, args);
}
}
@ripla
ripla / InfiniteStreams.scala
Created July 7, 2015 12:29
Creating infinite streams from a function
//Get a new Stream that always calls the given function when a new value
//is needed.
def stream(): Source[Int, Unit] =
Source(() => Iterator.continually(createValue()))
//Just an example, could be anything
def createValue(): Int = Random.nextInt()
@marinhoarthur
marinhoarthur / Algorithm.py
Last active May 5, 2022 12:39
A simple genetic algorithm written in Python fully based on an article by Lee Jacobson from his blog theprojectspot.com
from Population import Population
from Individual import Individual
from random import random, randint
class Algorithm():
#Constants
Uniform_rate = 0.5
Mutation_rate = 0.015
Tournament_size = 5
@turbofart
turbofart / tsp.py
Created August 22, 2012 20:06
Applying a genetic algorithm to the travelling salesman problem
#!/usr/bin/env python
"""
This Python code is based on Java code by Lee Jacobson found in an article
entitled "Applying a genetic algorithm to the travelling salesman problem"
that can be found at: http://goo.gl/cJEY1
"""
import math
import random