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
| # Executable transcript of https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04 | |
| sudo apt update | |
| sudo apt install -y openvpn easy-rsa python | |
| make-cadir ~/openvpn-ca | |
| cd ~/openvpn-ca | |
| cat <<EOT >> vars | |
| # New values | |
| export KEY_COUNTRY="EE" | |
| export KEY_PROVINCE="Some Province" |
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
| import sqlalchemy as sa | |
| import pandas as pd | |
| e = sa.create_engine("sqlite:///raw_data.sqlite") | |
| pd.read_csv("raw_data.csv").to_sql("raw_data", e) |
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
| select | |
| s.Key | |
| v1.AverageTimeSpent, | |
| v1.NumberOfClicks, | |
| v2.Country | |
| v3.Purchase as Target | |
| from vw_TrainSample s | |
| left join vw_BehaviourFeatures v1 on v1.Key = s.Key | |
| left join vw_ProfileFeatures v2 on v2.Key = s.Key | |
| left join vw_TargetFeatures v3 on v3.Key = s.Key |
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
| with _BehaviourFeatures as ( | |
| ... inline the view definition ... | |
| ), | |
| _ProfileFeatures as ( | |
| ... inline the view definition ... | |
| ), | |
| _ModelInputs as ( | |
| ... concatenate the feature columns ... | |
| ) | |
| select |
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
| // https://nauka.leprosorium.ru/comments/2349993/ | |
| #include <iostream> | |
| #include <chrono> | |
| using namespace std; | |
| using namespace std::chrono; | |
| long long f(int x) { | |
| if (x < 0) 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
| // Greedy solver for https://leprosorium.ru/comments/2379244/ | |
| let modeMap = {"fa-ellipsis-v": ":", | |
| "fa-ellipsis-h": "..", | |
| "fa-arrows-alt-v": "|", | |
| "fa-arrows-alt-h": "-", | |
| "fa-plus": "+", | |
| "fa-bomb": "[]", | |
| "fa-trash": "X", | |
| "fa-skull": "@"}; |
OlderNewer