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 <stdio.h> | |
#include <stdlib.h> | |
// void * return type means that it returns a naked pointer, which is just an address. | |
void *foo(void) { | |
long *bar_ptr = malloc(sizeof(long)); | |
*bar_ptr = 5; | |
printf("The data is held at address: %p, holds %ld bytes\n", bar_ptr, sizeof(long)); | |
free(bar_ptr); | |
return (void *) bar_ptr; |
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
#!/usr/local/bin/python3 | |
""" | |
This script should idempotently grab the stuff that's newly added to Pocket to pocket.md | |
You'll need to install https://airtable-python-wrapper.readthedocs.io, i.e. via: | |
$ pip3 install airtable-python-wrapper | |
and, of course, sign up for an Airtable account (free seems to work fine). | |
""" |
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
""" | |
This script exports the AutoGPT-Q Llama 2 weights in llama2rs.bin format. | |
""" | |
import pathlib | |
import click | |
import struct | |
import torch | |
from torch import nn | |
from auto_gptq import AutoGPTQForCausalLM | |
from auto_gptq.nn_modules import qlinear |
OlderNewer