Executable and Linkable Format (ELF), is the default binary format on Linux-based systems.
This file contains hidden or 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 av | |
import numpy as np | |
import mlx.core as mx | |
def conway(a: mx.array): | |
source = """ | |
uint i = thread_position_in_grid.x; | |
uint j = thread_position_in_grid.y; | |
uint n = threads_per_grid.x; |
This file contains hidden or 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
#!/usr/bin/env python | |
# parse_toc.py | |
from pdfminer.pdfparser import PDFParser | |
from pdfminer.pdfdocument import PDFDocument | |
def parse(filename, maxlevel): | |
fp = open(filename, 'rb') | |
parser = PDFParser(fp) | |
doc = PDFDocument(parser) |
This file contains hidden or 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
static int cf_tolua(lua_State *L) { | |
lua_pushliteral(L, "hello"); | |
return 1; | |
} | |
static int cf_fromlua(lua_State *L) { | |
const char *str = lua_tostring(L, 1); // first argument passed in; second would be at index 2 | |
printf("%s\n", str); | |
return 0; | |
} |
This file contains hidden or 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
# gcc -Wall -o match match.c && ./match | |
# | |
#include <stdio.h> | |
#include <string.h> | |
#include <regex.h> | |
This file contains hidden or 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
console.log(1); | |
(_ => console.log(2))(); | |
eval('console.log(3);'); | |
console.log.call(null, 4); | |
console.log.apply(null, [5]); | |
new Function('console.log(6)')(); | |
Reflect.apply(console.log, null, [7]) | |
Reflect.construct(function(){console.log(8)}, []); | |
Function.prototype.apply.call(console.log, null, [9]); | |
Function.prototype.call.call(console.log, null, 10); |
Vim regular expressions are powerful, but they pre-date Perl.
This can be frustrating since the Perl-flavored-regex syntax has expanded beyond into other programming languages and contexts, becoming a de-facto standard.
This guide is a quick cheatsheet and tipsheet for using regular expressions in Vim for those who may be more familiar with Perl.
This file contains hidden or 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 <stdio.h> | |
#include <stdlib.h> | |
#include "array_api.h" | |
// abstract array data type types | |
// opaque pointer: | |
// an ADT implementation hidden behind the interface that is abstract to | |
// the client, making it easier to maintain, apply changes and improve | |
// in this example the array_t data type provides a bunch of functins |
NewerOlder