This file contains hidden or 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
(ns homomorph.core | |
(:gen-class)) | |
(import java.security.SecureRandom) | |
(defn lcm [a b] (.divide (.multiply a b) (.gcd a b))) | |
(defn makePublicKey [bits nn] | |
(let [n (biginteger nn)] | |
{ | |
:bits (biginteger bits) | |
:n n | |
:n2 (.pow n 2) |
This file contains hidden or 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
genomeTypes = | |
Dict( | |
[0,0,0,1] => "1", | |
[0,0,1,0] => "2", | |
[0,0,1,1] => "3", | |
[0,1,0,0] => "4", | |
[0,1,0,1] => "5", | |
[0,1,1,0] => "6", |
This file contains hidden or 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
This is a basic draft of the API right now. | |
`GET /events` | |
[{ | |
"name": "Tombert's Cool Event", | |
"id":1, | |
"data":"{ | |
\"date\":\"12-15-2016\", | |
\"description\":\" Where tomberts come to grow \" |
This file contains hidden or 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/python3 | |
import calendar | |
import time | |
seed = calendar.timegm(time.gmtime()) # We'll use the epoch time as a seed. | |
def random (seed): | |
seed2 = (seed*297642 + 83782)/70000 | |
return int(seed2) % 70000; |
This file contains hidden or 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
require 'digest/md5' | |
def hashKey(key) | |
md5 = Digest::MD5.hexdigest("bobby" | |
int_md5 = md5.to_i(16) | |
return int_md5 % max_length | |
end |
This file contains hidden or 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
server { | |
listen 80; | |
server_name brucewillis.sexy; | |
return 301 https://www.brucewillis.sexy$request_uri; | |
} | |
server { | |
listen 443 ssl; | |
server_name brucewillis.sexy www.brucewillis.sexy; |
This file contains hidden or 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 <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> | |
#include <netinet/ip.h> /* superset of previous */ | |
int main( int argc, char **argv){ | |
int tcp_socket; |
This file contains hidden or 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
==> cowboy (compile) | |
Compiled src/cowboy_acceptors_sup.erl | |
Compiling src/cowboy_listener.erl failed: | |
src/cowboy_listener.erl:30: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
src/cowboy_listener.erl:211: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
src/cowboy_listener.erl:211: type queue/0 is deprecated and will be removed in OTP 18.0; use use queue:queue/0 or preferably queue:queue/1 | |
Could not compile dependency cowboy, /usr/bin/rebar command failed. If you want to recompile this dependency, please run: mix deps.compile cowboy |
This file contains hidden or 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
-- Standard awesome library | |
local gears = require("gears") | |
local awful = require("awful") | |
awful.rules = require("awful.rules") | |
require("awful.autofocus") | |
-- Widget and layout library | |
local wibox = require("wibox") | |
-- Theme handling library | |
local beautiful = require("beautiful") | |
-- Notification library |
This file contains hidden or 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
<p>A generalization for all even numbers is <br> | |
<span class="MathJax_Preview"></span><div class="MathJax_Display" role="textbox" aria-readonly="true" style="text-align: center;"><span class="MathJax" id="MathJax-Element-1-Frame"><nobr><span class="math" id="MathJax-Span-1" style="width: 1.143em; display: inline-block;"><span style="display: inline-block; position: relative; width: 0.995em; height: 0px; font-size: 112%;"><span style="position: absolute; clip: rect(1.639em 1000.002em 2.631em -0.394em); top: -2.478em; left: 0.002em;"><span class="mrow" id="MathJax-Span-2"><span class="mn" id="MathJax-Span-3" style="font-family: STIXGeneral-Regular;">2</span><span class="mi" id="MathJax-Span-4" style="font-family: STIXGeneral-Italic;">k<span style="display: inline-block; overflow: hidden; height: 1px; width: 0.002em;"></span></span></span><span style="display: inline-block; width: 0px; height: 2.483em;"></span></span></span><span style="border-left-width: 0.003em; border-left-style: solid; display: inline-block |