Skip to content

Instantly share code, notes, and snippets.

View compscidr's full-sized avatar

Jason Ernst compscidr

View GitHub Profile
import io.mockk.every
import io.mockk.slot
import io.mockk.spyk
import org.junit.jupiter.api.Test
import kotlin.test.assertEquals
class SomeClass {
fun isInWindow(x: Int): Boolean {
if (x < 1000) {
return true
@compscidr
compscidr / Dockerfile
Created February 15, 2023 06:30
ChatGpt podcast creator recomendations
FROM python:3.9
# Install necessary packages
RUN pip install google-auth google-auth-oauthlib google-auth-httplib2 google-api-python-client spacy
# Download the spaCy model data
RUN python -m spacy download en_core_web_sm
# Copy the Python code to the container
WORKDIR /app
@compscidr
compscidr / blockchain-rundown.csv
Created February 8, 2018 03:11
Comparison Table of Blockchain Approaches
Tech Programming Language Support Number of Users Verifying the Chain (Full nodes) Number of Miners Number of Active Developers (Internal and External) Time Since Launch Code Commits Number of Forks Average Cost per Transaction Average Transactions / Second Smart Contract Support Payment Channel Support Algorithms for Transaction Signatures & Average Runtime of these algorithms on Mobile Phones Support for Anonymity Market Cap Wallet Support
bitcoin 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
lightning network 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
bitcoin cash 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ethereum 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
cardano 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
steller 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
nem 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
litecoin 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
counterparty 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
@compscidr
compscidr / datahandle.java
Created January 8, 2018 17:34
Data Handling RM
private void handleDataReceived(MeshManager.RightMeshEvent e) {
final MeshManager.DataReceivedEvent event = (MeshManager.DataReceivedEvent) e;
runOnUiThread(new Runnable() {
@Override
public void run() {
// Toast data contents.
String message = new String(event.data);
Toast.makeText(MainActivity.this, event.peerUuid.toString() + ":"
+ message, Toast.LENGTH_SHORT).show();
@compscidr
compscidr / rminit.java
Created January 4, 2018 20:25
Bare Minimial RightMesh Init Handling
@Override
public void meshStateChanged(MeshID uuid, int state) {
if (state == MeshStateListener.SUCCESS) {
try {
// Binds this app to MESH_PORT.
// This app will now receive all events generated on that port.
mm.bind(HELLO_PORT);
mm.on(PEER_CHANGED, this::handlePeerChanged);
mm.on(DATA_RECEIVED, this::dataReceived);
} catch (RightMeshException e) {

Keybase proof

I hereby claim:

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

To claim this, I am signing this object: