Skip to content

Instantly share code, notes, and snippets.

@Auctoris
Auctoris / LLL_LeetCode.c
Created January 1, 2023 16:34
LLL Leet Code Example
/**
* Note: The returned array must be malloced, assume caller calls free().
*/
__attribute__ ((naked)) int* twoSum(int* nums,
int numsSize,
int target,
int* returnSize)
{
/* Inline assembly version - using AT&T syntax... */
__asm__(".intel_syntax noprefix;\
@Auctoris
Auctoris / demo.py
Created June 6, 2022 18:12
An Argparse example
import argparse
import sys
# Our goal here is to illustrate a simple example of how to use
# argparse to handle a slightly non-trivial (but quite common) case.
#
# This is inspired by an example in this video:
# https://www.youtube.com/watch?v=26mEa1Ojux8
#
# What we want to do, is to have a tool that we can run in one
@Auctoris
Auctoris / hello.cpp
Created May 27, 2016 11:31
Hello World
#include <iostream>
int main()
{
std::cout << "Hello World!" << std::endl;
return 0;
}