Skip to content

Instantly share code, notes, and snippets.

View florestankorp's full-sized avatar
🇳🇱

Florestan Korp florestankorp

🇳🇱
View GitHub Profile
@florestankorp
florestankorp / student.py
Last active December 24, 2025 21:45
A Python class-based system for tracking student grades across multiple subjects. Features automatic ID generation, grade management, and statistical calculations.
class Student:
students = {}
def __init__(self, id, name):
self.id = id
self.name = name
self.grades = {}
def __str__(self):
class Book:
"""A book of a library"""
def __init__(self, title, author, borrowed=False):
self.title = title
self.author = author
self.is_borrowed = borrowed
def __str__(self):
return f"Title: {self.title}, Author: {self.author}, Borrowed: {'Yes' if self.is_borrowed else 'No'}"
@florestankorp
florestankorp / best-books.js
Created January 29, 2020 13:53
Mapping an array to object with default keys
const BOOKS = [
'1',
'The Stranger\nThe Outsider',
'Albert Camus',
'1942',
'French',
'2',
'In Search of Lost Time\nRemembrance of Things Past',
'Marcel Proust',
'1913–27',
@florestankorp
florestankorp / my-app.ts
Last active January 29, 2025 15:46
Minimal example of effect
/* eslint-disable max-classes-per-file */
/* eslint-disable @angular-eslint/component-selector */
import {
ChangeDetectionStrategy,
Component,
effect,
inject,
Injectable,
OnInit,
@florestankorp
florestankorp / README.md
Last active July 11, 2024 09:36
Scenario based API mocking with `ng-apimock`

Scenario based API mocking with ng-apimock

Overview

ng-apimock is a tool that provides scenario based API mocking. It can be used to test and develop applications without the need of a backend. Alternatively you can also chose to let certain calls through to the actual backend and apply mocking selectively.

@florestankorp
florestankorp / .eslintrc.json
Last active June 18, 2024 07:40
ESLint config (frontend)
{
"extends": ["../../../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"rules": {
"@angular-eslint/directive-selector": [
"error",
{
@florestankorp
florestankorp / .eslintrc.json
Created June 17, 2024 21:59
ESLint config (workspace)
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"project": ["./tsconfig.base.json"]
"""
Tic Tac Toe Player
"""
import math
import random
import copy
X = "X"
O = "O"
@florestankorp
florestankorp / most-popular-sport-type-in-movies.js
Created February 12, 2022 20:42
Data analysis of the most popular type of sport in sports-movies
@florestankorp
florestankorp / .eslintrc.js
Created April 19, 2021 13:52
ES Lint Rules
module.exports = {
ignorePatterns: ['.eslintrc.js'],
env: {
browser: true,
es6: true,
},
parser: '@typescript-eslint/parser',
parserOptions: {
project: 'tsconfig.json',
sourceType: 'module',