Skip to content

Instantly share code, notes, and snippets.

View dsfb's full-sized avatar
🎯
Focusing

Daniel Bruno dsfb

🎯
Focusing
View GitHub Profile
@Mr-Precise
Mr-Precise / vs_buildtools_dl_list.md
Created February 28, 2024 05:33
MSVC / VS / Buildtools download link collection list
@FilipeChagasDev
FilipeChagasDev / julia_regression.py
Last active November 23, 2023 19:02
This code is a Python implementation of the Julia Regression method for calculating the square root of a natural number.
def sqrt_julia_regression(x, first_trial_root=1):
"""
Function that calculates the square root of an natural number using the Julia Regression Method.
Params:
x (int) - Natural input number
first_trial_root (int) - First root to try
Return (int): natural root found or None
"""
current_root = first_trial_root
current_square = first_trial_root**2
@Gaelan
Gaelan / README.md
Last active June 18, 2025 09:27
ChatGPT passes the 2022 APCSA free response section

ChatGPT passes the 2022 AP Computer Science A free response section

For fun, I had ChatGPT take the free response section of the 2022 AP Computer Science A exam. (The exam also has a multiple-choice section, but the College Board doesn't publish this.) It scored 32/36.

Methodology

  • For each question, I pasted in the full text of the question and took the response given.
  • I tried each question once and took the response given: no cherry-picking. For readability, I've added indentation in some cases, and included method signatures where they were provided in the question and ChatGPT only provided a body. I've added question numbers; any other comments are ChatGPT's.
  • Many questions have examples containing tables or diagrams; because those don't translate well to plain text, I excluded those tables/diagrams and any text that referenced them.
  • I excluded the initial instructions at the top of th
@ivan-pi
ivan-pi / fortran_links.md
Created January 20, 2022 13:52
Resources on Fortran
@chandraseta
chandraseta / thanos_sort.py
Last active March 27, 2024 15:22
Implementation of Thanos Sort in Python
from random import sample
from typing import List
def thanos_sort(items: List, reverse: bool = False) -> List:
""" Sorts a list by snapping the list until it is sorted.
"Because you murdered half the planet!"
"A small price to pay for salvation."
@prologic
prologic / LearnGoIn5mins.md
Last active August 12, 2025 02:24
Learn Go in ~5mins
@ityonemo
ityonemo / test.md
Last active October 21, 2025 09:09
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@RobinCPC
RobinCPC / wine_setup.md
Last active July 31, 2025 14:13
Wine Setup

Install Wine with Mono & Gecko in Ubuntu 20.04

Warning: Do not try those command in your main PC, I test in a virtual Machine

Note: Most of commands are from the Dockerfile in Reference section. If you want to test wine, just run their docker container

1. Setup PPA

sudo dpkg --add-architecture i386
wget -qO - https://dl.winehq.org/wine-builds/winehq.key | sudo tee /etc/apt/trusted.gpg.d/winehq.asc
@rtimmons
rtimmons / slides.md
Created June 21, 2018 18:11
Learning C++ The Hard Way

Welcome

Who is this guy?

Goal(s)

  1. Don't WTF quite so much when looking at C++ PRs
  2. Know what you don't know (so you know what to look up to learn more)

Agenda

@andreidbr
andreidbr / soundPlayingTest.java
Last active April 22, 2021 15:21
A Selenium test to check if a sound is playing / has played
@Test(testName = "Listen for Sound", description = "Check that, when clicking the 'A' key, a sound is played", groups = {"01Drums"})
public void soundPlayTest() throws InterruptedException {
driver.findElement(By.xpath("/html/body/div[2]/div[1]")).click();
WebElement aKey = driver.findElement(By.xpath("/html/body/div/div[1]"));
Actions builder = new Actions(driver);
Action sendAKey = builder.moveToElement(aKey).sendKeys("A").build();
sendAKey.perform();
Thread.sleep(1000);
WebElement audio = driver.findElement(By.tagName("audio"));