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=2602970321841479 | |
g=2 | |
x=2064002103016912 | |
A=1376951019743626 | |
K=1443056703658992 | |
K_inv1 = power_mod(K, p-2, p) | |
K_inv2 = xgcd(p, K)[2] % p | |
K_inv3 = power_mod(A, p - 1- x, p) | |
print K_inv1* K % p | |
print K_inv2 * K % p |
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
var SURROGATE_PAIR_REGEXP = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, | |
// Match everything outside of normal chars and " (quote character) | |
NON_ALPHANUMERIC_REGEXP = /([^\#-~| |!])/g; | |
function encodeEntities(value) { | |
return value. | |
replace(/&/g, '&'). | |
replace(SURROGATE_PAIR_REGEXP, function(value) { | |
var hi = value.charCodeAt(0); | |
var low = value.charCodeAt(1); |
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
<h1>Databinding example</h1> | |
<p>What is your name?</p> | |
<input type="text" ng-model="name"/> | |
<p ng-if="!!name">Hello {{name}}.</p> |
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
def invMod(x, p): | |
return pow(x, p-2, p) | |
def addECC(x1,y1,x2,y2,a,b,p): | |
s = (invMod(x2-x1, p)*(y2-y1)) % p | |
if ((x1 - x2) % p == 0) and ((y1-y2) % p == 0): | |
s=(invMod(2*y1, p)*(3*x1*x1 + a)) % p | |
x3 = (s*s -x1 -x2) %p | |
y3 = (s*(x1-x3) -y1) % p | |
return x3,y3 |
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 HTML <?php print_r($data); ?> |
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
f=file('parameters','r') | |
lines=f.readlines() | |
f.close() | |
params = {} | |
currentHex='' | |
currentParam='' | |
def h2i(hexLines): | |
if (hexLines == ''): | |
return 0 |
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
Field Type: prime-field | |
Prime: | |
00:aa:dd:9d:b8:db:e9:c4:8b:3f:d4:e6:ae:33:c9: | |
fc:07:cb:30:8d:b3:b3:c9:d2:0e:d6:63:9c:ca:70: | |
33:08:71:7d:4d:9b:00:9b:c6:68:42:ae:cd:a1:2a: | |
e6:a3:80:e6:28:81:ff:2f:2d:82:c6:85:28:aa:60: | |
56:58:3a:48:f3 | |
A: | |
00:aa:dd:9d:b8:db:e9:c4:8b:3f:d4:e6:ae:33:c9: | |
fc:07:cb:30:8d:b3:b3:c9:d2:0e:d6:63:9c:ca:70: |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Welcome to the chat</title> | |
</head> | |
<body> | |
<p>Chat screen for MYUSERNAME <span class="lang">LANGUAGEHERE</span></p> | |
<hr> | |
<table border="1"> | |
<col style="width:10%"> |
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
def invMod(x, p): | |
return pow(x, p-2, p) | |
def addECC(x1,y1,x2,y2,a,b,p): | |
s = (invMod(x2-x1, p)*(y2-y1)) % p | |
if ((x1 - x2) % p == 0) and ((y1-y2) % p == 0): | |
s=(invMod(2*y1, p)*(3*x1*x1 + a)) % p | |
x3 = (s*s -x1 -x2) %p | |
y3 = (s*(x1-x3) -y1) % p | |
return x3,y3 |
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
var Twitter = require('twitter'); | |
var client = new Twitter({ | |
consumer_key: process.env.TWITTER_CONSUMER_KEY, | |
consumer_secret: process.env.TWITTER_CONSUMER_SECRET, | |
access_token_key: process.env.TWITTER_ACCESS_TOKEN_KEY, | |
access_token_secret: process.env.TWITTER_ACCESS_TOKEN_SECRET | |
}); | |
client.stream('statuses/filter', {track: 'jaguars'}, function(stream) { |