Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Schultz Sembiance

View GitHub Profile
@Sembiance
Sembiance / dl2gl.c
Created May 28, 2021
C code that converts a DL file to GL
View dl2gl.c
/*
* dltogl.c -- convert .DL animations into .GL animations.
*
* usage: dltogl file.dl [file.gl]
*
* If no .gl file is specified, the images and control file will be
* written to separate files. The control file will always be "dl.txt",
* the images "clpN.clp" and a palette file called "palette.pic".
*
* Author:
@Sembiance
Sembiance / kygload.c
Created May 15, 2021
kygFormat image parsing code
View kygload.c
/*
--- Kyss presents ---
kygload.c : Kyss graphics format loader
Last update : 1992-02-28 version 0.10
for "TOWNS-GCC"
*/
@Sembiance
Sembiance / tesnorServer.py
Created Mar 19, 2021
Example lobe.ai tensor server using Flask
View tesnorServer.py
import os
import logging
from PIL import Image
from flask import Flask, request, jsonify
from TensorModel import TensorModel
app = Flask(__name__)
logging.getLogger('werkzeug').setLevel(logging.WARNING)
@Sembiance
Sembiance / gimp-appimage-2.10.21_p20200924.ebuild
Created Oct 1, 2020
Gentoo ebuild for GIMP AppImage version with resynthesizer
View gimp-appimage-2.10.21_p20200924.ebuild
EAPI="7"
DESCRIPTION="GNU Image Manipulation Program - AppImage version with Resynthesizer plugin"
HOMEPAGE="https://github.com/aferrero2707/gimp-appimage"
MY_PV="${PV/_p/-}"
APPIMAGE_FILENAME="GIMP_AppImage-git-${MY_PV}-withplugins-x86_64.AppImage"
SRC_URI="https://github.com/aferrero2707/${PN}/releases/download/continuous/${APPIMAGE_FILENAME}"
S="${WORKDIR}"
@Sembiance
Sembiance / test.c
Created Jul 24, 2020
Test abydos crash
View test.c
// Place in current working directory: https://telparia.com/fileFormatSamples/image/SPRITESCO.ABK
// Compile with: gcc -I/usr/include/cairo -I/usr/include/abydos -lm -lcairo -labydos-0.2 -o test test.c
// Run as: ./test
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include <string.h>
#include <assert.h>
@Sembiance
Sembiance / validate.js
Created Oct 22, 2012
Sample JSON validation
View validate.js
var jsonSchema = require("json-schema");
var mySchema = { name : "test", type : "object", additionalProperties : false, properties : { fullName: { type : "string" } } };
var myObject = { fullName : "John Doe" };
var schemaResult = jsonSchema.validate(myObject, mySchema);
if(!schemaResult.valid)
return schemaResult.errors;
@Sembiance
Sembiance / advanced_object.json
Created Jan 13, 2012
JSON objects, schema and benchmark code
View advanced_object.json
{
fullName : "John Doe",
age : 47,
state : "Massachusetts",
city : "Boston",
zip : 02201,
married : false,
dozen : 12,
dozenOrBakersDozen : 13,
favoriteEvenNumber : 14,
@Sembiance
Sembiance / redis-key-stats.c
Created Oct 3, 2011
C program using hiredis to gather key statistics from a redis server
View redis-key-stats.c
/*
1. Install hiredis:
git clone git://github.com/antirez/hiredis.git
cd hiredis
make
make install
2. Build C program:
gcc -o redis-key-stats -lhiredis -I/usr/local/include/hiredis redis-key-stats.c