Skip to content

Instantly share code, notes, and snippets.

View dionyziz's full-sized avatar
🐼

Dionysis Zindros dionyziz

🐼
View GitHub Profile
@dionyziz
dionyziz / sleepsort.cpp
Last active December 22, 2023 00:39
Sleep sort in C++
#include <cstdio>
#include <unistd.h>
#include <cstdlib>
pid_t engage(unsigned int i) {
pid_t pid = fork();
if (pid == 0) {
usleep(1000 * i);
printf("%i\n", i);
\usepackage{algorithm}
\usepackage{algpseudocode}
\def\chain{\mathcal{C}}
\newcommand{\true}{\textsf{true}}
\newcommand{\false}{\textsf{false}}
\begin{figure}[t]
\begin{algorithm}[H]
\caption{\label{alg.backbone} The backbone protocol}
const ADVERSARIAL_POWER = 0.49
const BLOCK_LIMIT = 500
const MONTE_CARLO = 10
function simulate() {
let honestBlocks = 1
let adversaryHeadStart = 0
let chainLength = 1
while (chainLength < BLOCK_LIMIT) {
import random
import matplotlib.pyplot as plt
import numpy as np
MONTE_CARLO_REPEAT = 30
TIME_INTERVAL = 100
def simulate(eta, Delta):
convergence_opportunities = 0
t = 0

A pseudonymous trust system for a decentralized anonymous marketplace

Dionysis Zindros, National Technical University of Athens dionyziz@gmail.com

Keywords

pseudonymous anonymous web-of-trust identity trust bitcoin namecoin proof-of-burn timelock decentralized anonymous marketplace openbazaar

Abstract

import pygame
from datetime import datetime
import math
BLACK = (0, 0, 0)
WHITE = (255, 255, 255)
RED = (255, 0, 0)
DIGITAL_H = 100 # height of digital clock
W = 700 # screen width
class List {
static fromArray(arr) {
if (arr.length == 0) {
return new EmptyList()
}
return new FullList(
arr[0],
() => List.fromArray(arr.slice(1))
)
}
/*
This has a compile error:
test3.cpp:14:18: error: use of undeclared identifier 'a'
std::cout << a;
^
1 error generated.
*/
#include <iostream>
template<typename T>
#include <cstdio>
#include <iostream>
using namespace std;
class A {
public:
virtual int a() {
return 5;
}
import java.io.*;
import java.util.*;
public class Solution {
public static class A {
}
public static class B extends A {