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
/* | |
James William Fletcher (github.com/mrbid) | |
February 2021 | |
Mission critical file increments. | |
https://james-william-fletcher.medium.com/mission-critical-integer-increment-operations-from-php-c1c71fb42451 | |
This file is compiled to a program that any | |
service can externally execute to ensure | |
a file increment or decrement operation |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Mission critical file increments. Variant 2. | |
https://james-william-fletcher.medium.com/mission-critical-integer-increment-operations-from-php-c1c71fb42451 | |
This file is compiled to a program that any | |
service can externally execute to ensure | |
a file increment or decrement operation |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Mission critical file increments. Variant 3. | |
https://james-william-fletcher.medium.com/mission-critical-integer-increment-operations-from-php-c1c71fb42451 | |
This file is compiled to a program that any | |
service can externally execute to ensure | |
a file increment or decrement operation |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Simple math function benchmark using RDTSC. | |
https://james-william-fletcher.medium.com/rdtsc-the-only-way-to-benchmark-fc84562ef734 | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Simple math function benchmark using RDTSC. | |
https://james-william-fletcher.medium.com/rdtsc-the-only-way-to-benchmark-fc84562ef734 | |
*/ | |
#define _GNU_SOURCE | |
#include <stdio.h> | |
#include <stdlib.h> |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Benchmarking random float functions. | |
https://james-william-fletcher.medium.com/benchmarking-random-float-functions-in-c-13b9febb3d5b | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> |
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
/* | |
James William Fletcher (github.com/mrbid) | |
August 2021 | |
Benchmarking random float functions using | |
the box muller transformation. | |
https://james-william-fletcher.medium.com/benchmarking-random-float-functions-in-c-13b9febb3d5b | |
*/ | |
#include <stdio.h> |
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
/* | |
James William Fletcher (github.com/mrbid) | |
October 2022 | |
compile: gcc random_float_bench_2022.c -Ofast -lm -o main | |
Benchmarking random float functions, an update to the original in August 2021: | |
https://gist.github.com/mrbid/51ed2963c88981452a5f87a3b072f8fb | |
https://james-william-fletcher.medium.com/benchmarking-random-float-functions-in-c-13b9febb3d5b | |
*/ |
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
# Code adapted from the original article by Orhan G. Yalçın | |
# https://towardsdatascience.com/fast-neural-style-transfer-in-5-minutes-with-tensorflow-hub-magenta-110b60431dcc | |
# For use in the following article concerning Real-Time NST in ioQuake3: | |
# https://james-william-fletcher.medium.com/real-time-neural-style-transfer-in-quake3-71cd5f6c3e4 | |
import tensorflow as tf | |
import tensorflow_hub as hub | |
import sys | |
import time | |
import os |
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
/* | |
James William Fletcher (github.com/mrbid) | |
https://gist.github.com/mrbid/deacf1f19ec521de68d1c017977a2653 | |
This code is an adaption of; | |
https://stackoverflow.com/questions/34176795/any-efficient-way-of-converting-ximage-data-to-pixel-map-e-g-array-of-rgb-quad/38298349#38298349 | |
It will loop indefinitely generating a new output to /dev/shm/dbuff.png every time the existing dbuff.png is deleted. | |
It should generate ~60 fps when compiled with GCC, or around 16 fps with clang for some reason. ¯\_(ツ)_/¯ |
OlderNewer