This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def build(x: int, y: int, level, components: dict) -> List[Particle]: | |
particle_width = 1 | |
particle_height = 1 | |
random_width_offset = random.randint(-8, 8) | |
random_height_offset = random.randint(-4, 4) | |
valid_velocities = [ | |
[{'x': 0, 'y': 1}], | |
[{'x': 0, 'y': -1}], | |
[{'x': 1, 'y': 0}], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from collections import namedtuple | |
from typing import Tuple | |
cells: dict[Tuple[int, int], list] = { | |
(i, j) : [] | |
for i in range(10) | |
for j in range(10) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pygame | |
from src.countdown_timer import CountdownTimer | |
import src.config.events as e | |
class Animates: | |
def __init__( | |
self, | |
parent: pygame.sprite.Sprite, | |
frames, | |
named_frames: dict = {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface PaymentProvider | |
{ | |
public function purchase(); | |
} | |
class BrainTreePaymentProvider implements PaymentProvider | |
{ | |
public function purchase() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
function report_unused_functions() { | |
# Find the function | |
# Remove the ampersands for pass by reference functions | |
# Remove everything after and including the ( in the function name | |
git grep -Ei '(public|private|protected) function' $1 | awk '{print $4}' | tr -d '&' | cut -f1 -d"(" | while read -r function ; do | |
match_count="$(git grep -i $function| wc -l)" |