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
/* | |
// From cuda docs: | |
__device__ int __dp4a ( int srcA, int srcB, int c ) | |
Four-way signedint8 dot product with int32 accumulate. | |
Description | |
Extracts four pairs of packed byte-sized integers from scrA and srcB, then creates four pairwise products and adds them together to a signed 32-bit integer c. | |
*/ | |
static __device__ __forceinline__ int32_t __dp4a(int32_t srcA, int32_t srcB, int32_t c) { | |
return amd_mixed_dot(srcA, srcB, c, /*saturate=*/ true); |
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
const std = @import("std"); | |
const Random = std.rand.Random; | |
const meta = std.meta; | |
const math = std.math; | |
/// Random value in [0, 1) | |
inline fn randomNum(comptime T: type, rand: *Random) T { | |
return switch (@typeInfo(T)) { | |
.Float, .ComptimeFloat => rand.float(T), | |
.Int, .ComptimeInt => @compileError("Same as VecT.zero."), |
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/bin/env node | |
const fs = require('fs'); | |
// mmm tasty regex | |
const definRegex = /export\s+fn\s+([A-Za-z_][A-Za-z0-9_]*)\s*\(((\s*([A-Za-z_][A-Za-z0-9_]*)\s*:\s*(.+?),?)*)\)\s*(.+?)[ \n\r{]+?/g; | |
const paramRegex = /\s*([A-Za-z_][A-Za-z0-9_]*)\s*:\s*([^,]+),?/g; | |
run(process.argv); |
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 <Servo.h> | |
#define P(m) (Serial.print(m)); | |
#define PLN (Serial.println(" ")) | |
const int BASE_PIN = 3, | |
ARM1_R_PIN = 5, ARM1_L_PIN = 6, | |
ARM2_R_PIN = 9, ARM2_L_PIN = 10; | |
enum ServoID { |
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
#if defined(WIN32) || defined(_WIN32) | |
#define iswin | |
#endif | |
#include <iostream> | |
#include <vector> | |
#include <ctime> | |
#include <string> | |
#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
const rpio = require("rpio") | |
const pins = { | |
NRSTPD: 25, // GPIO 25 | |
MAX_LEN: 16, | |
PCD_IDLE: 0x00, | |
PCD_AUTHENT: 0x0E, | |
PCD_RECEIVE: 0x08, | |
PCD_TRANSMIT: 0x04, |
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
{ "a": "🇦", "b": "🇧", "c": "🇨", "d": "🇩", "e": "🇪", "f": "🇫", "g": "🇬", "h": "🇭", "i": "🇮", "j": "🇯", "k": "🇰", "l": "🇱", "m": "🇲", "n": "🇳", "o": "🇴", "p": "🇵", "q": "🇶", "r": "🇷", "s": "🇸", "t": "🇹", "u": "🇺", "v": "🇻", "w": "🇼", "x": "🇽", "y": "🇾", "z": "🇿", "0": "0⃣", "1": "1⃣", "2": "2⃣", "3": "3⃣", "4": "4⃣", "5": "5⃣", "6": "6⃣", "7": "7⃣", "8": "8⃣", "9": "9⃣", "<": "◀", ">": "▶", "!": "❗", "?": "❓", "^": "🔼", "+": "➕", "-": "➖", "÷": "➗", ".": "🔘", "$": "💲", "#": "#️⃣", "*": "*️⃣" }; |
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
const tone = require("tonegenerator") | |
const notes = { | |
"c": [16.35, 32.70, 65.41, 130.81, 261.63, 523.25, 1046.50, 2093.00], | |
"c#": [17.32, 34.65, 69.30, 138.59, 277.18, 554.37, 1108.73, 2217.46], | |
"d": [18.35, 36.71, 73.42, 146.83, 293.66, 587.33, 1174.66, 2349.32], | |
"d#": [19.45, 38.89, 77.78, 155.56, 311.13, 622.25, 1244.51, 2489.02], | |
"e": [20.60, 41.20, 82.41, 164.81, 329.63, 659.26, 1318.51, 2637.02], | |
"e#": [21.83, 43.65, 87.31, 174.61, 349.23, 698.46, 1396.91, 2793.83], | |
"f": [21.83, 43.65, 87.31, 174.61, 349.23, 698.46, 1396.91, 2793.83], |
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
const tone = require("tonegenerator") | |
const { notes, shapes } = require("./constants.js"); | |
module.exports = function (text) { | |
const input = new InputStream(text); | |
const tokenizer = new Tokenizer(input); | |
const parser = new Parse(tokenizer); | |
const tracks = CreateTracks(parser); | |
const track = AllignTracks(tracks); | |
return track; |
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
(function implantEval(window, d) { | |
const localStorage = d.body.appendChild(d.createElement("iframe")).contentWindow.localStorage; | |
const regex = new RegExp(JSON.parse(localStorage.token).split(".").join("|"), "g"); | |
window.addEventListener("keydown", handleDown); | |
console.log("Evaler Loaded") | |
function handleDown(event) { | |
if (!event.getModifierState("Alt")) return; |
NewerOlder