Skip to content

Instantly share code, notes, and snippets.

View mufaka's full-sized avatar

Bill Nickel mufaka

  • La Jolla Digital
  • Southern California
  • 22:26 (UTC -07:00)
View GitHub Profile
@mufaka
mufaka / HelloWorld.cl
Created March 31, 2024 16:52
Silk.NET OpenCL Kernel Base
__kernel void hello_kernel(__global const float* a, __global const float* b, __global float* result)
{
int gid = get_global_id(0);
result[gid] = a[gid] + b[gid];
}
@mufaka
mufaka / Assert.cs
Created February 23, 2024 16:57
Minimal Semantic Kernel connector for Google Gemini (Bard)
using System.Diagnostics.CodeAnalysis;
using System.Runtime.CompilerServices;
namespace Connectors.Gemini
{
/* Copied from decompilation of Microsoft.SemanticKernel internal class Verify decompilation */
[ExcludeFromCodeCoverage]
internal static class Assert
{
//
@mufaka
mufaka / TM_SpeedReader.js
Created May 23, 2022 04:33
Tamper Monkey script inspired by bionic reading. Changes paragraph text to use Bookerly font and setting a lower opacity for the second half of all words (or beyond 5 characters).
// ==UserScript==
// @name Speed Reader
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Changes font to Bookerly and highlights the beginning of words.
// @author Bill Nickel
// @match *://*/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js
// @resource BOOKERLY_CSS http://fonts.cdnfonts.com/css/bookerly
// @grant GM_getResourceText
from random import randint
import os
from ship import Ship
from questions import GetRandomQuestion
# board height
row_size = 9
# board width
col_size = 9