Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
C > Rust > Go > TypeScript > C++

Samuel Marks SamuelMarks

:octocat:
C > Rust > Go > TypeScript > C++
View GitHub Profile
View log
This file has been truncated, but you can view the full file.
/usr/bin/cmake -S/ROCm/ROCm-CompilerSupport/lib/comgr -B/ROCm/ROCm-CompilerSupport/lib/comgr/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/bin/cmake -E cmake_progress_start /ROCm/ROCm-CompilerSupport/lib/comgr/build/CMakeFiles /ROCm/ROCm-CompilerSupport/lib/comgr/build//CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
make -f CMakeFiles/bc2h.dir/build.make CMakeFiles/bc2h.dir/depend
make[2]: Entering directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
cd /ROCm/ROCm-CompilerSupport/lib/comgr/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /ROCm/ROCm-CompilerSupport/lib/comgr /ROCm/ROCm-CompilerSupport/lib/comgr /ROCm/ROCm-CompilerSupport/lib/comgr/build /ROCm/ROCm-CompilerSupport/lib/comgr/build /ROCm/ROCm-CompilerSupport/lib/comgr/build/CMakeFiles/bc2h.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/ROCm/ROCm-CompilerSupport/lib/comgr/build'
make -f CMakeFiles/bc2h.dir/build.make CMakeFi
View postgres_copy_from_array.py
from io import StringIO
from json import dumps
from itertools import repeat
from collections import namedtuple
from pprint import PrettyPrinter
import psycopg2
import psycopg2.sql
import numpy as np
@SamuelMarks
SamuelMarks / CMakeLists.txt
Created September 18, 2022 14:06
CMake hacks to create a Bundle for macOS
View CMakeLists.txt
if (BUILD_APPLE_BUNDLE)
set(EXEC_NAME "MyUI")
else ()
get_filename_component(EXEC_NAME "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
string(APPEND EXEC_NAME "-${PROJECT_VERSION}")
endif ()
set(Source_Files "main.c")
source_group("Source Files" FILES "${Source_Files}")
@SamuelMarks
SamuelMarks / DOMAIN.conf
Created September 3, 2022 19:26
nginx conf for Jupyter Notebook
View DOMAIN.conf
# /etc/nginx/sites-enabled/DOMAIN.conf
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 80;
server_name DOMAIN_NAME;
@SamuelMarks
SamuelMarks / main.c
Last active February 14, 2022 03:41
Experiments with simple HTTP socket server in C
View main.c
#include "server_attempt_6.c"
/* just a hack for this gist^, for attempts 0-5 see revision <17 */
int main(void) {
int code;
char *response = calloc(PIPE_BUF + 1, sizeof(char));
if (response == NULL) {
const int _code = fputs("OOM", stderr);
if (_code == EOF) exit(_code);
exit(EAI_MEMORY);
@SamuelMarks
SamuelMarks / Proposal.md
Created July 20, 2021 04:21
Decentralised game console
View Proposal.md

Project proposal

Multiple phones + TV gaming.

Why

You arrive at a mate's place and they don't have a console. But. You. Must. Game.

(also who wants to buy a console?)

View versions_export.gcc.h
#ifndef VERSIONS_EXPORT_H
#define VERSIONS_EXPORT_H
#ifdef VERSIONS_STATIC_DEFINE
# define VERSIONS_EXPORT
# define VERSIONS_NO_EXPORT
#else
# ifndef VERSIONS_EXPORT
# ifdef versions_EXPORTS
@SamuelMarks
SamuelMarks / Makefile
Created August 17, 2020 08:49
Thesis Makefile. Entire Thesis will be open-sourced once the university has accepted it.
View Makefile
SHELL := bash
SRC_FILES = $(filter-out Thesis.tex, $(wildcard *.tex))
.PHONY: Thesis.pdf all clean
all: $(patsubst %.dot,%.svg,$(wildcard *.dot)) Thesis.pdf
%.tex:
for name in *.tex; do
echo '$< =' "$<" '$name =' "$name"
@SamuelMarks
SamuelMarks / article.md
Created June 20, 2020 09:53
Open-source isn't racist. Stop attacking us.
View article.md

Recently there has been a push towards renaming 'master' to 'main' in all git repositories. Advocates reason that the terminology is noninclusive, and has racist overtones[1]--[5].

@Una @github It's a great idea and we are already working on this! cc @billygriffin22{width="6.5in" height="2.5375in"}

CEO of GitHub, [6]

The alleged offensive meaning of master and slave in computer coding is

@SamuelMarks
SamuelMarks / tpu.md
Last active January 22, 2020 00:12
Nothing to TPU in 5 Google Cloud commands
View tpu.md

Google Cloud configuration

First: install the CLI program for your distribution: https://cloud.google.com/sdk/install

Parameters

Modify accordingly:

export REGION='us-central1'
export ZONE='us-central1-f'
export PROJECT_NAME='proj'