Skip to content

Instantly share code, notes, and snippets.

View andraantariksa's full-sized avatar
🦀

Andra Antariksa andraantariksa

🦀
View GitHub Profile
@andraantariksa
andraantariksa / Scrollbar.kt
Last active January 22, 2024 09:38 — forked from mxalbert1996/Scrollbar.kt
Modifiers to draw scrollbars in Jetpack Compose
/*
* MIT License
*
* Copyright (c) 2022 Albert Chang & Andra Antariksa
*
* 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
@andraantariksa
andraantariksa / testrunner.py
Created September 14, 2022 03:15 — forked from cessor/testrunner.py
StopwatchTestRunner
import time
import statistics
import unittest
from unittest import TextTestRunner
from django.test.runner import DiscoverRunner
class StopwatchTestResult(unittest.TextTestResult):
"""
Times test runs and formats the result
class SomeTypedDict(TypedDict):
brands = forms.ModelChoiceField(required=True, queryset=None)
class MerchantBrandsForm(forms.Form, SomeTypedDict):
fields: SomeTypedDict
def __init__(self: merchant: Merchant, *args: Any, **kwargs: Any):
super().__init__(*args, **kwargs)
self.fields['brands'].queryset = merchant.brands.all()
1. Register yourself to github.com
2. Fork the repository
3. Clone repository to your machine
4. Checkout to the new branch
5. Create a file in `student` folder
6. Commit your work
7. Push it to remote or internet
8. Open a pull request
Learning resource:
@andraantariksa
andraantariksa / README.md
Last active October 29, 2020 01:16
Add gpedit.msc in Windows 10 Home

Run gpedit-windows-10-home.bat using administrator rights

@andraantariksa
andraantariksa / MainClient.java
Last active October 28, 2020 12:54
Simple Java socket client
package io.github.andraantariksa;
import java.io.*;
import java.net.Socket;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.Date;
import java.util.Scanner;
public class MainClient {
#include "RenderSystem.hpp"
#include <SFML/Graphics.hpp>
#include <entt/entt.hpp>
#include <glm/glm.hpp>
#include <cmath>
#include "../Component/TransformComponent.hpp"
#include "../Component/SphereComponent.hpp"
#include "../Util/Logger.hpp"
y(t) = A*sin(2*π*f*t+φ) = A*sin(ω*t+φ)
ω = 2*π*f = 2*π/T
https://www.desmos.com/calculator/6ssiybs0a4
https://colab.research.google.com/drive/1JlgHLRYjPBKEg3JaRkNFSCs_dR8VIqkw?usp=sharing
https://docs.google.com/spreadsheets/d/1SNW_uQUGfa2uRMes6wyxcePPoHzMR9EoJQIrwyl7KlY/edit?ts=5f584788#gid=0
T = Period (s)
A = Amplitude (Not constant), depend on how many cycle
f = Frequency (How many cycle in a second) (Hz or rad/s)
@andraantariksa
andraantariksa / RUST_QUINE.md
Created September 9, 2020 19:40
Rust Quine in one line

A quine is a computer program which takes no input and produces a copy of its own source code as its only output. The standard terms for these programs in the computability theory and computer science literature are "self-replicating programs", "self-reproducing programs", and "self-copying programs".

https://en.wikipedia.org/wiki/Quine_(computing)

@andraantariksa
andraantariksa / gist:1a3984d0e68bd9a3d3c5da854fbf2aef
Last active September 16, 2020 11:48
Software Engineering Notes
Mid 35
Final 35
*Exam is open book
Quiz/Assignment 30
*Project is individual except for the final project (Max 4 person)
Assignment may start from Week 4
Mid example
Create class diagram from some use cases