This file contains 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
# enable forwarding for kernel | |
#vim /etc/sysctl.conf | |
#sudo sysctl --system | |
iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port xxxx | |
apt-get install iptables-persistent |
This file contains 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
@font-face { | |
font-family: "Source Sans Pro"; | |
font-style: normal; | |
font-display: swap; | |
font-weight: 300; | |
src: local("Source Sans Pro Light"), local("SourceSansPro-Light"), | |
url([:q | |
[.CdnPrefix]]]/en/fonts/source-sans-300-cyrillic-ext.woff2) | |
format("woff2"); | |
unicode-range: U+0460-052F, U+1C80-1C88, U+20B4, U+2DE0-2DFF, U+A640-A69F, |
This file contains 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
using DataStructures | |
using DSP | |
#= | |
ZS1 and ZS2 based on ALGORITHMS explained in : | |
FAST ALGORITHMS FOR GENERATING | |
INTEGER PARTITIONS | |
ANTOINE ZOGHBIU and IVAN STOJMENOVIC* | |
Bell Northern Research, P.O . Box 35 I I , Station C , Mail Stop 091 , | |
Ottawa, Ontario KIY 4H7, Canada; | |
Computer Science Department, SITE, University of Ottawa, |
This file contains 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 primitive_triples(depth::Int64, max_sum::Int64 = 0, list::Bool = false) | |
#= | |
depth : tree depth | |
each depth adds 3^i new triples each depth. | |
total triples with depth 'd' : ∑_(i=0;d) 3^i | |
max_sum : maximum perimeter of the right triangle formed by the triples, breaks if the limit (max_sum) is reached, but includes the last 3 triples one of which exceed the limit. | |
0 is the default value, to ignore any restrictions. | |
list : return a flat array of the triples | |
=# |