Skip to content

Commit

Permalink
make day25 work in browser
Browse files Browse the repository at this point in the history
  • Loading branch information
shahata committed Dec 29, 2023
1 parent c5b4d1e commit fd35ee7
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 41 deletions.
38 changes: 23 additions & 15 deletions cert.pem
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
-----BEGIN CERTIFICATE-----
MIICpDCCAYwCCQCBpbEXUYmxMDANBgkqhkiG9w0BAQsFADAUMRIwEAYDVQQDDAkx
MjcuMC4wLjEwHhcNMjMwMTA2MTMwNzM2WhcNMzMwMTAzMTMwNzM2WjAUMRIwEAYD
VQQDDAkxMjcuMC4wLjEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8
osKSbpNGrv5/X3ztgJaBYqEYnE9q4FEraLr02Ex4W+XB5EaBLeFTr4wo0Z9yKXEX
ePMbTwT7igF5vsdfuAiVQ/r7KTWJnfz6o0cBlqdG99zzHP6Dz3g/OIbsUlGJvIGM
TTsldgEECzXS0EvCwX2Ym+tEEdetvTE/RtkhdwvMKPe5w4lEBLx2EgDzhVgZemry
wqSz6kuudnilmcDC2WmpaNGfLhLU1MOkk+irZ8XarGfbxbqN7fX6Q3Ru7eSuW/Xd
Tg3iPgQJ/Mbe2KqskYmuGTMCGQr4odgowRi4Cu59KYJLJRkGuRbGgWn8UW55koSR
4bW5h//K/TQFDvGtZu9nAgMBAAEwDQYJKoZIhvcNAQELBQADggEBAAaeMOrs9iqz
z/vF+MHLp6kKHY4bxLri2WSlVVukKs1uA07+rIlaabe1vIGMEpiw1eu3xdIM0EAr
YQzrkLWambrpxOHRYbb2j2P4slU1tlPx7PYH8ItjRmoQJ+av2aXS8farZyVuQBwB
Vr+H4zjpUVoICszrRquAVTmDTnsvWTCl+OxK64s7ssQGq4w3D1eGdzL7ZCgGdPa2
IgOBj1FpYQvypRMBbzhHO0cwSKZnz41eisQZGlJY/gHqMx1Jg2RUbjKLYTd1pS7u
a3RlRK/1/rX8al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cL7yzo+j6u3PNXMeiJsCyC7U1QEQ2B/GotrGJi/FD+
bmRbzVadIBkjxhOCKhmm+68ArQPkdnkKfuLrzT3dSbpkfsQvWlPO7zfZY0pXZzp3
M8TVdxj1zBH7/h2q3z9tz6a2W3HWb1edB2ZewJ1k7SLBDPqsmpf7Y9g7iGFfVC3p
8WTf4889ohrijusRuWudQnuGR5ffn0C4Fr+PZ4w4je9ZVGT+98iPKIqrTv4Jmhqe
aDLdOKeYtS0yTfzUFHOvFagP/m3AaUy8U1MfEoLKj47mwiRqP5EfgZRgFLzuOqF+
km85w0aPDttA3GSb9fVltcdHRiZSiggvGmYjU0FyMu0/xEM/xsEzj4MMARn4jAIi
yEoWDPzbvuk6nGgFoL4A+YbV7cYwcXN+lBJtNv67A8UNTP9g1xqTxnfR72wcyb8U
M07DgW9XLs1FhHdU5GSa
-----END CERTIFICATE-----
52 changes: 26 additions & 26 deletions key.pem
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
-----BEGIN PRIVATE KEY-----
MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQC8osKSbpNGrv5/
X3ztgJaBYqEYnE9q4FEraLr02Ex4W+XB5EaBLeFTr4wo0Z9yKXEXePMbTwT7igF5
vsdfuAiVQ/r7KTWJnfz6o0cBlqdG99zzHP6Dz3g/OIbsUlGJvIGMTTsldgEECzXS
0EvCwX2Ym+tEEdetvTE/RtkhdwvMKPe5w4lEBLx2EgDzhVgZemrywqSz6kuudnil
mcDC2WmpaNGfLhLU1MOkk+irZ8XarGfbxbqN7fX6Q3Ru7eSuW/XdTg3iPgQJ/Mbe
2KqskYmuGTMCGQr4odgowRi4Cu59KYJLJRkGuRbGgWn8UW55koSR4bW5h//K/TQF
DvGtZu9nAgMBAAECggEAc1waH9ENsklsjFrKHLjp0gCOQm29R8AdA64Nv5TT1ztk
HBpNX8y+Ix6VWZUwrHFZnyAxlD7T7jyswFaCuS/j19z2DUlbW2jKAEGAOCF49Ta5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dKgWcLFm8Mv0JNaxqi8V3u
Vo96/v+AH/2SfDWEtLYKHLXYlIF4EloHdr7WFWzXASYMqeZ9sgvgNsio1HHVwVkO
uJ6gCFG7+wKBgEmU8cErnvY8hZjCB9V4PMauGUyfUAeQtXRGpTOgYHi2ic3BQWhe
p6ONfX0CWHe89iPSxZoOxiji8+AUzzqJjXmvSHOWT3s7fgiqJYlhc6dir0pmV7JM
EYk1J+3J+nCOqbBZpFbLKNgMeV4qJEvROLxM5iXPRd4fr2Z/pplkYJvJAoGAdg85
Y4Un4yRcqhjrZGwrpnKk24mjSU4FeD7ikpdyyAgycy/QdIMJx8FePROHwuvYZxyl
EzkTe7QzP3rjwBFinRXrFfpfuT5HbE/OK/unZkQiQF83DmCJBoOhRSzoILiT4BrR
S0apvl4lLXZQFk+wkKbivrN5DluQVTzFHlH2FiECgYBxcq+XvyEglNmwVuuw/+wm
rQyVICMjm4TM0dj+OZFoHBKGNXAKcFEQ8pQycItycVK+8pQiNGicIm/qLwRkMzuO
7PrKcHZskgJeXgR1vCzwDfhTLBDT7zZkm16inAfUT8YUmPmfxYtZa23UV06HAVn2
4he41t4x9g5Q4EbOMJsGAg==
-----END PRIVATE KEY-----
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"inquirer": "^9.2.12",
"node-forge": "^1.3.1",
"progress": "^2.0.3",
"regenerator-runtime": "^0.14.1",
"z3-solver": "^4.12.4"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions src/2023/day25.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'regenerator-runtime';
import { mincut } from '@graph-algorithm/minimum-cut';

function graphSize(graph, component, ignored, visited = new Set()) {
Expand Down
2 changes: 2 additions & 0 deletions src/utils/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ const unpkg = (name, suffix = '') => ({
});

export const imports = {
...skypack('regenerator-runtime'),
...skypack('async-mutex'),
...skypack('z3-solver'),
...skypack('@datastructures-js/priority-queue'),
...skypack('combinatorial-generators'),
...skypack('chart.js'),
...skypack('@graph-algorithm/minimum-cut'),
...unpkg('node-forge', '/dist/forge.min.js'),
...unpkg('es-module-shims'),
};

0 comments on commit fd35ee7

Please sign in to comment.