Lets quickly build up a ECC system so that we are all on the same page.
First, define a finate field F_q where q is a large prime.
Operations in F_q are all done modulo q.
from random import random | |
def busy_block(stepper): | |
res = None | |
while stepper is not None: | |
stepper, res = stepper() | |
print(res) | |
return res |
float angle(vec2 uv) { | |
float a = atan(uv.y / uv.x); | |
if (uv.x < 0.) { | |
a += PI; | |
} | |
if (uv.x > 0. && uv.y < 0.) { | |
a += PI2; | |
} | |
return a; | |
} |
#include <stdio.h> | |
#include <time.h> | |
#include <ApplicationServices/ApplicationServices.h> /* ApplicationServices.framework needed */ | |
char *logFileName = "./keystroke.log"; | |
FILE *logFile = NULL; | |
int counter = 0; | |
struct timespec prev_time; |
void setup() { | |
size(500, 500); | |
} | |
void tree(float x, float y, float length, float angle) { | |
if (length < 2) { | |
return; | |
} | |
float ny = y - length * sin(angle); | |
float nx = x + length * cos(angle); |
import java.awt.event.KeyEvent; | |
float drag = 0.9; | |
class Point { | |
float x, y, vx, vy; | |
Point(float x, float y) { | |
this.x = x; | |
this.y = y; |
int count = 1; | |
void setup() { | |
size(500, 500); | |
} | |
void keyPressed() { | |
if (keyCode == UP) { | |
count += 1; | |
} else if (keyCode == DOWN) { |
from random import shuffle | |
from math import log2, floor | |
def main(): | |
A = list(range(15)) | |
B = list(range(10)) | |
print("Before:\t A =", A) | |
print("\t B =", B) | |
N = len(A) | |
P = 5 # Number of procs |
(require 'package) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) ;; You might already have this line | |
(require 'multiple-cursors) |
FROM tutum/nginx | |
RUN rm /etc/nginx/sites-enabled/default | |
ADD sites-enabled/ /etc/nginx/sites-enabled | |
ADD static/ /www/static | |
# the directory structure of the nginx component: | |
# ./nginx | |
# ├── Dockerfile | |
# ├── sites-enabled | |
# │ └── app |