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
#include <iostream> | |
int main() | |
{ | |
std::cout << "Hello World!" << std::endl; | |
return 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
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 |
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
/** | |
* 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;\ |