Skip to content

Instantly share code, notes, and snippets.

View PlasmaPower's full-sized avatar

Lee Bousfield PlasmaPower

View GitHub Profile
@PlasmaPower
PlasmaPower / diff-intersection.py
Last active November 22, 2023 06:02
Git diff intersection finder
#!/usr/bin/env python3
import argparse
import sys
from pathlib import PurePath
from unidiff import PatchSet
from unidiff.constants import LINE_TYPE_CONTEXT
parser = argparse.ArgumentParser(prog="diff-intersection")
@PlasmaPower
PlasmaPower / opencv-rust-error.log
Created October 16, 2023 21:19
Error building OpenCV Rust library
note: This could happen because of added/removed `cargo:rerun-if` instructions in the build script
Compiling opencv v0.85.1
Running `project/target/release/build/opencv-db4cc17ef44df09a/build-script-build`
[opencv 0.85.1] === Crate version: Some("0.85.1")
[opencv 0.85.1] === Environment configuration:
[opencv 0.85.1] === OPENCV_PACKAGE_NAME = None
[opencv 0.85.1] === OPENCV_PKGCONFIG_NAME = None
[opencv 0.85.1] === OPENCV_CMAKE_NAME = None
[opencv 0.85.1] === OPENCV_CMAKE_BIN = None
[opencv 0.85.1] === OPENCV_VCPKG_NAME = None
@PlasmaPower
PlasmaPower / host.c
Last active September 30, 2022 22:51
AMD ROCm OpenCL miscompilation
#define __global
#define __kernel
#define __constant const
#include <stdio.h>
void run_test(unsigned int zero, unsigned char *result);
int main() {
unsigned int result = 0;
run_test(0, (unsigned char *)&result);
// Taken from raiblock's openclwork.cpp
enum blake2b_constant
{
BLAKE2B_BLOCKBYTES = 128,
BLAKE2B_OUTBYTES = 64,
BLAKE2B_KEYBYTES = 64,
BLAKE2B_SALTBYTES = 16,
BLAKE2B_PERSONALBYTES = 16
};
diff --git a/discrete/discrete.py b/discrete/discrete.py
index e8cd187..e1cfbb6 100644
--- a/discrete/discrete.py
+++ b/discrete/discrete.py
@@ -105,6 +105,7 @@ def prove(x):
temp_s += dumb448.Scalar(2)**i*s[i]
if not temp_r == dumb25519.Scalar(0) or not temp_s == dumb448.Scalar(0):
raise ArithmeticError('Blinder sum check failed!')
+ r[0] += dumb25519.Scalar(1)

Keybase proof

I hereby claim:

  • I am plasmapower on github.
  • I am plasmapower (https://keybase.io/plasmapower) on keybase.
  • I have a public key ASD789yxGtKuGphcCCyhv4wjlYKuabyOVPt733qi0NjW1wo

To claim this, I am signing this object:

Here are my recommended tangram whitepaper fixes:

Section 3.3:

With strong commitment to research and development means that we are constantly looking for
new innovative ways to enhance online security, with the long-term ambition of establishing a

The first part needs reworded. "With X means that Y" isn't grammatically correct.

extern crate lmdb_zero as lmdb;
extern crate nanocurrency_types;
use lmdb::LmdbResultExt;
use nanocurrency_types::Account;
use std::collections::HashMap;
use std::env;
fn get_pattern(addr: &str) -> [u8; 64] {
let mut res = [0u8; 64];
const compose = require('koa-compose');
const sleep = require('sleep-promise');
/**
* Simple App Structure.
*/
class App {
constructor () {
this.middleware = [];
16c16
< 'desktop-file-utils' 'hicolor-icon-theme')
---
> 'desktop-file-utils' 'hicolor-icon-theme' 'ncurses5-compat-libs')
22a23
> options=('!strip')
47c48
< [icu]=icu
---
> #[icu]=icu # NACL doesn't like this