8.8.4.4
8.8.8.8
2001:4860:4860:0:0:0:0:64
2001:4860:4860:0:0:0:0:6464
2001:4860:4860:0:0:0:0:8844
2001:4860:4860:0:0:0:0:8888
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
| from Crypto.Util.number import GCD, bytes_to_long, long_to_bytes | |
| class CRT: | |
| def __init__(self, p, q): | |
| self.p_p_inv = p * pow(p,-1,q) | |
| self.p_q = p * q | |
| def calc(self, a, b): | |
| x = a + (b - a) * self.p_p_inv | |
| return x % self.p_q |
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
| #!/bin/bash | |
| # This script builds a (hopefully) working gcc based cross compiler | |
| # Update to latest stable release | |
| BINUTILS_VERSION=2.27 | |
| GMP_VERSION=6.1.2 | |
| MPFR_VERSION=3.1.5 | |
| MPC_VERSION=1.0.3 | |
| ISL_VERSION=0.16.1 | |
| GCC_VERSION=6.3.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
| #!/bin/bash | |
| # This script builds a (hopefully) working gcc based cross compiler | |
| # Update to latest stable release | |
| BINUTILS_VERSION=2.27 | |
| GMP_VERSION=6.1.2 | |
| MPFR_VERSION=3.1.5 | |
| MPC_VERSION=1.0.3 | |
| ISL_VERSION=0.16.1 | |
| GCC_VERSION=6.3.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
| (function(XHR) { | |
| "use strict"; | |
| var stats = []; | |
| var timeoutId = null; | |
| var open = XHR.prototype.open; | |
| var send = XHR.prototype.send; | |
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
| # Example of read_sql loading dataframe from database, using SQLAlchemy Models (possibily from flask app) | |
| # import pandas lib | |
| import pandas as pd | |
| # import sqlalchemy libs | |
| from flask_app.db import express_session | |
| from flask_app.models import SalesRegistry | |
| from flask_app.app import create_app, db |
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 'openssl' | |
| require 'openssl-extensions/all' | |
| keyfile = '/tmp/mycert.key' | |
| csrfile = '/tmp/mycert.csr' | |
| file = File.new(keyfile,'w',0400) | |
| key = OpenSSL::PKey::RSA.new 2048 | |
| file.write(key) |